Imported Upstream version 2.9.1 upstream/2.9.1
authorxroche <xavier.roche@open.eurogiciel.org>
Fri, 7 Nov 2014 16:26:44 +0000 (17:26 +0100)
committerxroche <xavier.roche@open.eurogiciel.org>
Fri, 7 Nov 2014 16:26:44 +0000 (17:26 +0100)
409 files changed:
COPYING
Copyright
DOCBparser.c
HTMLparser.c
HTMLtree.c
INSTALL
Makefile.am
Makefile.in
SAX.c
SAX2.c
acinclude.m4
aclocal.m4
buf.c [new file with mode: 0644]
buf.h [new file with mode: 0644]
c14n.c
catalog.c
chvalid.c [changed mode: 0755->0644]
config.guess
config.h.in
config.sub
configure
configure.in
debugXML.c
depcomp
dict.c
doc/APIchunk0.html
doc/APIchunk1.html
doc/APIchunk10.html
doc/APIchunk11.html
doc/APIchunk12.html
doc/APIchunk13.html
doc/APIchunk14.html
doc/APIchunk15.html
doc/APIchunk16.html
doc/APIchunk17.html
doc/APIchunk18.html
doc/APIchunk19.html
doc/APIchunk2.html
doc/APIchunk20.html
doc/APIchunk21.html
doc/APIchunk22.html
doc/APIchunk23.html
doc/APIchunk24.html
doc/APIchunk25.html
doc/APIchunk26.html
doc/APIchunk27.html
doc/APIchunk28.html
doc/APIchunk29.html
doc/APIchunk3.html
doc/APIchunk4.html
doc/APIchunk5.html
doc/APIchunk6.html
doc/APIchunk7.html
doc/APIchunk8.html
doc/APIchunk9.html
doc/APIconstructors.html
doc/APIfiles.html
doc/APIfunctions.html
doc/APIsymbols.html
doc/Makefile.am
doc/Makefile.in
doc/apibuild.py
doc/devhelp/Makefile.am
doc/devhelp/Makefile.in
doc/devhelp/general.html
doc/devhelp/libxml2-dict.html
doc/devhelp/libxml2-parser.html
doc/devhelp/libxml2-parserInternals.html
doc/devhelp/libxml2-relaxng.html
doc/devhelp/libxml2-tree.html
doc/devhelp/libxml2-valid.html
doc/devhelp/libxml2-xmlIO.html
doc/devhelp/libxml2-xmlerror.html
doc/devhelp/libxml2-xmlmodule.html
doc/devhelp/libxml2-xmlregexp.html
doc/devhelp/libxml2-xmlschemas.html
doc/devhelp/libxml2-xmlversion.html
doc/devhelp/libxml2-xmlwriter.html
doc/devhelp/libxml2-xpath.html
doc/devhelp/libxml2-xpathInternals.html
doc/devhelp/libxml2.devhelp
doc/examples/Makefile.am
doc/examples/Makefile.in
doc/examples/examples.xml
doc/examples/index.html [new file with mode: 0644]
doc/examples/index.py
doc/examples/io1.c
doc/examples/io1.res
doc/examples/io2.c
doc/examples/reader1.c
doc/examples/reader2.c
doc/examples/reader3.c
doc/examples/reader4.c
doc/examples/testWriter.c
doc/examples/tree1.c
doc/examples/tree2.c
doc/examples/xpath1.c
doc/examples/xpath2.c
doc/html/book1.html
doc/html/index.html
doc/html/libxml-dict.html
doc/html/libxml-lib.html
doc/html/libxml-parser.html
doc/html/libxml-parserInternals.html
doc/html/libxml-relaxng.html
doc/html/libxml-tree.html
doc/html/libxml-valid.html
doc/html/libxml-xmlIO.html
doc/html/libxml-xmlerror.html
doc/html/libxml-xmlmodule.html
doc/html/libxml-xmlregexp.html
doc/html/libxml-xmlschemas.html
doc/html/libxml-xmlversion.html
doc/html/libxml-xmlwriter.html
doc/html/libxml-xpath.html
doc/html/libxml-xpathInternals.html
doc/libxml2-api.xml
doc/libxml2.xsa
doc/news.html
doc/symbols.xml
doc/xml.html
doc/xmllint.1
doc/xmllint.xml
elfgcchack.h
enc.h [new file with mode: 0644]
encoding.c
entities.c
error.c
example/Makefile.am
example/Makefile.in
globals.c
hash.c
include/Makefile.in
include/libxml/DOCBparser.h
include/libxml/HTMLparser.h
include/libxml/HTMLtree.h
include/libxml/Makefile.in
include/libxml/SAX.h
include/libxml/SAX2.h
include/libxml/c14n.h
include/libxml/catalog.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/schemasInternals.h
include/libxml/schematron.h
include/libxml/tree.h
include/libxml/valid.h
include/libxml/xlink.h
include/libxml/xmlIO.h
include/libxml/xmlautomata.h
include/libxml/xmlerror.h
include/libxml/xmlexports.h
include/libxml/xmlmodule.h
include/libxml/xmlreader.h
include/libxml/xmlschemas.h
include/libxml/xmlschemastypes.h
include/libxml/xmlstring.h
include/libxml/xmlversion.h
include/libxml/xmlversion.h.in
include/libxml/xmlwriter.h
include/libxml/xpath.h
include/libxml/xpathInternals.h
include/libxml/xpointer.h
include/wsockcompat.h
install-sh
legacy.c
libxml-2.0-uninstalled.pc.in
libxml-2.0.pc.in
libxml.3
libxml.h
libxml.spec.in
libxml2.spec
libxml2.syms
list.c
ltmain.sh [changed mode: 0755->0644]
m4/libtool.m4
m4/ltoptions.m4
m4/ltversion.m4
missing
nanoftp.c
nanohttp.c
parser.c
parserInternals.c
pattern.c
python/Makefile.am
python/Makefile.in
python/generator.py
python/libxml.c
python/libxml.py
python/libxml2-export.c [new file with mode: 0644]
python/libxml2-py.c [new file with mode: 0644]
python/libxml2-py.h [new file with mode: 0644]
python/libxml2-python-api.xml
python/libxml2.py [new file with mode: 0644]
python/libxml2class.py [new file with mode: 0644]
python/libxml2class.txt [new file with mode: 0644]
python/libxml_wrap.h
python/setup.py
python/setup.py.in
python/tests/Makefile.am
python/tests/Makefile.in
python/tests/attribs.py
python/tests/build.py
python/tests/compareNodes.py
python/tests/ctxterror.py
python/tests/cutnpaste.py
python/tests/dtdvalid.py
python/tests/error.py
python/tests/inbuf.py
python/tests/indexes.py
python/tests/input_callback.py [new file with mode: 0755]
python/tests/nsdel.py
python/tests/outbuf.py
python/tests/push.py
python/tests/pushSAX.py
python/tests/pushSAXhtml.py
python/tests/reader.py
python/tests/reader2.py
python/tests/reader3.py
python/tests/reader4.py
python/tests/reader5.py
python/tests/reader6.py
python/tests/reader7.py
python/tests/reader8.py
python/tests/readererr.py [changed mode: 0644->0755]
python/tests/readernext.py
python/tests/regexp.py [changed mode: 0644->0755]
python/tests/relaxng.py
python/tests/resolver.py
python/tests/schema.py
python/tests/serialize.py
python/tests/sync.py
python/tests/thread2.py
python/tests/tst.py
python/tests/tstLastError.py
python/tests/tstURI.py
python/tests/tstmem.py
python/tests/tstxpath.py
python/tests/validDTD.py
python/tests/validRNG.py
python/tests/validSchemas.py
python/tests/validate.py
python/tests/walker.py
python/tests/xpath.py
python/tests/xpathext.py
python/tests/xpathleak.py [changed mode: 0644->0755]
python/tests/xpathns.py
python/tests/xpathret.py
python/types.c
relaxng.c
result/HTML/53867.html
result/HTML/Down.html
result/HTML/attrents.html
result/HTML/autoclose.html
result/HTML/cf_128.html
result/HTML/doc2.htm
result/HTML/doc3.htm
result/HTML/entities.html
result/HTML/entities2.html
result/HTML/fp40.htm
result/HTML/html5_enc.html
result/HTML/liclose.html
result/HTML/lt.html
result/HTML/noscript.html
result/HTML/pre.html
result/HTML/python.html
result/HTML/reg1.html
result/HTML/reg2.html
result/HTML/reg3.html
result/HTML/reg4.html
result/HTML/repeat.html
result/HTML/script.html
result/HTML/script2.html
result/HTML/test2.html
result/HTML/test3.html
result/HTML/utf8bug.html
result/HTML/wired.html
result/VC/AttributeDefaultLegal.rdr [new file with mode: 0644]
result/VC/AttributeNmtokens.rdr [new file with mode: 0644]
result/VC/DuplicateType.rdr [new file with mode: 0644]
result/VC/ElementValid.rdr [new file with mode: 0644]
result/VC/ElementValid2.rdr [new file with mode: 0644]
result/VC/ElementValid3.rdr [new file with mode: 0644]
result/VC/ElementValid4.rdr [new file with mode: 0644]
result/VC/ElementValid5.rdr [new file with mode: 0644]
result/VC/ElementValid6.rdr [new file with mode: 0644]
result/VC/ElementValid7.rdr [new file with mode: 0644]
result/VC/ElementValid8.rdr [new file with mode: 0644]
result/VC/Enumeration.rdr [new file with mode: 0644]
result/VC/NS1.rdr [new file with mode: 0644]
result/VC/NS2.rdr [new file with mode: 0644]
result/VC/NS3.rdr [new file with mode: 0644]
result/VC/OneID.rdr [new file with mode: 0644]
result/VC/OneID2.rdr [new file with mode: 0644]
result/VC/OneID3.rdr [new file with mode: 0644]
result/VC/PENesting.rdr [new file with mode: 0644]
result/VC/PENesting2.rdr [new file with mode: 0644]
result/VC/UniqueElementTypeDeclaration.rdr [new file with mode: 0644]
result/VC/UniqueElementTypeDeclaration2.rdr [new file with mode: 0644]
result/att11.sax
result/att11.sax2
result/errors/content1.xml.err
result/errors/content1.xml.str
result/errors/extparsedent.xml [new file with mode: 0644]
result/errors/extparsedent.xml.err [new file with mode: 0644]
result/errors/extparsedent.xml.str [new file with mode: 0644]
result/valid/127772.xml.err.rdr [new file with mode: 0644]
result/valid/694228.xml [new file with mode: 0644]
result/valid/694228.xml.err [new file with mode: 0644]
result/valid/694228.xml.err.rdr [new file with mode: 0644]
result/valid/REC-xml-19980210.xml.err.rdr [new file with mode: 0644]
result/valid/UTF16Entity.xml.err.rdr [new file with mode: 0644]
result/valid/dia.xml.err.rdr [new file with mode: 0644]
result/valid/id1.xml.err.rdr [new file with mode: 0644]
result/valid/id2.xml.err.rdr [new file with mode: 0644]
result/valid/id3.xml.err.rdr [new file with mode: 0644]
result/valid/index.xml.err.rdr [new file with mode: 0644]
result/valid/mixed_ns.xml.err.rdr [new file with mode: 0644]
result/valid/notes.xml.err.rdr [new file with mode: 0644]
result/valid/ns.xml.err.rdr [new file with mode: 0644]
result/valid/ns2.xml.err.rdr [new file with mode: 0644]
result/valid/objednavka.xml.err.rdr [new file with mode: 0644]
result/valid/rss.xml.err.rdr [new file with mode: 0644]
result/valid/t10.xml.err.rdr [new file with mode: 0644]
result/valid/t11.xml.err.rdr [new file with mode: 0644]
result/valid/t4.dtd.err.rdr [new file with mode: 0644]
result/valid/t4.xml.err.rdr [new file with mode: 0644]
result/valid/t4a.dtd.err.rdr [new file with mode: 0644]
result/valid/t4a.xml.err.rdr [new file with mode: 0644]
result/valid/t6.dtd.err.rdr [new file with mode: 0644]
result/valid/t6.xml.err.rdr [new file with mode: 0644]
result/valid/t8.xml.err
result/valid/t8.xml.err.rdr [new file with mode: 0644]
result/valid/t8a.xml.err
result/valid/t8a.xml.err.rdr [new file with mode: 0644]
result/valid/t9.xml.err.rdr [new file with mode: 0644]
result/valid/t9a.xml.err.rdr [new file with mode: 0644]
result/valid/xhtml1.xhtml.err.rdr [new file with mode: 0644]
result/valid/xlink.xml.err.rdr [new file with mode: 0644]
runsuite.c
runtest.c
runxmlconf.c
save.h [new file with mode: 0644]
schematron.c
test/errors/extparsedent.xml [new file with mode: 0644]
test/valid/694228.xml [new file with mode: 0644]
test/valid/dtds/694228.dtd [new file with mode: 0644]
testAutomata.c
testC14N.c
testHTML.c
testModule.c
testRegexp.c
testRelax.c
testSAX.c
testSchemas.c
testThreadsWin32.c
testXPath.c
testapi.c
testchar.c
testlimits.c [new file with mode: 0644]
testrecurse.c
threads.c
timsort.h [new file with mode: 0644]
tree.c
trio.c
trio.h
trionan.c
trionan.h
triostr.c
uri.c
valid.c
win32/.cvsignore [deleted file]
win32/Makefile.bcb
win32/Makefile.mingw
win32/Makefile.msvc
win32/VC10/libxml2.vcxproj
win32/VC10/runsuite.vcxproj
win32/configure.js
win32/libxml2.def.src
win32/wince/wincecompat.c
xinclude.c
xlink.c
xml2-config.1
xml2-config.in
xmlIO.c
xmlcatalog.c
xmllint.c
xmlmemory.c
xmlmodule.c
xmlreader.c
xmlregexp.c
xmlsave.c
xmlschemas.c
xmlschemastypes.c
xmlstring.c
xmlunicode.c
xmlwriter.c
xpath.c
xpointer.c
xstc/Makefile.am
xstc/Makefile.in

diff --git a/COPYING b/COPYING
index 417e955..d613185 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -2,7 +2,7 @@ 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-2003 Daniel Veillard.  All Rights Reserved.
+ 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
@@ -17,11 +17,7 @@ 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.
-
+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.
index 417e955..d613185 100644 (file)
--- a/Copyright
+++ b/Copyright
@@ -2,7 +2,7 @@ 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-2003 Daniel Veillard.  All Rights Reserved.
+ 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
@@ -17,11 +17,7 @@ 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.
-
+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.
index 3573743..f12511b 100644 (file)
@@ -53,7 +53,7 @@ docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED,
 /**
  * docbParseDocument:
  * @ctxt:  an SGML parser context
- * 
+ *
  * parse an SGML document (and build a tree if using the standard SAX
  * interface).
  *
@@ -163,12 +163,12 @@ docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
  * @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. 
+ * @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
  */
 
@@ -196,7 +196,7 @@ docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
  * @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
  */
 
@@ -221,7 +221,7 @@ docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
  * @filename:  the filename
  * @encoding:  the SGML document encoding, or NULL
  *
- * Create a parser context for a file content. 
+ * Create a parser context for a file content.
  * Automatic support for ZLIB/Compress compressed document is provided
  * by default if found at compile-time.
  *
@@ -247,7 +247,7 @@ docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED,
  * @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. 
+ * @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.
index 66ff17b..dd0c1ea 100644 (file)
@@ -44,6 +44,9 @@
 #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
@@ -1082,7 +1085,7 @@ static const char * const htmlStartClose[] = {
 "div",         "p", "head", NULL,
 "noscript",    "p", NULL,
 "center",      "font", "b", "i", "p", "head", NULL,
-"a",           "a", NULL,
+"a",           "a", "head", NULL,
 "caption",     "p", NULL,
 "colgroup",    "caption", "colgroup", "col", "p", NULL,
 "col",         "caption", "col", "p", NULL,
@@ -1100,6 +1103,43 @@ static const char * const htmlStartClose[] = {
 "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
 };
 
@@ -2941,9 +2981,14 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
             */
            if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
                if (areBlanks(ctxt, buf, nbchar)) {
-                   if (ctxt->sax->ignorableWhitespace != NULL)
-                       ctxt->sax->ignorableWhitespace(ctxt->userData,
-                                                      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)
@@ -2974,8 +3019,14 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
         */
        if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
            if (areBlanks(ctxt, buf, nbchar)) {
-               if (ctxt->sax->ignorableWhitespace != NULL)
-                   ctxt->sax->ignorableWhitespace(ctxt->userData, 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)
@@ -3509,19 +3560,14 @@ htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) {
             * convert as much as possible to the parser reading buffer.
             */
            processed = ctxt->input->cur - ctxt->input->base;
-           xmlBufferShrink(ctxt->input->buf->buffer, processed);
-           nbchars = xmlCharEncInFunc(ctxt->input->buf->encoder,
-                                      ctxt->input->buf->buffer,
-                                      ctxt->input->buf->raw);
+           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);
            }
-           ctxt->input->base =
-           ctxt->input->cur = ctxt->input->buf->buffer->content;
-            ctxt->input->end =
-                          &ctxt->input->base[ctxt->input->buf->buffer->use];
+            xmlBufResetInput(ctxt->input->buf->buffer, ctxt->input);
        }
     }
 }
@@ -4906,9 +4952,7 @@ htmlCreateMemoryParserCtxt(const char *buffer, int size) {
 
     input->filename = NULL;
     input->buf = buf;
-    input->base = input->buf->buffer->content;
-    input->cur = input->buf->buffer->content;
-    input->end = &input->buf->buffer->content[input->buf->buffer->use];
+    xmlBufResetInput(buf->buffer, input);
 
     inputPush(ctxt, input);
     return(ctxt);
@@ -5025,8 +5069,8 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
         buf = in->base;
         len = in->length;
     } else {
-        buf = in->buf->buffer->content;
-        len = in->buf->buffer->use;
+        buf = xmlBufContent(in->buf->buffer);
+        len = xmlBufUse(in->buf->buffer);
     }
 
     /* take into account the sequence length */
@@ -5118,13 +5162,13 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
  * @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 
+ * 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 
+ * Returns the index to the current parsing point if a stopChar
  *      is available, -1 otherwise.
  */
 static int
@@ -5152,8 +5196,8 @@ htmlParseLookupChars(htmlParserCtxtPtr ctxt, const xmlChar * stop,
         buf = in->base;
         len = in->length;
     } else {
-        buf = in->buf->buffer->content;
-        len = in->buf->buffer->use;
+        buf = xmlBufContent(in->buf->buffer);
+        len = xmlBufUse(in->buf->buffer);
     }
 
     for (; base < len; base++) {
@@ -5264,7 +5308,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
        if (in->buf == NULL)
            avail = in->length - (in->cur - in->base);
        else
-           avail = in->buf->buffer->use - (in->cur - in->base);
+           avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
        if ((avail == 0) && (terminate)) {
            htmlAutoCloseOnEnd(ctxt);
            if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) {
@@ -5300,7 +5344,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
                    if (in->buf == NULL)
                        avail = in->length - (in->cur - in->base);
                    else
-                       avail = in->buf->buffer->use - (in->cur - in->base);
+                       avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
                }
                if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
                    ctxt->sax->setDocumentLocator(ctxt->userData,
@@ -5342,7 +5386,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
                if (in->buf == NULL)
                    avail = in->length - (in->cur - in->base);
                else
-                   avail = in->buf->buffer->use - (in->cur - in->base);
+                   avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
                /*
                 * no chars in buffer
                 */
@@ -5415,7 +5459,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
                if (in->buf == NULL)
                    avail = in->length - (in->cur - in->base);
                else
-                   avail = in->buf->buffer->use - (in->cur - in->base);
+                   avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
                if (avail < 2)
                    goto done;
                cur = in->cur[0];
@@ -5456,7 +5500,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
                if (in->buf == NULL)
                    avail = in->length - (in->cur - in->base);
                else
-                   avail = in->buf->buffer->use - (in->cur - in->base);
+                   avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
                if (avail < 1)
                    goto done;
                cur = in->cur[0];
@@ -5654,9 +5698,15 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
                    if ((cur != '<') && (cur != '&')) {
                        if (ctxt->sax != NULL) {
                            if (IS_BLANK_CH(cur)) {
-                               if (ctxt->sax->ignorableWhitespace != NULL)
-                                   ctxt->sax->ignorableWhitespace(
-                                           ctxt->userData, &cur, 1);
+                               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)
@@ -5979,8 +6029,8 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
     }
     if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
         (ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF))  {
-       int base = ctxt->input->base - ctxt->input->buf->buffer->content;
-       int cur = ctxt->input->cur - ctxt->input->base;
+       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);
@@ -5989,10 +6039,7 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
            ctxt->disableSAX = 1;
            return (XML_PARSER_EOF);
        }
-       ctxt->input->base = ctxt->input->buf->buffer->content + base;
-       ctxt->input->cur = ctxt->input->base + cur;
-       ctxt->input->end =
-         &ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
+        xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
 #ifdef DEBUG_PUSH
        xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
 #endif
@@ -6007,13 +6054,16 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
            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 = xmlCharEncInFunc(in->encoder, in->buffer, in->raw);
+               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);
            }
        }
     }
@@ -6107,24 +6157,18 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
        inputStream->filename = (char *)
            xmlCanonicPath((const xmlChar *) filename);
     inputStream->buf = buf;
-    inputStream->base = inputStream->buf->buffer->content;
-    inputStream->cur = inputStream->buf->buffer->content;
-    inputStream->end =
-       &inputStream->buf->buffer->content[inputStream->buf->buffer->use];
+    xmlBufResetInput(buf->buffer, inputStream);
 
     inputPush(ctxt, inputStream);
 
     if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
         (ctxt->input->buf != NULL))  {
-       int base = ctxt->input->base - ctxt->input->buf->buffer->content;
-       int cur = ctxt->input->cur - ctxt->input->base;
+       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);
 
-       ctxt->input->base = ctxt->input->buf->buffer->content + base;
-       ctxt->input->cur = ctxt->input->base + cur;
-       ctxt->input->end =
-           &ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
+        xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
 #ifdef DEBUG_PUSH
        xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
 #endif
index 5d0893b..4d8e354 100644 (file)
 #include <libxml/globals.h>
 #include <libxml/uri.h>
 
+#include "buf.h"
+
 /************************************************************************
  *                                                                     *
- *             Getting/Setting encoding meta tags                      *
+ *             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
@@ -126,17 +128,17 @@ found_meta:
 
 found_content:
     encoding = xmlStrstr(content, BAD_CAST"charset=");
-    if (encoding == NULL) 
+    if (encoding == NULL)
        encoding = xmlStrstr(content, BAD_CAST"Charset=");
-    if (encoding == NULL) 
+    if (encoding == NULL)
        encoding = xmlStrstr(content, BAD_CAST"CHARSET=");
     if (encoding != NULL) {
        encoding += 8;
     } else {
        encoding = xmlStrstr(content, BAD_CAST"charset =");
-       if (encoding == NULL) 
+       if (encoding == NULL)
            encoding = xmlStrstr(content, BAD_CAST"Charset =");
-       if (encoding == NULL) 
+       if (encoding == NULL)
            encoding = xmlStrstr(content, BAD_CAST"CHARSET =");
        if (encoding != NULL)
            encoding += 9;
@@ -314,7 +316,7 @@ static const char* htmlBooleanAttrs[] = {
  * @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
@@ -338,7 +340,7 @@ xmlOutputBufferPtr
 xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
 /************************************************************************
  *                                                                     *
- *                     Output error handlers                           *
+ *                     Output error handlers                           *
  *                                                                     *
  ************************************************************************/
 /**
@@ -387,17 +389,13 @@ htmlSaveErr(int code, xmlNodePtr node, const char *extra)
 
 /************************************************************************
  *                                                                     *
- *             Dumping HTML tree content to a simple buffer            *
+ *             Dumping HTML tree content to a simple buffer            *
  *                                                                     *
  ************************************************************************/
 
-static int
-htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
-                  int format);
-
 /**
- * htmlNodeDumpFormat:
- * @buf:  the HTML buffer output
+ * htmlBufNodeDumpFormat:
+ * @buf:  the xmlBufPtr output
  * @doc:  the document
  * @cur:  the current node
  * @format:  should formatting spaces been added
@@ -406,10 +404,10 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
  *
  * Returns the number of byte written or -1 in case of error
  */
-static int
-htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
+static size_t
+htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur,
                   int format) {
-    unsigned int use;
+    size_t use;
     int ret;
     xmlOutputBufferPtr outbuf;
 
@@ -432,10 +430,10 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
     outbuf->context = NULL;
     outbuf->written = 0;
 
-    use = buf->use;
+    use = xmlBufUse(buf);
     htmlNodeDumpFormatOutput(outbuf, doc, cur, NULL, format);
     xmlFree(outbuf);
-    ret = buf->use - use;
+    ret = xmlBufUse(buf) - use;
     return (ret);
 }
 
@@ -452,9 +450,24 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
  */
 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);
 
-    return(htmlNodeDumpFormat(buf, doc, cur, 1));
+    if (ret > INT_MAX)
+        return(-1);
+    return((int) ret);
 }
 
 /**
@@ -499,7 +512,7 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
     if (handler == NULL)
        handler = xmlFindCharEncodingHandler("ascii");
 
-    /* 
+    /*
      * save the content to a temp buffer.
      */
     buf = xmlOutputBufferCreateFile(out, handler);
@@ -595,11 +608,11 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
 
     xmlOutputBufferFlush(buf);
     if (buf->conv != NULL) {
-       *size = buf->conv->use;
-       *mem = xmlStrndup(buf->conv->content, *size);
+       *size = xmlBufUse(buf->conv);
+       *mem = xmlStrndup(xmlBufContent(buf->conv), *size);
     } else {
-       *size = buf->buffer->use;
-       *mem = xmlStrndup(buf->buffer->content, *size);
+       *size = xmlBufUse(buf->buffer);
+       *mem = xmlStrndup(xmlBufContent(buf->buffer), *size);
     }
     (void)xmlOutputBufferClose(buf);
 }
@@ -621,7 +634,7 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
 
 /************************************************************************
  *                                                                     *
- *             Dumping HTML tree content to an I/O output buffer       *
+ *             Dumping HTML tree content to an I/O output buffer       *
  *                                                                     *
  ************************************************************************/
 
@@ -632,7 +645,7 @@ void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
  * @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.
@@ -650,14 +663,14 @@ htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
     xmlOutputBufferWriteString(buf, (const char *)cur->name);
     if (cur->ExternalID != NULL) {
        xmlOutputBufferWriteString(buf, " PUBLIC ");
-       xmlBufferWriteQuotedString(buf->buffer, cur->ExternalID);
+       xmlBufWriteQuotedString(buf->buffer, cur->ExternalID);
        if (cur->SystemID != NULL) {
            xmlOutputBufferWriteString(buf, " ");
-           xmlBufferWriteQuotedString(buf->buffer, cur->SystemID);
-       } 
+           xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
+       }
     }  else if (cur->SystemID != NULL) {
        xmlOutputBufferWriteString(buf, " SYSTEM ");
-       xmlBufferWriteQuotedString(buf->buffer, cur->SystemID);
+       xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
     }
     xmlOutputBufferWriteString(buf, ">\n");
 }
@@ -677,9 +690,10 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur,
     xmlChar *value;
 
     /*
-     * TODO: 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).
+     * 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) {
@@ -707,15 +721,19 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur,
 
                while (IS_BLANK_CH(*tmp)) tmp++;
 
-               escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+");
+               /*
+                * the < and > have already been escaped at the entity level
+                * And doing so here breaks server side includes
+                */
+               escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+<>");
                if (escaped != NULL) {
-                   xmlBufferWriteQuotedString(buf->buffer, escaped);
+                   xmlBufWriteQuotedString(buf->buffer, escaped);
                    xmlFree(escaped);
                } else {
-                   xmlBufferWriteQuotedString(buf->buffer, value);
+                   xmlBufWriteQuotedString(buf->buffer, value);
                }
            } else {
-               xmlBufferWriteQuotedString(buf->buffer, value);
+               xmlBufWriteQuotedString(buf->buffer, value);
            }
            xmlFree(value);
        } else  {
@@ -1105,7 +1123,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
 
     if ((cur == NULL) || (filename == NULL))
         return(-1);
-       
+
     xmlInitParser();
 
     encoding = (const char *) htmlGetMetaEncoding(cur);
@@ -1136,7 +1154,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
     if (handler == NULL)
        handler = xmlFindCharEncodingHandler("ascii");
 
-    /* 
+    /*
      * save the content to a temp buffer.
      */
     buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
@@ -1156,7 +1174,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
  * @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
@@ -1200,7 +1218,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
     if (handler == NULL)
        handler = xmlFindCharEncodingHandler("ascii");
 
-    /* 
+    /*
      * save the content to a temp buffer.
      */
     buf = xmlOutputBufferCreateFilename(filename, handler, 0);
@@ -1220,7 +1238,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
  *
  * 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
diff --git a/INSTALL b/INSTALL
index 7d1c323..a1e89e1 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,8 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
 
    Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
@@ -226,6 +226,11 @@ order to use an ANSI C compiler:
 
 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
index f82cefa..a4a9f87 100644 (file)
@@ -2,23 +2,25 @@
 
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = include . doc example xstc @PYTHON_SUBDIR@
+SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR)
 
 DIST_SUBDIRS = include . doc example python xstc
 
-INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ @LZMA_CFLAGS@
+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
+               testdict runxmlconf testrecurse testlimits
 
 bin_PROGRAMS = xmllint xmlcatalog
 
 bin_SCRIPTS=xml2-config
 
 lib_LTLIBRARIES = libxml2.la
-libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
+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
@@ -26,35 +28,37 @@ 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@
+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
-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 DOCBparser.c \
-               catalog.c globals.c threads.c c14n.c xmlstring.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
+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 DOCBparser.c \
-               catalog.c globals.c threads.c c14n.c xmlstring.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
-endif
 
 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@
+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
@@ -65,32 +69,37 @@ m4data_DATA = libxml.m4
 runtest_SOURCES=runtest.c
 runtest_LDFLAGS = 
 runtest_DEPENDENCIES = $(DEPS)
-runtest_LDADD= @BASE_THREAD_LIBS@ @RDL_LIBS@ $(LDADDS)
+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)
+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)
+testchar_LDADD= $(RDL_LIBS) $(LDADDS)
 
 testdict_SOURCES=testdict.c
 testdict_LDFLAGS = 
 testdict_DEPENDENCIES = $(DEPS)
-testdict_LDADD= @RDL_LIBS@ $(LDADDS)
+testdict_LDADD= $(RDL_LIBS) $(LDADDS)
 
 runsuite_SOURCES=runsuite.c
 runsuite_LDFLAGS = 
 runsuite_DEPENDENCIES = $(DEPS)
-runsuite_LDADD= @RDL_LIBS@ $(LDADDS)
+runsuite_LDADD= $(RDL_LIBS) $(LDADDS)
 
 xmllint_SOURCES=xmllint.c
 xmllint_LDFLAGS = 
 xmllint_DEPENDENCIES = $(DEPS)
-xmllint_LDADD=  @RDL_LIBS@ $(LDADDS)
+xmllint_LDADD=  $(RDL_LIBS) $(LDADDS)
 
 testSAX_SOURCES=testSAX.c
 testSAX_LDFLAGS = 
@@ -105,7 +114,7 @@ testHTML_LDADD= $(LDADDS)
 xmlcatalog_SOURCES=xmlcatalog.c
 xmlcatalog_LDFLAGS = 
 xmlcatalog_DEPENDENCIES = $(DEPS)
-xmlcatalog_LDADD= @RDL_LIBS@ $(LDADDS)
+xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS)
 
 testXPath_SOURCES=testXPath.c
 testXPath_LDFLAGS = 
@@ -117,10 +126,14 @@ testC14N_LDFLAGS =
 testC14N_DEPENDENCIES = $(DEPS)
 testC14N_LDADD= $(LDADDS)
 
-testThreads_SOURCES=testThreads@THREADS_W32@.c
+if THREADS_W32
+testThreads_SOURCES = testThreadsWin32.c
+else
+testThreads_SOURCES = testThreads.c
+endif
 testThreads_LDFLAGS = 
 testThreads_DEPENDENCIES = $(DEPS)
-testThreads_LDADD= @BASE_THREAD_LIBS@  $(LDADDS)
+testThreads_LDADD= $(BASE_THREAD_LIBS) $(LDADDS)
 
 testURI_SOURCES=testURI.c
 testURI_LDFLAGS = 
@@ -172,6 +185,8 @@ 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)
@@ -188,28 +203,25 @@ runxmlconf_LDADD= $(LDADDS)
 #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) MAKEFLAGS+=--silent tests ; fi)
+       @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
+           $(MAKE) tests ; fi)
 
 check: all runtests
 
-check-valgrind: all
+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' check
+       $(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) MAKEFLAGS+=--silent tests ; fi)
-       @(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests)
-
-valgrind:
-       @echo '## Running the regression tests under Valgrind'
-       @echo '## Go get a cup of coffee it is gonna take a while ...'
-       $(MAKE) CHECKER='valgrind -q' tests
+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"
@@ -1115,7 +1127,7 @@ SchemasPythonTests:
            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)" MAKEFLAGS+=--silent pytests ; fi)
+       @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" pytests ; fi)
 
 Patterntests: xmllint$(EXEEXT)
        @(echo > .memdump)
@@ -1147,8 +1159,8 @@ ModuleTests: testModule$(EXEEXT) testdso.la
 
 cleanup:
        -@(find . -name .\#\* -exec rm {} \;)
-       -@(find . -name \*.gcda -o *.gcno -exec rm {} \;)
-       -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -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)
@@ -1183,7 +1195,8 @@ xml2Conf.sh: xml2Conf.sh.in Makefile
               < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \
        && mv xml2Conf.tmp xml2Conf.sh
 
-CLEANFILES=xml2Conf.sh *.gcda *.gcno
+CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res
+DISTCLEANFILES = COPYING missing.lst
 
 confexecdir=$(libdir)
 confexec_DATA = xml2Conf.sh
@@ -1195,10 +1208,10 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
              example/Makefile.am example/gjobread.c example/gjobs.xml \
             $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
             trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
-            triop.h triodef.h libxml.h elfgcchack.h xzlib.h \
-            testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
+            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 \
+            README.tests Makefile.tests libxml2.syms timsort.h \
             $(CVS_EXTRA_DIST)
 
 
@@ -1213,13 +1226,13 @@ 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)
+       $(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
index 6e88cc9..bde07d3 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -43,7 +60,7 @@ noinst_PROGRAMS = testSchemas$(EXEEXT) testRelax$(EXEEXT) \
        testAutomata$(EXEEXT) testRegexp$(EXEEXT) testReader$(EXEEXT) \
        testapi$(EXEEXT) testModule$(EXEEXT) runtest$(EXEEXT) \
        runsuite$(EXEEXT) testchar$(EXEEXT) testdict$(EXEEXT) \
-       runxmlconf$(EXEEXT) testrecurse$(EXEEXT)
+       runxmlconf$(EXEEXT) testrecurse$(EXEEXT) testlimits$(EXEEXT)
 bin_PROGRAMS = xmllint$(EXEEXT) xmlcatalog$(EXEEXT)
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
@@ -88,57 +105,46 @@ am__nobase_list = $(am__nobase_strip_setup); \
 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)$(confexecdir)" \
        "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)"
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-libxml2_la_DEPENDENCIES = $(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 \
-       xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.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 \
-       triostr.c trio.c
-@WITH_TRIO_SOURCES_FALSE@am_libxml2_la_OBJECTS = SAX.lo entities.lo \
-@WITH_TRIO_SOURCES_FALSE@      encoding.lo error.lo \
-@WITH_TRIO_SOURCES_FALSE@      parserInternals.lo parser.lo tree.lo \
-@WITH_TRIO_SOURCES_FALSE@      hash.lo list.lo xmlIO.lo xmlmemory.lo \
-@WITH_TRIO_SOURCES_FALSE@      uri.lo valid.lo xlink.lo \
-@WITH_TRIO_SOURCES_FALSE@      HTMLparser.lo HTMLtree.lo debugXML.lo \
-@WITH_TRIO_SOURCES_FALSE@      xpath.lo xpointer.lo xinclude.lo \
-@WITH_TRIO_SOURCES_FALSE@      nanohttp.lo nanoftp.lo DOCBparser.lo \
-@WITH_TRIO_SOURCES_FALSE@      catalog.lo globals.lo threads.lo \
-@WITH_TRIO_SOURCES_FALSE@      c14n.lo xmlstring.lo xmlregexp.lo \
-@WITH_TRIO_SOURCES_FALSE@      xmlschemas.lo xmlschemastypes.lo \
-@WITH_TRIO_SOURCES_FALSE@      xmlunicode.lo xmlreader.lo relaxng.lo \
-@WITH_TRIO_SOURCES_FALSE@      dict.lo SAX2.lo xmlwriter.lo \
-@WITH_TRIO_SOURCES_FALSE@      legacy.lo chvalid.lo pattern.lo \
-@WITH_TRIO_SOURCES_FALSE@      xmlsave.lo xmlmodule.lo schematron.lo \
-@WITH_TRIO_SOURCES_FALSE@      xzlib.lo
-@WITH_TRIO_SOURCES_TRUE@am_libxml2_la_OBJECTS = SAX.lo entities.lo \
-@WITH_TRIO_SOURCES_TRUE@       encoding.lo error.lo \
-@WITH_TRIO_SOURCES_TRUE@       parserInternals.lo parser.lo tree.lo \
-@WITH_TRIO_SOURCES_TRUE@       hash.lo list.lo xmlIO.lo xmlmemory.lo \
-@WITH_TRIO_SOURCES_TRUE@       uri.lo valid.lo xlink.lo HTMLparser.lo \
-@WITH_TRIO_SOURCES_TRUE@       HTMLtree.lo debugXML.lo xpath.lo \
-@WITH_TRIO_SOURCES_TRUE@       xpointer.lo xinclude.lo nanohttp.lo \
-@WITH_TRIO_SOURCES_TRUE@       nanoftp.lo DOCBparser.lo catalog.lo \
-@WITH_TRIO_SOURCES_TRUE@       globals.lo threads.lo c14n.lo \
-@WITH_TRIO_SOURCES_TRUE@       xmlstring.lo xmlregexp.lo \
-@WITH_TRIO_SOURCES_TRUE@       xmlschemas.lo xmlschemastypes.lo \
-@WITH_TRIO_SOURCES_TRUE@       xmlunicode.lo triostr.lo trio.lo \
-@WITH_TRIO_SOURCES_TRUE@       xmlreader.lo relaxng.lo dict.lo \
-@WITH_TRIO_SOURCES_TRUE@       SAX2.lo xmlwriter.lo legacy.lo \
-@WITH_TRIO_SOURCES_TRUE@       chvalid.lo pattern.lo xmlsave.lo \
-@WITH_TRIO_SOURCES_TRUE@       xmlmodule.lo schematron.lo xzlib.lo
+       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_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 libxml2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -152,7 +158,10 @@ testdso_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
 am_runsuite_OBJECTS = runsuite.$(OBJEXT)
 runsuite_OBJECTS = $(am_runsuite_OBJECTS)
-am__DEPENDENCIES_2 = $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1)
+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 $@
@@ -211,7 +220,9 @@ 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_OBJECTS = testThreads@THREADS_W32@.$(OBJEXT)
+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) \
@@ -241,6 +252,11 @@ 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) \
@@ -267,21 +283,21 @@ 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_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+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_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 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_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+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_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(libxml2_la_SOURCES) $(testdso_la_SOURCES) \
        $(runsuite_SOURCES) $(runtest_SOURCES) $(runxmlconf_SOURCES) \
@@ -291,16 +307,17 @@ SOURCES = $(libxml2_la_SOURCES) $(testdso_la_SOURCES) \
        $(testRelax_SOURCES) $(testSAX_SOURCES) $(testSchemas_SOURCES) \
        $(testThreads_SOURCES) $(testURI_SOURCES) $(testXPath_SOURCES) \
        $(testapi_SOURCES) $(testchar_SOURCES) $(testdict_SOURCES) \
-       $(testrecurse_SOURCES) $(xmlcatalog_SOURCES) \
-       $(xmllint_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) \
-       $(testThreads_SOURCES) $(testURI_SOURCES) $(testXPath_SOURCES) \
-       $(testapi_SOURCES) $(testchar_SOURCES) $(testdict_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 dvi-recursive \
@@ -310,6 +327,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        install-pdf-recursive install-ps-recursive install-recursive \
        installcheck-recursive installdirs-recursive pdf-recursive \
        ps-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
@@ -326,9 +348,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(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__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -357,12 +381,13 @@ am__relativize = \
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 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@
-AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -399,6 +424,7 @@ 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@
@@ -454,7 +480,6 @@ RANLIB = @RANLIB@
 RDL_LIBS = @RDL_LIBS@
 READER_TEST = @READER_TEST@
 RELDATE = @RELDATE@
-RM = @RM@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -479,7 +504,6 @@ TEST_VTIME = @TEST_VTIME@
 TEST_XINCLUDE = @TEST_XINCLUDE@
 TEST_XPATH = @TEST_XPATH@
 TEST_XPTR = @TEST_XPTR@
-THREADS_W32 = @THREADS_W32@
 THREAD_CFLAGS = @THREAD_CFLAGS@
 THREAD_LIBS = @THREAD_LIBS@
 VERSION = @VERSION@
@@ -512,6 +536,7 @@ 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@
@@ -586,68 +611,69 @@ 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@
+SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR)
 DIST_SUBDIRS = include . doc example python xstc
-INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ @LZMA_CFLAGS@
+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 = @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
+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_TRIO_SOURCES_FALSE@libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c  \
-@WITH_TRIO_SOURCES_FALSE@              parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c  \
-@WITH_TRIO_SOURCES_FALSE@              valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c  \
-@WITH_TRIO_SOURCES_FALSE@              xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \
-@WITH_TRIO_SOURCES_FALSE@              catalog.c globals.c threads.c c14n.c xmlstring.c \
-@WITH_TRIO_SOURCES_FALSE@              xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
-@WITH_TRIO_SOURCES_FALSE@              xmlreader.c relaxng.c dict.c SAX2.c \
-@WITH_TRIO_SOURCES_FALSE@              xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
-@WITH_TRIO_SOURCES_FALSE@              xmlmodule.c schematron.c xzlib.c
-
-@WITH_TRIO_SOURCES_TRUE@libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c  \
-@WITH_TRIO_SOURCES_TRUE@               parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c  \
-@WITH_TRIO_SOURCES_TRUE@               valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c  \
-@WITH_TRIO_SOURCES_TRUE@               xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \
-@WITH_TRIO_SOURCES_TRUE@               catalog.c globals.c threads.c c14n.c xmlstring.c \
-@WITH_TRIO_SOURCES_TRUE@               xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
-@WITH_TRIO_SOURCES_TRUE@               triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \
-@WITH_TRIO_SOURCES_TRUE@               xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
-@WITH_TRIO_SOURCES_TRUE@               xmlmodule.c schematron.c xzlib.c
+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@
+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)
+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)
+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)
+testchar_LDADD = $(RDL_LIBS) $(LDADDS)
 testdict_SOURCES = testdict.c
 testdict_LDFLAGS = 
 testdict_DEPENDENCIES = $(DEPS)
-testdict_LDADD = @RDL_LIBS@ $(LDADDS)
+testdict_LDADD = $(RDL_LIBS) $(LDADDS)
 runsuite_SOURCES = runsuite.c
 runsuite_LDFLAGS = 
 runsuite_DEPENDENCIES = $(DEPS)
-runsuite_LDADD = @RDL_LIBS@ $(LDADDS)
+runsuite_LDADD = $(RDL_LIBS) $(LDADDS)
 xmllint_SOURCES = xmllint.c
 xmllint_LDFLAGS = 
 xmllint_DEPENDENCIES = $(DEPS)
-xmllint_LDADD = @RDL_LIBS@ $(LDADDS)
+xmllint_LDADD = $(RDL_LIBS) $(LDADDS)
 testSAX_SOURCES = testSAX.c
 testSAX_LDFLAGS = 
 testSAX_DEPENDENCIES = $(DEPS)
@@ -659,7 +685,7 @@ testHTML_LDADD = $(LDADDS)
 xmlcatalog_SOURCES = xmlcatalog.c
 xmlcatalog_LDFLAGS = 
 xmlcatalog_DEPENDENCIES = $(DEPS)
-xmlcatalog_LDADD = @RDL_LIBS@ $(LDADDS)
+xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS)
 testXPath_SOURCES = testXPath.c
 testXPath_LDFLAGS = 
 testXPath_DEPENDENCIES = $(DEPS)
@@ -668,10 +694,11 @@ testC14N_SOURCES = testC14N.c
 testC14N_LDFLAGS = 
 testC14N_DEPENDENCIES = $(DEPS)
 testC14N_LDADD = $(LDADDS)
-testThreads_SOURCES = testThreads@THREADS_W32@.c
+@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)
+testThreads_LDADD = $(BASE_THREAD_LIBS) $(LDADDS)
 testURI_SOURCES = testURI.c
 testURI_LDFLAGS = 
 testURI_DEPENDENCIES = $(DEPS)
@@ -703,6 +730,7 @@ 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)
@@ -711,7 +739,8 @@ runxmlconf_SOURCES = runxmlconf.c
 runxmlconf_LDFLAGS = 
 runxmlconf_DEPENDENCIES = $(DEPS)
 runxmlconf_LDADD = $(LDADDS)
-CLEANFILES = xml2Conf.sh *.gcda *.gcno
+CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res
+DISTCLEANFILES = COPYING missing.lst
 confexecdir = $(libdir)
 confexec_DATA = xml2Conf.sh
 CVS_EXTRA_DIST = 
@@ -722,10 +751,10 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
              example/Makefile.am example/gjobread.c example/gjobs.xml \
             $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
             trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
-            triop.h triodef.h libxml.h elfgcchack.h xzlib.h \
-            testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
+            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 \
+            README.tests Makefile.tests libxml2.syms timsort.h \
             $(CVS_EXTRA_DIST)
 
 pkgconfigdir = $(libdir)/pkgconfig
@@ -744,12 +773,12 @@ EXAMPLES_DIR = $(BASE_DIR)/$(DOC_MODULE)/examples
 #
 LCOV = /usr/bin/lcov
 GENHTML = /usr/bin/genhtml
-all: config.h
+all: $(BUILT_SOURCES) config.h
        $(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
-am--refresh:
+am--refresh: Makefile
        @:
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
@@ -785,10 +814,8 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-       @if test ! -f $@; then \
-         rm -f stamp-h1; \
-         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-       else :; fi
+       @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
@@ -810,7 +837,6 @@ libxml-2.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/libxml-2.0-un
        cd $(top_builddir) && $(SHELL) ./config.status $@
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
        @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
        list2=; for p in $$list; do \
          if test -f $$p; then \
@@ -818,6 +844,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
          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)"; \
        }
@@ -848,14 +876,17 @@ clean-noinstLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
-libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) 
+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) 
+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)
-       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
        @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; \
@@ -904,73 +935,79 @@ clean-noinstPROGRAMS:
        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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+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) 
+testdict$(EXEEXT): $(testdict_OBJECTS) $(testdict_DEPENDENCIES) $(EXTRA_testdict_DEPENDENCIES) 
        @rm -f testdict$(EXEEXT)
        $(AM_V_CCLD)$(testdict_LINK) $(testdict_OBJECTS) $(testdict_LDADD) $(LIBS)
-testrecurse$(EXEEXT): $(testrecurse_OBJECTS) $(testrecurse_DEPENDENCIES) 
+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) 
+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) 
+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)
-       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
        @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; \
@@ -998,9 +1035,7 @@ uninstall-binSCRIPTS:
        @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
        files=`for p in $$list; do echo "$$p"; done | \
               sed -e 's,.*/,,;$(transform)'`; \
-       test -n "$$list" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+       dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -1013,6 +1048,7 @@ distclean-compile:
 @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@
@@ -1044,13 +1080,15 @@ distclean-compile:
 @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@THREADS_W32@.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@
@@ -1080,26 +1118,23 @@ distclean-compile:
 .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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@  $(COMPILE) -c $<
+@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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@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@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -1111,11 +1146,18 @@ distclean-libtool:
        -rm -f libtool config.lt
 install-man1: $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
-       @list=''; test -n "$(man1dir)" || exit 0; \
-       { 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'; \
+       @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"; \
@@ -1144,16 +1186,21 @@ uninstall-man1:
          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,.,'`; \
-       test -z "$$files" || { \
-         echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
-         cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+       dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
 install-man3: $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
-       @list=''; test -n "$(man3dir)" || exit 0; \
-       { 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'; \
+       @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"; \
@@ -1182,13 +1229,14 @@ uninstall-man3:
          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,.,'`; \
-       test -z "$$files" || { \
-         echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
-         cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
+       dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
 install-confexecDATA: $(confexec_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(confexecdir)" || $(MKDIR_P) "$(DESTDIR)$(confexecdir)"
        @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"; \
@@ -1202,13 +1250,14 @@ uninstall-confexecDATA:
        @$(NORMAL_UNINSTALL)
        @list='$(confexec_DATA)'; test -n "$(confexecdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(confexecdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(confexecdir)" && rm -f $$files
+       dir='$(DESTDIR)$(confexecdir)'; $(am__uninstall_files_from_dir)
 install-m4dataDATA: $(m4data_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)"
        @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"; \
@@ -1222,13 +1271,14 @@ uninstall-m4dataDATA:
        @$(NORMAL_UNINSTALL)
        @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(m4datadir)" && rm -f $$files
+       dir='$(DESTDIR)$(m4datadir)'; $(am__uninstall_files_from_dir)
 install-pkgconfigDATA: $(pkgconfig_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
        @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"; \
@@ -1242,9 +1292,7 @@ uninstall-pkgconfigDATA:
        @$(NORMAL_UNINSTALL)
        @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+       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.
@@ -1428,13 +1476,10 @@ distdir: $(DISTFILES)
        done
        @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(MKDIR_P) "$(distdir)/$$subdir" \
-           || 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; \
@@ -1469,7 +1514,11 @@ dist-gzip: distdir
        $(am__remove_distdir)
 
 dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+dist-lzip: distdir
+       tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
        $(am__remove_distdir)
 
 dist-lzma: distdir
@@ -1477,7 +1526,7 @@ dist-lzma: distdir
        $(am__remove_distdir)
 
 dist-xz: distdir
-       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
        $(am__remove_distdir)
 
 dist-tarZ: distdir
@@ -1508,6 +1557,8 @@ distcheck: dist
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
          lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.lz*) \
+         lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
        *.tar.xz*) \
          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
@@ -1517,7 +1568,7 @@ distcheck: dist
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       chmod -R a-w $(distdir); chmod u+w $(distdir)
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
@@ -1527,6 +1578,7 @@ distcheck: dist
          && 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 \
@@ -1555,8 +1607,16 @@ distcheck: dist
          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:
-       @$(am__cd) '$(distuninstallcheck_dir)' \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+       @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)"; \
@@ -1573,7 +1633,8 @@ distcleancheck: distclean
               $(distcleancheck_listfiles) ; \
               exit 1; } >&2
 check-am: all-am
-check: check-recursive
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-recursive
 all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \
                config.h
 install-binPROGRAMS: install-libLTLIBRARIES
@@ -1583,7 +1644,8 @@ installdirs-am:
        for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(confexecdir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
-install: install-recursive
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-recursive
 install-exec: install-exec-recursive
 install-data: install-data-recursive
 uninstall: uninstall-recursive
@@ -1593,10 +1655,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       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:
@@ -1605,10 +1672,12 @@ 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)
+       -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 \
@@ -1691,34 +1760,35 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
 
 uninstall-man: uninstall-man1 uninstall-man3
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
-       ctags-recursive install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+       ctags-recursive install install-am install-strip \
+       tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am am--refresh check check-am clean clean-binPROGRAMS \
        clean-generic clean-libLTLIBRARIES clean-libtool \
        clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags \
        ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
-       dist-lzma 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-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-recursive \
-       uninstall uninstall-am uninstall-binPROGRAMS \
-       uninstall-binSCRIPTS uninstall-confexecDATA \
-       uninstall-libLTLIBRARIES uninstall-local uninstall-m4dataDATA \
-       uninstall-man uninstall-man1 uninstall-man3 \
-       uninstall-pkgconfigDATA
+       dist-lzip dist-lzma 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-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-recursive uninstall uninstall-am \
+       uninstall-binPROGRAMS uninstall-binSCRIPTS \
+       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/
@@ -1738,28 +1808,25 @@ testapi.c: $(srcdir)/gentest.py
 #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) MAKEFLAGS+=--silent tests ; fi)
+       @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
+           $(MAKE) tests ; fi)
 
 check: all runtests
 
-check-valgrind: all
+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' check
+       $(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) MAKEFLAGS+=--silent tests ; fi)
-       @(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests)
-
-valgrind:
-       @echo '## Running the regression tests under Valgrind'
-       @echo '## Go get a cup of coffee it is gonna take a while ...'
-       $(MAKE) CHECKER='valgrind -q' tests
+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"
@@ -2665,7 +2732,7 @@ SchemasPythonTests:
            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)" MAKEFLAGS+=--silent pytests ; fi)
+       @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" pytests ; fi)
 
 Patterntests: xmllint$(EXEEXT)
        @(echo > .memdump)
@@ -2697,8 +2764,8 @@ ModuleTests: testModule$(EXEEXT) testdso.la
 
 cleanup:
        -@(find . -name .\#\* -exec rm {} \;)
-       -@(find . -name \*.gcda -o *.gcno -exec rm {} \;)
-       -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -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)
@@ -2728,13 +2795,13 @@ xml2Conf.sh: xml2Conf.sh.in Makefile
        && 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)
+       $(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
diff --git a/SAX.c b/SAX.c
index 8e5d460..292af57 100644 (file)
--- a/SAX.c
+++ b/SAX.c
@@ -41,7 +41,7 @@
 void
 initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning)
 {
-    
+
     if(hdlr->initialized == 1)
        return;
 
diff --git a/SAX2.c b/SAX2.c
index 126a79f..4adf202 100644 (file)
--- a/SAX2.c
+++ b/SAX2.c
@@ -45,7 +45,7 @@
  *> values "system" and "public".  I have made the default be "system" to
  *> match yours.
  */
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
  */
 static void
 xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
+    xmlStructuredErrorFunc schannel = NULL;
+    const char *str1 = "out of memory\n";
+
     if (ctxt != NULL) {
-       if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
-           ctxt->sax->error(ctxt->userData, "%s: out of memory\n", msg);
+       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);
     }
 }
 
@@ -126,7 +143,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
     if (ctxt != NULL)
        ctxt->errNo = error;
     __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
-                    XML_ERR_FATAL, NULL, 0, 
+                    XML_ERR_FATAL, NULL, 0,
                    (const char *) str1, (const char *) str2,
                    NULL, 0, 0, msg, str1, str2);
     if (ctxt != NULL) {
@@ -157,7 +174,7 @@ xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
     if (ctxt != NULL)
        ctxt->errNo = error;
     __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
-                    XML_ERR_WARNING, NULL, 0, 
+                    XML_ERR_WARNING, NULL, 0,
                    (const char *) str1, NULL,
                    NULL, 0, 0, msg, str1);
 }
@@ -182,7 +199,7 @@ xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
     if (ctxt != NULL)
        ctxt->errNo = error;
     __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
-                    XML_ERR_ERROR, NULL, 0, 
+                    XML_ERR_ERROR, NULL, 0,
                    (const char *) str1, (const char *) str2,
                    NULL, 0, 0, msg, str1, str2);
 }
@@ -206,7 +223,7 @@ xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
     if (ctxt != NULL)
        ctxt->errNo = error;
     __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
-                    XML_ERR_WARNING, NULL, 0, 
+                    XML_ERR_WARNING, NULL, 0,
                    (const char *) str1, (const char *) str2,
                    NULL, 0, 0, msg, str1, str2);
 }
@@ -240,7 +257,7 @@ xmlSAX2GetSystemId(void *ctx)
 {
     xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
     if ((ctx == NULL) || (ctxt->input == NULL)) return(NULL);
-    return((const xmlChar *) ctxt->input->filename); 
+    return((const xmlChar *) ctxt->input->filename);
 }
 
 /**
@@ -355,7 +372,7 @@ xmlSAX2InternalSubset(void *ctx, const xmlChar *name,
        xmlFreeDtd(dtd);
        ctxt->myDoc->intSubset = NULL;
     }
-    ctxt->myDoc->intSubset = 
+    ctxt->myDoc->intSubset =
        xmlCreateIntSubset(ctxt->myDoc, name, ExternalID, SystemID);
     if (ctxt->myDoc->intSubset == NULL)
         xmlSAX2ErrMemory(ctxt, "xmlSAX2InternalSubset");
@@ -394,6 +411,7 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
        xmlParserInputPtr input = NULL;
        xmlCharEncoding enc;
        int oldcharset;
+       const xmlChar *oldencoding;
 
        /*
         * Ask the Entity resolver to load the damn thing
@@ -415,6 +433,8 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
        oldinputMax = ctxt->inputMax;
        oldinputTab = ctxt->inputTab;
        oldcharset = ctxt->charset;
+       oldencoding = ctxt->encoding;
+       ctxt->encoding = NULL;
 
        ctxt->inputTab = (xmlParserInputPtr *)
                         xmlMalloc(5 * sizeof(xmlParserInputPtr));
@@ -425,6 +445,7 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
            ctxt->inputMax = oldinputMax;
            ctxt->inputTab = oldinputTab;
            ctxt->charset = oldcharset;
+           ctxt->encoding = oldencoding;
            return;
        }
        ctxt->inputNr = 0;
@@ -470,6 +491,11 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
        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; */
     }
 }
@@ -574,6 +600,7 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name)
         * parse the external entity
         */
        xmlNodePtr children;
+       unsigned long oldnbent = ctxt->nbentities;
 
         val = xmlParseCtxtExternalEntity(ctxt, ret->URI,
                                         ret->ExternalID, &children);
@@ -586,8 +613,11 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name)
            return(NULL);
        }
        ret->owner = 1;
-       if (ret->checked == 0)
-           ret->checked = 1;
+       if (ret->checked == 0) {
+           ret->checked = (ctxt->nbentities - oldnbent + 1) * 2;
+           if ((ret->content != NULL) && (xmlStrchr(ret->content, '<')))
+               ret->checked |= 1;
+       }
     }
     return(ret);
 }
@@ -621,8 +651,8 @@ xmlSAX2GetParameterEntity(void *ctx, const xmlChar *name)
 /**
  * xmlSAX2EntityDecl:
  * @ctx: the user data (XML parser context)
- * @name:  the entity name 
- * @type:  the entity type 
+ * @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).
@@ -657,7 +687,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
                base = ctxt->input->filename;
            if (base == NULL)
                base = ctxt->directory;
-       
+
            URI = xmlBuildURI(systemId, (const xmlChar *) base);
            ent->URI = URI;
        }
@@ -666,7 +696,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
                              systemId, content);
        if ((ent == NULL) && (ctxt->pedantic) &&
            (ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
-           ctxt->sax->warning(ctxt->userData, 
+           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;
@@ -676,7 +706,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
                base = ctxt->input->filename;
            if (base == NULL)
                base = ctxt->directory;
-       
+
            URI = xmlBuildURI(systemId, (const xmlChar *) base);
            ent->URI = URI;
        }
@@ -691,8 +721,8 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
  * xmlSAX2AttributeDecl:
  * @ctx: the user data (XML parser context)
  * @elem:  the name of the element
- * @fullname:  the attribute name 
- * @type:  the attribute type 
+ * @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
@@ -735,7 +765,7 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
               (xmlAttributeDefault) def, defaultValue, tree);
     else if (ctxt->inSubset == 2)
        attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, elem,
-          name, prefix, (xmlAttributeType) type, 
+          name, prefix, (xmlAttributeType) type,
           (xmlAttributeDefault) def, defaultValue, tree);
     else {
         xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
@@ -761,8 +791,8 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
 /**
  * xmlSAX2ElementDecl:
  * @ctx: the user data (XML parser context)
- * @name:  the element name 
- * @type:  the element type 
+ * @name:  the element name
+ * @type:  the element type
  * @content: the element value tree
  *
  * An element definition has been parsed
@@ -883,7 +913,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
                        publicId, systemId, notationName);
        if ((ent == NULL) && (ctxt->pedantic) &&
            (ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
-           ctxt->sax->warning(ctxt->userData, 
+           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;
@@ -893,7 +923,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
                base = ctxt->input->filename;
            if (base == NULL)
                base = ctxt->directory;
-       
+
            URI = xmlBuildURI(systemId, (const xmlChar *) base);
            ent->URI = URI;
        }
@@ -903,7 +933,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
                        publicId, systemId, notationName);
        if ((ent == NULL) && (ctxt->pedantic) &&
            (ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
-           ctxt->sax->warning(ctxt->userData, 
+           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;
@@ -913,7 +943,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
                base = ctxt->input->filename;
            if (base == NULL)
                base = ctxt->directory;
-       
+
            URI = xmlBuildURI(systemId, (const xmlChar *) base);
            ent->URI = URI;
        }
@@ -1157,12 +1187,12 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
            uri = xmlParseURI((const char *)val);
            if (uri == NULL) {
                if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
-                   ctxt->sax->warning(ctxt->userData, 
+                   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, 
+                       ctxt->sax->warning(ctxt->userData,
                             "xmlns: URI %s is not absolute\n", val);
                }
                xmlFreeURI(uri);
@@ -1182,7 +1212,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
            ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc,
                                           ctxt->node, prefix, nsret, val);
 #endif /* LIBXML_VALID_ENABLED */
-       if (name != NULL) 
+       if (name != NULL)
            xmlFree(name);
        if (nval != NULL)
            xmlFree(nval);
@@ -1204,7 +1234,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
            if (val == NULL) {
                xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
                xmlFree(ns);
-               if (name != NULL) 
+               if (name != NULL)
                    xmlFree(name);
                return;
            }
@@ -1245,7 +1275,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
            ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc,
                                           ctxt->node, prefix, nsret, value);
 #endif /* LIBXML_VALID_ENABLED */
-       if (name != NULL) 
+       if (name != NULL)
            xmlFree(name);
        if (nval != NULL)
            xmlFree(nval);
@@ -1311,7 +1341,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
 #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.
@@ -1323,7 +1353,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
            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);
@@ -1380,7 +1410,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
 error:
     if (nval != NULL)
        xmlFree(nval);
-    if (ns != NULL) 
+    if (ns != NULL)
        xmlFree(ns);
 }
 
@@ -1479,7 +1509,7 @@ process_external_subset:
                 *  - this is a namespace prefix
                 *  - the user required for completion in the tree
                 *    like XSLT
-                *  - there isn't already an attribute definition 
+                *  - there isn't already an attribute definition
                 *    in the internal subset overriding it.
                 */
                if (((attr->prefix != NULL) &&
@@ -1568,17 +1598,17 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
     /*
      * First check on validity:
      */
-    if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && 
+    if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
         ((ctxt->myDoc->intSubset == NULL) ||
-        ((ctxt->myDoc->intSubset->notations == NULL) && 
+        ((ctxt->myDoc->intSubset->notations == NULL) &&
          (ctxt->myDoc->intSubset->elements == NULL) &&
-         (ctxt->myDoc->intSubset->attributes == 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
@@ -1766,7 +1796,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
     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;
@@ -1783,7 +1813,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
                                             cur);
 #endif /* LIBXML_VALID_ENABLED */
 
-    
+
     /*
      * end of parsing of this node.
      */
@@ -1799,8 +1829,8 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
  * @ctxt:  the parser context
  * @str:  the input string
  * @len: the string length
- * 
- * Remove the entities from an attribute value
+ *
+ * Callback for a text node
  *
  * Returns the newly allocated string or NULL if not needed or error
  */
@@ -1833,7 +1863,7 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
 
        if ((len < (int) (2 * sizeof(void *))) &&
            (ctxt->options & XML_PARSE_COMPACT)) {
-           /* store the string in the node overrithing properties and nsDef */
+           /* store the string in the node overriding properties and nsDef */
            xmlChar *tmp = (xmlChar *) &(ret->properties);
            memcpy(tmp, str, len);
            tmp[len] = 0;
@@ -1865,8 +1895,17 @@ skip:
     } else
        ret->content = (xmlChar *) intern;
 
-    if (ctxt->input != NULL)
-        ret->line = ctxt->input->line;
+    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);
@@ -1879,7 +1918,7 @@ skip:
  * @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
@@ -1945,7 +1984,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
        memset(ret, 0, sizeof(xmlAttr));
        ret->type = XML_ATTRIBUTE_NODE;
 
-       ret->parent = ctxt->node; 
+       ret->parent = ctxt->node;
        ret->doc = ctxt->myDoc;
        ret->ns = namespace;
 
@@ -1969,7 +2008,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
            xmlRegisterNodeDefaultValue((xmlNodePtr)ret);
     } else {
        if (ctxt->dictNames)
-           ret = xmlNewNsPropEatName(ctxt->node, namespace, 
+           ret = xmlNewNsPropEatName(ctxt->node, namespace,
                                      (xmlChar *) localname, NULL);
        else
            ret = xmlNewNsProp(ctxt->node, namespace, localname, NULL);
@@ -2055,7 +2094,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
                    xmlChar *nvalnorm;
                    xmlChar fn[50];
                    xmlChar *fullname;
-                   
+
                    fullname = xmlBuildQName(localname, prefix, fn, 50);
                    if (fullname != NULL) {
                        ctxt->vctxt.valid = 1;
@@ -2170,13 +2209,13 @@ xmlSAX2StartElementNs(void *ctx,
     /*
      * First check on validity:
      */
-    if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) && 
+    if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
         ((ctxt->myDoc->intSubset == NULL) ||
-        ((ctxt->myDoc->intSubset->notations == NULL) && 
+        ((ctxt->myDoc->intSubset->notations == NULL) &&
          (ctxt->myDoc->intSubset->elements == NULL) &&
-         (ctxt->myDoc->intSubset->attributes == NULL) && 
+         (ctxt->myDoc->intSubset->attributes == NULL) &&
          (ctxt->myDoc->intSubset->entities == NULL)))) {
-       xmlErrValid(ctxt, XML_ERR_NO_DTD,
+       xmlErrValid(ctxt, XML_DTD_NO_DTD,
          "Validation failed: no DTD found !", NULL, NULL);
        ctxt->validate = 0;
     }
@@ -2221,12 +2260,12 @@ xmlSAX2StartElementNs(void *ctx,
            xmlRegisterNodeDefaultValue(ret);
     } else {
        if (ctxt->dictNames)
-           ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, 
+           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, 
+           ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
                                       (xmlChar *) lname, NULL);
        if (ret == NULL) {
            xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
@@ -2431,7 +2470,7 @@ xmlSAX2EndElementNs(void *ctx,
  * @ctx: the user data (XML parser context)
  * @name:  The entity name
  *
- * called when an entity xmlSAX2Reference is detected. 
+ * called when an entity xmlSAX2Reference is detected.
  */
 void
 xmlSAX2Reference(void *ctx, const xmlChar *name)
@@ -2536,7 +2575,7 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, int len)
                 xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: huge text node");
                 return;
             }
-           if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len || 
+           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;
index 4ff672e..7ad8630 100644 (file)
@@ -2,8 +2,8 @@ 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>&AC_FD_CC; dnl
-(eval [$]$1) 2>&AC_FD_CC; _out=`eval [$]$1 2>&1` && test "x$_out" = x; }])
+[{ (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],
@@ -19,8 +19,8 @@ if AC_TRY_EVAL2(ac_compile); then
   ifelse([$3], , :, [rm -rf conftest*
   $3])
 else
-  echo "configure: failed program was:" >&AC_FD_CC
-  cat conftest.$ac_ext >&AC_FD_CC
+  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
+  cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
 ifelse([$4], , , [  rm -rf conftest*
   $4
 ])dnl
index fcf3076..cb558d2 100644 (file)
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+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'.])])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 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.
 
+# serial 1
+
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -34,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.11'
 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.11.1], [],
+m4_if([$1], [1.11.6], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -50,19 +54,21 @@ m4_define([_AM_AUTOCONF_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.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])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, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 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.
 
+# serial 1
+
 # 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/../..'.
@@ -144,14 +150,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 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.
 
-# serial 10
+# serial 12
 
 # 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,
@@ -191,6 +197,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # 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.
@@ -255,7 +262,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
        break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    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.
@@ -320,10 +327,13 @@ AC_DEFUN([AM_DEP_TRACK],
 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 -*-
@@ -406,18 +416,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 ])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# 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.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -557,12 +555,15 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 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.
 
+# serial 1
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -694,12 +695,15 @@ else
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 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.
 
+# serial 1
+
 # AM_PROG_MKDIR_P
 # ---------------
 # Check for `mkdir -p'.
@@ -722,13 +726,14 @@ esac
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 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.
 
-# serial 4
+# serial 5
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -736,13 +741,13 @@ 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)])])
@@ -818,13 +823,13 @@ Check your system clock])
 fi
 AC_MSG_RESULT(yes)])
 
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011  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.
 
-# serial 1
+# serial 2
 
 # AM_SILENT_RULES([DEFAULT])
 # --------------------------
@@ -839,18 +844,50 @@ 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, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 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.
 
+# serial 1
+
 # AM_PROG_INSTALL_STRIP
 # ---------------------
 # One issue with vendor `install' (even GNU) is that you can't
@@ -873,13 +910,13 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 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.
 
-# serial 2
+# serial 3
 
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
@@ -888,13 +925,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
 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, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -916,10 +953,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [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}'])
 m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
      [m4_case([$1], [ustar],, [pax],,
               [m4_fatal([Unknown tar format])])
 AC_MSG_CHECKING([how to create a $1 tar archive])
diff --git a/buf.c b/buf.c
new file mode 100644 (file)
index 0000000..d1756c4
--- /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 xmlBufPtr 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(const 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 (file)
index 0000000..e8c7715
--- /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 xmlBufPtr buf); */
+/* const xmlChar * xmlBufEnd(const 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
index 9c3cad2..afd95b3 100644 (file)
--- a/c14n.c
+++ b/c14n.c
@@ -1,12 +1,12 @@
 /*
- * "Canonical XML" implementation 
+ * "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
@@ -27,6 +27,8 @@
 #include <libxml/xpathInternals.h>
 #include <libxml/c14n.h>
 
+#include "buf.h"
+
 /************************************************************************
  *                                                                     *
  *             Some declaration better left private ATM                *
@@ -44,7 +46,7 @@ typedef struct _xmlC14NVisibleNsStack {
     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 */          
+    xmlNsPtr   *nsTab;     /* array of ns in no particular order */
     xmlNodePtr *nodeTab;   /* array of nodes in no particular order */
 } xmlC14NVisibleNsStack, *xmlC14NVisibleNsStackPtr;
 
@@ -52,7 +54,7 @@ typedef struct _xmlC14NCtx {
     /* input parameters */
     xmlDocPtr doc;
     xmlC14NIsVisibleCallback is_visible_callback;
-    void* user_data;    
+    void* user_data;
     int with_comments;
     xmlOutputBufferPtr buf;
 
@@ -60,7 +62,7 @@ typedef struct _xmlC14NCtx {
     xmlC14NPosition pos;
     int parent_is_doc;
     xmlC14NVisibleNsStackPtr ns_rendered;
-    
+
     /* C14N mode */
     xmlC14NMode mode;
 
@@ -73,17 +75,17 @@ typedef struct _xmlC14NCtx {
 
 static xmlC14NVisibleNsStackPtr        xmlC14NVisibleNsStackCreate     (void);
 static void     xmlC14NVisibleNsStackDestroy   (xmlC14NVisibleNsStackPtr cur);
-static void     xmlC14NVisibleNsStackAdd           (xmlC14NVisibleNsStackPtr cur, 
+static void     xmlC14NVisibleNsStackAdd           (xmlC14NVisibleNsStackPtr cur,
                                                  xmlNsPtr ns,
                                                  xmlNodePtr node);
-static void                    xmlC14NVisibleNsStackSave       (xmlC14NVisibleNsStackPtr cur,
+static void                    xmlC14NVisibleNsStackSave       (xmlC14NVisibleNsStackPtr cur,
                                                                 xmlC14NVisibleNsStackPtr state);
-static void                    xmlC14NVisibleNsStackRestore    (xmlC14NVisibleNsStackPtr cur,
+static void                    xmlC14NVisibleNsStackRestore    (xmlC14NVisibleNsStackPtr cur,
                                                                 xmlC14NVisibleNsStackPtr state);
-static void                    xmlC14NVisibleNsStackShift      (xmlC14NVisibleNsStackPtr cur);
-static int                     xmlC14NVisibleNsStackFind       (xmlC14NVisibleNsStackPtr cur, 
+static void                    xmlC14NVisibleNsStackShift      (xmlC14NVisibleNsStackPtr cur);
+static int                     xmlC14NVisibleNsStackFind       (xmlC14NVisibleNsStackPtr cur,
                                                                 xmlNsPtr ns);
-static int                     xmlExcC14NVisibleNsStackFind    (xmlC14NVisibleNsStackPtr cur, 
+static int                     xmlExcC14NVisibleNsStackFind    (xmlC14NVisibleNsStackPtr cur,
                                                                 xmlNsPtr ns,
                                                                 xmlC14NCtxPtr ctx);
 
@@ -105,26 +107,26 @@ typedef enum {
 static xmlChar *xmlC11NNormalizeString(const xmlChar * input,
                                        xmlC14NNormalizationMode mode);
 
-#define        xmlC11NNormalizeAttr( a ) \
+#define        xmlC11NNormalizeAttr( a ) \
     xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_ATTR)
-#define        xmlC11NNormalizeComment( a ) \
+#define        xmlC11NNormalizeComment( a ) \
     xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_COMMENT)
-#define        xmlC11NNormalizePI( a ) \
+#define        xmlC11NNormalizePI( a ) \
     xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_PI)
-#define        xmlC11NNormalizeText( a ) \
+#define        xmlC11NNormalizeText( a ) \
     xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_TEXT)
 
-#define        xmlC14NIsVisible( ctx, node, parent ) \
+#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 ) \
+#define        xmlC14NIsExclusive( ctx ) \
     ( (ctx)->mode == XML_C14N_EXCLUSIVE_1_0 )
 
 /************************************************************************
  *                                                                     *
- *             Some factorized error routines                          *
+ *             Some factorized error routines                          *
  *                                                                     *
  ************************************************************************/
 
@@ -249,25 +251,25 @@ xmlC14NErr(xmlC14NCtxPtr ctxt, xmlNodePtr node, int error,
  ************************************************************************/
 #define XML_NAMESPACES_DEFAULT         16
 
-static int                     
+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)); 
-           
+
+           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; 
+               ns.next = (xmlNsPtr)parent;
            }
 
-           /* 
-            * If the input is an XPath node-set, then the node-set must explicitly 
+           /*
+            * 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));
@@ -305,12 +307,12 @@ xmlC14NVisibleNsStackDestroy(xmlC14NVisibleNsStackPtr cur) {
     }
     memset(cur, 0, sizeof(xmlC14NVisibleNsStack));
     xmlFree(cur);
-    
+
 }
 
-static void 
+static void
 xmlC14NVisibleNsStackAdd(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlNodePtr node) {
-    if((cur == NULL) || 
+    if((cur == NULL) ||
        ((cur->nsTab == NULL) && (cur->nodeTab != NULL)) ||
        ((cur->nsTab != NULL) && (cur->nodeTab == NULL))) {
         xmlC14NErrParam("adding namespace to stack");
@@ -328,9 +330,9 @@ xmlC14NVisibleNsStackAdd(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlNodePtr n
        memset(cur->nodeTab, 0 , XML_NAMESPACES_DEFAULT * sizeof(xmlNodePtr));
         cur->nsMax = XML_NAMESPACES_DEFAULT;
     } else if(cur->nsMax == cur->nsCurEnd) {
-       void *tmp;      
+       void *tmp;
        int tmpSize;
-       
+
        tmpSize = 2 * cur->nsMax;
        tmp = xmlRealloc(cur->nsTab, tmpSize * sizeof(xmlNsPtr));
        if (tmp == NULL) {
@@ -360,7 +362,7 @@ xmlC14NVisibleNsStackSave(xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStackPtr
         xmlC14NErrParam("saving namespaces stack");
        return;
     }
-    
+
     state->nsCurEnd = cur->nsCurEnd;
     state->nsPrevStart = cur->nsPrevStart;
     state->nsPrevEnd = cur->nsPrevEnd;
@@ -377,7 +379,7 @@ xmlC14NVisibleNsStackRestore(xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStack
     cur->nsPrevEnd = state->nsPrevEnd;
 }
 
-static void 
+static void
 xmlC14NVisibleNsStackShift(xmlC14NVisibleNsStackPtr cur) {
     if(cur == NULL) {
         xmlC14NErrParam("shifting namespaces stack");
@@ -400,7 +402,7 @@ xmlC14NStrEqual(const xmlChar *str1, const xmlChar *str2) {
 
 /**
  * xmlC14NVisibleNsStackFind:
- * @ctx:               the C14N context 
+ * @ctx:               the C14N context
  * @ns:                        the namespace to check
  *
  * Checks whether the given namespace was already rendered or not
@@ -414,14 +416,14 @@ xmlC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns)
     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 
+     * 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;
@@ -432,7 +434,7 @@ xmlC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns)
        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));
            }
@@ -441,20 +443,20 @@ xmlC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns)
     return(has_empty_ns);
 }
 
-static int                     
+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 
+     * 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;
@@ -465,10 +467,10 @@ xmlExcC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NC
        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]));
+                   return(xmlC14NIsVisible(ctx, ns1, cur->nodeTab[i]));
                } else {
                    return(0);
                }
@@ -483,8 +485,8 @@ xmlExcC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NC
 
 /**
  * xmlC14NIsXmlNs:
- * @ns:                the namespace to check
- *             
+ * @ns:                the namespace to check
+ *
  * Checks whether the given namespace is a default "xml:" namespace
  * with href="http://www.w3.org/XML/1998/namespace"
  *
@@ -504,7 +506,7 @@ xmlC14NIsXmlNs(xmlNsPtr ns)
 /**
  * xmlC14NNsCompare:
  * @ns1:               the pointer to first namespace
- * @ns2:               the pointer to second namespace
+ * @ns2:               the pointer to second namespace
  *
  * Compares the namespaces by names (prefixes).
  *
@@ -527,7 +529,7 @@ xmlC14NNsCompare(xmlNsPtr ns1, xmlNsPtr ns2)
 /**
  * xmlC14NPrintNamespaces:
  * @ns:                        the pointer to namespace
- * @ctx:               the C14N context
+ * @ctx:               the C14N context
  *
  * Prints the given namespace to the output buffer from C14N context.
  *
@@ -558,39 +560,39 @@ xmlC14NPrintNamespaces(const xmlNsPtr ns, xmlC14NCtxPtr ctx)
 
 /**
  * xmlC14NProcessNamespacesAxis:
- * @ctx:               the C14N context
+ * @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 
+ * 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 
+ * 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 
+ *    - 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, 
+ * 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 
+ * 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.
@@ -603,7 +605,7 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
     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);
@@ -622,29 +624,29 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
     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);
+           xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
                }
                if(!already_rendered) {
-                   xmlListInsert(list, ns); 
+                   xmlListInsert(list, ns);
                }
-               if(xmlStrlen(ns->prefix) == 0) {
+               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 
+     * 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 
+     *  - 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) {
@@ -652,17 +654,17 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
 
         memset(&ns_default, 0, sizeof(ns_default));
         if(!xmlC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default)) {
-           xmlC14NPrintNamespaces(&ns_default, ctx);
+           xmlC14NPrintNamespaces(&ns_default, ctx);
        }
     }
-       
-    
-    /* 
-     * print out all elements from list 
+
+
+    /*
+     * print out all elements from list
      */
     xmlListWalk(list, (xmlListWalker) xmlC14NPrintNamespaces, (const void *) ctx);
 
-    /* 
+    /*
      * Cleanup
      */
     xmlListDelete(list);
@@ -672,28 +674,28 @@ xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
 
 /**
  * xmlExcC14NProcessNamespacesAxis:
- * @ctx:               the C14N context
+ * @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 
+ * 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 
+ * 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 
+ *    * 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 
+ *    * 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 
+ * 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.
  *
@@ -710,7 +712,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
     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);
@@ -731,15 +733,15 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
         return (-1);
     }
 
-    /* 
+    /*
      * process inclusive namespaces:
-     * All namespace nodes appearing on inclusive ns list are 
+     * All namespace nodes appearing on inclusive ns list are
      * handled as provided in Canonical XML
      */
     if(ctx->inclusive_ns_prefixes != NULL) {
-       xmlChar *prefix; 
+       xmlChar *prefix;
        int i;
-       
+
        for (i = 0; ctx->inclusive_ns_prefixes[i] != NULL; ++i) {
            prefix = ctx->inclusive_ns_prefixes[i];
            /*
@@ -750,23 +752,23 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
                 prefix = NULL;
                has_empty_ns_in_inclusive_list = 1;
             }
-       
-           ns = xmlSearchNs(cur->doc, cur, prefix);        
+
+           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);
+                   xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
                }
                if(!already_rendered) {
-                   xmlListInsert(list, ns); 
+                   xmlListInsert(list, ns);
                }
-               if(xmlStrlen(ns->prefix) == 0) {
+               if(xmlStrlen(ns->prefix) == 0) {
                    has_empty_ns = 1;
                }
            }
        }
     }
-    
+
     /* add node namespace */
     if(cur->ns != NULL) {
        ns = cur->ns;
@@ -775,32 +777,32 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
        has_visibly_utilized_empty_ns = 1;
     }
     if((ns != NULL) && !xmlC14NIsXmlNs(ns)) {
-       if(visible && xmlC14NIsVisible(ctx, ns, cur)) { 
+       if(visible && xmlC14NIsVisible(ctx, ns, cur)) {
            if(!xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, ns, ctx)) {
                xmlListInsert(list, ns);
            }
        }
        if(visible) {
-           xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur); 
+           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")         
+         * 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); 
+           xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, cur);
            if(!already_rendered && visible) {
-               xmlListInsert(list, attr->ns); 
+               xmlListInsert(list, attr->ns);
            }
            if(xmlStrlen(attr->ns->prefix) == 0) {
                has_empty_ns = 1;
@@ -813,33 +815,33 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
     /*
      * Process xmlns=""
      */
-    if(visible && has_visibly_utilized_empty_ns && 
+    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);
+           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);
+           xmlC14NPrintNamespaces(&ns_default, ctx);
        }
     }
 
-    
 
-    /* 
-     * print out all elements from list 
+
+    /*
+     * print out all elements from list
      */
     xmlListWalk(list, (xmlListWalker) xmlC14NPrintNamespaces, (const void *) ctx);
 
-    /* 
+    /*
      * Cleanup
      */
     xmlListDelete(list);
@@ -849,8 +851,8 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
 
 /**
  * xmlC14NIsXmlAttr:
- * @attr:              the attr to check
- *             
+ * @attr:              the attr to check
+ *
  * Checks whether the given attribute is a default "xml:" namespace
  * with href="http://www.w3.org/XML/1998/namespace"
  *
@@ -861,7 +863,7 @@ xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
 static int
 xmlC14NIsXmlAttr(xmlAttrPtr attr)
 {
-    return ((attr->ns != NULL) && 
+    return ((attr->ns != NULL) &&
            (xmlC14NIsXmlNs(attr->ns) != 0));
 }
 
@@ -869,7 +871,7 @@ xmlC14NIsXmlAttr(xmlAttrPtr attr)
 /**
  * xmlC14NAttrsCompare:
  * @attr1:             the pointer tls o first attr
- * @attr2:             the pointer to second attr
+ * @attr2:             the pointer to second attr
  *
  * Prints the given attribute to the output buffer from C14N context.
  *
@@ -893,7 +895,7 @@ xmlC14NAttrsCompare(xmlAttrPtr attr1, xmlAttrPtr attr2)
         return (xmlStrcmp(attr1->name, attr2->name));
     }
 
-    /* 
+    /*
      * Attributes in the default namespace are first
      * because the default namespace is not applied to
      * unqualified attributes
@@ -918,10 +920,10 @@ xmlC14NAttrsCompare(xmlAttrPtr attr1, xmlAttrPtr attr2)
 /**
  * xmlC14NPrintAttrs:
  * @attr:              the pointer to attr
- * @ctx:               the C14N context
+ * @ctx:               the C14N context
  *
  * Prints out canonical attribute urrent node to the
- * buffer from C14N context as follows 
+ * buffer from C14N context as follows
  *
  * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n)
  *
@@ -968,7 +970,7 @@ xmlC14NPrintAttrs(const xmlAttrPtr attr, xmlC14NCtxPtr ctx)
  * xmlC14NFindHiddenParentAttr:
  *
  * Finds an attribute in a hidden parent node.
- * 
+ *
  * Returns a pointer to the attribute node (if found) or NULL otherwise.
  */
 static xmlAttrPtr
@@ -996,7 +998,7 @@ xmlC14NFindHiddenParentAttr(xmlC14NCtxPtr ctx, xmlNodePtr cur, const xmlChar * n
  */
 static xmlAttrPtr
 xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr)
-{    
+{
     xmlChar * res = NULL;
     xmlNodePtr cur;
     xmlAttrPtr attr;
@@ -1028,9 +1030,9 @@ xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr)
 
                 xmlC14NErrInternal("processing xml:base attribute - can't get attr value");
                 return (NULL);
-            } 
+            }
 
-            /* we need to add '/' if our current base uri ends with '..' or '.' 
+            /* 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] == '.') {
@@ -1047,7 +1049,7 @@ xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr)
             }
 
             /* build uri */
-            tmp_str2 = xmlBuildURI(res, tmp_str); 
+            tmp_str2 = xmlBuildURI(res, tmp_str);
             if(tmp_str2 == NULL) {
                 xmlFree(tmp_str);
                 xmlFree(res);
@@ -1080,7 +1082,7 @@ xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr)
         xmlC14NErrInternal("processing xml:base attribute - can't construct attribute");
         return (NULL);
     }
+
     /* done */
     xmlFree(res);
     return (attr);
@@ -1088,33 +1090,33 @@ xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr)
 
 /**
  * xmlC14NProcessAttrsAxis:
- * @ctx:               the C14N context
+ * @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 
+ * 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 
+ * 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 
+ *
+ * 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 
+ * 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.
@@ -1123,9 +1125,9 @@ static int
 xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
 {
     xmlAttrPtr attr;
-    xmlListPtr list;    
+    xmlListPtr list;
     xmlAttrPtr attrs_to_delete = NULL;
-    
+
     /* special processing for 1.1 spec */
     xmlAttrPtr xml_base_attr = NULL;
     xmlAttrPtr xml_lang_attr = NULL;
@@ -1147,19 +1149,19 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
 
     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. 
+        /* 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. 
+
+        /*
+         * Add all visible attributes from current node.
          */
         attr = cur->properties;
         while (attr != NULL) {
@@ -1170,16 +1172,16 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
             attr = attr->next;
         }
 
-        /* 
+        /*
          * Handle xml attributes
          */
-        if (parent_visible && (cur->parent != NULL) && 
-            (!xmlC14NIsVisible(ctx, cur->parent, cur->parent->parent))) 
+        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 
+             * If XPath node-set is not specified then the parent is always
              * visible!
              */
             tmp = cur->parent;
@@ -1200,12 +1202,12 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
         /* 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 
+        /* 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. 
+        /*
+         * Add all visible attributes from current node.
          */
         attr = cur->properties;
         while (attr != NULL) {
@@ -1219,36 +1221,36 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
         /* 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. 
+        /* 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 
+         * 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 
+         *
+         * 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 
+         *
+         * 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 
+         *
+         * 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 
+         *
+         * 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. 
+        /*
+         * Add all visible attributes from current node.
          */
         attr = cur->properties;
         while (attr != NULL) {
@@ -1265,7 +1267,7 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
                 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;
@@ -1282,11 +1284,11 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
                     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)) {
 
@@ -1311,7 +1313,7 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
             }
             if(xml_base_attr != NULL) {
                 xml_base_attr = xmlC14NFixupBaseAttr(ctx, xml_base_attr);
-                if(xml_base_attr != NULL) {                    
+                if(xml_base_attr != NULL) {
                     xmlListInsert(list, xml_base_attr);
 
                     /* note that we MUST delete returned attr node ourselves! */
@@ -1325,12 +1327,12 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
         break;
     }
 
-    /* 
-     * print out all elements from list 
+    /*
+     * print out all elements from list
      */
     xmlListWalk(list, (xmlListWalker) xmlC14NPrintAttrs, (const void *) ctx);
 
-    /* 
+    /*
      * Cleanup
      */
     xmlFreePropList(attrs_to_delete);
@@ -1338,7 +1340,7 @@ xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
     return (0);
 }
 
-/** 
+/**
  * xmlC14NCheckForRelativeNamespaces:
  * @ctx:               the C14N context
  * @cur:               the current element node
@@ -1388,23 +1390,23 @@ xmlC14NCheckForRelativeNamespaces(xmlC14NCtxPtr ctx, xmlNodePtr cur)
 
 /**
  * xmlC14NProcessElementNode:
- * @ctx:               the pointer to C14N context object
+ * @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 
+ * 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
@@ -1421,7 +1423,7 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
         return (-1);
     }
 
-    /* 
+    /*
      * Check relative relative namespaces:
      * implementations of XML canonicalization MUST report an operation
      * failure on documents containing relative namespace URIs.
@@ -1432,13 +1434,13 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
     }
 
 
-    /* 
+    /*
      * Save ns_rendered stack position
      */
     memset(&state, 0, sizeof(state));
     xmlC14NVisibleNsStackSave(ctx->ns_rendered, &state);
 
-    if (visible) {     
+    if (visible) {
         if (ctx->parent_is_doc) {
            /* save this flag into the stack */
            parent_is_doc = ctx->parent_is_doc;
@@ -1468,14 +1470,14 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
     if(visible) {
        xmlC14NVisibleNsStackShift(ctx->ns_rendered);
     }
-    
+
     ret = xmlC14NProcessAttrsAxis(ctx, cur, visible);
     if (ret < 0) {
        xmlC14NErrInternal("processing attributes axis");
-       return (-1);
+       return (-1);
     }
 
-    if (visible) { 
+    if (visible) {
         xmlOutputBufferWriteString(ctx->buf, ">");
     }
     if (cur->children != NULL) {
@@ -1501,7 +1503,7 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
         }
     }
 
-    /* 
+    /*
      * Restore ns_rendered stack position
      */
     xmlC14NVisibleNsStackRestore(ctx->ns_rendered, &state);
@@ -1510,9 +1512,9 @@ xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
 
 /**
  * xmlC14NProcessNode:
- * @ctx:               the pointer to C14N context object
+ * @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
@@ -1537,9 +1539,9 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur)
         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 
+             * 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 */
@@ -1559,16 +1561,16 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur)
             }
             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 
+            /*
+             * 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) {
@@ -1607,17 +1609,17 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur)
         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 
+             * 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) {
@@ -1687,8 +1689,8 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur)
         case XML_XINCLUDE_START:
         case XML_XINCLUDE_END:
 #endif
-            /* 
-             * should be ignored according to "W3C Canonical XML" 
+            /*
+             * should be ignored according to "W3C Canonical XML"
              */
             break;
         default:
@@ -1701,9 +1703,9 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur)
 
 /**
  * xmlC14NProcessNodeList:
- * @ctx:               the pointer to C14N context object
+ * @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
@@ -1728,7 +1730,7 @@ xmlC14NProcessNodeList(xmlC14NCtxPtr ctx, xmlNodePtr cur)
 /**
  * xmlC14NFreeCtx:
  * @ctx: the pointer to C14N context object
- *             
+ *
  * Cleanups the C14N context object.
  */
 
@@ -1748,27 +1750,27 @@ xmlC14NFreeCtx(xmlC14NCtxPtr ctx)
 
 /**
  * xmlC14NNewCtx:
- * @doc:               the XML document for canonization
- * @is_visible_callback:the function to use to determine is node visible 
+ * @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
+ * @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 
+ * @inclusive_ns_prefixe the list of inclusive namespace prefixes
  *                     ended with a NULL or NULL if there is no
- *                     inclusive namespaces (only for ` 
+ *                     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 
+ * @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,  
+xmlC14NNewCtx(xmlDocPtr doc,
              xmlC14NIsVisibleCallback is_visible_callback, void* user_data,
               xmlC14NMode mode, xmlChar ** inclusive_ns_prefixes,
               int with_comments, xmlOutputBufferPtr buf)
@@ -1840,28 +1842,28 @@ xmlC14NNewCtx(xmlDocPtr doc,
 
 /**
  * xmlC14NExecute:
- * @doc:               the XML document for canonization
- * @is_visible_callback:the function to use to determine is node visible 
+ * @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
+ * @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 
+ * @inclusive_ns_prefixes: the list of inclusive namespace prefixes
  *                     ended with a NULL or NULL if there is no
- *                     inclusive namespaces (only for exclusive 
+ *                     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 
+ * @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  
+ * Returns non-negative value on success or a negative value on fail
  */
-int            
+int
 xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback,
         void* user_data, int mode, xmlChar **inclusive_ns_prefixes,
         int with_comments, xmlOutputBufferPtr buf) {
@@ -1875,15 +1877,15 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback,
         return (-1);
     }
 
-    /* for backward compatibility, we have to have "mode" as "int" 
+    /* 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: 
+    case XML_C14N_1_1:
          c14n_mode = (xmlC14NMode)mode;
          break;
-    default:       
+    default:
         xmlC14NErrParam("invalid mode for executing c14n");
         return (-1);
     }
@@ -1897,7 +1899,7 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback,
         return (-1);
     }
 
-    ctx = xmlC14NNewCtx(doc, is_visible_callback, user_data, 
+    ctx = xmlC14NNewCtx(doc, is_visible_callback, user_data,
                    c14n_mode, inclusive_ns_prefixes,
                     with_comments, buf);
     if (ctx == NULL) {
@@ -1908,12 +1910,12 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback,
 
 
 
-    /*  
+    /*
      * 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 
+     * 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) {
@@ -1935,7 +1937,7 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback,
         return (-1);
     }
 
-    /* 
+    /*
      * Cleanup
      */
     xmlC14NFreeCtx(ctx);
@@ -1944,30 +1946,30 @@ xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback,
 
 /**
  * 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
+ * @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 
+ * @inclusive_ns_prefixes: the list of inclusive namespace prefixes
  *                     ended with a NULL or NULL if there is no
- *                     inclusive namespaces (only for exclusive 
+ *                     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 
+ * @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  
+ * 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, 
+    return(xmlC14NExecute(doc,
                        (xmlC14NIsVisibleCallback)xmlC14NIsNodeInNodeset,
                        nodes,
                        mode,
@@ -1979,24 +1981,24 @@ xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes,
 
 /**
  * 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
+ * @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 
+ * @inclusive_ns_prefixes: the list of inclusive namespace prefixes
  *                     ended with a NULL or NULL if there is no
- *                     inclusive namespaces (only for exclusive 
+ *                     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;
+ * @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 
- *             
+ *                     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  
+ * Returns the number of bytes written on success or a negative value on fail
  */
 int
 xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes,
@@ -2014,7 +2016,7 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes,
     *doc_txt_ptr = NULL;
 
     /*
-     * create memory buffer with UTF8 (default) encoding 
+     * create memory buffer with UTF8 (default) encoding
      */
     buf = xmlAllocOutputBuffer(NULL);
     if (buf == NULL) {
@@ -2033,9 +2035,9 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes,
         return (-1);
     }
 
-    ret = buf->buffer->use;
+    ret = xmlBufUse(buf->buffer);
     if (ret > 0) {
-        *doc_txt_ptr = xmlStrndup(buf->buffer->content, ret);
+        *doc_txt_ptr = xmlStrndup(xmlBufContent(buf->buffer), ret);
     }
     (void) xmlOutputBufferClose(buf);
 
@@ -2048,26 +2050,26 @@ xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes,
 
 /**
  * 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
+ * @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 
+ * @inclusive_ns_prefixes: the list of inclusive namespace prefixes
  *                     ended with a NULL or NULL if there is no
- *                     inclusive namespaces (only for exclusive 
+ *                     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): 
+ * @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 - 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  
+ * Returns the number of bytes written success or a negative value on fail
  */
 int
 xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes,
@@ -2086,7 +2088,7 @@ xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes,
         compression = xmlGetCompressMode();
 #endif
 
-    /* 
+    /*
      * save the content to a temp buffer, use default UTF8 encoding.
      */
     buf = xmlOutputBufferCreateFilename(filename, NULL, compression);
@@ -2106,8 +2108,8 @@ xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes,
         return (-1);
     }
 
-    /* 
-     * get the numbers of bytes written 
+    /*
+     * get the numbers of bytes written
      */
     ret = xmlOutputBufferClose(buf);
     return (ret);
@@ -2121,14 +2123,14 @@ xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes,
 #define growBufferReentrant() {                                                \
     buffer_size *= 2;                                                  \
     buffer = (xmlChar *)                                               \
-               xmlRealloc(buffer, buffer_size * sizeof(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)
index fb586c1..8e34cd2 100644 (file)
--- a/catalog.c
+++ b/catalog.c
@@ -1,5 +1,5 @@
 /**
- * catalog.c: set of generic Catalog related routines 
+ * catalog.c: set of generic Catalog related routines
  *
  * Reference:  SGML Open Technical Resolution TR9401:1997.
  *             http://www.jclark.com/sp/catalog.htm
@@ -41,6 +41,8 @@
 #include <libxml/threads.h>
 #include <libxml/globals.h>
 
+#include "buf.h"
+
 #define MAX_DELEGATE   50
 #define MAX_CATAL_DEPTH        50
 
@@ -60,7 +62,7 @@
  *> values "system" and "public".  I have made the default be "system" to
  *> match yours.
  */
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
@@ -82,10 +84,12 @@ static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
 #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);
@@ -206,7 +210,7 @@ static int xmlCatalogInitialized = 0;
 
 /************************************************************************
  *                                                                     *
- *                     Catalog error handlers                          *
+ *                     Catalog error handlers                          *
  *                                                                     *
  ************************************************************************/
 
@@ -259,9 +263,9 @@ xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error,
  * @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 
+ * @group:  for members of a group, the group entry
  *
- * create a new Catalog entry, this type is shared both by XML and 
+ * 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
@@ -399,7 +403,7 @@ xmlFreeCatalogHashEntryList(xmlCatalogEntryPtr catal) {
  * @type:  type of catalog
  * @prefer:  the PUBLIC vs. SYSTEM current preference value
  *
- * create a new Catalog, this type is shared both by XML and 
+ * 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
@@ -567,7 +571,7 @@ static void xmlDumpXMLCatalogNode(xmlCatalogEntryPtr catal, xmlNodePtr catalog,
                        xns = xmlSearchNsByHref(doc, node, XML_XML_NAMESPACE);
                        if (xns != NULL)
                            xmlSetNsProp(node, xns, BAD_CAST "base",
-                                        cur->value);
+                                        cur->value);
                    }
                    switch (cur->prefer) {
                        case XML_CATA_PREFER_NONE:
@@ -685,7 +689,7 @@ BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd");
     xmlAddChild((xmlNodePtr) doc, catalog);
 
     xmlDumpXMLCatalogNode(catal, catalog, doc, ns, NULL);
-    
+
     /*
      * reserialize it
      */
@@ -822,7 +826,7 @@ xmlCatalogUnWrapURN(const xmlChar *urn) {
     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;
@@ -912,10 +916,7 @@ xmlParseCatalogFile(const char *filename) {
 
     inputStream->filename = (char *) xmlCanonicPath((const xmlChar *)filename);
     inputStream->buf = buf;
-    inputStream->base = inputStream->buf->buffer->content;
-    inputStream->cur = inputStream->buf->buffer->content;
-    inputStream->end = 
-       &inputStream->buf->buffer->content[inputStream->buf->buffer->use];
+    xmlBufResetInput(buf->buffer, inputStream);
 
     inputPush(ctxt, inputStream);
     if ((ctxt->directory == NULL) && (directory == NULL))
@@ -938,7 +939,7 @@ xmlParseCatalogFile(const char *filename) {
         ctxt->myDoc = NULL;
     }
     xmlFreeParserCtxt(ctxt);
-    
+
     return(ret);
 }
 
@@ -990,7 +991,7 @@ xmlLoadFileContent(const char *filename)
         return (NULL);
     }
 #endif
-    content = xmlMallocAtomic(size + 10);
+    content = (xmlChar*)xmlMallocAtomic(size + 10);
     if (content == NULL) {
         xmlCatalogErrMemory("allocating catalog data");
         return (NULL);
@@ -1328,7 +1329,7 @@ xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer,
  *
  * 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
@@ -1396,14 +1397,14 @@ xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename) {
  * @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) 
+    if (catal == NULL)
        return(-1);
     if (catal->URL == NULL)
        return(-1);
@@ -1495,7 +1496,7 @@ xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type,
     xmlCatalogEntryType typ;
     int doregister = 0;
 
-    if ((catal == NULL) || 
+    if ((catal == NULL) ||
        ((catal->type != XML_CATA_CATALOG) &&
         (catal->type != XML_CATA_BROKEN_CATALOG)))
        return(-1);
@@ -1548,7 +1549,7 @@ xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type,
                                       NULL, catal->prefer, NULL);
     if (doregister) {
         catal->type = XML_CATA_CATALOG;
-       cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
+       cur = (xmlCatalogEntryPtr)xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
        if (cur != NULL)
            cur->children = catal->children;
     }
@@ -1571,7 +1572,7 @@ xmlDelXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *value) {
     xmlCatalogEntryPtr cur;
     int ret = 0;
 
-    if ((catal == NULL) || 
+    if ((catal == NULL) ||
        ((catal->type != XML_CATA_CATALOG) &&
         (catal->type != XML_CATA_BROKEN_CATALOG)))
        return(-1);
@@ -1786,7 +1787,7 @@ xmlCatalogXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
                    }
                    if (nbList < MAX_DELEGATE)
                        delegates[nbList++] = cur->URL;
-                           
+
                    if (cur->children == NULL) {
                        xmlFetchXMLCatalogFile(cur);
                    }
@@ -1999,7 +2000,7 @@ xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
     xmlChar *ret = NULL;
     xmlChar *urnID = NULL;
     xmlChar *normid;
-    
+
     if (catal == NULL)
         return(NULL);
     if ((pubID == NULL) && (sysID == NULL))
@@ -2008,7 +2009,7 @@ xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
     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) {
@@ -2088,7 +2089,7 @@ static xmlChar *
 xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) {
     xmlChar *ret = NULL;
     xmlChar *urnID = NULL;
-    
+
     if (catal == NULL)
         return(NULL);
     if (URI == NULL)
@@ -2148,7 +2149,7 @@ xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) {
  */
 static const xmlChar *
 xmlParseSGMLCatalogComment(const xmlChar *cur) {
-    if ((cur[0] != '-') || (cur[1] != '-')) 
+    if ((cur[0] != '-') || (cur[1] != '-'))
        return(cur);
     SKIP(2);
     while ((cur[0] != 0) && ((cur[0] != '-') || ((cur[1] != '-'))))
@@ -2683,7 +2684,7 @@ xmlLoadACatalog(const char *filename)
 
 
     first = content;
-   
+
     while ((*first != 0) && (*first != '-') && (*first != '<') &&
           (!(((*first >= 'A') && (*first <= 'Z')) ||
              ((*first >= 'a') && (*first <= 'z')))))
@@ -2778,7 +2779,7 @@ xmlACatalogResolveSystem(xmlCatalogPtr catal, const xmlChar *sysID) {
 
     if ((sysID == NULL) || (catal == NULL))
        return(NULL);
-    
+
     if (xmlDebugCatalogs)
        xmlGenericError(xmlGenericErrorContext,
                "Resolve sysID %s\n", sysID);
@@ -2813,7 +2814,7 @@ xmlACatalogResolvePublic(xmlCatalogPtr catal, const xmlChar *pubID) {
 
     if ((pubID == NULL) || (catal == NULL))
        return(NULL);
-    
+
     if (xmlDebugCatalogs)
        xmlGenericError(xmlGenericErrorContext,
                "Resolve pubID %s\n", pubID);
@@ -2932,7 +2933,7 @@ xmlACatalogDump(xmlCatalogPtr catal, FILE *out) {
     } else {
        xmlHashScan(catal->sgml,
                    (xmlHashScanner) xmlCatalogDumpEntry, out);
-    } 
+    }
 }
 #endif /* LIBXML_OUTPUT_ENABLED */
 
@@ -2940,7 +2941,7 @@ xmlACatalogDump(xmlCatalogPtr catal, FILE *out) {
  * xmlACatalogAdd:
  * @catal:  a Catalog
  * @type:  the type of record to add to the catalog
- * @orig:  the system, public or prefix to match 
+ * @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
@@ -2999,7 +3000,7 @@ xmlACatalogRemove(xmlCatalogPtr catal, const xmlChar *value) {
                (xmlHashDeallocator) xmlFreeCatalogEntry);
        if (res == 0)
            res = 1;
-    } 
+    }
     return(res);
 }
 
@@ -3058,7 +3059,7 @@ xmlCatalogIsEmpty(xmlCatalogPtr catal) {
            return(1);
        if (res < 0)
            return(-1);
-    } 
+    }
     return(0);
 }
 
@@ -3081,7 +3082,7 @@ xmlInitializeCatalogData(void) {
     if (xmlCatalogInitialized != 0)
        return;
 
-    if (getenv("XML_DEBUG_CATALOG")) 
+    if (getenv("XML_DEBUG_CATALOG"))
        xmlDebugCatalogs = 1;
     xmlCatalogMutex = xmlNewRMutex();
 
@@ -3102,7 +3103,7 @@ xmlInitializeCatalog(void) {
     xmlInitializeCatalogData();
     xmlRMutexLock(xmlCatalogMutex);
 
-    if (getenv("XML_DEBUG_CATALOG")) 
+    if (getenv("XML_DEBUG_CATALOG"))
        xmlDebugCatalogs = 1;
 
     if (xmlDefaultCatalog == NULL) {
@@ -3125,12 +3126,12 @@ xmlInitializeCatalog(void) {
                        unsigned long len = GetModuleFileNameA(hmodule, buf, 255);
                        if (len != 0) {
                                char* p = &(buf[len]);
-                               while (*p != '\\' && p > buf) 
+                               while (*p != '\\' && p > buf)
                                        p--;
                                if (p != buf) {
                                        xmlChar* uri;
                                        strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf));
-                                       uri = xmlCanonicPath(buf);
+                                       uri = xmlCanonicPath((const xmlChar*)buf);
                                        if (uri != NULL) {
                                                strncpy(XML_XML_DEFAULT_CATALOG, uri, 255);
                                                xmlFree(uri);
@@ -3144,15 +3145,15 @@ xmlInitializeCatalog(void) {
            catalogs = XML_XML_DEFAULT_CATALOG;
 #endif
 
-       catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE, 
+       catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
                xmlCatalogDefaultPrefer);
        if (catal != NULL) {
-           /* the XML_CATALOG_FILES envvar is allowed to contain a 
+           /* 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)) 
+               while (xmlIsBlank_ch(*cur))
                    cur++;
                if (*cur != 0) {
                    paths = cur;
@@ -3245,7 +3246,7 @@ xmlLoadCatalogs(const char *pathss) {
                cur++;
            path = xmlStrndup((const xmlChar *)paths, cur - paths);
 #ifdef _WIN32
-        iLen = strlen(path);
+        iLen = strlen((const char*)path);
         for(i = 0; i < iLen; i++) {
             if(path[i] == '\\') {
                 path[i] = '/';
@@ -3277,7 +3278,7 @@ xmlCatalogCleanup(void) {
        xmlGenericError(xmlGenericErrorContext,
                "Catalogs cleanup\n");
     if (xmlCatalogXMLFiles != NULL)
-       xmlHashFree(xmlCatalogXMLFiles, 
+       xmlHashFree(xmlCatalogXMLFiles,
                    (xmlHashDeallocator)xmlFreeCatalogHashEntryList);
     xmlCatalogXMLFiles = NULL;
     if (xmlDefaultCatalog != NULL)
@@ -3392,7 +3393,7 @@ xmlCatalogDump(FILE *out) {
 /**
  * xmlCatalogAdd:
  * @type:  the type of record to add to the catalog
- * @orig:  the system, public or prefix to match 
+ * @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
@@ -3423,7 +3424,7 @@ xmlCatalogAdd(const xmlChar *type, const xmlChar *orig, const xmlChar *replace)
 
        xmlRMutexUnlock(xmlCatalogMutex);
        return(0);
-    } 
+    }
 
     res = xmlACatalogAdd(xmlDefaultCatalog, type, orig, replace);
     xmlRMutexUnlock(xmlCatalogMutex);
@@ -3611,7 +3612,7 @@ xmlCatalogFreeLocal(void *catalogs) {
  *
  * Returns the updated list
  */
-void * 
+void *
 xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) {
     xmlCatalogEntryPtr catal, add;
 
@@ -3631,7 +3632,7 @@ xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) {
        return(catalogs);
 
     catal = (xmlCatalogEntryPtr) catalogs;
-    if (catal == NULL) 
+    if (catal == NULL)
        return((void *) add);
 
     while (catal->next != NULL)
@@ -3646,7 +3647,7 @@ xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) {
  * @pubID:  the public ID string
  * @sysID:  the system ID string
  *
- * Do a complete resolution lookup of an External Identifier using a 
+ * 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
@@ -3691,7 +3692,7 @@ xmlCatalogLocalResolve(void *catalogs, const xmlChar *pubID,
  * @catalogs:  a document's list of catalogs
  * @URI:  the URI
  *
- * Do a complete resolution lookup of an URI using a 
+ * 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
@@ -3752,7 +3753,7 @@ xmlCatalogGetSystem(const xmlChar *sysID) {
 
     if (sysID == NULL)
        return(NULL);
-    
+
     /*
      * Check first the XML catalogs
      */
@@ -3796,7 +3797,7 @@ xmlCatalogGetPublic(const xmlChar *pubID) {
 
     if (pubID == NULL)
        return(NULL);
-    
+
     /*
      * Check first the XML catalogs
      */
old mode 100755 (executable)
new mode 100644 (file)
index 00dd962..06e8db0
--- a/chvalid.c
+++ b/chvalid.c
@@ -46,109 +46,109 @@ const unsigned char xmlIsPubidChar_tab[256] = {
     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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+static const xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007},
     {0x3021, 0x3029}, {0x4e00, 0x9fa5}};
 const xmlChRangeGroup xmlIsIdeographicGroup =
        {3, 0, xmlIsIdeographic_srng, (xmlChLRangePtr)0};
index dc84c68..d622a44 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2009-11-20'
+timestamp='2012-02-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
@@ -17,9 +17,7 @@ timestamp='2009-11-20'
 # 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., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# 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
@@ -56,8 +54,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+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."
@@ -144,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
        # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # 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
@@ -180,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                fi
                ;;
            *)
-               os=netbsd
+               os=netbsd
                ;;
        esac
        # The OS release
@@ -223,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
                ;;
        *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
                ;;
        esac
        # According to Compaq, /usr/sbin/psrinfo has been available on
@@ -269,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # 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'`
-       exit ;;
+       # 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
@@ -295,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        echo s390-ibm-zvmoe
        exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+       echo powerpc-ibm-os400
        exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
@@ -394,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # 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}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
        echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+       exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-milan-mint${UNAME_RELEASE}
+       exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-hades-mint${UNAME_RELEASE}
+       exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+       echo m68k-unknown-mint${UNAME_RELEASE}
+       exit ;;
     m68k:machten:*:*)
        echo m68k-apple-machten${UNAME_RELEASE}
        exit ;;
@@ -480,8 +482,8 @@ EOF
        echo m88k-motorola-sysv3
        exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       # 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 ] || \
@@ -494,7 +496,7 @@ EOF
        else
            echo i586-dg-dgux${UNAME_RELEASE}
        fi
-       exit ;;
+       exit ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
        echo m88k-dolphin-sysv3
        exit ;;
@@ -551,7 +553,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *: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
@@ -594,52 +596,52 @@ EOF
            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" ;;
+                   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
+                       esac ;;
+                   esac
                fi
                if [ "${HP_ARCH}" = "" ]; then
                    eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
+                   sed 's/^            //' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+               #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);
+               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);
-              }
+                   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
@@ -730,22 +732,22 @@ EOF
        exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
        echo c1-convex-bsd
-        exit ;;
+       exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
        else echo c2-convex-bsd
        fi
-        exit ;;
+       exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
        echo c34-convex-bsd
-        exit ;;
+       exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
        echo c38-convex-bsd
-        exit ;;
+       exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
        echo c4-convex-bsd
-        exit ;;
+       exit ;;
     CRAY*Y-MP:*:*:*)
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit ;;
@@ -769,14 +771,14 @@ EOF
        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 ;;
+       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}"
+       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}
@@ -788,13 +790,12 @@ EOF
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
        exit ;;
     *:FreeBSD:*:*)
-       case ${UNAME_MACHINE} in
-           pc98)
-               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
+       case ${UNAME_PROCESSOR} in
            amd64)
                echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
            *)
-               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+               echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
        esac
        exit ;;
     i*:CYGWIN*:*)
@@ -803,15 +804,18 @@ EOF
     *: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
+       # 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
+       case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
@@ -857,6 +861,13 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    aarch64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    aarch64_be:Linux:*:*)
+       UNAME_MACHINE=aarch64_be
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
          EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -866,7 +877,7 @@ EOF
          EV6)   UNAME_MACHINE=alphaev6 ;;
          EV67)  UNAME_MACHINE=alphaev67 ;;
          EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+       esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@@ -878,20 +889,29 @@ EOF
        then
            echo ${UNAME_MACHINE}-unknown-linux-gnu
        else
-           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+           if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+               | grep -q __ARM_PCS_VFP
+           then
+               echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+           else
+               echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+           fi
        fi
        exit ;;
     avr32*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     cris:Linux:*:*)
-       echo cris-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-gnu
        exit ;;
     crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-gnu
        exit ;;
     frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    hexagon:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     i*86:Linux:*:*)
        LIBC=gnu
@@ -933,7 +953,7 @@ EOF
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     padre:Linux:*:*)
        echo sparc-unknown-linux-gnu
@@ -959,7 +979,7 @@ EOF
        echo ${UNAME_MACHINE}-ibm-linux
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     sh*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -967,14 +987,17 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
     x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -983,11 +1006,11 @@ EOF
        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,
+       # 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.
+       # Use sysv4.2uw... so that sysv4* matches it.
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
        exit ;;
     i*86:OS/2:*:*)
@@ -1019,7 +1042,7 @@ EOF
        fi
        exit ;;
     i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
        case `/bin/uname -X | grep "^Machine"` in
            *486*)           UNAME_MACHINE=i486 ;;
            *Pentium)        UNAME_MACHINE=i586 ;;
@@ -1047,13 +1070,13 @@ EOF
        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.
+       # 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 ;;
+       exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
        exit ;;
@@ -1088,8 +1111,8 @@ EOF
        /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; } ;;
+       /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 \
@@ -1132,10 +1155,10 @@ EOF
                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 ;;
+    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
@@ -1161,11 +1184,11 @@ EOF
        exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
        if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
+               echo mips-nec-sysv${UNAME_RELEASE}
        else
-               echo mips-unknown-sysv${UNAME_RELEASE}
+               echo mips-unknown-sysv${UNAME_RELEASE}
        fi
-        exit ;;
+       exit ;;
     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
        echo powerpc-be-beos
        exit ;;
@@ -1230,6 +1253,9 @@ EOF
     *: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 ;;
@@ -1275,13 +1301,13 @@ EOF
        echo pdp10-unknown-its
        exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+       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`
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
        case "${UNAME_MACHINE}" in
            A*) echo alpha-dec-vms ; exit ;;
            I*) echo ia64-dec-vms ; exit ;;
@@ -1299,6 +1325,9 @@ EOF
     i*86:AROS:*:*)
        echo ${UNAME_MACHINE}-pc-aros
        exit ;;
+    x86_64:VMkernel:*:*)
+       echo ${UNAME_MACHINE}-unknown-esx
+       exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1321,11 +1350,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+       "4"
 #else
-         ""
+       ""
 #endif
-         ); exit (0);
+       ); exit (0);
 #endif
 #endif
 
index 4b080ba..a564b6c 100644 (file)
@@ -69,6 +69,9 @@
 /* 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 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 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
 
 /* 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
index 2a55a50..c894da4 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2009-11-20'
+timestamp='2012-02-10'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2009-11-20'
 # 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., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# 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
@@ -75,8 +73,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+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."
@@ -123,13 +122,18 @@ esac
 # 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-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  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 ]
@@ -156,8 +160,8 @@ case $os in
                os=
                basic_machine=$1
                ;;
-        -bluegene*)
-               os=-cnk
+       -bluegene*)
+               os=-cnk
                ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
@@ -173,10 +177,10 @@ case $os in
                os=-chorusos
                basic_machine=$1
                ;;
-       -chorusrdb)
-               os=-chorusrdb
+       -chorusrdb)
+               os=-chorusrdb
                basic_machine=$1
-               ;;
+               ;;
        -hiux*)
                os=-hiuxwe2
                ;;
@@ -245,17 +249,22 @@ case $basic_machine in
        # 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 | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | 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 | mcore | mep | metag \
@@ -281,29 +290,39 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
+       | open8 \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
-       | rx \
+       | 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 | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | spu \
+       | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
-       | v850 | v850e \
+       | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
        | we32k \
-       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-               # Motorola 68HC11/12.
+       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
                ;;
@@ -313,6 +332,21 @@ case $basic_machine in
                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.
@@ -327,21 +361,25 @@ case $basic_machine in
        # 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-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
+       | be32-* | be64-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | 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-* \
@@ -367,25 +405,29 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
+       | open8-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
        | pyramid-* \
-       | romp-* | rs6000-* | rx-* \
+       | 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-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+       | tahoe-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile*-* \
        | tron-* \
        | ubicom32-* \
-       | v850-* | v850e-* | vax-* \
+       | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+       | vax-* \
        | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
        | ymp-* \
        | z8k-* | z80-*)
@@ -410,7 +452,7 @@ case $basic_machine in
                basic_machine=a29k-amd
                os=-udi
                ;;
-       abacus)
+       abacus)
                basic_machine=abacus-unknown
                ;;
        adobe68k)
@@ -480,11 +522,20 @@ case $basic_machine in
                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)
+       cegcc)
                basic_machine=arm-unknown
                os=-cegcc
                ;;
@@ -516,7 +567,7 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16)
+       cr16 | cr16-*)
                basic_machine=cr16-unknown
                os=-elf
                ;;
@@ -674,7 +725,6 @@ case $basic_machine in
        i370-ibm* | ibm*)
                basic_machine=i370-ibm
                ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
        i*86v32)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv32
@@ -732,7 +782,7 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
-        microblaze)
+       microblaze)
                basic_machine=microblaze-xilinx
                ;;
        mingw32)
@@ -771,10 +821,18 @@ case $basic_machine in
        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
@@ -839,6 +897,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+       neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+       nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -921,9 +985,10 @@ case $basic_machine in
                ;;
        power)  basic_machine=power-ibm
                ;;
-       ppc)    basic_machine=powerpc-unknown
+       ppc | ppcbe)    basic_machine=powerpc-unknown
                ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+       ppc-* | ppcbe-*)
+               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        ppcle | powerpclittle | ppc-le | powerpc-little)
                basic_machine=powerpcle-unknown
@@ -1017,6 +1082,9 @@ case $basic_machine in
                basic_machine=i860-stratus
                os=-sysv4
                ;;
+       strongarm-* | thumb-*)
+               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        sun2)
                basic_machine=m68000-sun
                ;;
@@ -1073,20 +1141,8 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
        tile*)
-               basic_machine=tile-unknown
+               basic_machine=$basic_machine-unknown
                os=-linux-gnu
                ;;
        tx39)
@@ -1156,6 +1212,9 @@ case $basic_machine in
        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
@@ -1253,11 +1312,11 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+       # 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
+       -auroraux)
+               os=-auroraux
                ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1293,8 +1352,9 @@ case $os in
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1341,7 +1401,7 @@ case $os in
        -opened*)
                os=-openedition
                ;;
-        -os400*)
+       -os400*)
                os=-os400
                ;;
        -wince*)
@@ -1390,7 +1450,7 @@ case $os in
        -sinix*)
                os=-sysv4
                ;;
-        -tpf*)
+       -tpf*)
                os=-tpf
                ;;
        -triton*)
@@ -1435,6 +1495,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
+       -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1457,10 +1519,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+       score-*)
                os=-elf
                ;;
-        spu-*)
+       spu-*)
                os=-elf
                ;;
        *-acorn)
@@ -1472,8 +1534,17 @@ case $basic_machine in
        arm*-semi)
                os=-aout
                ;;
-        c4x-* | tic4x-*)
-               os=-coff
+       c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
                ;;
        # This must come before the *-dec entry.
        pdp10-*)
@@ -1493,14 +1564,11 @@ case $basic_machine in
                ;;
        m68000-sun)
                os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
                ;;
        m68*-cisco)
                os=-aout
                ;;
-        mep-*)
+       mep-*)
                os=-elf
                ;;
        mips*-cisco)
@@ -1527,7 +1595,7 @@ case $basic_machine in
        *-ibm)
                os=-aix
                ;;
-       *-knuth)
+       *-knuth)
                os=-mmixware
                ;;
        *-wec)
index e152273..80dd0fc 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,11 +1,9 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -134,6 +132,31 @@ 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
@@ -167,7 +190,8 @@ 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\$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'\" &&
@@ -220,21 +244,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # 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
-       export CONFIG_SHELL
-       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+"$@"}
+  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 :
@@ -336,6 +364,14 @@ $as_echo X"$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
@@ -457,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   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).
@@ -491,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... 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 -p'.
+    # 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 -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -512,28 +552,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+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'"
@@ -645,6 +665,7 @@ WITH_SCHEMAS
 TEST_SCHEMATRON
 WITH_SCHEMATRON
 WITH_ISO8859X
+ICU_LIBS
 WITH_ICU
 WITH_ICONV
 WITH_OUTPUT
@@ -675,6 +696,8 @@ WITH_HTML
 TEST_PUSH
 WITH_PUSH
 TEST_SAX
+WITH_SAX1_SOURCES_FALSE
+WITH_SAX1_SOURCES_TRUE
 WITH_SAX1
 TEST_PATTERN
 WITH_PATTERN
@@ -687,7 +710,9 @@ WITH_HTTP
 FTP_OBJ
 WITH_FTP
 WITH_TREE
-THREADS_W32
+THREADS_W32_FALSE
+THREADS_W32_TRUE
+WITH_THREAD_ALLOC
 TEST_THREADS
 THREAD_CFLAGS
 WITH_THREADS
@@ -728,7 +753,8 @@ MANIFEST_TOOL
 RANLIB
 ac_ct_AR
 AR
-LN_S
+DLLTOOL
+OBJDUMP
 NM
 ac_ct_DUMPBIN
 DUMPBIN
@@ -738,20 +764,18 @@ EGREP
 GREP
 SED
 LIBTOOL
-OBJDUMP
-DLLTOOL
-AS
 XSLTPROC
 XMLLINT
 WGET
 PERL
 TAR
 MV
-RM
 CPP
+LN_S
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
@@ -767,6 +791,8 @@ CFLAGS
 CC
 AM_BACKSLASH
 AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
 am__untar
 am__tar
 AMTAR
@@ -1362,8 +1388,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1534,13 +1558,13 @@ Optional Features:
   --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=yes]
+  --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              try to use only PIC/non-PIC objects [default=use
+  --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
@@ -1665,9 +1689,9 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 configure
-generated by GNU Autoconf 2.68
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+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
@@ -1780,7 +1804,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+        test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -2025,12 +2049,66 @@ 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.68.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2377,6 +2455,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+
 ac_config_headers="$ac_config_headers config.h"
 
 
@@ -2482,8 +2561,8 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 LIBXML_MAJOR_VERSION=2
-LIBXML_MINOR_VERSION=8
-LIBXML_MICRO_VERSION=0
+LIBXML_MINOR_VERSION=9
+LIBXML_MICRO_VERSION=1
 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
@@ -2563,7 +2642,7 @@ case $as_dir/ in #((
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+       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.
@@ -2732,7 +2811,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -2772,7 +2851,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -2823,7 +2902,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_prog in mkdir gmkdir; do
         for ac_exec_ext in '' $ac_executable_extensions; do
-          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          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) '* | \
@@ -2876,7 +2955,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -2992,11 +3071,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
-# Always define AMTAR for backward compatibility.
+# 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}'
 
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
@@ -3016,6 +3095,33 @@ 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='\'
 
 
@@ -3041,7 +3147,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -3081,7 +3187,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -3134,7 +3240,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -3175,7 +3281,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -3233,7 +3339,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -3277,7 +3383,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -3723,8 +3829,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.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);
@@ -3860,6 +3965,7 @@ 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=
@@ -3884,6 +3990,7 @@ else
   # 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.
@@ -3943,7 +4050,7 @@ else
        break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    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.
@@ -3999,6 +4106,17 @@ 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'
@@ -4137,47 +4255,6 @@ 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 "rm", so it can be a program name with args.
-set dummy rm; 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_RM+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $RM in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_RM="$RM" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_RM="$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_RM" && ac_cv_path_RM="/bin/rm"
-  ;;
-esac
-fi
-RM=$ac_cv_path_RM
-if test -n "$RM"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
-$as_echo "$RM" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
 # 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
@@ -4196,7 +4273,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -4237,7 +4314,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -4278,7 +4355,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -4319,7 +4396,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
-
-
-
-enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; 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_AS+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AS"; then
-  ac_cv_prog_AS="$AS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AS="${ac_tool_prefix}as"
-    $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
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
-$as_echo "$AS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AS"; then
-  ac_ct_AS=$AS
-  # Extract the first word of "as", so it can be a program name with args.
-set dummy as; 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_AS+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_AS"; then
-  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AS="as"
-    $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_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
-$as_echo "$ac_ct_AS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_AS" = x; then
-    AS="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
-    AS=$ac_ct_AS
-  fi
-else
-  AS="$ac_cv_prog_AS"
-fi
-
-  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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; }
+$as_echo "$WGET" >&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
 
-  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
+# 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_prog_OBJDUMP+:} false; then :
+if ${ac_cv_path_XMLLINT+:} 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
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+  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
@@ -4639,39 +4446,40 @@ done
   done
 IFS=$as_save_IFS
 
+  test -z "$ac_cv_path_XMLLINT" && ac_cv_path_XMLLINT="/usr/bin/xmllint"
+  ;;
+esac
 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; }
+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
 
 
-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
+# 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_prog_ac_ct_OBJDUMP+:} false; then :
+if ${ac_cv_path_XSLTPROC+:} 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
+  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+  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
@@ -4679,53 +4487,19 @@ done
   done
 IFS=$as_save_IFS
 
+  test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="/usr/bin/xsltproc"
+  ;;
+esac
 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; }
+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_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
-
-  ;;
-esac
-
-test -z "$AS" && AS=as
-
-
-
-
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-
-
-
-
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
 
 
 case `pwd` in
@@ -4736,8 +4510,8 @@ esac
 
 
 
-macro_version='2.4'
-macro_revision='1.3293'
+macro_version='2.4.2'
+macro_revision='1.3337'
 
 
 
@@ -4844,7 +4618,7 @@ do
     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"
-      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+      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
@@ -4920,7 +4694,7 @@ do
     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"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+      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
@@ -4986,7 +4760,7 @@ do
     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"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      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
@@ -5053,7 +4827,7 @@ do
     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"
-      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+      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
@@ -5309,7 +5083,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -5353,7 +5127,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -5434,17 +5208,6 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
 $as_echo "$lt_cv_nm_interface" >&6; }
 
-{ $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
-
 # 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; }
@@ -5511,6 +5274,11 @@ else
     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
@@ -5550,7 +5318,7 @@ else
       # 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"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+      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
@@ -5772,7 +5540,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -5812,7 +5580,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -5854,6 +5622,9 @@ 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 :
@@ -5976,7 +5747,7 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -6115,7 +5886,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6155,7 +5926,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6198,6 +5969,9 @@ 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 :
@@ -6256,7 +6030,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6300,7 +6074,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6425,7 +6199,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6465,7 +6239,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6524,7 +6298,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6564,7 +6338,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6614,13 +6388,13 @@ old_postuninstall_cmds=
 if test -n "$RANLIB"; then
   case $host_os in
   openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
@@ -6767,6 +6541,7 @@ for ac_symprfx in "" "_"; do
     # 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};"\
@@ -7155,7 +6930,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*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
@@ -7166,7 +6941,20 @@ sparc*-*solaris*)
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      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"
@@ -7199,7 +6987,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7239,7 +7027,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7319,7 +7107,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7359,7 +7147,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7411,7 +7199,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7451,7 +7239,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7503,7 +7291,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7543,7 +7331,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7595,7 +7383,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7635,7 +7423,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7687,7 +7475,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7727,7 +7515,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7806,7 +7594,13 @@ else
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+       # 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
@@ -7817,6 +7611,7 @@ else
 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 :
@@ -7849,6 +7644,7 @@ rm -f core conftest.err conftest.$ac_objext \
 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 :
@@ -7870,7 +7666,9 @@ _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 -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+      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
@@ -8070,6 +7868,8 @@ done
         enable_dlopen=no
 
 
+  enable_win32_dll=no
+
 
             # Check whether --enable-shared was given.
 if test "${enable_shared+set}" = set; then :
@@ -8136,7 +7936,22 @@ fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  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
@@ -8214,6 +8029,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
+
+
+
+
 test -z "$LN_S" && LN_S="ln -s"
 
 
@@ -8673,7 +8492,9 @@ lt_prog_compiler_static=
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       lt_prog_compiler_wl='-Xlinker '
-      lt_prog_compiler_pic='-Xcompiler -fPIC'
+      if test -n "$lt_prog_compiler_pic"; then
+        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+      fi
       ;;
     esac
   else
@@ -8764,18 +8585,33 @@ lt_prog_compiler_static=
        ;;
       *)
        case `$CC -V 2>&1 | sed 5q` in
-       *Sun\ F* | *Sun*Fortran*)
+       *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
@@ -9137,7 +8973,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   hardcode_direct=no
   hardcode_direct_absolute=no
   hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
   hardcode_libdir_separator=
   hardcode_minus_L=no
   hardcode_shlibpath_var=unsupported
@@ -9387,8 +9222,7 @@ _LT_EOF
        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=
-         hardcode_libdir_flag_spec_ld='-rpath $libdir'
+         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~
@@ -9767,6 +9601,7 @@ fi
        # 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'
@@ -9812,6 +9647,7 @@ fi
   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
@@ -9840,10 +9676,6 @@ fi
       hardcode_shlibpath_var=no
       ;;
 
-    freebsd1*)
-      ld_shlibs=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
@@ -9856,7 +9688,7 @@ fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
       hardcode_minus_L=yes
@@ -9895,7 +9727,6 @@ fi
       fi
       if test "$with_gnu_ld" = no; then
        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_flag_spec_ld='+b $libdir'
        hardcode_libdir_separator=:
        hardcode_direct=yes
        hardcode_direct_absolute=yes
@@ -10519,11 +10350,6 @@ esac
 
 
 
-
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -10613,7 +10439,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  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
 
@@ -10622,7 +10448,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -10687,7 +10513,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  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'
@@ -10826,7 +10652,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=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'
@@ -10834,10 +10660,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -10845,7 +10667,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -10863,7 +10685,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -10883,17 +10705,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=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}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 haiku*)
-  version_type=linux
+  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"
@@ -10954,7 +10777,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=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}'
@@ -10970,7 +10793,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
        if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
+               version_type=linux # correct to gnu/linux during the next big refactor
        else
                version_type=irix
        fi ;;
@@ -11007,9 +10830,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=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}'
@@ -11095,7 +10918,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  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
@@ -11164,7 +10987,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=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}'
@@ -11189,7 +11012,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  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
@@ -11213,7 +11036,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    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
@@ -11244,7 +11067,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=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}'
@@ -11254,7 +11077,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  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
@@ -12036,6 +11859,8 @@ CC="$lt_save_CC"
 
 
 
+
+
         ac_config_commands="$ac_config_commands libtool"
 
 
@@ -12066,7 +11891,7 @@ fi
 
 
 _cppflags="${CPPFLAGS}"
-_ldflags="${LDFLAGS}"
+_libs="${LIBS}"
 
 
 # Check whether --with-c14n was given.
@@ -12213,7 +12038,7 @@ if test "${with_readline+set}" = set; then :
   if test "$withval" != "no" -a "$withval" != "yes"; then
     RDL_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LDFLAGS="${LDFLAGS} -L$withval/lib"
+    LIBS="${LIBS} -L$withval/lib"
   fi
 
 fi
@@ -12309,7 +12134,7 @@ if test "${with_zlib+set}" = set; then :
   if test "$withval" != "no" -a "$withval" != "yes"; then
     Z_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LDFLAGS="${LDFLAGS} -L$withval/lib"
+    LIBS="${LIBS} -L$withval/lib"
   fi
 
 fi
@@ -12321,7 +12146,7 @@ if test "${with_lzma+set}" = set; then :
   if test "$withval" != "no" -a "$withval" != "yes"; then
     LZMA_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LDFLAGS="${LDFLAGS} -L$withval/lib"
+    LIBS="${LIBS} -L$withval/lib"
   fi
 
 fi
@@ -12338,7 +12163,10 @@ if test "${enable_rebuild_docs+set}" = set; then :
   enableval=$enable_rebuild_docs;
 fi
 
- if test "$enable_rebuild_docs" = "no"; then
+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
@@ -12661,7 +12489,7 @@ fi
 
 
 CPPFLAGS=${_cppflags}
-LDFLAGS=${_ldflags}
+LIBS=${_libs}
 
 echo Checking headers
 
@@ -13374,6 +13202,24 @@ 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
@@ -13491,6 +13337,20 @@ _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; }
@@ -13722,7 +13582,7 @@ 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 13725 "configure"
+#line 13585 "configure"
 #include "confdefs.h"
 
 #include <stddef.h>
@@ -13733,7 +13593,7 @@ int main(void) {
 (void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)
 ; return 0; }
 EOF
-if { (eval echo configure:13736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+if { (eval echo configure:13596: \"$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
@@ -13745,7 +13605,7 @@ else
   rm -rf conftest*
 
   cat > conftest.$ac_ext <<EOF
-#line 13748 "configure"
+#line 13608 "configure"
 #include "confdefs.h"
 
 #include <stddef.h>
@@ -13756,7 +13616,7 @@ int main(void) {
 (void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)
 ; return 0; }
 EOF
-if { (eval echo configure:13759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+if { (eval echo configure:13619: \"$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
@@ -13768,7 +13628,7 @@ else
   rm -rf conftest*
 
     cat > conftest.$ac_ext <<EOF
-#line 13771 "configure"
+#line 13631 "configure"
 #include "confdefs.h"
 
 #include <stddef.h>
@@ -13779,7 +13639,7 @@ int main(void) {
 (void)getsockopt (1, 1, 1, NULL, (int *)NULL)
 ; return 0; }
 EOF
-if { (eval echo configure:13782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+if { (eval echo configure:13642: \"$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
@@ -13824,8 +13684,8 @@ if test $enable_ipv6 = yes; then
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-    #include <sys/types.h>
-    #include <sys/socket.h>
+#   include <sys/types.h>
+#   include <sys/socket.h>
 
 int
 main ()
@@ -13859,8 +13719,8 @@ $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>
+#     include <sys/types.h>
+#     include <sys/socket.h>
 
 int
 main ()
@@ -13888,8 +13748,8 @@ $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>
+#       include <sys/types.h>
+#       include <sys/socket.h>
 
 int
 main ()
@@ -14175,7 +14035,7 @@ if test "$with_python" != "no" ; then
                 if test -x "$PYTHON"
                 then
                     echo Found python in environment PYTHON=$PYTHON
-                    with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
+                    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
@@ -14195,7 +14055,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
     if test "$PYTHON" != ""
     then
-        PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[0:3]"`
+        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" != ""
+    if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = ""
     then
-       if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
-          -d $with_python/lib/python$PYTHON_VERSION/site-packages
+       if test -r $with_python/include/python$PYTHON_VERSION/Python.h
        then
            PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
-           PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
        else
            if test -r $prefix/include/python$PYTHON_VERSION/Python.h
            then
                PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
-               PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
            else
                if test -r /usr/include/python$PYTHON_VERSION/Python.h
                then
                    PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
-                   PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
                else
-                   if test -r $with_python/include/Python.h -a \
-                      -d $with_python/lib/site-packages
+                   if test -r $with_python/include/Python.h
                    then
                        PYTHON_INCLUDES=$with_python/include
-                       PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
                    else
                        echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
                    fi
                fi
            fi
-           if test ! -d "$PYTHON_SITE_PACKAGES"
-           then
-                   PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
-           fi
        fi
-       PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
     fi
-    if test "$with_python" != ""
+    if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
     then
-        pythondir='$(PYTHON_SITE_PACKAGES)'
-    else
-        pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+       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
@@ -14534,6 +14397,7 @@ WITH_THREADS=0
 THREAD_CFLAGS=""
 TEST_THREADS=""
 THREADS_W32=""
+WITH_THREAD_ALLOC=0
 
 if test "$with_threads" = "no" ; then
     echo Disabling multithreaded support
@@ -14543,7 +14407,7 @@ else
         case $host_os in
        *mingw32*) if test "$with_threads" != "pthread" && test "$with_threads" != "no"; then
                WITH_THREADS="1"
-               THREADS_W32="Win32"
+               THREADS_W32="1"
                THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS"
            fi
        ;;
@@ -14642,7 +14506,7 @@ fi
     fi
 fi
 if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
-    THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED"
+    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
@@ -14897,6 +14769,14 @@ else
     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
@@ -15196,14 +15076,14 @@ 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`
-        LDFLAGS="$LDFLAGS $ICU_LIBS"
+        ICU_LIBS=`${ICU_CONFIG} --ldflags`
         WITH_ICU=1
         echo Enabling ICU support
     else
@@ -15212,6 +15092,7 @@ else
 fi
 
 
+
 WITH_ISO8859X=1
 if test "$WITH_ICONV" != "1" ; then
 if test "$with_iso8859x" = "no" ; then
@@ -15379,7 +15260,7 @@ RELDATE=`date +'%a %b %e %Y'`
 
 
 rm -f COPYING.LIB COPYING
-ln -s Copyright 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 xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py"
@@ -15525,6 +15406,14 @@ if test -z "${WITH_TRIO_SOURCES_TRUE}" && test -z "${WITH_TRIO_SOURCES_FALSE}";
   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
@@ -15823,16 +15712,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... 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 -p'.
+    # 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 -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -15892,28 +15781,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# 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'"
@@ -15935,7 +15812,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # values after options handling.
 ac_log="
 This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -16001,10 +15878,10 @@ 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.68,
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+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."
 
@@ -16095,7 +15972,7 @@ 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
+  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'
@@ -16129,9 +16006,6 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 sed_quote_subst='$sed_quote_subst'
 double_quote_subst='$double_quote_subst'
 delay_variable_subst='$delay_variable_subst'
-AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
-DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_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"`'
@@ -16140,6 +16014,7 @@ 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"`'
@@ -16164,10 +16039,12 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q
 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"`'
@@ -16220,7 +16097,6 @@ 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_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $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"`'
@@ -16274,11 +16150,9 @@ _LTECHO_EOF'
 }
 
 # Quote evaled strings.
-for var in AS \
-DLLTOOL \
-OBJDUMP \
-SHELL \
+for var in SHELL \
 ECHO \
+PATH_SEPARATOR \
 SED \
 GREP \
 EGREP \
@@ -16289,10 +16163,12 @@ 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 \
@@ -16327,7 +16203,6 @@ with_gnu_ld \
 allow_undefined_flag \
 no_undefined_flag \
 hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
 hardcode_libdir_separator \
 exclude_expsyms \
 include_expsyms \
@@ -17138,8 +17013,8 @@ $as_echo X"$file" |
 # 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 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -17171,15 +17046,6 @@ available_tags=""
 
 # ### BEGIN LIBTOOL CONFIG
 
-# Assembler program.
-AS=$lt_AS
-
-# DLL creation program.
-DLLTOOL=$lt_DLLTOOL
-
-# Object dumper program.
-OBJDUMP=$lt_OBJDUMP
-
 # Which release of libtool.m4 was used?
 macro_version=$macro_version
 macro_revision=$macro_revision
@@ -17202,6 +17068,9 @@ 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
@@ -17257,6 +17126,9 @@ 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
 
@@ -17269,6 +17141,9 @@ 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
 
@@ -17497,10 +17372,6 @@ no_undefined_flag=$lt_no_undefined_flag
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
index 0fb4983..d449b11 100644 (file)
@@ -1,13 +1,14 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.59)
-AC_INIT(entities.c)
-AM_CONFIG_HEADER(config.h)
+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=8
-LIBXML_MICRO_VERSION=0
+LIBXML_MINOR_VERSION=9
+LIBXML_MICRO_VERSION=1
 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
@@ -58,9 +59,9 @@ 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(RM, rm, /bin/rm)
 AC_PATH_PROG(MV, mv, /bin/mv)
 AC_PATH_PROG(TAR, tar, /bin/tar)
 AC_PATH_PROG(PERL, perl, /usr/bin/perl)
@@ -68,8 +69,7 @@ AC_PATH_PROG(WGET, wget, /usr/bin/wget)
 AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint)
 AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
 
-AC_LIBTOOL_WIN32_DLL
-AM_PROG_LIBTOOL
+LT_INIT
 
 dnl
 dnl if the system support linker version scripts for symbol versioning
@@ -97,7 +97,7 @@ dnl
 dnl zlib option might change flags, so we save them initially
 dnl
 _cppflags="${CPPFLAGS}"
-_ldflags="${LDFLAGS}"
+_libs="${LIBS}"
 
 AC_ARG_WITH(c14n,
 [  --with-c14n             add the Canonicalization support (on)])
@@ -116,11 +116,11 @@ AC_ARG_WITH(history,
 AC_ARG_WITH(html,
 [  --with-html             add the HTML support (on)])
 dnl Specific dir for HTML output ?
-AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=path],
+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, AC_HELP_STRING([--with-html-subdir=path],
+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"])
@@ -154,7 +154,7 @@ AC_ARG_WITH(readline,
   if test "$withval" != "no" -a "$withval" != "yes"; then
     RDL_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LDFLAGS="${LDFLAGS} -L$withval/lib"
+    LIBS="${LIBS} -L$withval/lib"
   fi
 ])
 AC_ARG_WITH(regexps,
@@ -190,7 +190,7 @@ AC_ARG_WITH(zlib,
   if test "$withval" != "no" -a "$withval" != "yes"; then
     Z_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LDFLAGS="${LDFLAGS} -L$withval/lib"
+    LIBS="${LIBS} -L$withval/lib"
   fi
 ])
 AC_ARG_WITH(lzma,
@@ -198,15 +198,18 @@ AC_ARG_WITH(lzma,
   if test "$withval" != "no" -a "$withval" != "yes"; then
     LZMA_DIR=$withval
     CPPFLAGS="${CPPFLAGS} -I$withval/include"
-    LDFLAGS="${LDFLAGS} -L$withval/lib"
+    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=yes]]])
-AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "no"])
+[  --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
@@ -428,7 +431,7 @@ AC_SUBST(LZMA_LIBS)
 AC_SUBST(WITH_LZMA)
 
 CPPFLAGS=${_cppflags}
-LDFLAGS=${_ldflags}
+LIBS=${_libs}
 
 echo Checking headers
 
@@ -500,6 +503,11 @@ 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.
@@ -509,11 +517,17 @@ 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_TRY_LINK([#include <stdarg.h>
-va_list ap1,ap2;], [va_copy(ap1,ap2);],
+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)
@@ -521,8 +535,8 @@ 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_TRY_LINK([#include <stdarg.h>
-    va_list ap1,ap2;], [__va_copy(ap1,ap2);],
+    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)
@@ -573,13 +587,13 @@ then
 fi
 if test $enable_ipv6 = yes; then
   have_ipv6=no
-  AC_TRY_COMPILE([
-    #include <sys/types.h>
-    #include <sys/socket.h>
-    ][
+  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
   )
@@ -597,26 +611,26 @@ if test $enable_ipv6 = yes; then
     dnl present.
     dnl ********************************************************************
     AC_MSG_CHECKING([struct sockaddr::ss_family])
-    AC_TRY_COMPILE([
-      #include <sys/types.h>
-      #include <sys/socket.h>
-      ][
+    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_TRY_COMPILE([
-        #include <sys/types.h>
-        #include <sys/socket.h>
-        ][
+      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
       )
@@ -752,7 +766,7 @@ if test "$with_python" != "no" ; then
                 if test -x "$PYTHON"
                 then
                     echo Found python in environment PYTHON=$PYTHON
-                    with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
+                    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
@@ -761,50 +775,53 @@ if test "$with_python" != "no" ; then
     fi
     if test "$PYTHON" != ""
     then
-        PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
+        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" != ""
+    if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = ""
     then
-       if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
-          -d $with_python/lib/python$PYTHON_VERSION/site-packages
+       if test -r $with_python/include/python$PYTHON_VERSION/Python.h
        then
            PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
-           PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
        else
            if test -r $prefix/include/python$PYTHON_VERSION/Python.h
            then
                PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
-               PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
            else
                if test -r /usr/include/python$PYTHON_VERSION/Python.h
                then
                    PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
-                   PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
                else
-                   if test -r $with_python/include/Python.h -a \
-                      -d $with_python/lib/site-packages
+                   if test -r $with_python/include/Python.h
                    then
                        PYTHON_INCLUDES=$with_python/include
-                       PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
                    else
                        echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
                    fi
                fi
            fi
-           if test ! -d "$PYTHON_SITE_PACKAGES"
-           then
-                   PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
-           fi
        fi
-       PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
     fi
-    if test "$with_python" != ""
+    if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
     then
-        pythondir='$(PYTHON_SITE_PACKAGES)'
-    else
-        pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+       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
@@ -939,6 +956,7 @@ WITH_THREADS=0
 THREAD_CFLAGS=""
 TEST_THREADS=""
 THREADS_W32=""
+WITH_THREAD_ALLOC=0
 
 if test "$with_threads" = "no" ; then
     echo Disabling multithreaded support
@@ -949,7 +967,7 @@ else
     case $host_os in
        *mingw32*) if test "$with_threads" != "pthread" && test "$with_threads" != "no"; then
                WITH_THREADS="1"
-               THREADS_W32="Win32"
+               THREADS_W32="1"
                THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS"
            fi
        ;;
@@ -1002,7 +1020,7 @@ else
     fi
 fi
 if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
-    THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED"
+    WITH_THREAD_ALLOC=1
 fi
 
 AC_SUBST(THREAD_LIBS)
@@ -1010,7 +1028,8 @@ AC_SUBST(BASE_THREAD_LIBS)
 AC_SUBST(WITH_THREADS)
 AC_SUBST(THREAD_CFLAGS)
 AC_SUBST(TEST_THREADS)
-AC_SUBST(THREADS_W32)
+AC_SUBST(WITH_THREAD_ALLOC)
+AM_CONDITIONAL([THREADS_W32],[test -n "$THREADS_W32"])
 
 dnl
 dnl xmllint shell history
@@ -1134,6 +1153,7 @@ else
     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
@@ -1300,10 +1320,10 @@ else
 
     AC_CHECK_HEADER(iconv.h,
        AC_MSG_CHECKING(for iconv)
-       AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],[
+       AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+#include <iconv.h>]],[[
 iconv_t cd = iconv_open ("","");
-iconv (cd, NULL, NULL, NULL, NULL);],[
+iconv (cd, NULL, NULL, NULL, NULL);]])],[
            AC_MSG_RESULT(yes)
            WITH_ICONV=1],[
            AC_MSG_RESULT(no)
@@ -1314,10 +1334,10 @@ iconv (cd, NULL, NULL, NULL, NULL);],[
            LDFLAGS="${LDFLAGS} ${ICONV_LIBS}"
            LIBS="${LIBS} -liconv"
 
-           AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],[
+           AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+#include <iconv.h>]],[[
 iconv_t cd = iconv_open ("","");
-iconv (cd, NULL, NULL, NULL, NULL);],[
+iconv (cd, NULL, NULL, NULL, NULL);]])],[
                AC_MSG_RESULT(yes)
                WITH_ICONV=1
                ICONV_LIBS="${ICONV_LIBS} -liconv"
@@ -1330,7 +1350,7 @@ iconv (cd, NULL, NULL, NULL, NULL);],[
        if test "$WITH_ICONV" = "1" ; then
                AC_MSG_CHECKING([for iconv declaration])
                AC_CACHE_VAL(xml_cv_iconv_arg2, [
-                       AC_TRY_COMPILE([#include <stdlib.h>
+                       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
 #include <iconv.h>
 extern
 #ifdef __cplusplus
@@ -1341,7 +1361,7 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
 #else
 size_t iconv();
 #endif
-], [], xml_cv_iconv_arg2="", xml_cv_iconv_arg2="const")])
+]], [])], 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:-
@@ -1365,14 +1385,14 @@ 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`
-        LDFLAGS="$LDFLAGS $ICU_LIBS"
+        ICU_LIBS=`${ICU_CONFIG} --ldflags`
         WITH_ICU=1
         echo Enabling ICU support
     else
@@ -1380,6 +1400,7 @@ else
     fi
 fi
 AC_SUBST(WITH_ICU)
+AC_SUBST(ICU_LIBS)
 
 WITH_ISO8859X=1
 if test "$WITH_ICONV" != "1" ; then
@@ -1550,10 +1571,11 @@ AC_SUBST(RELDATE)
 AC_SUBST(PYTHON_TESTS)
 
 rm -f COPYING.LIB COPYING
-ln -s Copyright COPYING
+ln -s $srcdir/Copyright COPYING
 
 # keep on one line for cygwin c.f. #130896
-AC_OUTPUT(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 xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py)
+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 xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py])
+AC_OUTPUT
 
 chmod +x xml2-config python/setup.py
 echo Done configuring
index 3e9ec7a..c8efe6a 100644 (file)
@@ -85,7 +85,7 @@ xmlCtxtDumpCleanCtxt(xmlDebugCtxtPtr ctxt ATTRIBUTE_UNUSED)
  *
  * Check that a given namespace is in scope on a node.
  *
- * Returns 1 if in scope, -1 in case of argument error, 
+ * 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.
  */
@@ -311,7 +311,7 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
                (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");
@@ -354,7 +354,6 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
        (node->type != XML_ELEMENT_DECL) &&
        (node->type != XML_ATTRIBUTE_DECL) &&
        (node->type != XML_DTD_NODE) &&
-       (node->type != XML_ELEMENT_DECL) &&
        (node->type != XML_HTML_DOCUMENT_NODE) &&
        (node->type != XML_DOCUMENT_NODE)) {
        if (node->content != NULL)
@@ -1068,7 +1067,7 @@ xmlCtxtDumpNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
         return;
     }
     xmlCtxtDumpOneNode(ctxt, node);
-    if ((node->type != XML_NAMESPACE_DECL) && 
+    if ((node->type != XML_NAMESPACE_DECL) &&
         (node->children != NULL) && (node->type != XML_ENTITY_REF_NODE)) {
         ctxt->depth++;
         xmlCtxtDumpNodeList(ctxt, node->children);
@@ -1603,7 +1602,7 @@ int
 xmlLsCountNode(xmlNodePtr node) {
     int ret = 0;
     xmlNodePtr list = NULL;
-    
+
     if (node == NULL)
        return(0);
 
@@ -1644,7 +1643,7 @@ xmlLsCountNode(xmlNodePtr node) {
            ret = 1;
            break;
     }
-    for (;list != NULL;ret++) 
+    for (;list != NULL;ret++)
         list = list->next;
     return(ret);
 }
@@ -1712,11 +1711,11 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) {
     if (node->type != XML_NAMESPACE_DECL) {
        if (node->properties != NULL)
            fprintf(output, "a");
-       else    
+       else
            fprintf(output, "-");
-       if (node->nsDef != NULL) 
+       if (node->nsDef != NULL)
            fprintf(output, "n");
-       else    
+       else
            fprintf(output, "-");
     }
 
@@ -1786,7 +1785,7 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) {
  * xmlBoolToText:
  * @boolval: a bool to turn into text
  *
- * Convenient way to turn bool into text 
+ * Convenient way to turn bool into text
  *
  * Returns a pointer to either "True" or "False"
  */
@@ -1802,7 +1801,7 @@ xmlBoolToText(int boolval)
 #ifdef LIBXML_XPATH_ENABLED
 /****************************************************************
  *                                                             *
- *             The XML shell related functions                 *
+ *             The XML shell related functions                 *
  *                                                             *
  ****************************************************************/
 
@@ -2053,7 +2052,7 @@ xmlShellBase(xmlShellCtxtPtr ctxt,
     if (node == NULL) {
        fprintf(ctxt->output, "NULL\n");
        return (0);
-    }    
+    }
 
     base = xmlNodeGetBase(node->doc, node);
 
@@ -2280,7 +2279,7 @@ xmlShellDir(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
     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);
@@ -2415,7 +2414,7 @@ xmlShellCat(xmlShellCtxtPtr ctxt, char *arg ATTRIBUTE_UNUSED,
     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)
@@ -2753,7 +2752,7 @@ xmlShellDu(xmlShellCtxtPtr ctxt,
  * xmlShellPwd:
  * @ctxt:  the shell context
  * @buffer:  the output buffer
- * @node:  a node 
+ * @node:  a node
  * @node2:  unused
  *
  * Implements the XML shell function "pwd"
@@ -2798,7 +2797,7 @@ xmlShellPwd(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, char *buffer,
  * @input:  the line reading function
  * @output:  the output FILE*, defaults to stdout if NULL
  *
- * Implements the XML shell 
+ * Implements the XML shell
  * This allow to load, validate, view, modify and save a document
  * using a environment similar to a UNIX commandline.
  */
diff --git a/depcomp b/depcomp
index df8eea7..25a39e6 100755 (executable)
--- a/depcomp
+++ b/depcomp
@@ -1,10 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-03-27.16; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011, 2012 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
@@ -28,7 +28,7 @@ scriptversion=2009-04-28.21; # UTC
 
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
@@ -40,11 +40,11 @@ as side-effects.
 
 Environment variables:
   depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
+  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 outputing dependencies.
+  tmpdepfile  Temporary file to use when outputting dependencies.
   libtool     Whether libtool is used (yes/no).
 
 Report bugs to <bug-automake@gnu.org>.
@@ -57,6 +57,12 @@ EOF
     ;;
 esac
 
+# A tabulation character.
+tab='  '
+# A newline character.
+nl='
+'
+
 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
@@ -90,10 +96,24 @@ 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"
+   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 informations.
+   gccflag=-qmakedep=gcc,-MF
+   depmode=gcc
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
@@ -148,20 +168,21 @@ gcc)
 ## 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.
+## 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.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
+  tr ' ' "$nl" < "$tmpdepfile" |
+## 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.
+## 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.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+      | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -193,18 +214,15 @@ sgi)
     # 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
+    # the IRIX cc adds comments like '#:fec' to the end of the
     # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
+    tr ' ' "$nl" < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> "$depfile"
+    tr "$nl" ' ' >> "$depfile"
     echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
+    tr ' ' "$nl" < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
    >> "$depfile"
   else
@@ -216,10 +234,17 @@ sgi)
   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
+  # 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.
   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
@@ -249,12 +274,11 @@ aix)
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
+    # Each line is of the form 'foo.o: dependent.h'.
     # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
+    # '$object: dependent.h' and one to simply 'dependent.h:'.
     sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+    sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -265,23 +289,26 @@ aix)
   ;;
 
 icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
+  # However on
+  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
   # ICC 7.0 will fill foo.d with something like
   #    foo.o: sub/foo.c
   #    foo.o: sub/foo.h
-  # which is wrong.  We want:
+  # which is wrong.  We want
   #    sub/foo.o: sub/foo.c
   #    sub/foo.o: sub/foo.h
   #    sub/foo.c:
   #    sub/foo.h:
   # ICC 7.1 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using :
+  # and will wrap long lines using '\':
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
-
+  # tcc 0.9.26 (FIXME still under development at the moment of writing)
+  # will emit a similar output, but also prepend the continuation lines
+  # with horizontal tabulation characters.
   "$@" -MD -MF "$tmpdepfile"
   stat=$?
   if test $stat -eq 0; then :
@@ -290,15 +317,21 @@ icc)
     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 \'.
+  # 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"
+  # '$object: dependent.h' and one to simply 'dependent.h:'.
+  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
+    < "$tmpdepfile" > "$depfile"
+  sed '
+    s/[ '"$tab"'][ '"$tab"']*/ /g
+    s/^ *//
+    s/ *\\*$//
+    s/^[^:]*: *//
+    /^$/d
+    /:$/d
+    s/$/ :/
+  ' < "$tmpdepfile" >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -334,7 +367,7 @@ hp2)
   done
   if test -f "$tmpdepfile"; then
     sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
+    # Add 'dependent.h:' lines.
     sed -ne '2,${
               s/^ *//
               s/ \\*$//
@@ -349,9 +382,9 @@ hp2)
 
 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'.
+   # 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.
+   # dependencies in 'foo.d' instead, so we check for that too.
    # Subdirectories are respected.
    dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
    test "x$dir" = "x$object" && dir=
@@ -397,14 +430,59 @@ tru64)
    done
    if test -f "$tmpdepfile"; then
       sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+      sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
    else
       echo "#dummy" > "$depfile"
    fi
    rm -f "$tmpdepfile"
    ;;
 
+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" = 0; then :
+  else
+    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"
+  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.
@@ -422,7 +500,7 @@ dashmstdout)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -442,15 +520,14 @@ dashmstdout)
   done
 
   test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
+  # 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.
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
+  tr ' ' "$nl" < "$tmpdepfile" | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -503,9 +580,10 @@ makedepend)
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
+  # 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"
+  sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -525,7 +603,7 @@ cpp)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -594,8 +672,8 @@ msvisualcpp)
   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::     \1 \\:p' >> "$depfile"
-  echo "       " >> "$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"
   ;;
diff --git a/dict.c b/dict.c
index 6de2f03..5f71d55 100644 (file)
--- a/dict.c
+++ b/dict.c
@@ -19,6 +19,7 @@
 #define IN_LIBXML
 #include "libxml.h"
 
+#include <limits.h>
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
@@ -93,7 +94,7 @@ typedef xmlDictEntry *xmlDictEntryPtr;
 struct _xmlDictEntry {
     struct _xmlDictEntry *next;
     const xmlChar *name;
-    int len;
+    unsigned int len;
     int valid;
     unsigned long okey;
 };
@@ -104,8 +105,8 @@ struct _xmlDictStrings {
     xmlDictStringsPtr next;
     xmlChar *free;
     xmlChar *end;
-    int size;
-    int nbStrings;
+    size_t size;
+    size_t nbStrings;
     xmlChar array[1];
 };
 /*
@@ -115,13 +116,15 @@ struct _xmlDict {
     int ref_counter;
 
     struct _xmlDictEntry *dict;
-    int size;
-    int nbElems;
+    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;
 };
 
 /*
@@ -140,7 +143,7 @@ static int xmlDictInitialized = 0;
 /*
  * Internal data for random function, protected by xmlDictMutex
  */
-unsigned int rand_seed = 0;
+static unsigned int rand_seed = 0;
 #endif
 #endif
 
@@ -148,13 +151,28 @@ unsigned int rand_seed = 0;
  * xmlInitializeDict:
  *
  * Do the dictionary mutex initialization.
- * this function is not thread safe, initialization should
- * preferably be done once at startup
+ * 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);
 
@@ -180,7 +198,7 @@ int __xmlRandom(void) {
     int ret;
 
     if (xmlDictInitialized == 0)
-        xmlInitializeDict();
+        __xmlInitializeDict();
 
     xmlRMutexLock(xmlDictMutex);
 #ifdef HAVE_RAND_R
@@ -213,17 +231,18 @@ xmlDictCleanup(void) {
  * xmlDictAddString:
  * @dict: the dictionnary
  * @name: the name of the userdata
- * @len: the length of the name, if -1 it is recomputed
+ * @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, int namelen) {
+xmlDictAddString(xmlDictPtr dict, const xmlChar *name, unsigned int namelen) {
     xmlDictStringsPtr pool;
     const xmlChar *ret;
-    int size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
+    size_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
+    size_t limit = 0;
 
 #ifdef DICT_DEBUG_PATTERNS
     fprintf(stderr, "-");
@@ -233,15 +252,20 @@ xmlDictAddString(xmlDictPtr dict, const xmlChar *name, int namelen) {
        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) 
+        if (size < 4 * namelen)
            size = 4 * namelen; /* just in case ! */
        pool = (xmlDictStringsPtr) xmlMalloc(sizeof(xmlDictStrings) + size);
        if (pool == NULL)
@@ -271,19 +295,20 @@ found_pool:
  * @prefix: the prefix of the userdata
  * @plen: the prefix length
  * @name: the name of the userdata
- * @len: the length of the name, if -1 it is recomputed
+ * @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, int plen,
-                 const xmlChar *name, int namelen)
+xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, unsigned int plen,
+                 const xmlChar *name, unsigned int namelen)
 {
     xmlDictStringsPtr pool;
     const xmlChar *ret;
-    int size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
+    size_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
+    size_t limit = 0;
 
     if (prefix == NULL) return(xmlDictAddString(dict, name, namelen));
 
@@ -295,12 +320,17 @@ xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, int plen,
        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))
@@ -507,7 +537,7 @@ xmlDictCreate(void) {
     xmlDictPtr dict;
 
     if (!xmlDictInitialized)
-        if (!xmlInitializeDict())
+        if (!__xmlInitializeDict())
             return(NULL);
 
 #ifdef DICT_DEBUG_PATTERNS
@@ -517,6 +547,7 @@ xmlDictCreate(void) {
     dict = xmlMalloc(sizeof(xmlDict));
     if (dict) {
         dict->ref_counter = 1;
+        dict->limit = 0;
 
         dict->size = MIN_DICT_SIZE;
        dict->nbElems = 0;
@@ -574,7 +605,7 @@ xmlDictCreateSub(xmlDictPtr sub) {
 int
 xmlDictReference(xmlDictPtr dict) {
     if (!xmlDictInitialized)
-        if (!xmlInitializeDict())
+        if (!__xmlInitializeDict())
             return(-1);
 
     if (dict == NULL) return -1;
@@ -594,9 +625,9 @@ xmlDictReference(xmlDictPtr dict) {
  * Returns 0 in case of success, -1 in case of failure
  */
 static int
-xmlDictGrow(xmlDictPtr dict, int size) {
+xmlDictGrow(xmlDictPtr dict, size_t size) {
     unsigned long key, okey;
-    int oldsize, i;
+    size_t oldsize, i;
     xmlDictEntryPtr iter, next;
     struct _xmlDictEntry *olddict;
 #ifdef DEBUG_GROW
@@ -713,7 +744,7 @@ xmlDictGrow(xmlDictPtr dict, int size) {
 
 #ifdef DEBUG_GROW
     xmlGenericError(xmlGenericErrorContext,
-           "xmlDictGrow : from %d to %d, %d elems\n", oldsize, size, nbElem);
+           "xmlDictGrow : from %lu to %lu, %u elems\n", oldsize, size, nbElem);
 #endif
 
     return(ret);
@@ -728,7 +759,7 @@ xmlDictGrow(xmlDictPtr dict, int size) {
  */
 void
 xmlDictFree(xmlDictPtr dict) {
-    int i;
+    size_t i;
     xmlDictEntryPtr iter;
     xmlDictEntryPtr next;
     int inside_dict = 0;
@@ -738,7 +769,7 @@ xmlDictFree(xmlDictPtr dict) {
        return;
 
     if (!xmlDictInitialized)
-        if (!xmlInitializeDict())
+        if (!__xmlInitializeDict())
             return;
 
     /* decrement the counter, it may be shared by a parser and docs */
@@ -797,17 +828,24 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
     xmlDictEntryPtr entry;
     xmlDictEntryPtr insert;
     const xmlChar *ret;
+    unsigned int l;
 
     if ((dict == NULL) || (name == NULL))
        return(NULL);
 
     if (len < 0)
-        len = strlen((const char *) name);
+        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, len);
+    okey = xmlDictComputeKey(dict, name, l);
     key = okey % dict->size;
     if (dict->dict[key].valid == 0) {
        insert = NULL;
@@ -815,25 +853,25 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
        for (insert = &(dict->dict[key]); insert->next != NULL;
             insert = insert->next) {
 #ifdef __GNUC__
-           if ((insert->okey == okey) && (insert->len == len)) {
-               if (!memcmp(insert->name, name, len))
+           if ((insert->okey == okey) && (insert->len == l)) {
+               if (!memcmp(insert->name, name, l))
                    return(insert->name);
            }
 #else
-           if ((insert->okey == okey) && (insert->len == len) &&
-               (!xmlStrncmp(insert->name, name, len)))
+           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 == len)) {
-           if (!memcmp(insert->name, name, len))
+       if ((insert->okey == okey) && (insert->len == l)) {
+           if (!memcmp(insert->name, name, l))
                return(insert->name);
        }
 #else
-       if ((insert->okey == okey) && (insert->len == len) &&
-           (!xmlStrncmp(insert->name, name, len)))
+       if ((insert->okey == okey) && (insert->len == l) &&
+           (!xmlStrncmp(insert->name, name, l)))
            return(insert->name);
 #endif
     }
@@ -846,7 +884,7 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
             (dict->subdict->size != MIN_DICT_SIZE)) ||
             ((dict->size != MIN_DICT_SIZE) &&
             (dict->subdict->size == MIN_DICT_SIZE)))
-           skey = xmlDictComputeKey(dict->subdict, name, len);
+           skey = xmlDictComputeKey(dict->subdict, name, l);
        else
            skey = okey;
 
@@ -857,32 +895,32 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
            for (tmp = &(dict->subdict->dict[key]); tmp->next != NULL;
                 tmp = tmp->next) {
 #ifdef __GNUC__
-               if ((tmp->okey == skey) && (tmp->len == len)) {
-                   if (!memcmp(tmp->name, name, len))
+               if ((tmp->okey == skey) && (tmp->len == l)) {
+                   if (!memcmp(tmp->name, name, l))
                        return(tmp->name);
                }
 #else
-               if ((tmp->okey == skey) && (tmp->len == len) &&
-                   (!xmlStrncmp(tmp->name, name, len)))
+               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 == len)) {
-               if (!memcmp(tmp->name, name, len))
+           if ((tmp->okey == skey) && (tmp->len == l)) {
+               if (!memcmp(tmp->name, name, l))
                    return(tmp->name);
            }
 #else
-           if ((tmp->okey == skey) && (tmp->len == len) &&
-               (!xmlStrncmp(tmp->name, name, len)))
+           if ((tmp->okey == skey) && (tmp->len == l) &&
+               (!xmlStrncmp(tmp->name, name, l)))
                return(tmp->name);
 #endif
        }
        key = okey % dict->size;
     }
 
-    ret = xmlDictAddString(dict, name, len);
+    ret = xmlDictAddString(dict, name, l);
     if (ret == NULL)
         return(NULL);
     if (insert == NULL) {
@@ -893,13 +931,13 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
             return(NULL);
     }
     entry->name = ret;
-    entry->len = len;
+    entry->len = l;
     entry->next = NULL;
     entry->valid = 1;
     entry->okey = okey;
 
 
-    if (insert != NULL) 
+    if (insert != NULL)
        insert->next = entry;
 
     dict->nbElems++;
@@ -928,17 +966,23 @@ 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)
-        len = strlen((const char *) name);
+        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, len);
+    okey = xmlDictComputeKey(dict, name, l);
     key = okey % dict->size;
     if (dict->dict[key].valid == 0) {
        insert = NULL;
@@ -946,25 +990,25 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
        for (insert = &(dict->dict[key]); insert->next != NULL;
             insert = insert->next) {
 #ifdef __GNUC__
-           if ((insert->okey == okey) && (insert->len == len)) {
-               if (!memcmp(insert->name, name, len))
+           if ((insert->okey == okey) && (insert->len == l)) {
+               if (!memcmp(insert->name, name, l))
                    return(insert->name);
            }
 #else
-           if ((insert->okey == okey) && (insert->len == len) &&
-               (!xmlStrncmp(insert->name, name, len)))
+           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 == len)) {
-           if (!memcmp(insert->name, name, len))
+       if ((insert->okey == okey) && (insert->len == l)) {
+           if (!memcmp(insert->name, name, l))
                return(insert->name);
        }
 #else
-       if ((insert->okey == okey) && (insert->len == len) &&
-           (!xmlStrncmp(insert->name, name, len)))
+       if ((insert->okey == okey) && (insert->len == l) &&
+           (!xmlStrncmp(insert->name, name, l)))
            return(insert->name);
 #endif
     }
@@ -977,7 +1021,7 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
             (dict->subdict->size != MIN_DICT_SIZE)) ||
             ((dict->size != MIN_DICT_SIZE) &&
             (dict->subdict->size == MIN_DICT_SIZE)))
-           skey = xmlDictComputeKey(dict->subdict, name, len);
+           skey = xmlDictComputeKey(dict->subdict, name, l);
        else
            skey = okey;
 
@@ -988,25 +1032,25 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
            for (tmp = &(dict->subdict->dict[key]); tmp->next != NULL;
                 tmp = tmp->next) {
 #ifdef __GNUC__
-               if ((tmp->okey == skey) && (tmp->len == len)) {
-                   if (!memcmp(tmp->name, name, len))
+               if ((tmp->okey == skey) && (tmp->len == l)) {
+                   if (!memcmp(tmp->name, name, l))
                        return(tmp->name);
                }
 #else
-               if ((tmp->okey == skey) && (tmp->len == len) &&
-                   (!xmlStrncmp(tmp->name, name, len)))
+               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 == len)) {
-               if (!memcmp(tmp->name, name, len))
+           if ((tmp->okey == skey) && (tmp->len == l)) {
+               if (!memcmp(tmp->name, name, l))
                    return(tmp->name);
            }
 #else
-           if ((tmp->okey == skey) && (tmp->len == len) &&
-               (!xmlStrncmp(tmp->name, name, len)))
+           if ((tmp->okey == skey) && (tmp->len == l) &&
+               (!xmlStrncmp(tmp->name, name, l)))
                return(tmp->name);
 #endif
        }
@@ -1032,7 +1076,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
     xmlDictEntryPtr entry;
     xmlDictEntryPtr insert;
     const xmlChar *ret;
-    int len, plen, l;
+    unsigned int len, plen, l;
 
     if ((dict == NULL) || (name == NULL))
        return(NULL);
@@ -1108,7 +1152,7 @@ xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
     entry->valid = 1;
     entry->okey = okey;
 
-    if (insert != NULL) 
+    if (insert != NULL)
        insert->next = entry;
 
     dict->nbElems++;
@@ -1166,6 +1210,50 @@ xmlDictSize(xmlDictPtr dict) {
     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"
index 25f473e..c90e042 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -46,6 +46,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -55,6 +56,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -95,6 +98,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -117,6 +122,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -271,8 +277,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 51d331e..7947196 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -358,8 +358,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 116605d..22d5061 100644 (file)
@@ -7,7 +7,7 @@ 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 Z-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 Z-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>
+</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>
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -37,7 +37,11 @@ A:link, A:visited, A:active { text-decoration: underline }
 <a href="APIchunk27.html">w-w</a>
 <a href="APIchunk28.html">x-x</a>
 <a href="APIchunk29.html">y-z</a>
-</h2><h2>Letter Z:</h2><dl><dt>ZLIB</dt><dd><a href="html/libxml-DOCBparser.html#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a><br />
+</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 />
@@ -149,7 +153,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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>activation</dt><dd><a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</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 />
@@ -251,6 +254,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -287,8 +291,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlNodeBufGetContent">xmlNodeBufGetContent</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 />
@@ -308,7 +314,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-HTMLparser.html#htmlNewParserCtxt">htmlNewParserCtxt</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 />
@@ -351,7 +358,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</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 />
@@ -360,6 +370,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -399,7 +410,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-parser.html#xmlParserInputRead">xmlParserInputRead</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 />
@@ -431,10 +441,12 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -623,7 +635,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-parser.html#xmlCleanupParser">xmlCleanupParser</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 />
@@ -638,8 +651,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index a594514..c1336cb 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -49,6 +49,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -100,7 +101,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-tree.html#xmlGetLineNo">xmlGetLineNo</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 />
@@ -113,7 +113,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlBufferAddHead">xmlBufferAddHead</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 />
@@ -127,16 +128,21 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-HTMLtree.html#htmlNodeDump">htmlNodeDump</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 />
@@ -171,6 +177,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -206,7 +213,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</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 />
@@ -249,7 +259,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlBufferDetach">xmlBufferDetach</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 />
@@ -304,8 +315,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 7985825..113385b 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -52,7 +52,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-tree.html#xmlGetLineNo">xmlGetLineNo</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 />
@@ -87,10 +86,13 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlNewDocProp">xmlNewDocProp</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 />
@@ -139,7 +141,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</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 />
@@ -581,6 +584,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -652,6 +657,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -881,6 +887,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -896,8 +904,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 21eaffe..b1f069d 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -242,7 +242,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -379,12 +382,16 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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>dictionary</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</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 />
@@ -396,10 +403,12 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -420,7 +429,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-entities.html#xmlNewEntity">xmlNewEntity</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 />
@@ -443,7 +453,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlNodeBufGetContent">xmlNodeBufGetContent</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 />
@@ -466,6 +477,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -474,8 +486,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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-parser.html#xmlParserInputRead">xmlParserInputRead</a><br />
-<a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</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 />
@@ -532,7 +543,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-parser.html#xmlParserInputRead">xmlParserInputRead</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 />
@@ -601,7 +611,11 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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>dump</dt><dd><a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</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 />
@@ -643,8 +657,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index ce82237..2eac2f6 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -55,6 +55,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -170,6 +171,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -311,6 +313,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -395,6 +398,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -432,6 +436,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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>
@@ -442,8 +448,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index bbf22e5..163d67b 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -38,6 +38,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -114,7 +115,9 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</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 />
@@ -177,6 +180,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -233,6 +237,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -305,6 +310,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -424,8 +430,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 0912b93..92d3845 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -110,6 +110,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -178,6 +179,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -246,6 +251,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -274,6 +281,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -285,6 +293,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -342,8 +351,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 6936af2..070f8ce 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -42,6 +42,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -59,7 +60,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlNodeDump">xmlNodeDump</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 />
@@ -191,7 +193,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</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 />
@@ -218,7 +221,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-parser.html#xmlParserInputRead">xmlParserInputRead</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 />
@@ -302,7 +304,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -329,6 +334,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -417,6 +423,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -429,6 +436,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -497,17 +505,20 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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>invoking</dt><dd><a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</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 />
@@ -545,8 +556,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 5de97d8..90249a1 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -184,12 +184,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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>lenght</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#xmlExpNewAtom">xmlExpNewAtom</a><br />
-<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
-<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
-<a href="html/libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</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 />
@@ -199,6 +193,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -299,15 +294,22 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</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_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</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 />
@@ -372,6 +374,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -429,8 +433,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 0f302d0..23f434e 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -97,7 +97,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlParseMarkupDecl">xmlParseMarkupDecl</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 />
@@ -289,6 +290,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -308,7 +310,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-tree.html#xmlReconciliateNs">xmlReconciliateNs</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 />
@@ -346,8 +349,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 5c70d09..1d10f93 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -208,7 +208,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlNodeBufGetContent">xmlNodeBufGetContent</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 />
@@ -287,6 +288,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -328,6 +330,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -389,8 +392,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 72ed431..0317066 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -306,8 +306,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 2f98a8c..c655198 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -135,7 +135,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-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-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
@@ -231,7 +230,9 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</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 />
@@ -322,6 +323,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -337,11 +339,15 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</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 />
@@ -369,8 +375,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 94d0248..2f20018 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -151,6 +151,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -189,7 +190,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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-parser.html#xmlParserInputRead">xmlParserInputRead</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 />
@@ -208,6 +208,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -294,7 +296,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-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-tree.html#xmlNewPI">xmlNewPI</a><br />
@@ -331,7 +332,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-parser.html#xmlParserInputRead">xmlParserInputRead</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 />
@@ -355,6 +355,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -373,6 +374,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -508,6 +510,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -517,6 +520,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -570,8 +575,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index c7e04e3..16c7c21 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -59,8 +59,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -190,6 +192,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -244,7 +247,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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>refresh</dt><dd><a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</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 />
@@ -335,6 +337,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -352,6 +355,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -403,6 +407,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -447,7 +452,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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-tree.html#xmlGetLineNo">xmlGetLineNo</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 />
@@ -518,6 +522,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -628,6 +633,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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>
@@ -638,8 +644,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 9067279..e81f34d 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -40,10 +40,11 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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-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 />
-</dd><dt>safety</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</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 />
@@ -66,6 +67,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -135,6 +137,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -384,6 +387,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -407,6 +411,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -453,6 +458,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -639,7 +645,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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-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#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
@@ -688,6 +693,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -703,6 +709,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -735,6 +742,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -776,6 +784,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -808,6 +817,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -891,6 +901,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -966,8 +977,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index dc8dc79..dec65ba 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -117,6 +117,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -144,6 +145,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -158,6 +160,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -170,7 +173,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-dict.html#xmlInitializeDict">xmlInitializeDict</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 />
@@ -217,6 +219,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -365,7 +368,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-parser.html#xmlParserInputRead">xmlParserInputRead</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 />
@@ -425,8 +427,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 646acdb..17666cf 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -62,6 +62,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -111,6 +113,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</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 />
@@ -185,10 +188,12 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</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-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</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 />
@@ -239,6 +244,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -292,6 +298,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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>
@@ -301,8 +308,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 7123c06..cabaa27 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -132,6 +132,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -188,6 +189,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -255,6 +258,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -270,6 +275,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -318,8 +325,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 5653024..c5993f9 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -107,12 +107,16 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -129,8 +133,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
-<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
-<a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</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 />
@@ -216,7 +218,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</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 />
@@ -248,14 +251,14 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</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>xmlLineNumbersDefault</dt><dd><a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</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 />
@@ -311,10 +314,13 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -338,6 +344,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -491,6 +498,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -533,8 +541,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index d293408..2aaa21b 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -107,8 +107,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 946863a..515118a 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -57,7 +57,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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#xmlNodeBufGetContent">xmlNodeBufGetContent</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 />
@@ -120,7 +121,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlBufferContent">xmlBufferContent</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 />
@@ -140,7 +144,9 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</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 />
@@ -316,6 +322,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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>
@@ -326,8 +336,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 8220fff..d26883b 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -91,6 +91,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -134,7 +135,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</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 />
@@ -193,7 +197,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</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 />
@@ -207,6 +212,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -320,8 +327,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index fcbe54a..da60d1a 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -149,6 +149,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -268,8 +269,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 315c8bd..346e7e5 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -82,7 +82,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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-xmlIO.html#xmlFileRead">xmlFileRead</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 />
@@ -201,6 +202,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -268,8 +270,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 452b9a7..3f46f99 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -185,8 +185,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -229,7 +231,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-xmlstring.html#xmlStrcat">xmlStrcat</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 />
@@ -303,8 +306,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 8fca400..934e39d 100644 (file)
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -41,6 +41,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -152,6 +153,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -281,8 +283,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 5cb56e3..8c4ac1f 100644 (file)
@@ -7,7 +7,7 @@ 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-Y 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-Y 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>
+</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>
@@ -16,8 +16,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
@@ -132,6 +132,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -195,7 +196,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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_HUGE</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</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 />
@@ -236,10 +240,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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>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 align="center"><a href="APIchunk0.html">A-B</a>
 <a href="APIchunk1.html">C-C</a>
 <a href="APIchunk2.html">D-E</a>
@@ -249,8 +249,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-Y</a>
-<a href="APIchunk10.html">Z-a</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>
index 35bb017..d5ca488 100644 (file)
@@ -24,6 +24,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -91,6 +92,12 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -173,6 +180,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -562,6 +571,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
index 3911d92..65e004b 100644 (file)
@@ -331,11 +331,13 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -610,6 +612,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -816,7 +819,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1286,6 +1292,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1378,6 +1385,14 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1771,6 +1786,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1817,7 +1834,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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_C14N_CREATE_CTXT">XML_C14N_CREATE_CTXT</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 />
@@ -1828,7 +1846,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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_">XML_CHECK_</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 />
@@ -1867,7 +1884,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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_CHECK_X">XML_CHECK_X</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 />
@@ -1973,6 +1989,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -2009,12 +2026,14 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -2038,6 +2057,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -2906,8 +2926,11 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -3177,6 +3200,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -3215,6 +3239,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -3281,6 +3306,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -3372,6 +3398,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -3384,6 +3411,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
index dbe89e8..3c47863 100644 (file)
@@ -81,6 +81,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -108,6 +109,9 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 xmlBufPtr:</h2><p><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 />
 </p><h2>Type const xmlBufferPtr:</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 />
@@ -485,6 +489,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -581,8 +586,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlBufferCreateSize">xmlBufferCreateSize</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 />
@@ -616,6 +623,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -853,8 +861,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -941,6 +951,9 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#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 />
@@ -995,6 +1008,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1085,10 +1099,12 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 />
@@ -1111,6 +1127,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1437,6 +1454,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlBufGetNodeContent">xmlBufGetNodeContent</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#xmlCopyProp">xmlCopyProp</a><br />
@@ -1564,6 +1583,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1574,6 +1594,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1655,6 +1676,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1950,12 +1973,15 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -2098,6 +2124,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -2202,6 +2229,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -2214,6 +2242,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
index 49a8737..c2b82e7 100644 (file)
@@ -61,7 +61,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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-xmlversion.html#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</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 />
@@ -91,6 +92,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -157,6 +159,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -206,7 +209,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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_">XML_CHECK_</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 />
@@ -245,7 +247,6 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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_CHECK_X">XML_CHECK_X</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 />
@@ -388,6 +389,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -424,6 +426,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -439,6 +442,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -462,6 +466,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -546,7 +551,10 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -586,6 +594,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1420,6 +1429,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1761,6 +1771,14 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -1934,11 +1952,13 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -2414,6 +2434,8 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -2812,8 +2834,11 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -3021,6 +3046,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -3443,6 +3469,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
@@ -3504,6 +3531,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />
index dd39f69..0cc0a50 100644 (file)
@@ -1,5 +1,5 @@
 ## Process this file with automake to produce Makefile.in
-SUBDIRS=devhelp examples
+SUBDIRS = . devhelp examples
 
 # The top-level SGML file.
 DOC_MAIN_XML_FILE=gnome-xml.xml
@@ -16,21 +16,230 @@ PAGES= architecture.html bugs.html contribs.html docs.html DOM.html \
     tree.html xmldtd.html XMLinfo.html XSLT.html
 APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
     APIsymbols.html APIchunk0.html
-EXTRA_DIST=xmlcatalog_man.xml tutorial/*.html tutorial/*.c tutorial/*.pdf \
-           tutorial/images/*.png tutorial/images/callouts/*.png \
-          API*.html *.1 *.xsl *.html *.gif w3c.png html/*.html \
-          html/*.png libxml2-api.xml index.py search.php \
-          apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \
-          README.docs symbols.xml
 
+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
-all: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
-else
-all:
-endif
+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
 
@@ -48,25 +257,25 @@ web: $(PAGES)
 $(PAGES): xml.html $(srcdir)/site.xsl
        -@(if [ -x $(XSLTPROC) ] ; then \
          echo "Rebuilding the HTML Web pages from xml.html" ; \
-         $(XSLTPROC) --nonet --html $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/xml.html > index.html ; fi );
+         $(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: $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html
+$(top_builddir)/NEWS: $(srcdir)/news.xsl $(srcdir)/news.html
        -@(if [ -x $(XSLTPROC) ] ; then \
-         $(XSLTPROC) --nonet $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html > $(top_builddir)/NEWS ; fi );
+         $(XSLTPROC) --nonet $(srcdir)/news.xsl $(srcdir)/news.html > $(top_builddir)/NEWS ; fi );
 
-libxml2.xsa: $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html
+libxml2.xsa: $(srcdir)/xsa.xsl $(srcdir)/news.html
        -@(if [ -x $(XSLTPROC) ] ; then \
          echo "Rebuilding the NEWS file" ; \
-         $(XSLTPROC) --nonet $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html > libxml2.xsa ; fi );
+         $(XSLTPROC) --nonet $(srcdir)/xsa.xsl $(srcdir)/news.html > libxml2.xsa ; fi );
 
-$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/api.xsl
+$(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 $(top_srcdir)/doc/api.xsl \
-                            $(top_srcdir)/doc/xml.html ; fi );
+         $(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 );
@@ -74,7 +283,7 @@ $(APIPAGES): libxml2-api.xml libxml2-refs.xml $(top_srcdir)/doc/site.xsl $(top_s
 $(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 libxml2-api.xml ; fi )
+         $(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 );
@@ -82,17 +291,23 @@ $(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl
 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 libxml2-api.xml; fi )
+               $(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 )
 
-libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl ../include/libxml/*.h ../*.c
-       -(./apibuild.py)
-       ($(XSLTPROC) checkapisym.xsl libxml2-api.xml)
-       ($(XSLTPROC) -o ../libxml2.syms syms.xsl symbols.xml)
+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)
 
 
@@ -102,28 +317,35 @@ xmllint.1: 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 all
+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/*.* \
+       $(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/*.* \
+       $(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/*.* \
+       $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
+       -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/callouts/*.* \
                $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
 
-.PHONY : html xml templates scan
+.PHONY: docs api web wiki rebuild
index ebeca2a..997026a 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -46,11 +63,11 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+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_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
@@ -61,6 +78,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        install-pdf-recursive install-ps-recursive install-recursive \
        installcheck-recursive installdirs-recursive pdf-recursive \
        ps-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/||"`;; \
@@ -82,6 +104,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 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
@@ -124,7 +152,6 @@ ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
-AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -161,6 +188,7 @@ 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@
@@ -216,7 +244,6 @@ RANLIB = @RANLIB@
 RDL_LIBS = @RDL_LIBS@
 READER_TEST = @READER_TEST@
 RELDATE = @RELDATE@
-RM = @RM@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -241,7 +268,6 @@ TEST_VTIME = @TEST_VTIME@
 TEST_XINCLUDE = @TEST_XINCLUDE@
 TEST_XPATH = @TEST_XPATH@
 TEST_XPTR = @TEST_XPTR@
-THREADS_W32 = @THREADS_W32@
 THREAD_CFLAGS = @THREAD_CFLAGS@
 THREAD_LIBS = @THREAD_LIBS@
 VERSION = @VERSION@
@@ -274,6 +300,7 @@ 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@
@@ -347,7 +374,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = devhelp examples
+SUBDIRS = devhelp examples
 
 # The top-level SGML file.
 DOC_MAIN_XML_FILE = gnome-xml.xml
@@ -365,14 +392,230 @@ PAGES = architecture.html bugs.html contribs.html docs.html DOM.html \
 APIPAGES = APIconstructors.html APIfiles.html APIfunctions.html \
     APIsymbols.html APIchunk0.html
 
-EXTRA_DIST = xmlcatalog_man.xml tutorial/*.html tutorial/*.c tutorial/*.pdf \
-           tutorial/images/*.png tutorial/images/callouts/*.png \
-          API*.html *.1 *.xsl *.html *.gif w3c.png html/*.html \
-          html/*.png libxml2-api.xml index.py search.php \
-          apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \
-          README.docs symbols.xml
+@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:
@@ -414,11 +657,18 @@ clean-libtool:
        -rm -rf .libs _libs
 install-man1: $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
-       @list=''; test -n "$(man1dir)" || exit 0; \
-       { 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'; \
+       @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"; \
@@ -447,9 +697,7 @@ uninstall-man1:
          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,.,'`; \
-       test -z "$$files" || { \
-         echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
-         cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+       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.
@@ -631,13 +879,10 @@ distdir: $(DISTFILES)
        done
        @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(MKDIR_P) "$(distdir)/$$subdir" \
-           || 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; \
@@ -675,10 +920,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       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:
@@ -778,77 +1028,83 @@ uninstall-man: uninstall-man1
        uninstall uninstall-am uninstall-man uninstall-man1
 
 
-@REBUILD_DOCS_TRUE@all: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
-@REBUILD_DOCS_FALSE@all:
-
-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 $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/xml.html > index.html ; fi );
-       -@(if [ -x $(XMLLINT) ] ; then \
-         echo "Validating the HTML Web pages" ; \
-         $(XMLLINT) --nonet --valid --noout $(PAGES) ; fi );
-
-$(top_builddir)/NEWS: $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html
-       -@(if [ -x $(XSLTPROC) ] ; then \
-         $(XSLTPROC) --nonet $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html > $(top_builddir)/NEWS ; fi );
-
-libxml2.xsa: $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html
-       -@(if [ -x $(XSLTPROC) ] ; then \
-         echo "Rebuilding the NEWS file" ; \
-         $(XSLTPROC) --nonet $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html > libxml2.xsa ; fi );
-
-$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/api.xsl
-       -@(if [ -x $(XSLTPROC) ] ; then \
-         echo "Rebuilding the HTML API pages from libxml2-refs.xml" ; \
-         $(XSLTPROC) --nonet --html $(top_srcdir)/doc/api.xsl \
-                            $(top_srcdir)/doc/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 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 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 )
-
-libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl ../include/libxml/*.h ../*.c
-       -(./apibuild.py)
-       ($(XSLTPROC) checkapisym.xsl libxml2-api.xml)
-       ($(XSLTPROC) -o ../libxml2.syms syms.xsl symbols.xml)
-       -@(cd .. ; $(MAKE) rebuild_testapi)
-
-xmllint.1: xmllint.xml
-       -@($(XSLTPROC) --nonet xmllint.xml)
-
-xmlcatalog.1: xmlcatalog_man.xml
-       -@($(XSLTPROC) --nonet xmlcatalog_man.xml)
+@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
@@ -856,25 +1112,25 @@ clean-local:
 maintainer-clean-local: clean-local
        rm -rf libxml-decl-list.txt libxml-decl.txt 
 
-rebuild: api all
+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/*.* \
+       $(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/*.* \
+       $(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/*.* \
+       $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
+       -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/callouts/*.* \
                $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
 
-.PHONY : html xml templates scan
+.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.
index c2dff84..b5b669a 100755 (executable)
@@ -52,7 +52,11 @@ ignored_files = {
   "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",
+  "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 = {
@@ -80,51 +84,51 @@ ignored_words = {
 }
 
 def escape(raw):
-    raw = string.replace(raw, '&', '&amp;')
-    raw = string.replace(raw, '<', '&lt;')
-    raw = string.replace(raw, '>', '&gt;')
-    raw = string.replace(raw, "'", '&apos;')
-    raw = string.replace(raw, '"', '&quot;')
+    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 d.keys()
+    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))
+        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 + " " +  `self.info`
-       if self.extra != None:
-           r = r + " " + `self.extra`
-       if self.conditionals != None:
-           r = r + " " + `self.conditionals`
-       return r
+        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):
@@ -142,10 +146,10 @@ class identifier:
     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[:]
+        if conditionals == None or len(conditionals) == 0:
+            self.conditionals = None
+        else:
+            self.conditionals = conditionals[:]
 
     def get_name(self):
         return self.name
@@ -168,231 +172,231 @@ class identifier:
 
     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 self.name == debugsym:
+            print("=> update %s : %s" % (debugsym, (module, type, info,
+                                         extra, conditionals)))
         if header != None and self.header == None:
-           self.set_header(module)
+            self.set_header(module)
         if module != None and (self.module == None or self.header == self.module):
-           self.set_module(module)
+            self.set_module(module)
         if type != None and self.type == None:
-           self.set_type(type)
+            self.set_type(type)
         if info != None:
-           self.set_info(info)
+            self.set_info(info)
         if extra != None:
-           self.set_extra(extra)
+            self.set_extra(extra)
         if conditionals != None:
-           self.set_conditionals(conditionals)
+            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 = {}
+        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
+            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
+           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 static == 1:
+            d.set_static(1)
 
-       if d != None and name != None and type != None:
-           self.references[name] = d
+        if d != None and name != None and type != None:
+            self.references[name] = d
 
-       if name == debugsym:
-           print "New ref: %s" % (d)
+        if name == debugsym:
+            print("New ref: %s" % (d))
 
-       return d
+        return d
 
     def add(self, name, header, module, static, type, lineno, info=None, extra=None, conditionals = None):
         if name[0:2] == '__':
-           return None
+            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
+           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 idx.functions.keys():
+        for id in list(idx.functions.keys()):
               #
               # macro might be used to override functions or variables
               # definitions
               #
-            if self.macros.has_key(id):
-                del self.macros[id]
-            if self.functions.has_key(id):
-                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 idx.variables.keys():
+             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 self.macros.has_key(id):
-                del self.macros[id]
-            if self.variables.has_key(id):
-                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 idx.structs.keys():
-            if self.structs.has_key(id):
-                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 idx.typedefs.keys():
-            if self.typedefs.has_key(id):
-                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 idx.macros.keys():
+             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 self.variables.has_key(id):
+             if id in self.variables:
                  continue
-             if self.functions.has_key(id):
+             if id in self.functions:
                  continue
-             if self.enums.has_key(id):
+             if id in self.enums:
                  continue
-            if self.macros.has_key(id):
-                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 idx.enums.keys():
-            if self.enums.has_key(id):
-                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]
+             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 idx.functions.keys():
-            if self.functions.has_key(id):
-                # 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.
+        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 dict.keys():
-           id = dict[name]
-           count = count + 1
-           if id.static == 0:
-               public = public + 1
+        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)
+            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)
+        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
+        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 = string.lstrip(line)
-           line = string.rstrip(line)
-           if line == '':
-               continue
-           while line[-1] == '\\':
-               line = line[:-1]
-               n = self.input.readline()
-               self.lineno = self.lineno + 1
-               n = string.lstrip(n)
-               n = string.rstrip(n)
-               if not n:
-                   break
-               else:
-                   line = line + n
+        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):
@@ -402,194 +406,194 @@ class CLexer:
         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
+        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 = map((lambda x: ('preproc', x)),
-                                 string.split(line))
-               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 string.find(
-                              " \t(){}:;,+-*/%&!|[]=><", line[i]) == -1:
-                           i = i + 1
-                       else:
-                           break
-                   self.tokens.append(('name', line[s:i]))
-                   continue
-               if string.find("(){}:;,[]", line[i]) != -1:
+            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 string.find("+-*><=/%&!|.", line[i]) != -1:
+#                    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 (
-                      string.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 (
-                       string.find(" \t(){}:;,+-*/%&!|[]=><", 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
+#                    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
+        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 = []
+        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
@@ -604,203 +608,203 @@ class CParser:
         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)
+        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)
+        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
+            return
+        print(msg)
 
     def error(self, msg, token=-1):
         if self.no_error:
-           return
+            return
 
-        print "Parse Error: " + msg
-       if token != -1:
-           print "Got token ", token
-       self.lexer.debug()
-       sys.exit(1)
+        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()
+        print("Debug: " + msg)
+        if token != -1:
+            print("Got token ", token)
+        self.lexer.debug()
 
     def parseTopComment(self, 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
-       self.index.info = res
+        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()
+            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 string.find(self.comment, "DOC_DISABLE") != -1:
-           self.stop_error()
+        if self.comment.find("DOC_DISABLE") != -1:
+            self.stop_error()
 
-        if string.find(self.comment, "DOC_ENABLE") != -1:
-           self.start_error()
+        if self.comment.find("DOC_ENABLE") != -1:
+            self.start_error()
 
-       return token
+        return token
 
     #
     # Parse a comment block associate to a typedef
     #
     def parseTypeComment(self, name, quiet = 0):
         if name[0:2] == '__':
-           quiet = 1
+            quiet = 1
 
         args = []
-       desc = ""
+        desc = ""
 
         if self.comment == None:
-           if not quiet:
-               self.warning("Missing comment for type %s" % (name))
-           return((args, desc))
+            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 = string.split(self.comment, '\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 = string.strip(l)
-           desc = desc + " " + l
-           del lines[0]
-
-       desc = string.strip(desc)
-
-       if quiet == 0:
-           if desc == "":
-               self.warning("Type comment for %s lack description of the macro" % (name))
-
-       return(desc)
+            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
+            quiet = 1
 
         args = []
-       desc = ""
+        desc = ""
 
         if self.comment == None:
-           if not quiet:
-               self.warning("Missing comment for macro %s" % (name))
-           return((args, desc))
+            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 = string.split(self.comment, '\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) = string.split(l, ':', 1)
-               desc=string.strip(desc)
-               arg=string.strip(arg)
+            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 = string.strip(lines[0])
-           while len(l) > 2 and l[0:3] != '* @':
-               while l[0] == '*':
-                   l = l[1:]
-               desc = desc + ' ' + string.strip(l)
-               del lines[0]
-               if len(lines) == 0:
-                   break
-               l = lines[0]
+                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 = string.strip(l)
-           desc = desc + " " + l
-           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 = string.strip(desc)
+        desc = desc.strip()
 
-       if quiet == 0:
-           if desc == "":
-               self.warning("Macro comment for %s lack description of the macro" % (name))
+        if quiet == 0:
+            if desc == "":
+                self.warning("Macro comment for %s lack description of the macro" % (name))
 
-       return((args, desc))
+        return((args, desc))
 
      #
      # Parse a comment block and merge the informations found in the
@@ -809,206 +813,206 @@ class CParser:
      #
     def mergeFunctionComment(self, name, description, quiet = 0):
         if name == 'main':
-           quiet = 1
+            quiet = 1
         if name[0:2] == '__':
-           quiet = 1
+            quiet = 1
 
-       (ret, args) = description
-       desc = ""
-       retdesc = ""
+        (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 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 = string.split(self.comment, '\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) = string.split(l, ':', 1)
-               desc=string.strip(desc)
-               arg=string.strip(arg)
+            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 = string.strip(lines[0])
-           while len(l) > 2 and l[0:3] != '* @':
-               while l[0] == '*':
-                   l = l[1:]
-               desc = desc + ' ' + string.strip(l)
-               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 = string.strip(l)
-           if len(l) >= 6 and  l[0:6] == "return" or l[0:6] == "Return":
-               try:
-                   l = string.split(l, ' ', 1)[1]
-               except:
-                   l = ""
-               retdesc = string.strip(l)
-               del lines[0]
-               while len(lines) > 0:
-                   l = lines[0]
-                   while len(l) > 0 and l[0] == '*':
-                       l = l[1:]
-                   l = string.strip(l)
-                   retdesc = retdesc + " " + l
-                   del lines[0]
-           else:
-               desc = desc + " " + l
-               del lines[0]
-
-       retdesc = string.strip(retdesc)
-       desc = string.strip(desc)
-
-       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))
+                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
+        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()
+        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 = string.split(name, '(') [0]
+                    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 string.find(apstr, '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 string.find(apstr, '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 string.find(apstr, 'ENABLED') != -1:
-                   self.conditionals.append(apstr)
-           except:
-               pass
-       elif name == "#else":
-           if self.conditionals != [] and \
-              string.find(self.defines[-1], 'ENABLED') != -1:
-               self.conditionals[-1] = "!(%s)" % self.conditionals[-1]
-       elif name == "#endif":
-           if self.conditionals != [] and \
-              string.find(self.defines[-1], '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
+                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
@@ -1019,89 +1023,89 @@ class CParser:
         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 ignored_words.has_key(token[1]):
-               (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
+        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 = string.split(type, '(')[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
+            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
@@ -1109,138 +1113,138 @@ class CParser:
      #
     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
+            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)
+         #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;
+            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
+         #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"
+        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 = string.strip(self.comment)
-                           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
+            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
@@ -1248,15 +1252,15 @@ class CParser:
      #
     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
+            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
@@ -1265,200 +1269,200 @@ class CParser:
      #
     def parseType(self, token):
         self.type = ""
-       self.struct_fields = []
+        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 == 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]
+            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
+            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()
+            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
+              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
+         # 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
+        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
@@ -1467,134 +1471,134 @@ class CParser:
     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
+            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:
+        while token != None:
             if token[0] == 'name':
-               token = self.parseGlobal(token)
+                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)
+                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
 
 
@@ -1603,488 +1607,490 @@ class docBuilder:
     def __init__(self, name, directories=['.'], excludes=[]):
         self.name = name
         self.directories = directories
-       self.excludes = excludes + ignored_files.keys()
-       self.modules = {}
-       self.headers = {}
-       self.idx = index()
+        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
+        self.index = {}
+        if name == 'libxml2':
+            self.basename = 'libxml'
+        else:
+            self.basename = name
 
     def indexString(self, id, str):
-       if str == None:
-           return
-       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, ';', ' ')
-       tokens = string.split(str)
-       for token in tokens:
-           try:
-               c = token[0]
-               if string.find(string.letters, c) < 0:
-                   pass
-               elif len(token) < 3:
-                   pass
-               else:
-                   lower = string.lower(token)
-                   # TODO: generalize this a bit
-                   if lower == 'and' or lower == 'the':
-                       pass
-                   elif self.xref.has_key(token):
-                       self.xref[token].append(id)
-                   else:
-                       self.xref[token] = [id]
-           except:
-               pass
+        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(self.headers.keys()), len(self.modules.keys()))
-       self.idx.analyze()
+        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 self.headers.keys():
-           parser = CParser(header)
-           idx = parser.parse()
-           self.headers[header] = idx;
-           self.idx.merge(idx)
+        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 self.modules.keys():
-           parser = CParser(module)
-           idx = parser.parse()
-           # idx.analyze()
-           self.modules[module] = idx
-           self.idx.merge_public(idx)
+        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 string.find(file, excl) != -1:
-                       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 string.find(file, excl) != -1:
-                       skip = 1;
-                       break
-               if skip == 0:
-                   self.headers[file] = None;
-       self.scanHeaders()
-       self.scanModules()
+            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
+        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]));
+                     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:
+                     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))
+                (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 self.idx.structs.has_key(name) 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))
+        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")
+                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)))
+        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
+        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, `id.info`
+                     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" % (
-                                string.lower(data),
-                                escape(dict.info[data]),
-                                string.lower(data)))
-               except:
-                   print "Header %s lacks a %s description" % (module, data)
-           if dict.info.has_key('Description'):
-               desc = dict.info['Description']
-               if string.find(desc, "DEPRECATED") != -1:
-                   output.write("     <deprecated/>\n")
-
-        ids = dict.macros.keys()
-       ids.sort()
-       for id in uniq(ids):
-           # Macros are sometime used to masquerade other types.
-           if dict.functions.has_key(id):
-               continue
-           if dict.variables.has_key(id):
-               continue
-           if dict.typedefs.has_key(id):
-               continue
-           if dict.structs.has_key(id):
-               continue
-           if dict.enums.has_key(id):
-               continue
-           output.write("     <exports symbol='%s' type='macro'/>\n" % (id))
-        ids = dict.enums.keys()
-       ids.sort()
-       for id in uniq(ids):
-           output.write("     <exports symbol='%s' type='enum'/>\n" % (id))
-        ids = dict.typedefs.keys()
-       ids.sort()
-       for id in uniq(ids):
-           output.write("     <exports symbol='%s' type='typedef'/>\n" % (id))
-        ids = dict.structs.keys()
-       ids.sort()
-       for id in uniq(ids):
-           output.write("     <exports symbol='%s' type='struct'/>\n" % (id))
-        ids = dict.variables.keys()
-       ids.sort()
-       for id in uniq(ids):
-           output.write("     <exports symbol='%s' type='variable'/>\n" % (id))
-        ids = dict.functions.keys()
-       ids.sort()
-       for id in uniq(ids):
-           output.write("     <exports symbol='%s' type='function'/>\n" % (id))
-       output.write("    </file>\n")
+        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 = self.headers.keys()
+        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(dict.functions.keys() + dict.variables.keys() + \
-                 dict.macros.keys() + dict.typedefs.keys() + \
-                 dict.structs.keys() + dict.enums.keys())
-           ids.sort()
-           for id in ids:
-               output.write("      <ref name='%s'/>\n" % (id))
-           output.write("    </file>\n")
+            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 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 funcs.has_key(param[0]):
-                       funcs[param[0]].append(name)
-                   else:
-                       funcs[param[0]] = [name]
-           except:
-               pass
-       typ = 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")
+        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 self.idx.functions.keys():
-           id = self.idx.functions[name]
-           try:
-               (ret, params, desc) = id.info
-               if ret[0] == "void":
-                   continue
-               if funcs.has_key(ret[0]):
-                   funcs[ret[0]].append(name)
-               else:
-                   funcs[ret[0]] = [name]
-           except:
-               pass
-       typ = 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")
+        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 = 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")
+        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 = 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))
+        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 = 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")
+        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")
+        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)
+        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 = self.headers.keys()
+        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 = self.idx.macros.keys()
+        macros = list(self.idx.macros.keys())
         macros.sort()
         for macro in macros:
             self.serialize_macro(output, macro)
-        enums = self.idx.enums.keys()
+        enums = list(self.idx.enums.keys())
         enums.sort()
         for enum in enums:
             self.serialize_enum(output, enum)
-        typedefs = self.idx.typedefs.keys()
+        typedefs = list(self.idx.typedefs.keys())
         typedefs.sort()
         for typedef in typedefs:
             self.serialize_typedef(output, typedef)
-        variables = self.idx.variables.keys()
+        variables = list(self.idx.variables.keys())
         variables.sort()
         for variable in variables:
             self.serialize_variable(output, variable)
-        functions = self.idx.functions.keys()
+        functions = list(self.idx.functions.keys())
         functions.sort()
         for function in functions:
             self.serialize_function(output, function)
@@ -2093,7 +2099,7 @@ class docBuilder:
         output.close()
 
         filename = "%s-refs.xml" % self.name
-        print "Saving XML Cross References %s" % (filename)
+        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)
@@ -2105,28 +2111,28 @@ class docBuilder:
 def rebuild():
     builder = None
     if glob.glob("parser.c") != [] :
-        print "Rebuilding API description for libxml2"
-       builder = docBuilder("libxml2", [".", "."],
-                            ["xmlwin32version.h", "tst.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"])
+        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"])
+        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
+        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()
+        extra.scan()
+        extra.analyze()
+        extra.serialize()
     return builder
 
 #
@@ -2142,4 +2148,4 @@ if __name__ == "__main__":
         debug = 1
         parse(sys.argv[1])
     else:
-       rebuild()
+        rebuild()
index 36852f9..dad7975 100644 (file)
@@ -1,5 +1,15 @@
-DEVHELP_DIR=$(datadir)/gtk-doc/html/libxml2
-HTML_FILES=index.html general.html $(HTML_MODULES)
+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            \
@@ -56,18 +66,14 @@ EXTRA_FORMAT=                               \
        up.png                          \
        style.css
 
-EXTRA_DIST=devhelp.xsl html.xsl libxml2.devhelp $(HTML_FILES) $(EXTRA_FORMAT)
+EXTRA_DIST = devhelp.xsl html.xsl
 
-all: libxml2.devhelp $(HTML_FILES)
+if REBUILD_DOCS
+rebuild: libxml2.devhelp $(HTML_FILES)
+.PHONY: rebuild
 
 libxml2.devhelp $(HTML_FILES): devhelp.xsl html.xsl $(top_srcdir)/doc/libxml2-api.xml
-       -@(echo Rebuilding devhelp files)
        -@(if [ -x $(XSLTPROC) ] ; then \
-         $(XSLTPROC) --nonet -o $(srcdir)/libxml2.devhelp devhelp.xsl $(top_srcdir)/doc/libxml2-api.xml ; fi );
-
-install-data-local: 
-       -@MKDIR_P@ $(DESTDIR)$(DEVHELP_DIR)
-       -@INSTALL@ -m 0644 $(srcdir)/libxml2.devhelp $(DESTDIR)$(DEVHELP_DIR)
-       -@INSTALL@ -m 0644 $(EXTRA_FORMAT:%=$(srcdir)/%) $(DESTDIR)$(DEVHELP_DIR)
-       -@INSTALL@ -m 0644 $(HTML_FILES:%=$(srcdir)/%) $(DESTDIR)$(DEVHELP_DIR)
-
+         echo Rebuilding devhelp files ; \
+         $(XSLTPROC) --nonet -o $(srcdir)/libxml2.devhelp $(srcdir)/devhelp.xsl $(top_srcdir)/doc/libxml2-api.xml ; fi );
+endif
index 2c87ff3..5d09d76 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
+
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -34,7 +52,8 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = doc/devhelp
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(dist_devhelp_DATA) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
 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 \
@@ -46,20 +65,53 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+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_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 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)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
-AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -96,6 +148,7 @@ 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@
@@ -151,7 +204,6 @@ RANLIB = @RANLIB@
 RDL_LIBS = @RDL_LIBS@
 READER_TEST = @READER_TEST@
 RELDATE = @RELDATE@
-RM = @RM@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -176,7 +228,6 @@ TEST_VTIME = @TEST_VTIME@
 TEST_XINCLUDE = @TEST_XINCLUDE@
 TEST_XPATH = @TEST_XPATH@
 TEST_XPTR = @TEST_XPTR@
-THREADS_W32 = @THREADS_W32@
 THREAD_CFLAGS = @THREAD_CFLAGS@
 THREAD_LIBS = @THREAD_LIBS@
 VERSION = @VERSION@
@@ -209,6 +260,7 @@ 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@
@@ -282,8 +334,17 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-DEVHELP_DIR = $(datadir)/gtk-doc/html/libxml2
-HTML_FILES = index.html general.html $(HTML_MODULES)
+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            \
@@ -340,7 +401,7 @@ EXTRA_FORMAT = \
        up.png                          \
        style.css
 
-EXTRA_DIST = devhelp.xsl html.xsl libxml2.devhelp $(HTML_FILES) $(EXTRA_FORMAT)
+EXTRA_DIST = devhelp.xsl html.xsl
 all: all-am
 
 .SUFFIXES:
@@ -380,6 +441,27 @@ mostlyclean-libtool:
 
 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
 TAGS:
 
@@ -419,8 +501,11 @@ distdir: $(DISTFILES)
        done
 check-am: all-am
 check: check-am
-all-am: Makefile
+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
@@ -431,10 +516,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       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:
@@ -466,7 +556,7 @@ info: info-am
 
 info-am:
 
-install-data-am: install-data-local
+install-data-am: install-dist_devhelpDATA
 
 install-dvi: install-dvi-am
 
@@ -510,35 +600,30 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-dist_devhelpDATA
 
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
        distclean distclean-generic distclean-libtool 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-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       uninstall uninstall-am
-
-
-all: libxml2.devhelp $(HTML_FILES)
-
-libxml2.devhelp $(HTML_FILES): devhelp.xsl html.xsl $(top_srcdir)/doc/libxml2-api.xml
-       -@(echo Rebuilding devhelp files)
-       -@(if [ -x $(XSLTPROC) ] ; then \
-         $(XSLTPROC) --nonet -o $(srcdir)/libxml2.devhelp devhelp.xsl $(top_srcdir)/doc/libxml2-api.xml ; fi );
-
-install-data-local: 
-       -@MKDIR_P@ $(DESTDIR)$(DEVHELP_DIR)
-       -@INSTALL@ -m 0644 $(srcdir)/libxml2.devhelp $(DESTDIR)$(DEVHELP_DIR)
-       -@INSTALL@ -m 0644 $(EXTRA_FORMAT:%=$(srcdir)/%) $(DESTDIR)$(DEVHELP_DIR)
-       -@INSTALL@ -m 0644 $(HTML_FILES:%=$(srcdir)/%) $(DESTDIR)$(DEVHELP_DIR)
+       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 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.
index 6122ffe..68f9380 100644 (file)
@@ -33,6 +33,6 @@
     <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 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>
+    <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>
index 818121d..fd5f6b9 100644 (file)
       <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);
@@ -94,6 +96,10 @@ The content of this structure is not made public by the API.
 </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>
@@ -110,12 +116,16 @@ The content of this structure is not made public by the API.
 </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 not thread safe, initialization should preferably be done once at startup</p>
+</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>
index 6c66e5f..357c14a 100644 (file)
@@ -309,7 +309,8 @@ void        <a href="#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a>    (<a hr
     <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_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>
@@ -661,11 +662,11 @@ void      <a href="#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a>    (<a hr
         <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 number of xmlChars read, or -1 in case of error, 0 indicate the end of this entity</td></tr></tbody></table></div></div>
+<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 refresh the input for the parser. It doesn't try to preserve pointers to the input buffer, and discard 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 number of xmlChars read, or -1 in case of error, 0 indicate the end of this entity</td></tr></tbody></table></div></div>
+</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>
index d56ab17..915ad5b 100644 (file)
@@ -2,7 +2,7 @@
 <html>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <title>parserInternals: internals routines exported by the parser.</title>
+    <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"/>
@@ -38,7 +38,7 @@
     <h2>
       <span class="refentrytitle">parserInternals</span>
     </h2>
-    <p>parserInternals - internals routines exported by the parser.</p>
+    <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">
 #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);
@@ -263,12 +266,24 @@ void      <a href="#xmlParseEntityDecl">xmlParseEntityDecl</a>            (<a href="libxml2-tre
 </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.</p>
+</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>;
index a89b58f..23905d0 100644 (file)
@@ -262,7 +262,7 @@ The content of this structure is not made public by the API.
         <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 lenght 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>
+<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>
index af1f654..90c3903 100644 (file)
     <div class="refsynopsisdiv">
       <h2>Synopsis</h2>
       <pre class="synopsis">#define <a href="#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a>;
-#define <a href="#XML_XML_NAMESPACE">XML_XML_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="#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</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 <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * <a href="#xmlBufferPtr">xmlBufferPtr</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>;
@@ -63,7 +64,7 @@ typedef <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> <a href="#
 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 struct _xmlElementContent <a href="#xmlElementContent">xmlElementContent</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>;
@@ -73,6 +74,7 @@ typedef <a href="libxml2-tree.html#xmlNode">xmlNode</a> * <a href="#xmlNodePtr">
 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>;
@@ -81,6 +83,7 @@ typedef <a href="libxml2-tree.html#xmlAttribute">xmlAttribute</a> * <a href="#xm
 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>;
@@ -104,8 +107,9 @@ typedef <a href="libxml2-tree.html#xmlOutputBuffer">xmlOutputBuffer</a> * <a hre
 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>            (const <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="#xmlGetProp">xmlGetProp</a>            (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/>                                       const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufContent">xmlBufContent</a>              (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</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>        (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</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>            (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/>                                  <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
@@ -117,15 +121,16 @@ int       <a href="#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a>                (const char * file
 <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>        (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
-<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a>  <a href="#xmlStringGetNodeList">xmlStringGetNodeList</a>        (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/>                                  const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetProp">xmlGetProp</a>            (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</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);
-void   <a href="#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a>        (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufEnd">xmlBufEnd</a>              (const <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>                (<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> * 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);
@@ -171,6 +176,7 @@ int <a href="#xmlBufferDump">xmlBufferDump</a>                      (FILE * file, <br/>                                      <a hre
 <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/>                                  <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</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);
@@ -194,6 +200,7 @@ void        <a href="#xmlSetDocCompressMode">xmlSetDocCompressMode</a>              (<a href="libxm
 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>                        (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *   <a href="#xmlBufferContent">xmlBufferContent</a>        (const <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
@@ -201,6 +208,7 @@ int <a href="#xmlRemoveProp">xmlRemoveProp</a>                      (<a href="libxml2-tree.html#xml
 <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>            (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
 int    <a href="#xmlGetDocCompressMode">xmlGetDocCompressMode</a>              (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</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>                (<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> * 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);
@@ -245,12 +253,13 @@ int       <a href="#xmlBufferCCat">xmlBufferCCat</a>                      (<a href="libxml2-tree.html#xml
 <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> *    <a href="#xmlGetNsList">xmlGetNsList</a>                (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/>                                  <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</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>                      (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
-<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);
+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);
@@ -273,6 +282,10 @@ void       <a href="#xmlFreeNsList">xmlFreeNsList</a>                      (<a href="libxml2-tree.html#xm
 </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>
@@ -371,6 +384,16 @@ void       <a href="#xmlFreeNsList">xmlFreeNsList</a>                      (<a href="libxml2-tree.html#xm
 </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
@@ -688,8 +711,8 @@ void        <a href="#xmlFreeNsList">xmlFreeNsList</a>                      (<a href="libxml2-tree.html#xm
     <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#xmlBufferPtr">xmlBufferPtr</a>  buffer  : Local buffer encoded in UTF-8 or ISOLatin
-    <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a>  conv    : if encoder != NULL buffer for output
+    <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;
@@ -789,6 +812,7 @@ void        <a href="#xmlFreeNsList">xmlFreeNsList</a>                      (<a href="libxml2-tree.html#xm
     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>
@@ -822,8 +846,8 @@ void        <a href="#xmlFreeNsList">xmlFreeNsList</a>                      (<a href="libxml2-tree.html#xm
     <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#xmlBufferPtr">xmlBufferPtr</a>  buffer  : Local buffer encoded in UTF-8
-    <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a>  raw     : if encoder != NULL buffer for raw input
+    <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
@@ -935,6 +959,30 @@ void       <a href="#xmlFreeNsList">xmlFreeNsList</a>                      (<a href="libxml2-tree.html#xm
 </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#xmlBufPtr">xmlBufPtr</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               (const <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/>                                  <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</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>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>
@@ -1184,7 +1232,7 @@ void      <a href="#xmlFreeNsList">xmlFreeNsList</a>                      (<a href="libxml2-tree.html#xm
 <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                    (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
-</pre><p>Get line number of @node. This requires activation of this option before invoking the parser by calling xmlLineNumbersDefault(1)</p>
+</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          (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/>                                       const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
@@ -1352,7 +1400,7 @@ void      <a href="#xmlFreeNsList">xmlFreeNsList</a>                      (<a href="libxml2-tree.html#xm
 <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</p>
+</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/>
@@ -1497,7 +1545,7 @@ void      <a href="#xmlFreeNsList">xmlFreeNsList</a>                      (<a href="libxml2-tree.html#xm
         <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 lenght in byte of the prefix and return a pointer to the start of the name without the prefix</td></tr></tbody></table></div></div>
+<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    (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</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>
@@ -1516,7 +1564,7 @@ void      <a href="#xmlFreeNsList">xmlFreeNsList</a>                      (<a href="libxml2-tree.html#xm
 <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.</p>
+</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/>
index 3480214..fcb68e7 100644 (file)
@@ -512,7 +512,7 @@ The content of this structure is not made public by the API.
         <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 lenght 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>
+<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>
index 8c41d1d..5bccc27 100644 (file)
@@ -82,9 +82,11 @@ void *       <a href="#xmlIOHTTPOpen">xmlIOHTTPOpen</a>                      (const char * filename);
 <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);
@@ -255,6 +257,14 @@ void *     <a href="#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a>                    (const char * post_uri, <b
 </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>
index cf445dd..27f7836 100644 (file)
@@ -120,7 +120,9 @@ void        <a href="#xmlResetError">xmlResetError</a>                      (<a href="libxml2-xmlerror.htm
     <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_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>
@@ -249,6 +251,8 @@ void        <a href="#xmlResetError">xmlResetError</a>                      (<a href="libxml2-xmlerror.htm
     <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 */
@@ -870,8 +874,7 @@ void        <a href="#xmlResetError">xmlResetError</a>                      (<a href="libxml2-xmlerror.htm
     <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_CHECK_">XML_CHECK_</a> = 6005 /* 5033 */
-    <a name="XML_CHECK_X">XML_CHECK_X</a> = 6006 /*  503 */
+    <a name="XML_BUF_OVERFLOW">XML_BUF_OVERFLOW</a> = 7000
 };
 </pre><p/>
 </div>
index 554cd91..08bb4ef 100644 (file)
@@ -84,11 +84,11 @@ The content of this structure is not made public by the API.
 <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 TODO: options are not yet implemented.</p>
+</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</p>
+</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>
index 4d11966..9427a34 100644 (file)
@@ -180,11 +180,11 @@ The content of this structure is not made public by the API.
         <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 lenght 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>
+<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 lenght 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>
+<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>
@@ -196,7 +196,7 @@ The content of this structure is not made public by the API.
         <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 lenght 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>
+<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>
index cc49dfa..533c114 100644 (file)
@@ -57,12 +57,14 @@ typedef struct _xmlSchemaValidCtxt <a href="#xmlSchemaValidCtxt">xmlSchemaValidC
 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);
@@ -71,6 +73,7 @@ int   <a href="#xmlSchemaValidateFile">xmlSchemaValidateFile</a>              (<a href="libxml
 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);
@@ -189,6 +192,10 @@ The content of this structure is not made public by the API.
 </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>
@@ -289,6 +296,14 @@ The content of this structure is not made public by the API.
 </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>
index 69a04e2..8178614 100644 (file)
@@ -83,6 +83,7 @@
 #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>;
@@ -221,6 +222,10 @@ void       <a href="#xmlCheckVersion">xmlCheckVersion</a>                  (int version);
 </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>
index 358c9e6..7c2be92 100644 (file)
@@ -51,7 +51,7 @@ int   <a href="#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a>    (<a hre
 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);
-void   <a href="#xmlFreeTextWriter">xmlFreeTextWriter</a>              (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+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);
@@ -73,7 +73,7 @@ int   <a href="#xmlTextWriterEndCDATA">xmlTextWriterEndCDATA</a>              (<a href="libxml
 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);
-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);
+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);
@@ -99,8 +99,9 @@ int   <a href="#xmlTextWriterWriteDTDInternalEntity">xmlTextWriterWriteDTDInternal
 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="#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="#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);
@@ -236,6 +237,10 @@ The content of this structure is not made public by the API.
 </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>
index 7efa7bc..640c715 100644 (file)
@@ -70,6 +70,7 @@ typedef <a href="libxml2-xpath.html#xmlXPathAxis">xmlXPathAxis</a> * <a href="#x
 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);
@@ -104,6 +105,7 @@ int <a href="#xmlXPathCmpNodes">xmlXPathCmpNodes</a>                (<a href="libxml2-tree.htm
 <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);
@@ -246,6 +248,7 @@ The content of this structure is not made public by the API.
     <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>
@@ -513,6 +516,10 @@ The content of this structure is not made public by the API.
 </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>
@@ -525,6 +532,10 @@ The content of this structure is not made public by the API.
 </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>
index 6200688..0597343 100644 (file)
@@ -153,7 +153,7 @@ void        <a href="#xmlXPathModValues">xmlXPathModValues</a>              (<a href="libxml2-xpath
 <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);
-void   <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);
+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);
@@ -171,8 +171,8 @@ void        <a href="#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a
 <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);
-void   <a href="#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a>            (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/>                                         <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val);
-void   <a href="#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a>        (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/>                                         <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val);
+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);
@@ -549,17 +549,17 @@ void      <a href="#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a>          (FILE * out
 </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">void   xmlXPathNodeSetAdd              (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/>                                         <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
+        <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></tbody></table></div></div>
+<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">void       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/>
+        <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></tbody></table></div></div>
+<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">void       xmlXPathNodeSetAddUnique        (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/>                                         <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
+        <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></tbody></table></div></div>
+<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>
index e564951..282546a 100644 (file)
@@ -91,6 +91,7 @@
     <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_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="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_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_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_" link="libxml2-xmlerror.html#XML_CHECK_"/>
     <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_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_CHECK_X" link="libxml2-xmlerror.html#XML_CHECK_X"/>
     <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_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_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_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_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_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="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="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="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="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="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="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="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="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="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="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="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"/>
index bdac7bb..57af9c2 100644 (file)
-# Beware this is autogenerated by index.py
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
-DEPS = $(top_builddir)/libxml2.la
-LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
+##
+## 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 *.c
-       -@($(srcdir)/index.py)
+examples.xml: index.py $(noinst_PROGRAMS:=.c)
+       cd $(srcdir) && $(PYTHON) index.py
+       $(MAKE) Makefile
 
 index.html: examples.xml examples.xsl
-       -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
+       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)
-
-EXTRA_DIST=examples.xsl index.py examples.xml writer.xml test3.xml tst.xml test1.xml test2.xml io2.res xpath2.res tree1.res reader4.res io1.res tree2.res reader3.res xpath1.res reader1.res 
-
-noinst_PROGRAMS=xpath2 reader1 reader4 parse2 reader2 parse3 reader3 tree2 parse4 io2 testWriter io1 xpath1 parse1 tree1 
-
-xpath2_SOURCES=xpath2.c
-xpath2_LDFLAGS=
-xpath2_DEPENDENCIES= $(DEPS)
-xpath2_LDADD= @RDL_LIBS@ $(LDADDS)
-
-reader1_SOURCES=reader1.c
-reader1_LDFLAGS=
-reader1_DEPENDENCIES= $(DEPS)
-reader1_LDADD= @RDL_LIBS@ $(LDADDS)
-
-reader4_SOURCES=reader4.c
-reader4_LDFLAGS=
-reader4_DEPENDENCIES= $(DEPS)
-reader4_LDADD= @RDL_LIBS@ $(LDADDS)
-
-parse2_SOURCES=parse2.c
-parse2_LDFLAGS=
-parse2_DEPENDENCIES= $(DEPS)
-parse2_LDADD= @RDL_LIBS@ $(LDADDS)
-
-reader2_SOURCES=reader2.c
-reader2_LDFLAGS=
-reader2_DEPENDENCIES= $(DEPS)
-reader2_LDADD= @RDL_LIBS@ $(LDADDS)
-
-parse3_SOURCES=parse3.c
-parse3_LDFLAGS=
-parse3_DEPENDENCIES= $(DEPS)
-parse3_LDADD= @RDL_LIBS@ $(LDADDS)
-
-reader3_SOURCES=reader3.c
-reader3_LDFLAGS=
-reader3_DEPENDENCIES= $(DEPS)
-reader3_LDADD= @RDL_LIBS@ $(LDADDS)
-
-tree2_SOURCES=tree2.c
-tree2_LDFLAGS=
-tree2_DEPENDENCIES= $(DEPS)
-tree2_LDADD= @RDL_LIBS@ $(LDADDS)
-
-parse4_SOURCES=parse4.c
-parse4_LDFLAGS=
-parse4_DEPENDENCIES= $(DEPS)
-parse4_LDADD= @RDL_LIBS@ $(LDADDS)
-
-io2_SOURCES=io2.c
-io2_LDFLAGS=
-io2_DEPENDENCIES= $(DEPS)
-io2_LDADD= @RDL_LIBS@ $(LDADDS)
-
-testWriter_SOURCES=testWriter.c
-testWriter_LDFLAGS=
-testWriter_DEPENDENCIES= $(DEPS)
-testWriter_LDADD= @RDL_LIBS@ $(LDADDS)
-
-io1_SOURCES=io1.c
-io1_LDFLAGS=
-io1_DEPENDENCIES= $(DEPS)
-io1_LDADD= @RDL_LIBS@ $(LDADDS)
-
-xpath1_SOURCES=xpath1.c
-xpath1_LDFLAGS=
-xpath1_DEPENDENCIES= $(DEPS)
-xpath1_LDADD= @RDL_LIBS@ $(LDADDS)
-
-parse1_SOURCES=parse1.c
-parse1_LDFLAGS=
-parse1_DEPENDENCIES= $(DEPS)
-parse1_LDADD= @RDL_LIBS@ $(LDADDS)
-
-tree1_SOURCES=tree1.c
-tree1_LDFLAGS=
-tree1_DEPENDENCIES= $(DEPS)
-tree1_LDADD= @RDL_LIBS@ $(LDADDS)
+       $(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) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
-       @(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) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
-       @(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) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
-       @(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) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
-       @(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) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-
-
+       $(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
index 9d08434..cbb7e34 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -34,11 +51,11 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = xpath2$(EXEEXT) reader1$(EXEEXT) reader4$(EXEEXT) \
-       parse2$(EXEEXT) reader2$(EXEEXT) parse3$(EXEEXT) \
-       reader3$(EXEEXT) tree2$(EXEEXT) parse4$(EXEEXT) io2$(EXEEXT) \
-       testWriter$(EXEEXT) io1$(EXEEXT) xpath1$(EXEEXT) \
-       parse1$(EXEEXT) tree1$(EXEEXT)
+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.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -55,84 +72,113 @@ CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_io1_OBJECTS = io1.$(OBJEXT)
 io1_OBJECTS = $(am_io1_OBJECTS)
+io1_LDADD = $(LDADD)
 am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+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
-io1_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(io1_LDFLAGS) $(LDFLAGS) -o $@
 am_io2_OBJECTS = io2.$(OBJEXT)
 io2_OBJECTS = $(am_io2_OBJECTS)
-io2_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(io2_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(parse1_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(parse2_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(parse3_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(parse4_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(reader1_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(reader2_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(reader3_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(reader4_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(testWriter_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(tree1_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(tree2_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(xpath1_LDFLAGS) $(LDFLAGS) -o $@
+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_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(xpath2_LDFLAGS) $(LDFLAGS) -o $@
+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)
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -143,21 +189,21 @@ 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_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+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_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 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_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+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_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_SOURCES) \
        $(parse2_SOURCES) $(parse3_SOURCES) $(parse4_SOURCES) \
@@ -169,6 +215,11 @@ DIST_SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_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
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -176,7 +227,6 @@ ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
-AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -213,6 +263,7 @@ 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@
@@ -268,7 +319,6 @@ RANLIB = @RANLIB@
 RDL_LIBS = @RDL_LIBS@
 READER_TEST = @READER_TEST@
 RELDATE = @RELDATE@
-RM = @RM@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -293,7 +343,6 @@ TEST_VTIME = @TEST_VTIME@
 TEST_XINCLUDE = @TEST_XINCLUDE@
 TEST_XPATH = @TEST_XPATH@
 TEST_XPTR = @TEST_XPTR@
-THREADS_W32 = @THREADS_W32@
 THREAD_CFLAGS = @THREAD_CFLAGS@
 THREAD_LIBS = @THREAD_LIBS@
 VERSION = @VERSION@
@@ -326,6 +375,7 @@ 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@
@@ -399,72 +449,45 @@ 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
 
-# Beware this is autogenerated by index.py
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
-DEPS = $(top_builddir)/libxml2.la
-LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
-EXTRA_DIST = examples.xsl index.py examples.xml writer.xml test3.xml tst.xml test1.xml test2.xml io2.res xpath2.res tree1.res reader4.res io1.res tree2.res reader3.res xpath1.res reader1.res 
-xpath2_SOURCES = xpath2.c
-xpath2_LDFLAGS = 
-xpath2_DEPENDENCIES = $(DEPS)
-xpath2_LDADD = @RDL_LIBS@ $(LDADDS)
-reader1_SOURCES = reader1.c
-reader1_LDFLAGS = 
-reader1_DEPENDENCIES = $(DEPS)
-reader1_LDADD = @RDL_LIBS@ $(LDADDS)
-reader4_SOURCES = reader4.c
-reader4_LDFLAGS = 
-reader4_DEPENDENCIES = $(DEPS)
-reader4_LDADD = @RDL_LIBS@ $(LDADDS)
+io1_SOURCES = io1.c
+io2_SOURCES = io2.c
+parse1_SOURCES = parse1.c
 parse2_SOURCES = parse2.c
-parse2_LDFLAGS = 
-parse2_DEPENDENCIES = $(DEPS)
-parse2_LDADD = @RDL_LIBS@ $(LDADDS)
-reader2_SOURCES = reader2.c
-reader2_LDFLAGS = 
-reader2_DEPENDENCIES = $(DEPS)
-reader2_LDADD = @RDL_LIBS@ $(LDADDS)
 parse3_SOURCES = parse3.c
-parse3_LDFLAGS = 
-parse3_DEPENDENCIES = $(DEPS)
-parse3_LDADD = @RDL_LIBS@ $(LDADDS)
-reader3_SOURCES = reader3.c
-reader3_LDFLAGS = 
-reader3_DEPENDENCIES = $(DEPS)
-reader3_LDADD = @RDL_LIBS@ $(LDADDS)
-tree2_SOURCES = tree2.c
-tree2_LDFLAGS = 
-tree2_DEPENDENCIES = $(DEPS)
-tree2_LDADD = @RDL_LIBS@ $(LDADDS)
 parse4_SOURCES = parse4.c
-parse4_LDFLAGS = 
-parse4_DEPENDENCIES = $(DEPS)
-parse4_LDADD = @RDL_LIBS@ $(LDADDS)
-io2_SOURCES = io2.c
-io2_LDFLAGS = 
-io2_DEPENDENCIES = $(DEPS)
-io2_LDADD = @RDL_LIBS@ $(LDADDS)
+reader1_SOURCES = reader1.c
+reader2_SOURCES = reader2.c
+reader3_SOURCES = reader3.c
+reader4_SOURCES = reader4.c
 testWriter_SOURCES = testWriter.c
-testWriter_LDFLAGS = 
-testWriter_DEPENDENCIES = $(DEPS)
-testWriter_LDADD = @RDL_LIBS@ $(LDADDS)
-io1_SOURCES = io1.c
-io1_LDFLAGS = 
-io1_DEPENDENCIES = $(DEPS)
-io1_LDADD = @RDL_LIBS@ $(LDADDS)
-xpath1_SOURCES = xpath1.c
-xpath1_LDFLAGS = 
-xpath1_DEPENDENCIES = $(DEPS)
-xpath1_LDADD = @RDL_LIBS@ $(LDADDS)
-parse1_SOURCES = parse1.c
-parse1_LDFLAGS = 
-parse1_DEPENDENCIES = $(DEPS)
-parse1_LDADD = @RDL_LIBS@ $(LDADDS)
 tree1_SOURCES = tree1.c
-tree1_LDFLAGS = 
-tree1_DEPENDENCIES = $(DEPS)
-tree1_LDADD = @RDL_LIBS@ $(LDADDS)
+tree2_SOURCES = tree2.c
+xpath1_SOURCES = xpath1.c
+xpath2_SOURCES = xpath2.c
 all: all-am
 
 .SUFFIXES:
@@ -508,51 +531,51 @@ clean-noinstPROGRAMS:
        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) 
+io1$(EXEEXT): $(io1_OBJECTS) $(io1_DEPENDENCIES) $(EXTRA_io1_DEPENDENCIES) 
        @rm -f io1$(EXEEXT)
-       $(AM_V_CCLD)$(io1_LINK) $(io1_OBJECTS) $(io1_LDADD) $(LIBS)
-io2$(EXEEXT): $(io2_OBJECTS) $(io2_DEPENDENCIES) 
+       $(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)$(io2_LINK) $(io2_OBJECTS) $(io2_LDADD) $(LIBS)
-parse1$(EXEEXT): $(parse1_OBJECTS) $(parse1_DEPENDENCIES) 
+       $(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)$(parse1_LINK) $(parse1_OBJECTS) $(parse1_LDADD) $(LIBS)
-parse2$(EXEEXT): $(parse2_OBJECTS) $(parse2_DEPENDENCIES) 
+       $(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)$(parse2_LINK) $(parse2_OBJECTS) $(parse2_LDADD) $(LIBS)
-parse3$(EXEEXT): $(parse3_OBJECTS) $(parse3_DEPENDENCIES) 
+       $(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)$(parse3_LINK) $(parse3_OBJECTS) $(parse3_LDADD) $(LIBS)
-parse4$(EXEEXT): $(parse4_OBJECTS) $(parse4_DEPENDENCIES) 
+       $(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)$(parse4_LINK) $(parse4_OBJECTS) $(parse4_LDADD) $(LIBS)
-reader1$(EXEEXT): $(reader1_OBJECTS) $(reader1_DEPENDENCIES) 
+       $(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)$(reader1_LINK) $(reader1_OBJECTS) $(reader1_LDADD) $(LIBS)
-reader2$(EXEEXT): $(reader2_OBJECTS) $(reader2_DEPENDENCIES) 
+       $(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)$(reader2_LINK) $(reader2_OBJECTS) $(reader2_LDADD) $(LIBS)
-reader3$(EXEEXT): $(reader3_OBJECTS) $(reader3_DEPENDENCIES) 
+       $(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)$(reader3_LINK) $(reader3_OBJECTS) $(reader3_LDADD) $(LIBS)
-reader4$(EXEEXT): $(reader4_OBJECTS) $(reader4_DEPENDENCIES) 
+       $(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)$(reader4_LINK) $(reader4_OBJECTS) $(reader4_LDADD) $(LIBS)
-testWriter$(EXEEXT): $(testWriter_OBJECTS) $(testWriter_DEPENDENCIES) 
+       $(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)$(testWriter_LINK) $(testWriter_OBJECTS) $(testWriter_LDADD) $(LIBS)
-tree1$(EXEEXT): $(tree1_OBJECTS) $(tree1_DEPENDENCIES) 
+       $(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)$(tree1_LINK) $(tree1_OBJECTS) $(tree1_LDADD) $(LIBS)
-tree2$(EXEEXT): $(tree2_OBJECTS) $(tree2_DEPENDENCIES) 
+       $(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)$(tree2_LINK) $(tree2_OBJECTS) $(tree2_LDADD) $(LIBS)
-xpath1$(EXEEXT): $(xpath1_OBJECTS) $(xpath1_DEPENDENCIES) 
+       $(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)$(xpath1_LINK) $(xpath1_OBJECTS) $(xpath1_LDADD) $(LIBS)
-xpath2$(EXEEXT): $(xpath2_OBJECTS) $(xpath2_DEPENDENCIES) 
+       $(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)$(xpath2_LINK) $(xpath2_OBJECTS) $(xpath2_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(xpath2_OBJECTS) $(xpath2_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -579,26 +602,23 @@ distclean-compile:
 .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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@  $(COMPILE) -c $<
+@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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@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@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -702,13 +722,19 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       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)
@@ -719,7 +745,7 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \
        mostlyclean-am
 
 distclean: distclean-am
@@ -791,7 +817,7 @@ uninstall-am:
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstPROGRAMS ctags distclean \
+       clean-libtool clean-local clean-noinstPROGRAMS ctags 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 \
@@ -805,54 +831,61 @@ uninstall-am:
        tags uninstall uninstall-am
 
 
-rebuild: examples.xml index.html
+@REBUILD_DOCS_TRUE@rebuild: examples.xml index.html
+@REBUILD_DOCS_TRUE@.PHONY: rebuild
 
-examples.xml: index.py *.c
-       -@($(srcdir)/index.py)
+@REBUILD_DOCS_TRUE@examples.xml: index.py $(noinst_PROGRAMS:=.c)
+@REBUILD_DOCS_TRUE@    cd $(srcdir) && $(PYTHON) index.py
+@REBUILD_DOCS_TRUE@    $(MAKE) Makefile
 
-index.html: examples.xml examples.xsl
-       -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
+@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)
+       $(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) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ./reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp ; diff reader4.tmp reader4.res ; rm reader4.tmp)
-       @(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) ./reader2 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp)
-       @(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) ./reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ./tree2 > tree2.tmp ; diff tree2.tmp tree2.res ; rm tree2.tmp)
-       @(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) ./io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ./testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ./io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
-       @($(CHECKER) ././xpath1 test3.xml '//child2' > xpath1.tmp ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp)
-       @(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) ./tree1 test2.xml > tree1.tmp ; diff tree1.tmp tree1.res ; rm tree1.tmp)
-       @(grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" ; exit 0)
+       $(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.
index a237a0e..28929cc 100644 (file)
@@ -1,74 +1,9 @@
 <examples>
-  <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 ; diff reader1.tmp reader1.res ; rm reader1.tmp</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='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 ; diff xpath2.tmp xpath2.res ; rm xpath2.tmp</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='56' file='xmlmemory' name='xmlMemoryDump'/>
-      <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'/>
-      <function line='51' file='parser' name='xmlCleanupParser'/>
-      <macro line='45' file='xmlversion' name='LIBXML_TEST_VERSION'/>
-      <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='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 ; diff xpath1.tmp xpath1.res ; rm xpath1.tmp</test>
+    <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>
       <typedef line='27' 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 ; diff io2.tmp io2.res ; rm -f io2.tmp</test>
-    <author>John Fleck</author>
+  <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>InputOutput</section>
+    <section>xmlReader</section>
     <includes>
-      <include>&lt;libxml/parser.h&gt;</include>
+      <include>&lt;libxml/xmlreader.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'/>
-      <function line='43' file='tree' name='xmlFreeDoc'/>
-      <typedef line='19' file='tree' name='xmlNodePtr'/>
-      <function line='27' file='tree' name='xmlNewDoc'/>
-      <function line='28' file='tree' name='xmlNewNode'/>
+      <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 ; diff tree2.tmp tree2.res ; rm tree2.tmp</test>
+    <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>
       <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 ; diff reader1.tmp reader1.res ; rm reader1.tmp</test>
+    <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>
     <uses>
       <function line='44' file='xmlstring' name='xmlStrlen'/>
-      <function line='94' file='parser' name='xmlCleanupParser'/>
       <function line='37' file='xmlreader' name='xmlTextReaderNodeType'/>
       <typedef line='59' file='xmlreader' name='xmlTextReaderPtr'/>
-      <function line='98' file='xmlmemory' name='xmlMemoryDump'/>
       <function line='33' file='xmlreader' name='xmlTextReaderConstValue'/>
       <function line='36' file='xmlreader' name='xmlTextReaderDepth'/>
       <function line='69' file='xmlreader' name='xmlFreeTextReader'/>
-      <macro line='89' file='xmlversion' name='LIBXML_TEST_VERSION'/>
       <function line='29' file='xmlreader' name='xmlTextReaderConstName'/>
       <function line='40' file='xmlreader' name='xmlTextReaderHasValue'/>
       <function line='67' file='xmlreader' name='xmlTextReaderRead'/>
       <function line='62' 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 ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res</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='879' file='tree' name='xmlDocPtr'/>
-      <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'/>
-      <function line='1131' file='tree' name='xmlFreeDoc'/>
-      <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>
-  <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>
+  <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>Parsing</section>
+    <section>Tree</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='67' file='parser' name='xmlCreatePushParserCtxt'/>
-      <typedef line='45' file='tree' name='xmlParserCtxtPtr'/>
-      <typedef line='47' file='tree' name='xmlDocPtr'/>
+      <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 ; diff reader3.tmp reader3.res ; rm reader3.tmp</test>
+    <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>
       <function line='38' file='xmlreader' name='xmlReaderForFile'/>
     </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 ; diff io1.tmp io1.res ; rm -f io1.tmp</test>
+  <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>InputOutput</section>
+    <section>Parsing</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>
+      <include>&lt;libxml/parser.h&gt;</include>
     </includes>
     <uses>
-      <function line='143' file='tree' name='xmlDocDump'/>
-      <function line='134' file='xinclude' name='xmlXIncludeProcess'/>
-      <function line='117' file='xmlIO' name='xmlRegisterInputCallbacks'/>
-      <function line='124' file='parser' name='xmlReadMemory'/>
+      <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'>
       <function line='26' file='parser' name='xmlReadFile'/>
     </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 ; diff tree1.tmp tree1.res ; rm tree1.tmp</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='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 ; diff reader4.tmp reader4.res ; rm reader4.tmp</test>
+    <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>
       <function line='72' 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>
+  <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>Parsing</section>
+    <section>xmlWriter</section>
     <includes>
-      <include>&lt;libxml/tree.h&gt;</include>
-      <include>&lt;libxml/parser.h&gt;</include>
+      <include>&lt;libxml/encoding.h&gt;</include>
+      <include>&lt;libxml/xmlwriter.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'/>
+      <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='reader2.c'/>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
       <ref filename='parse3.c'/>
+      <ref filename='reader2.c'/>
       <ref filename='tree2.c'/>
-      <ref filename='reader1.c'/>
+      <ref filename='io1.c'/>
+      <ref filename='parse4.c'/>
     </symbol>
     <symbol name='XML_DEFAULT_VERSION'>
       <ref filename='testWriter.c'/>
       <ref filename='tree1.c'/>
     </symbol>
     <symbol name='XML_NAMESPACE_DECL'>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
+      <ref filename='xpath2.c'/>
     </symbol>
     <symbol name='XML_PARSE_DTDATTR'>
       <ref filename='reader2.c'/>
       <ref filename='testWriter.c'/>
     </symbol>
     <symbol name='xmlCleanupParser'>
-      <ref filename='reader2.c'/>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
       <ref filename='parse3.c'/>
+      <ref filename='reader2.c'/>
       <ref filename='tree2.c'/>
-      <ref filename='reader1.c'/>
+      <ref filename='io1.c'/>
+      <ref filename='parse4.c'/>
     </symbol>
     <symbol name='xmlCreateIntSubset'>
       <ref filename='tree2.c'/>
       <ref filename='parse2.c'/>
     </symbol>
     <symbol name='xmlDocDump'>
+      <ref filename='io1.c'/>
       <ref filename='xpath2.c'/>
       <ref filename='reader3.c'/>
-      <ref filename='io1.c'/>
     </symbol>
     <symbol name='xmlDocDumpFormatMemory'>
       <ref filename='io2.c'/>
       <ref filename='tree1.c'/>
     </symbol>
     <symbol name='xmlDocPtr'>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
       <ref filename='parse3.c'/>
-      <ref filename='io2.c'/>
-      <ref filename='testWriter.c'/>
+      <ref filename='io1.c'/>
       <ref filename='parse4.c'/>
+      <ref filename='xpath2.c'/>
+      <ref filename='io2.c'/>
     </symbol>
     <symbol name='xmlDocSetRootElement'>
-      <ref filename='io2.c'/>
       <ref filename='tree2.c'/>
+      <ref filename='io2.c'/>
       <ref filename='testWriter.c'/>
     </symbol>
     <symbol name='xmlFindCharEncodingHandler'>
       <ref filename='testWriter.c'/>
     </symbol>
     <symbol name='xmlFreeDoc'>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
       <ref filename='parse3.c'/>
-      <ref filename='io2.c'/>
       <ref filename='tree2.c'/>
-      <ref filename='testWriter.c'/>
+      <ref filename='io1.c'/>
+      <ref filename='parse4.c'/>
+      <ref filename='xpath2.c'/>
     </symbol>
     <symbol name='xmlFreeParserCtxt'>
       <ref filename='parse4.c'/>
       <ref filename='testWriter.c'/>
     </symbol>
     <symbol name='xmlInitParser'>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
+      <ref filename='xpath2.c'/>
     </symbol>
     <symbol name='xmlMalloc'>
       <ref filename='testWriter.c'/>
     </symbol>
     <symbol name='xmlMemoryDump'>
-      <ref filename='reader2.c'/>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
       <ref filename='parse3.c'/>
+      <ref filename='reader2.c'/>
       <ref filename='tree2.c'/>
-      <ref filename='reader1.c'/>
+      <ref filename='io1.c'/>
+      <ref filename='parse4.c'/>
     </symbol>
     <symbol name='xmlNewChild'>
       <ref filename='tree2.c'/>
     </symbol>
     <symbol name='xmlNewDoc'>
-      <ref filename='io2.c'/>
       <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='io2.c'/>
       <ref filename='tree2.c'/>
+      <ref filename='io2.c'/>
     </symbol>
     <symbol name='xmlNewParserCtxt'>
       <ref filename='parse2.c'/>
       <ref filename='parse4.c'/>
     </symbol>
     <symbol name='xmlParseFile'>
-      <ref filename='xpath2.c'/>
       <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='parse1.c'/>
       <ref filename='tree1.c'/>
+      <ref filename='parse1.c'/>
     </symbol>
     <symbol name='xmlReadMemory'>
       <ref filename='parse3.c'/>
       <ref filename='io1.c'/>
     </symbol>
     <symbol name='xmlXPathContextPtr'>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
+      <ref filename='xpath2.c'/>
     </symbol>
     <symbol name='xmlXPathEvalExpression'>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
+      <ref filename='xpath2.c'/>
     </symbol>
     <symbol name='xmlXPathFreeContext'>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
+      <ref filename='xpath2.c'/>
     </symbol>
     <symbol name='xmlXPathFreeObject'>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
+      <ref filename='xpath2.c'/>
     </symbol>
     <symbol name='xmlXPathNewContext'>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
+      <ref filename='xpath2.c'/>
     </symbol>
     <symbol name='xmlXPathObjectPtr'>
-      <ref filename='xpath2.c'/>
       <ref filename='xpath1.c'/>
+      <ref filename='xpath2.c'/>
     </symbol>
     <symbol name='xmlXPathRegisterNs'>
       <ref filename='xpath1.c'/>
   </symbols>
   <sections>
     <section name='InputOutput'>
-      <example filename='io2.c'/>
       <example filename='io1.c'/>
+      <example filename='io2.c'/>
     </section>
     <section name='Parsing'>
       <example filename='parse3.c'/>
       <example filename='parse4.c'/>
-      <example filename='parse1.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='xpath2.c'/>
       <example filename='xpath1.c'/>
+      <example filename='xpath2.c'/>
     </section>
     <section name='xmlReader'>
       <example filename='reader2.c'/>
diff --git a/doc/examples/index.html b/doc/examples/index.html
new file mode 100644 (file)
index 0000000..c9314a3
--- /dev/null
@@ -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>
index 11df6f0..7e0efaa 100755 (executable)
@@ -13,7 +13,7 @@ sys.path.insert(0, "..")
 from apibuild import CParser, escape
 
 examples = []
-extras = ['examples.xsl', 'index.py']
+extras = ['examples.xsl', 'index.html', 'index.py']
 tests = []
 sections = {}
 symbols = {}
@@ -177,10 +177,10 @@ def parse(filename, output):
            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):
@@ -220,43 +220,59 @@ def dump_Makefile():
         extras.append(file)
     for file in glob.glob('*.res'):
         extras.append(file)
-    Makefile="""# Beware this is autogenerated by index.py
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
-DEPS = $(top_builddir)/libxml2.la
-LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
+    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 *.c
-       -@($(srcdir)/index.py)
+examples.xml: index.py $(noinst_PROGRAMS:=.c)
+       cd $(srcdir) && $(PYTHON) index.py
+       $(MAKE) Makefile
 
 index.html: examples.xml examples.xsl
-       -@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
+       cd $(srcdir) && xsltproc examples.xsl examples.xml && echo "Rebuilt web page"
+       -cd $(srcdir) && xmllint --valid --noout index.html
+endif
 
 install-data-local: 
-       $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
-       -@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
+       $(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 + extra + " "
-    Makefile = Makefile + "EXTRA_DIST=%s\n\n" % (EXTRA_DIST)
+        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 + example + " "
-    Makefile = Makefile + "noinst_PROGRAMS=%s\n\n" % (noinst_PROGRAMS)
+        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%s_LDFLAGS=\n%s_DEPENDENCIES= $(DEPS)\n%s_LDADD= @RDL_LIBS@ $(LDADDS)\n\n" % (example, example, example,
-              example, example)
+        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'
-    Makefile = Makefile + "\n\n"
+        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:
@@ -264,23 +280,23 @@ install-data-local:
            print "Updated Makefile.am"
     except:
         print "Failed to read or save Makefile.am"
-    #
-    # Autogenerate the .cvsignore too ...
-    #
-    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"
-    
+#    #
+#    # 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")
index c8a47e3..d077cd8 100644 (file)
@@ -6,7 +6,7 @@
  *          XInclude method context to show how dynamic document can
  *          be built in a clean way.
  * usage: io1
- * test: io1 > io1.tmp ; diff io1.tmp io1.res ; rm -f io1.tmp
+ * test: io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res
  * author: Daniel Veillard
  * copy: see Copyright for the status of this software.
  */
index 4a4c036..adf65c7 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
 <document xmlns:xi="http://www.w3.org/2003/XInclude">
   <p>List of people:</p>
-  <list><people>a</people><people>b</people></list>
+  <list xml:base="sql://select_name_from_people"><people>a</people><people>b</people></list>
 </document>
index 814a27e..4676f4a 100644 (file)
@@ -4,7 +4,7 @@
  * purpose: Demonstrate the use of xmlDocDumpMemory
  *          to output document to a character buffer
  * usage: io2
- * test: io2 > io2.tmp ; diff io2.tmp io2.res ; rm -f io2.tmp
+ * test: io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res
  * author: John Fleck
  * copy: see Copyright for the status of this software.
  */
index 90db2a1..e8a005a 100644 (file)
@@ -6,7 +6,7 @@
  *          (Note that the XMLReader functions require libxml2 version later
  *          than 2.6.)
  * usage: reader1 <filename>
- * test: reader1 test2.xml > reader1.tmp ; diff reader1.tmp reader1.res ; rm reader1.tmp
+ * test: reader1 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res
  * author: Daniel Veillard
  * copy: see Copyright for the status of this software.
  */
index c32ada5..043b137 100644 (file)
@@ -7,7 +7,7 @@
  *          (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 reader1.res ; rm reader1.tmp
+ * test: reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res
  * author: Daniel Veillard
  * copy: see Copyright for the status of this software.
  */
index 51f9d3b..3eeb61f 100644 (file)
@@ -7,7 +7,7 @@
  *          (Note that the XMLReader functions require libxml2 version later
  *          than 2.6.)
  * usage: reader3
- * test: reader3 > reader3.tmp ; diff reader3.tmp reader3.res ; rm reader3.tmp
+ * test: reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res
  * author: Daniel Veillard
  * copy: see Copyright for the status of this software.
  */
index ed2726a..1289d0d 100644 (file)
@@ -6,7 +6,7 @@
  * 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 reader4.res ; rm reader4.tmp
+ * 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.
  */
index 9bf590f..f662f76 100644 (file)
@@ -7,7 +7,7 @@
  *          do encoding string conversions too. The resulting
  *          documents are then serialized.
  * usage: testWriter
- * test: testWriter ; for i in 1 2 3 4 ; do diff writer.xml writer$$i.res ; done ; rm writer*.res
+ * 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.
  */
@@ -37,16 +37,16 @@ main(void)
     LIBXML_TEST_VERSION
 
     /* first, the file version */
-    testXmlwriterFilename("writer1.res");
+    testXmlwriterFilename("writer1.tmp");
 
     /* next, the memory version */
-    testXmlwriterMemory("writer2.res");
+    testXmlwriterMemory("writer2.tmp");
 
     /* next, the DOM version */
-    testXmlwriterDoc("writer3.res");
+    testXmlwriterDoc("writer3.tmp");
 
     /* next, the tree version */
-    testXmlwriterTree("writer4.res");
+    testXmlwriterTree("writer4.tmp");
 
     /*
      * Cleanup function for the XML library.
index 8644cf1..e6faefc 100644 (file)
@@ -5,7 +5,7 @@
  *          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 tree1.res ; rm tree1.tmp
+ * test: tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res
  * author: Dodji Seketeli
  * copy: see Copyright for the status of this software.
  */
index c40fc55..1cd1abe 100644 (file)
@@ -3,7 +3,7 @@
  * 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 tree2.res ; rm tree2.tmp
+ * 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
  */
index f2f7406..0a31650 100644 (file)
@@ -4,7 +4,7 @@
  * 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 xpath1.res ; rm xpath1.tmp
+ * 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.
  */
index 6ff4008..f604114 100644 (file)
@@ -4,7 +4,7 @@
  *              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 xpath2.res ; rm xpath2.tmp
+ * 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.
  */
index 6771189..1a58210 100644 (file)
@@ -10,4 +10,4 @@ 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 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>
+    </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>
index 6771189..1a58210 100644 (file)
@@ -10,4 +10,4 @@ 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 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>
+    </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>
index 2de32b0..bdd21f4 100644 (file)
@@ -18,10 +18,12 @@ The content of this structure is not made public by the API.
 <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>
@@ -37,7 +39,9 @@ The content of this structure is not made public by the API.
 </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="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 />
+<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>
@@ -45,8 +49,10 @@ The content of this structure is not made public by the API.
 </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="xmlDictSize" id="xmlDictSize"></a>Function: xmlDictSize</h3><pre class="programlisting">int        xmlDictSize                     (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+<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 not thread safe, initialization should preferably be done once at startup</p>
+</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>
index 6771189..1a58210 100644 (file)
@@ -10,4 +10,4 @@ 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 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>
+    </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>
index 461b3fb..98123f7 100644 (file)
@@ -289,6 +289,7 @@ void        <a href="#xmlParserInputDeallocate">xmlParserInputDeallocate</a>        (<a href="
     <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
@@ -507,9 +508,9 @@ void        xmlParserInputDeallocate        (<a href="libxml-xmlstring.html#xmlChar">xmlChar</
 </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 number of xmlChars 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 refresh the input for the parser. It doesn't try to preserve pointers to the input buffer, and discard 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 number of xmlChars read, or -1 in case of error, 0 indicate the end of this entity</td></tr></tbody></table></div><h3><a name="xmlPedanticParserDefault" id="xmlPedanticParserDefault"></a>Function: xmlPedanticParserDefault</h3><pre class="programlisting">int        xmlPedanticParserDefault        (int val)<br />
+<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>
index 681057f..4d1292b 100644 (file)
@@ -10,7 +10,7 @@ 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_NAMELEN">XML_MAX_NAMELEN</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>
+    </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>
@@ -127,8 +127,11 @@ void       <a href="#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a>            (<a href="lib
 <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_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.</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>
index 6d0ce42..1ec3192 100644 (file)
@@ -149,7 +149,7 @@ The content of this structure is not made public by the API.
 </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 lenght 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 />
+<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 />                                        ... ...)
index eb7c2bc..5d932cb 100644 (file)
@@ -10,12 +10,15 @@ 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="#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
+    </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>
@@ -67,6 +70,12 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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#xmlBufPtr">xmlBufPtr</a> buf)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *      <a href="#xmlBufEnd">xmlBufEnd</a>              (const <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 />                                  <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</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>
@@ -224,6 +233,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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>
@@ -279,7 +289,11 @@ A:link, A:visited, A:active { text-decoration: underline }
     <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="xmlBuffer" id="xmlBuffer">Structure xmlBuffer</a></h3><pre class="programlisting">Structure xmlBuffer<br />struct _xmlBuffer {
+</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
@@ -478,8 +492,8 @@ A:link, A:visited, A:active { text-decoration: underline }
     <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#xmlBufferPtr">xmlBufferPtr</a>   buffer  : Local buffer encoded in UTF-8 or ISOLat
-    <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a>   conv    : if encoder != NULL buffer for output
+    <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 {
@@ -571,6 +585,7 @@ A:link, A:visited, A:active { text-decoration: underline }
     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
@@ -592,8 +607,8 @@ A:link, A:visited, A:active { text-decoration: underline }
     <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#xmlBufferPtr">xmlBufferPtr</a>   buffer  : Local buffer encoded in UTF-8
-    <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a>   raw     : if encoder != NULL buffer for raw input
+    <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
@@ -653,7 +668,19 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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="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 />
+<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#xmlBufPtr">xmlBufPtr</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               (const <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 />                                  <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</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>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>
@@ -781,7 +808,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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         (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</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                    (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
-</pre><p>Get line number of @node. This requires activation of this option before invoking the parser by calling xmlLineNumbersDefault(1)</p>
+</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          (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</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          (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
@@ -865,7 +892,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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 />                                         <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</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</p>
+</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          (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br />                                  <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
@@ -938,7 +965,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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 lenght 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    (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br />                                  const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+<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    (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</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 (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</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>
@@ -947,7 +974,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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.</p>
+</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 />
index 5c15ace..94df436 100644 (file)
@@ -276,7 +276,7 @@ The content of this structure is not made public by the API.
 </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 lenght 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 />
+<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>
index e296535..2d2724c 100644 (file)
@@ -51,6 +51,8 @@ int   <a href="#xmlInputReadCallback">xmlInputReadCallback</a>                (void * context, <
 <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>
@@ -153,7 +155,11 @@ int        xmlInputReadCallback            (void * context, <br />                                  char * buffer, <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="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 />
+<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>
index c0ccb53..919d8de 100644 (file)
@@ -81,6 +81,8 @@ void  <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a>            (void * userD
     <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
@@ -199,6 +201,8 @@ void        <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a>            (void * userD
     <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
@@ -820,8 +824,7 @@ void        <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a>            (void * userD
     <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_CHECK_" id="XML_CHECK_">XML_CHECK_</a> = 6005 : 5033
-    <a name="XML_CHECK_X" id="XML_CHECK_X">XML_CHECK_X</a> = 6006 : 503
+    <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>
index c28c54b..1e25a92 100644 (file)
@@ -32,7 +32,7 @@ The content of this structure is not made public by the API.
 <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 TODO: options are not yet implemented.</p>
+</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</p>
+</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>
index f69cdab..8dda699 100644 (file)
@@ -91,15 +91,15 @@ The content of this structure is not made public by the API.
 </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 lenght 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 />
+<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 lenght 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 />
+<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 lenght 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 />
+<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>
index 18402a0..8cb42a1 100644 (file)
@@ -47,10 +47,15 @@ The content of this structure is not made public by the API.
 <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>
@@ -162,11 +167,18 @@ The content of this structure is not made public by the API.
 </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="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 />
+<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 />
index 2da967c..30e9f0e 100644 (file)
@@ -10,7 +10,7 @@ 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_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>
+    </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>
@@ -43,6 +43,7 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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>
index 3fef445..e09ff59 100644 (file)
@@ -34,6 +34,7 @@ The content of this structure is not made public by the API.
 <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>
@@ -139,7 +140,9 @@ The content of this structure is not made public by the API.
 </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="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 />
+<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>
index 1731b2a..e47e600 100644 (file)
@@ -81,9 +81,11 @@ void <a href="#xmlXPathFunction">xmlXPathFunction</a>                (<a href="libxml-xpath.ht
 <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>
@@ -167,6 +169,7 @@ The content of this structure is not made public by the API.
     <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
@@ -297,13 +300,17 @@ void      xmlXPathFunction                (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xml
 </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="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 />
+<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="xmlXPathVariableLookupFunc" id="xmlXPathVariableLookupFunc"></a>Function type: xmlXPathVariableLookupFunc</h3><pre class="programlisting">Function type: xmlXPathVariableLookupFunc
+<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>
index 4a6bb2e..f12d808 100644 (file)
@@ -69,9 +69,9 @@ A:link, A:visited, A:active { text-decoration: underline }
 <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">void       <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">void       <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">void       <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="#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>
@@ -275,13 +275,13 @@ A:link, A:visited, A:active { text-decoration: underline }
 </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">void  xmlXPathNodeSetAdd              (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br />                                         <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
+<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></tbody></table></div><h3><a name="xmlXPathNodeSetAddNs" id="xmlXPathNodeSetAddNs"></a>Function: xmlXPathNodeSetAddNs</h3><pre class="programlisting">void      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 />
+<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></tbody></table></div><h3><a name="xmlXPathNodeSetAddUnique" id="xmlXPathNodeSetAddUnique"></a>Function: xmlXPathNodeSetAddUnique</h3><pre class="programlisting">void       xmlXPathNodeSetAddUnique        (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br />                                         <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
+<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></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 />
+<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>
index 3bca246..45bceb5 100644 (file)
      <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='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_WITH_OUTPUT' 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='xmlSetExternalEntityLoader' type='function'/>
     </file>
     <file name='parserInternals'>
-     <summary>internals routines exported by the parser.</summary>
+     <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_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'/>
      <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='XML_XML_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='BASE_BUFFER_SIZE' 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_ELEMENT_CONTENT_MULT' type='enum'/>
      <exports symbol='XML_ELEMENT_CONTENT_PLUS' type='enum'/>
      <exports symbol='xmlNs' type='typedef'/>
-     <exports symbol='xmlBufferPtr' type='typedef'/>
+     <exports symbol='xmlElementContent' type='typedef'/>
      <exports symbol='xmlEnumerationPtr' type='typedef'/>
      <exports symbol='xmlBuffer' type='typedef'/>
      <exports symbol='xmlParserInputPtr' type='typedef'/>
      <exports symbol='xmlBufferAllocationScheme' type='typedef'/>
      <exports symbol='xmlNode' type='typedef'/>
      <exports symbol='xmlDocPtr' type='typedef'/>
-     <exports symbol='xmlElementContent' type='typedef'/>
+     <exports symbol='xmlBufferPtr' type='typedef'/>
      <exports symbol='xmlDOMWrapCtxtPtr' type='typedef'/>
      <exports symbol='xmlRefPtr' type='typedef'/>
      <exports symbol='xmlParserInputBuffer' 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='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='_xmlElementContent' type='struct'/>
      <exports symbol='xmlDocCopyNode' type='function'/>
      <exports symbol='xmlNewDocRawNode' type='function'/>
-     <exports symbol='xmlGetProp' 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='xmlBufferCreate' type='function'/>
      <exports symbol='xmlNewDocFragment' type='function'/>
      <exports symbol='xmlDocGetRootElement' type='function'/>
-     <exports symbol='xmlStringGetNodeList' type='function'/>
+     <exports symbol='xmlGetProp' type='function'/>
      <exports symbol='xmlValidateName' type='function'/>
-     <exports symbol='xmlSetBufferAllocationScheme' 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='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='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='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='xmlGetNsList' type='function'/>
      <exports symbol='xmlBufferGrow' type='function'/>
      <exports symbol='xmlNodeIsText' type='function'/>
-     <exports symbol='xmlSetProp' 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='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='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_CHECK_X' 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_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_RNGP_PAT_START_ATTR' type='enum'/>
      <exports symbol='XML_CHECK_WRONG_NAME' type='enum'/>
      <exports symbol='XML_SCHEMAV_NOTEMPTY' type='enum'/>
-     <exports symbol='XML_ERR_NMTOKEN_REQUIRED' 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_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_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1' 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_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_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_CHECK_' 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_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_SCHEMATRONV_REPORT' 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_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_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_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='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='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='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='xmlTextWriterEndPI' type='function'/>
      <exports symbol='xmlTextWriterWriteBase64' type='function'/>
      <exports symbol='xmlTextWriterSetIndentString' type='function'/>
-     <exports symbol='xmlFreeTextWriter' type='function'/>
+     <exports symbol='xmlTextWriterStartAttribute' type='function'/>
      <exports symbol='xmlTextWriterEndComment' type='function'/>
      <exports symbol='xmlTextWriterWriteRawLen' type='function'/>
      <exports symbol='xmlTextWriterWriteDTDExternalEntityContents' type='function'/>
      <exports symbol='xmlTextWriterStartElementNS' type='function'/>
      <exports symbol='xmlTextWriterEndDTDEntity' type='function'/>
      <exports symbol='xmlNewTextWriter' type='function'/>
-     <exports symbol='xmlTextWriterStartAttribute' type='function'/>
+     <exports symbol='xmlFreeTextWriter' type='function'/>
      <exports symbol='xmlTextWriterWriteVFormatDTDAttlist' type='function'/>
      <exports symbol='xmlTextWriterStartPI' type='function'/>
      <exports symbol='xmlTextWriterStartElement' type='function'/>
      <exports symbol='xmlTextWriterWriteVFormatElementNS' type='function'/>
      <exports symbol='xmlTextWriterWriteDTDNotation' type='function'/>
      <exports symbol='xmlTextWriterWriteFormatElement' type='function'/>
-     <exports symbol='xmlTextWriterWriteElementNS' 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='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='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='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'/>
       <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_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='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.</info>
+      <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>
     <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_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_' file='xmlerror' value='6005' type='xmlParserErrors' info='5033'/>
     <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_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_CHECK_X' file='xmlerror' value='6006' type='xmlParserErrors' info=' 503'/>
     <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'/>
@@ -4888,6 +4930,7 @@ and not by parsing an instance'/>
     <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'/>
@@ -4924,6 +4967,7 @@ and not by parsing an instance'/>
     <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'/>
@@ -4939,6 +4983,7 @@ and not by parsing an instance'/>
     <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'/>
@@ -4960,8 +5005,9 @@ and not by parsing an instance'/>
     <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_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'/>
@@ -5081,6 +5127,7 @@ and not by parsing an instance'/>
     <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)'/>
@@ -5089,7 +5136,7 @@ crash if you try to modify the tree)'/>
     <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_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'/>
@@ -5827,6 +5874,7 @@ crash if you try to modify the tree)'/>
     <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'/>
@@ -5970,6 +6018,10 @@ if necessary or NULL'/>
     <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'/>
@@ -6140,7 +6192,8 @@ set at the end of parsing'/>
       <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 entites
-* references done from that entity'/>
+* 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'/>
@@ -6287,8 +6340,8 @@ set at the end of parsing'/>
       <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='xmlBufferPtr' info=' Local buffer encoded in UTF-8 or ISOLatin'/>
-      <field name='conv' type='xmlBufferPtr' info=' if encoder != NULL buffer for output'/>
+      <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>
@@ -6390,6 +6443,7 @@ actually an xmlCharEncoding'/>
       <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'/>
@@ -6418,8 +6472,8 @@ actually an xmlCharEncoding'/>
       <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='xmlBufferPtr' info=' Local buffer encoded in UTF-8'/>
-      <field name='raw' type='xmlBufferPtr' info=' if encoder != NULL buffer for raw input'/>
+      <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'/>
@@ -8507,6 +8561,43 @@ Could we use @subtypes for this?'/>
       <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 xmlBufPtr' 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='const 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 @buffer 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='xmlNodePtr' 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.'/>
@@ -9430,6 +9521,11 @@ Could we use @subtypes for this?'/>
       <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'/>
@@ -9455,6 +9551,12 @@ Could we use @subtypes for this?'/>
       <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'/>
@@ -9687,7 +9789,7 @@ Could we use @subtypes for this?'/>
       <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 lenght of @list'/>
+      <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>
@@ -9696,7 +9798,7 @@ Could we use @subtypes for this?'/>
       <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 lenght of @list'/>
+      <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>
@@ -9716,7 +9818,7 @@ Could we use @subtypes for this?'/>
       <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 lenght in byte (or -1);'/>
+      <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>
@@ -10132,7 +10234,7 @@ Could we use @subtypes for this?'/>
       <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. This requires activation of this option before invoking the parser by calling xmlLineNumbersDefault(1)</info>
+      <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='xmlNodePtr' info='valid node'/>
     </function>
@@ -10536,7 +10638,7 @@ Could we use @subtypes for this?'/>
       <return type='void'/>
     </function>
     <function name='xmlInitializeDict' file='dict' module='dict'>
-      <info>Do the dictionary mutex initialization. this function is not thread safe, initialization should preferably be done once at startup</info>
+      <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'>
@@ -10984,14 +11086,14 @@ Could we use @subtypes for this?'/>
     </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 TODO: options are not yet implemented.</info>
+      <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</info>
+      <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'/>
@@ -11661,7 +11763,7 @@ Could we use @subtypes for this?'/>
     </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</info>
+      <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'/>
@@ -11835,6 +11937,18 @@ Could we use @subtypes for this?'/>
       <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>
@@ -12382,13 +12496,13 @@ Could we use @subtypes for this?'/>
     </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 number of xmlChars read, or -1 in case of error, 0 indicate the end of this entity'/>
+      <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 refresh the input for the parser. It doesn&apos;t try to preserve pointers to the input buffer, and discard already read data</info>
-      <return type='int' info='the number of xmlChars read, or -1 in case of error, 0 indicate the end of this entity'/>
+      <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>
@@ -13008,7 +13122,7 @@ Could we use @subtypes for this?'/>
       <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 lenght of the data'/>
+      <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>
@@ -13917,6 +14031,21 @@ Could we use @subtypes for this?'/>
       <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>
@@ -13935,6 +14064,14 @@ Could we use @subtypes for this?'/>
       <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>
@@ -14320,7 +14457,7 @@ Could we use @subtypes for this?'/>
     </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 lenght in byte of the prefix and return a pointer to the start of the name without the prefix'/>
+      <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>
@@ -15133,6 +15270,13 @@ Could we use @subtypes for this?'/>
       <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>
@@ -16799,7 +16943,7 @@ Could we use @subtypes for this?'/>
       <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.</info>
+      <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>
@@ -17031,7 +17175,7 @@ Could we use @subtypes for this?'/>
       <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 lenght of the data'/>
+      <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>
@@ -17765,6 +17909,14 @@ Could we use @subtypes for this?'/>
       <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>
@@ -17782,14 +17934,14 @@ Could we use @subtypes for this?'/>
     <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='void'/>
+      <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='void'/>
+      <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'/>
@@ -17797,7 +17949,7 @@ Could we use @subtypes for this?'/>
     <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='void'/>
+      <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>
@@ -18051,6 +18203,13 @@ Could we use @subtypes for this?'/>
       <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>
index 574f83b..ee6203d 100644 (file)
   </vendor>
   <product id="libxml2">
     <name>libxml2</name>
-    <version>2.7.8</version>
-    <last-release> Nov 4 2010</last-release>
+    <version>2.8.0</version>
+    <last-release> May 23 2012</last-release>
     <info-url>http://xmlsoft.org/</info-url>
-    <changes>   -  Features:
-    480323 add code to plug in ICU converters by default (Giuseppe Iuculano),
-    Add xmlSaveOption XML_SAVE_WSNONSIG (Adam Spragg)
+    <changes>   - Features:
+  add lzma compression support (Anders F Bjorklund)
   
-   -  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)
+   - 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:
-    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)
+   - 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:
-    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)
+   - 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)
   
-   -  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)
+   - 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:
-    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)
+   - 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)
   
 
 </changes>
index 1e7da8e..dcea8e7 100644 (file)
@@ -7,13 +7,136 @@ 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>Items not finished and worked on, get in touch with the list if you want
-to help those</p><ul><li>More testing on RelaxNG</li>
-  <li>Finishing up <a href="http://www.w3.org/TR/xmlschema-1/">XML
-  Schemas</a></li>
-</ul><p>The <a href="ChangeLog.html">change log</a> describes the recents commits
-to the <a href="http://svn.gnome.org/viewvc/libxml2/trunk/">SVN</a> code base.</p><p>Here is the list of public releases:</p><h3>2.8.0: May 23 2012</h3><ul><li>Features:
-- add lzma compression support (Anders F Bjorklund)
+</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.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:
index 1695bb3..ec275e7 100644 (file)
     <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>
index 2f73b54..d6abd50 100644 (file)
@@ -508,7 +508,7 @@ xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
   <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.daa.com.au/~james/gnome/xml-sax/xml-sax.html">some nice
+    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
@@ -704,23 +704,151 @@ href="python.html">bindings section</a></p>
 
 <h2><a name="News">Releases</a></h2>
 
-<p>Items not finished and worked on, get in touch with the list if you want
-to help those</p>
-<ul>
-  <li>More testing on RelaxNG</li>
-  <li>Finishing up <a href="http://www.w3.org/TR/xmlschema-1/">XML
-  Schemas</a></li>
-</ul>
-
 <p>The <a href="ChangeLog.html">change log</a> describes the recents commits
-to the <a href="http://svn.gnome.org/viewvc/libxml2/trunk/">SVN</a> code base.</p>
+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.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)
+  add lzma compression support (Anders F Bjorklund)
   </li>
 
   <li>Documentation:
index 10caf40..c647763 100644 (file)
@@ -1,18 +1,38 @@
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "XMLLINT" "1" "$Date$" "libxml2" ""
+'\" t
+.\"     Title: xmllint
+.\"    Author: John Fleck <jfleck@inkstain.net>
+.\" Generator: DocBook XSL Stylesheets v1.76.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 8
-\fBxmllint\fR [\fB\-\-version\fR \fB\-\-debug\fR \fB\-\-shell\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 8
+.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
@@ -24,404 +44,607 @@ 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
+)\&. 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.
+parser itself\&.
 .PP
 \fBxmllint\fR
 is included in
-\fBlibxml\fR(3).
+\fBlibxml\fR(3)\&.
 .SH "OPTIONS"
 .PP
+
 \fBxmllint\fR
 accepts the following options (in alphabetical order):
-.TP
+.PP
 \fB\-\-auto\fR
-Generate a small document for testing purposes.
-.TP
+.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
+\fBSGML_CATALOG_FILES\fR\&. Otherwise
 XML
 catalogs starting from
-\fI/etc/xml/catalog\fR
-are used by default.
-.TP
+/etc/xml/catalog
+are used by default\&.
+.RE
+.PP
 \fB\-\-chkregister\fR
-Turn on node registration. Useful for developers testing
+.RS 4
+Turn on node registration\&. Useful for developers testing
 \fBlibxml\fR(3)
-node tracking code.
-.TP
+node tracking code\&.
+.RE
+.PP
 \fB\-\-compress\fR
+.RS 4
 Turn on
 \fBgzip\fR(1)
-compression of output.
-.TP
+compression of output\&.
+.RE
+.PP
 \fB\-\-copy\fR
-Test the internal copy implementation.
-.TP
+.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
-\fIstdout\fR. It keeps comments in the result.
-.TP
+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.
-.TP
+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.
-.TP
+for validation, note that this will require a catalog exporting that Formal Public Identifier to work\&.
+.RE
+.PP
 \fB\-\-debug\fR
-Parse a file and output an annotated tree of the in\-memory version of the document.
-.TP
+.RS 4
+Parse a file and output an annotated tree of the in\-memory version of the document\&.
+.RE
+.PP
 \fB\-\-debugent\fR
-Debug the entities defined in the document.
-.TP
+.RS 4
+Debug the entities defined in the document\&.
+.RE
+.PP
 \fB\-\-dropdtd\fR
+.RS 4
 Remove
 DTD
-from output.
-.TP
+from output\&.
+.RE
+.PP
 \fB\-\-dtdattr\fR
+.RS 4
 Fetch external
 DTD
-and populate the tree with inherited attributes.
-.TP
+and populate the tree with inherited attributes\&.
+.RE
+.PP
 \fB\-\-encode \fR\fB\fIENCODING\fR\fR
-Output in the given encoding.
-.TP
+.RS 4
+Output in the given encoding\&.
+.RE
+.PP
 \fB\-\-format\fR
-Reformat and reindent the output. The
+.RS 4
+Reformat and reindent the output\&. The
 \fBXMLLINT_INDENT\fR
-environment variable controls the indentation. The default value is two spaces " ").
-.TP
+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.
-.TP
+\fBxmllint\fR\&.
+.RE
+.PP
 \fB\-\-html\fR
+.RS 4
 Use the
 HTML
-parser.
-.TP
+parser\&.
+.RE
+.PP
 \fB\-\-htmlout\fR
+.RS 4
 Output results as an
 HTML
-file. This causes
+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.
-.TP
+tags surrounding the result tree output so the results can be displayed/viewed in a browser\&.
+.RE
+.PP
 \fB\-\-insert\fR
-Test for valid insertions.
-.TP
+.RS 4
+Test for valid insertions\&.
+.RE
+.PP
 \fB\-\-loaddtd\fR
+.RS 4
 Fetch an external
-DTD.
-.TP
+DTD\&.
+.RE
+.PP
 \fB\-\-load\-trace\fR
+.RS 4
 Display all the documents loaded during the processing to
-\fIstderr\fR.
-.TP
+stderr\&.
+.RE
+.PP
 \fB\-\-maxmem \fR\fB\fINNBYTES\fR\fR
-Test the parser memory support.
+.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
+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.
-.TP
+files will not exhaust the virtual memory of the server running them\&.
+.RE
+.PP
 \fB\-\-memory\fR
-Parse from memory.
-.TP
+.RS 4
+Parse from memory\&.
+.RE
+.PP
 \fB\-\-noblanks\fR
-Drop ignorable blank spaces.
-.TP
+.RS 4
+Drop ignorable blank spaces\&.
+.RE
+.PP
 \fB\-\-nocatalogs\fR
-Do not use any catalogs.
-.TP
+.RS 4
+Do not use any catalogs\&.
+.RE
+.PP
 \fB\-\-nocdata\fR
-Substitute CDATA section by equivalent text nodes.
-.TP
+.RS 4
+Substitute CDATA section by equivalent text nodes\&.
+.RE
+.PP
 \fB\-\-noent\fR
-Substitute entity values for entity references. By default,
+.RS 4
+Substitute entity values for entity references\&. By default,
 \fBxmllint\fR
-leaves entity references in place.
-.TP
+leaves entity references in place\&.
+.RE
+.PP
 \fB\-\-nonet\fR
+.RS 4
 Do not use the Internet to fetch
-DTDs or entities.
-.TP
+DTDs or entities\&.
+.RE
+.PP
 \fB\-\-noout\fR
-Suppress output. By default,
+.RS 4
+Suppress output\&. By default,
 \fBxmllint\fR
-outputs the result tree.
-.TP
+outputs the result tree\&.
+.RE
+.PP
 \fB\-\-nowarning\fR
-Do not emit warnings from the parser and/or validator.
-.TP
+.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.
-.TP
+doc wrapper\&.
+.RE
+.PP
 \fB\-\-noxincludenode\fR
-Do XInclude processing but do not generate XInclude start and end nodes.
-.TP
+.RS 4
+Do XInclude processing but do not generate XInclude start and end nodes\&.
+.RE
+.PP
 \fB\-\-nsclean\fR
-Remove redundant namespace declarations.
-.TP
+.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
-\fIstdout\fR, with this option the result
+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.
-.TP
+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.
-.TP
+DTDs or entities\&. Enclose space\-separated lists by quotation marks\&.
+.RE
+.PP
 \fB\-\-pattern \fR\fB\fIPATTERNVALUE\fR\fR
-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.
-.TP
+.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
-Validate after parsing has completed.
-.TP
+.RS 4
+Validate after parsing has completed\&.
+.RE
+.PP
 \fB\-\-push\fR
-Use the push mode of the parser.
-.TP
+.RS 4
+Use the push mode of the parser\&.
+.RE
+.PP
 \fB\-\-recover\fR
-Output any parsable portions of an invalid document.
-.TP
+.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.
-.TP
+for validation\&.
+.RE
+.PP
 \fB\-\-repeat\fR
-Repeat 100 times, for timing or profiling.
-.TP
+.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.
-.TP
+for validation\&.
+.RE
+.PP
 \fB\-\-shell\fR
-Run a navigating shell. Details on available commands in shell mode are below (see
-the section called \(lqSHELL COMMANDS\(rq).
-.TP
+.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.
-.TP
+options for validation of files that are too large to be held in memory\&.
+.RE
+.PP
 \fB\-\-testIO\fR
-Test user input/output support.
-.TP
+.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.
-.TP
+to perform the various steps\&.
+.RE
+.PP
 \fB\-\-valid\fR
-Determine if the document is a valid instance of the included Document Type Definition (DTD). A
+.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,
+option\&. By default,
 \fBxmllint\fR
-also checks to determine if the document is well\-formed.
-.TP
+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.
-.TP
+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.
-.TP
+on an unparsed document it works on an existing in\-memory tree\&. Used for debugging\&.
+.RE
+.PP
 \fB\-\-xinclude\fR
-Do XInclude processing.
-.TP
+.RS 4
+Do XInclude processing\&.
+.RE
+.PP
 \fB\-\-xmlout\fR
+.RS 4
 Used in conjunction with
-\fB\-\-html\fR. Usually when
+\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
+serializer\&. But with this option the resulting document is saved with the
 XML
-serializer. This is primarily used to generate
+serializer\&. This is primarily used to generate
 XHTML
 from
 HTML
-input.
+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):
-.TP
+command\&. Available commands in shell mode include (in alphabetical order):
+.PP
 \fBbase\fR
+.RS 4
 Display
 XML
-base of the node.
-.TP
+base of the node\&.
+.RE
+.PP
 \fBbye\fR
-Leave the shell.
-.TP
+.RS 4
+Leave the shell\&.
+.RE
+.PP
 \fBcat \fR\fB\fINODE\fR\fR
-Display the given node or the current one.
-.TP
+.RS 4
+Display the given node or the current one\&.
+.RE
+.PP
 \fBcd \fR\fB\fIPATH\fR\fR
-Change the current node to the given path (if unique) or root if no argument is given.
-.TP
+.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
-Dumps information about the node (namespace, attributes, content).
-.TP
+.RS 4
+Dumps information about the node (namespace, attributes, content)\&.
+.RE
+.PP
 \fBdu \fR\fB\fIPATH\fR\fR
-Show the structure of the subtree under the given path or the current node.
-.TP
+.RS 4
+Show the structure of the subtree under the given path or the current node\&.
+.RE
+.PP
 \fBexit\fR
-Leave the shell.
-.TP
+.RS 4
+Leave the shell\&.
+.RE
+.PP
 \fBhelp\fR
-Show this help.
-.TP
+.RS 4
+Show this help\&.
+.RE
+.PP
 \fBfree\fR
-Display memory usage.
-.TP
+.RS 4
+Display memory usage\&.
+.RE
+.PP
 \fBload \fR\fB\fIFILENAME\fR\fR
-Load a new document with the given filename.
-.TP
+.RS 4
+Load a new document with the given filename\&.
+.RE
+.PP
 \fBls \fR\fB\fIPATH\fR\fR
-List contents of the given path or the current directory.
-.TP
+.RS 4
+List contents of the given path or the current directory\&.
+.RE
+.PP
 \fBpwd\fR
-Display the path to the current node.
-.TP
+.RS 4
+Display the path to the current node\&.
+.RE
+.PP
 \fBquit\fR
-Leave the shell.
-.TP
+.RS 4
+Leave the shell\&.
+.RE
+.PP
 \fBsave \fR\fB\fIFILENAME\fR\fR
-Save the current document to the given filename or to the original name.
-.TP
+.RS 4
+Save the current document to the given filename or to the original name\&.
+.RE
+.PP
 \fBvalidate\fR
-Check the document for errors.
-.TP
+.RS 4
+Check the document for errors\&.
+.RE
+.PP
 \fBwrite \fR\fB\fIFILENAME\fR\fR
-Write the current node to the given filename.
+.RS 4
+Write the current node to the given filename\&.
+.RE
 .SH "ENVIRONMENT"
-.TP
+.PP
 \fBSGML_CATALOG_FILES\fR
+.RS 4
 SGML
-catalog behavior can be changed by redirecting queries to the user's own set of catalogs. This can be done by setting the
+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
-\fI/etc/sgml/catalog\fR
-catalog.
-.TP
+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's own set of catalogs. This can be done by setting the
+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
-\fI/etc/xml/catalog\fR
-catalog.
-.TP
+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.
-.TP
+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 " ".
+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.
-.TP
+return codes provide information that can be used when calling it from scripts\&.
+.PP
 \fB0\fR
+.RS 4
 No error
-.TP
+.RE
+.PP
 \fB1\fR
+.RS 4
 Unclassified
-.TP
+.RE
+.PP
 \fB2\fR
+.RS 4
 Error in
 DTD
-.TP
+.RE
+.PP
 \fB3\fR
+.RS 4
 Validation error
-.TP
+.RE
+.PP
 \fB4\fR
+.RS 4
 Validation error
-.TP
+.RE
+.PP
 \fB5\fR
+.RS 4
 Error in schema compilation
-.TP
+.RE
+.PP
 \fB6\fR
+.RS 4
 Error writing output
-.TP
+.RE
+.PP
 \fB7\fR
+.RS 4
 Error in pattern (generated when
 \fB\-\-pattern\fR
 option is used)
-.TP
+.RE
+.PP
 \fB8\fR
+.RS 4
 Error in Reader registration (generated when
 \fB\-\-chkregister\fR
 option is used)
-.TP
+.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
-.TP 3
-\(bu
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
 \fBlibxml\fR(3)
 web page
-\fI\%http://www.xmlsoft.org/\fR
-.TP
-\(bu
+\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
-\fI\%http://www.w3.org/TR/xslt\fR
-.SH "AUTHOR"
-John Fleck <jfleck@inkstain.net>, Ziying Sherwin <sherwin@nlm.nih.gov>, Heiko Rupp <hwr@pilhuhn.de>. 
+\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
index 9a41b4e..5f0f000 100644 (file)
@@ -69,6 +69,7 @@
                        <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>
                </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>
index 84e8151..85c49d6 100644 (file)
@@ -1343,6 +1343,68 @@ extern __typeof (xmlBoolToText) xmlBoolToText__internal_alias __attribute((visib
 #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")));
@@ -1424,6 +1486,16 @@ extern __typeof (xmlBufferCreateStatic) xmlBufferCreateStatic__internal_alias __
 #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
@@ -2840,6 +2912,16 @@ extern __typeof (xmlDictFree) xmlDictFree__internal_alias __attribute((visibilit
 #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
@@ -2880,6 +2962,16 @@ extern __typeof (xmlDictReference) xmlDictReference__internal_alias __attribute(
 #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
@@ -4601,6 +4693,16 @@ extern __typeof (xmlInitializeCatalog) xmlInitializeCatalog__internal_alias __at
 #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")));
@@ -6757,6 +6859,30 @@ extern __typeof (xmlOutputBufferFlush) xmlOutputBufferFlush__internal_alias __at
 
 #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
@@ -10043,6 +10169,30 @@ extern __typeof (xmlSchemaValidatePredefinedType) xmlSchemaValidatePredefinedTyp
 
 #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
@@ -11715,6 +11865,18 @@ extern __typeof (xmlTextReaderRelaxNGValidate) xmlTextReaderRelaxNGValidate__int
 
 #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
@@ -12003,6 +12165,18 @@ extern __typeof (xmlTextWriterSetIndentString) xmlTextWriterSetIndentString__int
 
 #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
diff --git a/enc.h b/enc.h
new file mode 100644 (file)
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__ */
+
+
index d486dd6..7330e90 100644 (file)
@@ -24,6 +24,7 @@
 #include "libxml.h"
 
 #include <string.h>
+#include <limits.h>
 
 #ifdef HAVE_CTYPE_H
 #include <ctype.h>
@@ -44,6 +45,9 @@
 #include <libxml/globals.h>
 #include <libxml/xmlerror.h>
 
+#include "buf.h"
+#include "enc.h"
+
 static xmlCharEncodingHandlerPtr xmlUTF16LEHandler = NULL;
 static xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL;
 
@@ -1513,6 +1517,8 @@ xmlGetCharEncodingHandler(xmlCharEncoding enc) {
             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");
@@ -1825,7 +1831,7 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
 
 /************************************************************************
  *                                                                     *
- *             ICU based generic conversion functions                  *
+ *             ICU based generic conversion functions          *
  *                                                                     *
  ************************************************************************/
 
@@ -1897,9 +1903,6 @@ xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen,
  *             The real API used by libxml for on-the-fly conversion   *
  *                                                                     *
  ************************************************************************/
-int
-xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
-                       xmlBufferPtr in, int len);
 
 /**
  * xmlCharEncFirstLineInt:
@@ -1946,7 +1949,7 @@ xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
             toconv = 180;
     }
     if (toconv * 2 >= written) {
-        xmlBufferGrow(out, toconv);
+        xmlBufferGrow(out, toconv * 2);
        written = out->size - out->use - 1;
     }
 
@@ -2029,6 +2032,252 @@ xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
 }
 
 /**
+ * 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.
@@ -2136,6 +2385,235 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
 }
 
 /**
+ * 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);
+}
+
+/**
  * xmlCharEncOutFunc:
  * @handler:   char enconding transformation data structure
  * @out:  an xmlBuffer for the output.
@@ -2198,7 +2676,7 @@ retry:
        else if (handler->uconv_out != NULL) {
            ret = xmlUconvWrapper(handler->uconv_out, 0,
                               &out->content[out->use],
-                                             &written, NULL, &toconv);
+                                             &written, NULL, &toconv);
            out->use += written;
            out->content[out->use] = 0;
        }
@@ -2619,7 +3097,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
             c2 = c2 & 0x3F;
            d = d & 0x0F;
            d = xlattable [48 + c2 + xlattable [48 + c1 +
-                       xlattable [32 + d] * 64] * 64];
+                       xlattable [32 + d] * 64] * 64];
             if (d == 0) {
                 /* not in character set */
                 *outlen = out - outstart;
index 6aef49f..0c484a7 100644 (file)
 #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, 
+    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, 
+    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, 
+    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, 
+    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, 
+    NULL, NULL, NULL, NULL, NULL, NULL,
     BAD_CAST "'", BAD_CAST "'", 1,
     XML_INTERNAL_PREDEFINED_ENTITY,
     NULL, NULL, NULL, NULL, 0, 1
@@ -426,7 +428,7 @@ xmlNewEntity(xmlDocPtr doc, const xmlChar *name, int type,
  *
  * 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
@@ -441,7 +443,7 @@ xmlGetEntityFromTable(xmlEntitiesTablePtr table, const xmlChar *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
@@ -472,7 +474,7 @@ xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *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
@@ -496,7 +498,7 @@ xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *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
@@ -528,20 +530,20 @@ xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) {
  * Macro used to grow the current buffer.
  */
 #define growBufferReentrant() {                                                \
-    buffer_size *= 2;                                                  \
-    buffer = (xmlChar *)                                               \
-               xmlRealloc(buffer, buffer_size * sizeof(xmlChar));      \
-    if (buffer == NULL) {                                              \
-        xmlEntitiesErrMemory("xmlEncodeEntitiesReentrant: realloc failed");\
-       return(NULL);                                                   \
-    }                                                                  \
+    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;                                            \
 }
 
-
 /**
- * xmlEncodeEntitiesReentrant:
+ * 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.
@@ -550,12 +552,12 @@ xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) {
  *
  * Returns A newly allocated string with the substitution done.
  */
-xmlChar *
-xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
+static xmlChar *
+xmlEncodeEntitiesInternal(xmlDocPtr doc, const xmlChar *input, int attr) {
     const xmlChar *cur = input;
     xmlChar *buffer = NULL;
     xmlChar *out = NULL;
-    int buffer_size = 0;
+    size_t buffer_size = 0;
     int html = 0;
 
     if (input == NULL) return(NULL);
@@ -568,14 +570,14 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
     buffer_size = 1000;
     buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
     if (buffer == NULL) {
-        xmlEntitiesErrMemory("xmlEncodeEntitiesReentrant: malloc failed");
+        xmlEntitiesErrMemory("xmlEncodeEntities: malloc failed");
        return(NULL);
     }
     out = buffer;
 
     while (*cur != '\0') {
-        if (out - buffer > buffer_size - 100) {
-           int indx = out - buffer;
+        size_t indx = out - buffer;
+        if (indx + 100 > buffer_size) {
 
            growBufferReentrant();
            out = &buffer[indx];
@@ -585,6 +587,27 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
         * 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';
@@ -595,6 +618,23 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
            *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';
@@ -609,7 +649,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
        } else if (*cur >= 0x80) {
            if (((doc != NULL) && (doc->encoding != NULL)) || (html)) {
                /*
-                * Bjørn Reese <br@sseusa.com> provided the patch
+                * Bjørn Reese <br@sseusa.com> provided the patch
                xmlChar xc;
                xc = (*cur & 0x3F) << 6;
                if (cur[1] != 0) {
@@ -627,7 +667,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
 
                if (*cur < 0xC0) {
                    xmlEntitiesErr(XML_CHECK_NOT_UTF8,
-                           "xmlEncodeEntitiesReentrant : input not UTF-8");
+                           "xmlEncodeEntities: input not UTF-8");
                    if (doc != NULL)
                        doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
                    snprintf(buf, sizeof(buf), "&#%d;", *cur);
@@ -660,7 +700,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
                }
                if ((l == 1) || (!IS_CHAR(val))) {
                    xmlEntitiesErr(XML_ERR_INVALID_CHAR,
-                       "xmlEncodeEntitiesReentrant : char out of range\n");
+                       "xmlEncodeEntities: char out of range\n");
                    if (doc != NULL)
                        doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
                    snprintf(buf, sizeof(buf), "&#%d;", *cur);
@@ -692,6 +732,44 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
     }
     *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);
 }
 
 /**
@@ -709,7 +787,7 @@ xmlEncodeSpecialChars(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *input) {
     const xmlChar *cur = input;
     xmlChar *buffer = NULL;
     xmlChar *out = NULL;
-    int buffer_size = 0;
+    size_t buffer_size = 0;
     if (input == NULL) return(NULL);
 
     /*
@@ -724,8 +802,8 @@ xmlEncodeSpecialChars(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *input) {
     out = buffer;
 
     while (*cur != '\0') {
-        if (out - buffer > buffer_size - 10) {
-           int indx = out - buffer;
+        size_t indx = out - buffer;
+        if (indx + 10 > buffer_size) {
 
            growBufferReentrant();
            out = &buffer[indx];
@@ -774,6 +852,11 @@ xmlEncodeSpecialChars(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *input) {
     }
     *out = 0;
     return(buffer);
+
+mem_error:
+    xmlEntitiesErrMemory("xmlEncodeSpecialChars: realloc failed");
+    xmlFree(buffer);
+    return(NULL);
 }
 
 /**
@@ -820,7 +903,7 @@ xmlFreeEntitiesTable(xmlEntitiesTablePtr table) {
  * @ent:  An entity
  *
  * Build a copy of an entity
- * 
+ *
  * Returns the new xmlEntitiesPtr or NULL in case of error.
  */
 static xmlEntityPtr
@@ -856,7 +939,7 @@ xmlCopyEntity(xmlEntityPtr ent) {
  * @table:  An entity table
  *
  * Build a copy of an entity table.
- * 
+ *
  * Returns the new xmlEntitiesTablePtr or NULL in case of error.
  */
 xmlEntitiesTablePtr
@@ -1005,7 +1088,7 @@ static void
 xmlDumpEntityDeclScan(xmlEntityPtr ent, xmlBufferPtr buf) {
     xmlDumpEntityDecl(buf, ent);
 }
-      
+
 /**
  * xmlDumpEntitiesTable:
  * @buf:  An XML buffer.
diff --git a/error.c b/error.c
index a891faa..cbcf5c9 100644 (file)
--- a/error.c
+++ b/error.c
@@ -33,7 +33,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc      (void *ctx ATTRIBUTE_UNUSED,
                                                                \
     while (size < 64000) {                                     \
        va_start(ap, msg);                                      \
-       chars = vsnprintf(str, size, msg, ap);                  \
+       chars = vsnprintf(str, size, msg, ap);                  \
        va_end(ap);                                             \
        if ((chars > -1) && (chars < size)) {                   \
            if (prev_size == chars) {                           \
@@ -54,9 +54,9 @@ void XMLCDECL xmlGenericErrorDefaultFunc      (void *ctx ATTRIBUTE_UNUSED,
 }
 
 /************************************************************************
- *                                                                     *
- *                     Handling of out of context errors               *
- *                                                                     *
+ *                                                                     *
+ *                     Handling of out of context errors               *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -64,7 +64,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc      (void *ctx ATTRIBUTE_UNUSED,
  * @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
@@ -82,7 +82,7 @@ xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
 /**
  * initGenericErrorDefaultFunc:
  * @handler:  the handler
- * 
+ *
  * Set or reset (if NULL) the default handler for generic errors
  * to the builtin error function.
  */
@@ -137,15 +137,15 @@ xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
 }
 
 /************************************************************************
- *                                                                     *
- *                     Handling of parsing errors                      *
- *                                                                     *
+ *                                                                     *
+ *                     Handling of parsing errors                      *
+ *                                                                     *
  ************************************************************************/
 
 /**
  * xmlParserPrintFileInfo:
  * @input:  an xmlParserInputPtr input
- * 
+ *
  * Displays the associated file and line informations for the current input
  */
 
@@ -165,12 +165,12 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) {
 /**
  * xmlParserPrintFileContext:
  * @input:  an xmlParserInputPtr input
- * 
+ *
  * Displays current context within the input content for error tracking
  */
 
 static void
-xmlParserPrintFileContextInternal(xmlParserInputPtr input , 
+xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
                xmlGenericErrorFunc channel, void *data ) {
     const xmlChar *cur, *base;
     unsigned int n, col;       /* GCC warns if signed, because compared with sizeof() */
@@ -186,8 +186,8 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
     }
     n = 0;
     /* search backwards for beginning-of-line (to max buff size) */
-    while ((n++ < (sizeof(content)-1)) && (cur > base) && 
-          (*(cur) != '\n') && (*(cur) != '\r'))
+    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 */
@@ -196,8 +196,8 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
     n = 0;
     ctnt = content;
     /* copy selected text to our buffer */
-    while ((*cur != 0) && (*(cur) != '\n') && 
-          (*(cur) != '\r') && (n < sizeof(content)-1)) {
+    while ((*cur != 0) && (*(cur) != '\n') &&
+          (*(cur) != '\r') && (n < sizeof(content)-1)) {
                *ctnt++ = *cur++;
        n++;
     }
@@ -221,7 +221,7 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
 /**
  * xmlParserPrintFileContext:
  * @input:  an xmlParserInputPtr input
- * 
+ *
  * Displays current context within the input content for error tracking
  */
 void
@@ -292,7 +292,10 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
     } else {
         if (file != NULL)
             channel(data, "%s:%d: ", file, line);
-        else if ((line != 0) && (domain == XML_FROM_PARSER))
+        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) {
@@ -360,6 +363,15 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
         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;
     }
@@ -429,7 +441,7 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
  * @str2: extra string info
  * @str3: extra string info
  * @int1: extra int info
- * @col: column number of the error or 0 if N/A 
+ * @col: column number of the error or 0 if N/A
  * @msg:  the message to display/transmit
  * @...:  extra parameters for the message display
  *
@@ -521,6 +533,8 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
 
        if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
            line = node->line;
+       if ((line == 0) || (line == 65535))
+           line = xmlGetLineNo(node);
     }
 
     /*
@@ -601,8 +615,11 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
        data = ctxt->userData;
     } else if (channel == NULL) {
        channel = xmlGenericError;
-       if (!data)
+       if (ctxt != NULL) {
+           data = ctxt;
+       } else {
            data = xmlGenericErrorContext;
+       }
     }
     if (channel == NULL)
         return;
@@ -654,7 +671,7 @@ __xmlSimpleError(int domain, int code, xmlNodePtr node,
  * @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.
  */
@@ -697,7 +714,7 @@ xmlParserError(void *ctx, const char *msg, ...)
  * @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.
  */
@@ -718,7 +735,7 @@ xmlParserWarning(void *ctx, const char *msg, ...)
        }
        xmlParserPrintFileInfo(input);
     }
-        
+
     xmlGenericError(xmlGenericErrorContext, "warning: ");
     XML_GET_VAR_STR(msg, str);
     xmlGenericError(xmlGenericErrorContext, "%s", str);
@@ -736,9 +753,9 @@ xmlParserWarning(void *ctx, const char *msg, ...)
 }
 
 /************************************************************************
- *                                                                     *
- *                     Handling of validation errors                   *
- *                                                                     *
+ *                                                                     *
+ *                     Handling of validation errors                   *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -746,7 +763,7 @@ xmlParserWarning(void *ctx, const char *msg, ...)
  * @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.
  */
@@ -764,7 +781,7 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
            input = ctxt->input;
            if ((input->filename == NULL) && (ctxt->inputNr > 1))
                input = ctxt->inputTab[ctxt->inputNr - 2];
-               
+
            if (had_info == 0) {
                xmlParserPrintFileInfo(input);
            }
@@ -790,7 +807,7 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
  * @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.
  */
@@ -809,7 +826,7 @@ xmlParserValidityWarning(void *ctx, const char *msg, ...)
 
        xmlParserPrintFileInfo(input);
     }
-        
+
     xmlGenericError(xmlGenericErrorContext, "validity warning: ");
     XML_GET_VAR_STR(msg, str);
     xmlGenericError(xmlGenericErrorContext, "%s", str);
index 9eb6a76..488ee6e 100644 (file)
@@ -1,10 +1,7 @@
 noinst_PROGRAMS        = gjobread
 
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
-DEPS = $(top_builddir)/libxml2.la
-LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
+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
-gjobread_LDFLAGS=
-gjobread_DEPENDENCIES= $(DEPS)
-gjobread_LDADD= @RDL_LIBS@ $(LDADDS)
index ad7643f..69b7027 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -51,14 +68,15 @@ CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_gjobread_OBJECTS = gjobread.$(OBJEXT)
 gjobread_OBJECTS = $(am_gjobread_OBJECTS)
+gjobread_LDADD = $(LDADD)
 am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+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
-gjobread_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(gjobread_LDFLAGS) $(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -69,24 +87,29 @@ 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_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+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_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 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_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+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_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
 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
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -94,7 +117,6 @@ ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
-AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -131,6 +153,7 @@ 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@
@@ -186,7 +209,6 @@ RANLIB = @RANLIB@
 RDL_LIBS = @RDL_LIBS@
 READER_TEST = @READER_TEST@
 RELDATE = @RELDATE@
-RM = @RM@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -211,7 +233,6 @@ TEST_VTIME = @TEST_VTIME@
 TEST_XINCLUDE = @TEST_XINCLUDE@
 TEST_XPATH = @TEST_XPATH@
 TEST_XPTR = @TEST_XPTR@
-THREADS_W32 = @THREADS_W32@
 THREAD_CFLAGS = @THREAD_CFLAGS@
 THREAD_LIBS = @THREAD_LIBS@
 VERSION = @VERSION@
@@ -244,6 +265,7 @@ 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@
@@ -317,13 +339,10 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@
-DEPS = $(top_builddir)/libxml2.la
-LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
+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
-gjobread_LDFLAGS = 
-gjobread_DEPENDENCIES = $(DEPS)
-gjobread_LDADD = @RDL_LIBS@ $(LDADDS)
 all: all-am
 
 .SUFFIXES:
@@ -367,9 +386,9 @@ clean-noinstPROGRAMS:
        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) 
+gjobread$(EXEEXT): $(gjobread_OBJECTS) $(gjobread_DEPENDENCIES) $(EXTRA_gjobread_DEPENDENCIES) 
        @rm -f gjobread$(EXEEXT)
-       $(AM_V_CCLD)$(gjobread_LINK) $(gjobread_OBJECTS) $(gjobread_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(gjobread_OBJECTS) $(gjobread_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -382,26 +401,23 @@ distclean-compile:
 .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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@  $(COMPILE) -c $<
+@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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@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@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -505,10 +521,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       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:
index 69002f0..e351b03 100644 (file)
--- a/globals.c
+++ b/globals.c
@@ -65,9 +65,9 @@ void xmlCleanupGlobals(void)
 }
 
 /************************************************************************
- *                                                                     *
+ *                                                                     *
  *     All the user accessible global variables of the library         *
- *                                                                     *
+ *                                                                     *
  ************************************************************************/
 
 /*
@@ -246,7 +246,7 @@ 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. 
+ * in the content field of elements in the DOM tree.
  * Disabled by default since this may not be safe for old classes of
  * applicaton.
  */
@@ -509,7 +509,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
 #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)
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
     inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
 #endif
 
@@ -523,7 +523,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
     gs->xmlDefaultSAXLocator.getSystemId = xmlSAX2GetSystemId;
     gs->xmlDefaultSAXLocator.getLineNumber = xmlSAX2GetLineNumber;
     gs->xmlDefaultSAXLocator.getColumnNumber = xmlSAX2GetColumnNumber;
-    gs->xmlDoValidityCheckingDefaultValue = 
+    gs->xmlDoValidityCheckingDefaultValue =
          xmlDoValidityCheckingDefaultValueThrDef;
 #if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
     gs->xmlFree = (xmlFreeFunc) xmlMemFree;
@@ -548,7 +548,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
     gs->xmlParserVersion = LIBXML_VERSION_STRING;
     gs->xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
     gs->xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
-    gs->xmlSubstituteEntitiesDefaultValue = 
+    gs->xmlSubstituteEntitiesDefaultValue =
         xmlSubstituteEntitiesDefaultValueThrDef;
 
     gs->xmlGenericError = xmlGenericErrorThrDef;
@@ -600,7 +600,7 @@ xmlRegisterNodeFunc
 xmlRegisterNodeDefault(xmlRegisterNodeFunc func)
 {
     xmlRegisterNodeFunc old = xmlRegisterNodeDefaultValue;
-    
+
     __xmlRegisterCallbacks = 1;
     xmlRegisterNodeDefaultValue = func;
     return(old);
@@ -610,10 +610,10 @@ xmlRegisterNodeFunc
 xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)
 {
     xmlRegisterNodeFunc old;
-    
+
     xmlMutexLock(xmlThrDefMutex);
     old = xmlRegisterNodeDefaultValueThrDef;
-    
+
     __xmlRegisterCallbacks = 1;
     xmlRegisterNodeDefaultValueThrDef = func;
     xmlMutexUnlock(xmlThrDefMutex);
@@ -633,7 +633,7 @@ xmlDeregisterNodeFunc
 xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func)
 {
     xmlDeregisterNodeFunc old = xmlDeregisterNodeDefaultValue;
-    
+
     __xmlRegisterCallbacks = 1;
     xmlDeregisterNodeDefaultValue = func;
     return(old);
@@ -646,7 +646,7 @@ xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func)
 
     xmlMutexLock(xmlThrDefMutex);
     old = xmlDeregisterNodeDefaultValueThrDef;
-    
+
     __xmlRegisterCallbacks = 1;
     xmlDeregisterNodeDefaultValueThrDef = func;
     xmlMutexUnlock(xmlThrDefMutex);
@@ -658,7 +658,7 @@ xmlParserInputBufferCreateFilenameFunc
 xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func)
 {
     xmlParserInputBufferCreateFilenameFunc old;
-    
+
     xmlMutexLock(xmlThrDefMutex);
     old = xmlParserInputBufferCreateFilenameValueThrDef;
     if (old == NULL) {
@@ -675,7 +675,7 @@ xmlOutputBufferCreateFilenameFunc
 xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func)
 {
     xmlOutputBufferCreateFilenameFunc old;
-    
+
     xmlMutexLock(xmlThrDefMutex);
     old = xmlOutputBufferCreateFilenameValueThrDef;
 #ifdef LIBXML_OUTPUT_ENABLED
@@ -732,7 +732,7 @@ __xmlMalloc(void){
     if (IS_MAIN_THREAD)
         return (&xmlMalloc);
     else
-       return (&xmlGetGlobalState()->xmlMalloc);
+       return (&xmlGetGlobalState()->xmlMalloc);
 }
 
 #undef xmlMallocAtomic
diff --git a/hash.c b/hash.c
index 15e1efe..0145109 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -83,7 +83,7 @@ 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
@@ -93,11 +93,13 @@ xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name,
            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);
@@ -113,7 +115,7 @@ xmlHashComputeQKey(xmlHashTablePtr table,
                   const xmlChar *prefix3, const xmlChar *name3) {
     unsigned long value = 0L;
     char ch;
-    
+
 #ifdef HASH_RANDOMIZATION
     value = table->random_seed;
 #endif
@@ -133,6 +135,7 @@ xmlHashComputeQKey(xmlHashTablePtr table,
            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);
@@ -144,6 +147,7 @@ xmlHashComputeQKey(xmlHashTablePtr table,
            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);
@@ -169,10 +173,10 @@ xmlHashComputeQKey(xmlHashTablePtr table,
 xmlHashTablePtr
 xmlHashCreate(int size) {
     xmlHashTablePtr table;
-  
+
     if (size <= 0)
         size = 256;
-  
+
     table = xmlMalloc(sizeof(xmlHashTable));
     if (table) {
         table->dict = NULL;
@@ -180,11 +184,11 @@ xmlHashCreate(int size) {
        table->nbElems = 0;
         table->table = xmlMalloc(size * sizeof(xmlHashEntry));
         if (table->table) {
-           memset(table->table, 0, size * sizeof(xmlHashEntry));
+           memset(table->table, 0, size * sizeof(xmlHashEntry));
 #ifdef HASH_RANDOMIZATION
             table->random_seed = __xmlRandom();
 #endif
-           return(table);
+           return(table);
         }
         xmlFree(table);
     }
@@ -230,7 +234,7 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
 #ifdef DEBUG_GROW
     unsigned long nbElem = 0;
 #endif
-  
+
     if (table == NULL)
        return(-1);
     if (size < 8)
@@ -242,7 +246,7 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
     oldtable = table->table;
     if (oldtable == NULL)
         return(-1);
-  
+
     table->table = xmlMalloc(size * sizeof(xmlHashEntry));
     if (table->table == NULL) {
        table->table = oldtable;
@@ -252,13 +256,13 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
     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 
+       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) 
+       if (oldtable[i].valid == 0)
            continue;
        key = xmlHashComputeKey(table, oldtable[i].name, oldtable[i].name2,
                                oldtable[i].name3);
@@ -282,8 +286,8 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
                table->table[key].next = NULL;
                xmlFree(iter);
            } else {
-               iter->next = table->table[key].next;
-               table->table[key].next = iter;
+               iter->next = table->table[key].next;
+               table->table[key].next = iter;
            }
 
 #ifdef DEBUG_GROW
@@ -599,7 +603,7 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name,
     entry->valid = 1;
 
 
-    if (insert != NULL) 
+    if (insert != NULL)
        insert->next = entry;
 
     table->nbElems++;
@@ -748,7 +752,7 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name,
  * Returns the a pointer to the userdata
  */
 void *
-xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name, 
+xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name,
               const xmlChar *name2, const xmlChar *name3) {
     unsigned long key;
     xmlHashEntryPtr entry;
@@ -821,14 +825,14 @@ typedef struct {
     void *data;
 } stubData;
 
-static void 
-stubHashScannerFull (void *payload, void *data, const xmlChar *name, 
+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
@@ -841,7 +845,7 @@ void
 xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data) {
     stubData stubdata;
     stubdata.data = data;
-    stubdata.hashscanner = f; 
+    stubdata.hashscanner = f;
     xmlHashScanFull (table, stubHashScannerFull, &stubdata);
 }
 
@@ -866,7 +870,7 @@ xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
 
     if (table->table) {
        for(i = 0; i < table->size; i++) {
-           if (table->table[i].valid == 0) 
+           if (table->table[i].valid == 0)
                continue;
            iter = &(table->table[i]);
            while (iter) {
@@ -905,7 +909,7 @@ xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
  * the comparison is considered to match.
  */
 void
-xmlHashScan3(xmlHashTablePtr table, const xmlChar *name, 
+xmlHashScan3(xmlHashTablePtr table, const xmlChar *name,
             const xmlChar *name2, const xmlChar *name3,
             xmlHashScanner f, void *data) {
     xmlHashScanFull3 (table, name, name2, name3,
@@ -926,7 +930,7 @@ xmlHashScan3(xmlHashTablePtr table, const xmlChar *name,
  * the comparison is considered to match.
  */
 void
-xmlHashScanFull3(xmlHashTablePtr table, const xmlChar *name, 
+xmlHashScanFull3(xmlHashTablePtr table, const xmlChar *name,
                 const xmlChar *name2, const xmlChar *name3,
                 xmlHashScannerFull f, void *data) {
     int i;
index 18ab34d..45e9dd5 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -46,11 +63,11 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+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_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
@@ -61,6 +78,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        install-pdf-recursive install-ps-recursive install-recursive \
        installcheck-recursive installdirs-recursive pdf-recursive \
        ps-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=) \
@@ -99,7 +121,6 @@ ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
-AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -136,6 +157,7 @@ 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@
@@ -191,7 +213,6 @@ RANLIB = @RANLIB@
 RDL_LIBS = @RDL_LIBS@
 READER_TEST = @READER_TEST@
 RELDATE = @RELDATE@
-RM = @RM@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -216,7 +237,6 @@ TEST_VTIME = @TEST_VTIME@
 TEST_XINCLUDE = @TEST_XINCLUDE@
 TEST_XPATH = @TEST_XPATH@
 TEST_XPTR = @TEST_XPTR@
-THREADS_W32 = @THREADS_W32@
 THREAD_CFLAGS = @THREAD_CFLAGS@
 THREAD_LIBS = @THREAD_LIBS@
 VERSION = @VERSION@
@@ -249,6 +269,7 @@ 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@
@@ -531,13 +552,10 @@ distdir: $(DISTFILES)
        done
        @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(MKDIR_P) "$(distdir)/$$subdir" \
-           || 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; \
@@ -572,10 +590,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       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:
index 461d4ee..9394fa7 100644 (file)
@@ -47,44 +47,44 @@ XMLPUBFUN int XMLCALL
                                         const unsigned char *in,
                                         int *inlen, int quoteChar);
 
-XMLPUBFUN docbDocPtr XMLCALL             
+XMLPUBFUN docbDocPtr XMLCALL
                     docbSAXParseDoc   (xmlChar *cur,
                                         const char *encoding,
                                         docbSAXHandlerPtr sax,
                                         void *userData);
-XMLPUBFUN docbDocPtr XMLCALL             
+XMLPUBFUN docbDocPtr XMLCALL
                     docbParseDoc      (xmlChar *cur,
                                         const char *encoding);
-XMLPUBFUN docbDocPtr XMLCALL             
+XMLPUBFUN docbDocPtr XMLCALL
                     docbSAXParseFile  (const char *filename,
                                         const char *encoding,
                                         docbSAXHandlerPtr sax,
                                         void *userData);
-XMLPUBFUN docbDocPtr XMLCALL             
+XMLPUBFUN docbDocPtr XMLCALL
                     docbParseFile     (const char *filename,
                                         const char *encoding);
 
 /**
  * Interfaces for the Push mode.
  */
-XMLPUBFUN void XMLCALL                  
+XMLPUBFUN void XMLCALL
                     docbFreeParserCtxt      (docbParserCtxtPtr ctxt);
-XMLPUBFUN docbParserCtxtPtr XMLCALL     
+XMLPUBFUN docbParserCtxtPtr XMLCALL
                     docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
                                               void *user_data,
                                               const char *chunk,
                                               int size,
                                               const char *filename,
                                               xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL                   
+XMLPUBFUN int XMLCALL
                     docbParseChunk          (docbParserCtxtPtr ctxt,
                                               const char *chunk,
                                               int size,
                                               int terminate);
-XMLPUBFUN docbParserCtxtPtr XMLCALL       
+XMLPUBFUN docbParserCtxtPtr XMLCALL
                     docbCreateFileParserCtxt(const char *filename,
                                               const char *encoding);
-XMLPUBFUN int XMLCALL                   
+XMLPUBFUN int XMLCALL
                     docbParseDocument       (docbParserCtxtPtr ctxt);
 
 #ifdef __cplusplus
index 10a3d65..551186c 100644 (file)
@@ -83,87 +83,87 @@ struct _htmlEntityDesc {
 /*
  * There is only few public functions.
  */
-XMLPUBFUN const htmlElemDesc * XMLCALL         
+XMLPUBFUN const htmlElemDesc * XMLCALL
                        htmlTagLookup   (const xmlChar *tag);
-XMLPUBFUN const htmlEntityDesc * XMLCALL       
+XMLPUBFUN const htmlEntityDesc * XMLCALL
                        htmlEntityLookup(const xmlChar *name);
-XMLPUBFUN const htmlEntityDesc * XMLCALL       
+XMLPUBFUN const htmlEntityDesc * XMLCALL
                        htmlEntityValueLookup(unsigned int value);
 
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        htmlIsAutoClosed(htmlDocPtr doc,
                                         htmlNodePtr elem);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        htmlAutoCloseTag(htmlDocPtr doc,
                                         const xmlChar *name,
                                         htmlNodePtr elem);
-XMLPUBFUN const htmlEntityDesc * XMLCALL       
+XMLPUBFUN const htmlEntityDesc * XMLCALL
                        htmlParseEntityRef(htmlParserCtxtPtr ctxt,
                                         const xmlChar **str);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        htmlParseCharRef(htmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        htmlParseElement(htmlParserCtxtPtr ctxt);
 
-XMLPUBFUN htmlParserCtxtPtr XMLCALL    
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
                        htmlNewParserCtxt(void);
 
-XMLPUBFUN htmlParserCtxtPtr XMLCALL    
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
                        htmlCreateMemoryParserCtxt(const char *buffer,
                                                   int size);
 
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        htmlParseDocument(htmlParserCtxtPtr ctxt);
-XMLPUBFUN htmlDocPtr XMLCALL           
+XMLPUBFUN htmlDocPtr XMLCALL
                        htmlSAXParseDoc (xmlChar *cur,
                                         const char *encoding,
                                         htmlSAXHandlerPtr sax,
                                         void *userData);
-XMLPUBFUN htmlDocPtr XMLCALL           
+XMLPUBFUN htmlDocPtr XMLCALL
                        htmlParseDoc    (xmlChar *cur,
                                         const char *encoding);
-XMLPUBFUN htmlDocPtr XMLCALL           
+XMLPUBFUN htmlDocPtr XMLCALL
                        htmlSAXParseFile(const char *filename,
                                         const char *encoding,
                                         htmlSAXHandlerPtr sax,
                                         void *userData);
-XMLPUBFUN htmlDocPtr XMLCALL           
+XMLPUBFUN htmlDocPtr XMLCALL
                        htmlParseFile   (const char *filename,
                                         const char *encoding);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        UTF8ToHtml      (unsigned char *out,
                                         int *outlen,
                                         const unsigned char *in,
                                         int *inlen);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        htmlEncodeEntities(unsigned char *out,
                                         int *outlen,
                                         const unsigned char *in,
                                         int *inlen, int quoteChar);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        htmlIsScriptAttribute(const xmlChar *name);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        htmlHandleOmittedElem(int val);
 
 #ifdef LIBXML_PUSH_ENABLED
 /**
  * Interfaces for the Push mode.
  */
-XMLPUBFUN htmlParserCtxtPtr XMLCALL    
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
                        htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
                                                 void *user_data,
                                                 const char *chunk,
                                                 int size,
                                                 const char *filename,
                                                 xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        htmlParseChunk          (htmlParserCtxtPtr ctxt,
                                                 const char *chunk,
                                                 int size,
                                                 int terminate);
 #endif /* LIBXML_PUSH_ENABLED */
 
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        htmlFreeParserCtxt      (htmlParserCtxtPtr ctxt);
 
 /*
index 6ea8207..c0e1103 100644 (file)
@@ -62,78 +62,78 @@ extern "C" {
 XMLPUBFUN htmlDocPtr XMLCALL
                htmlNewDoc              (const xmlChar *URI,
                                         const xmlChar *ExternalID);
-XMLPUBFUN htmlDocPtr XMLCALL   
+XMLPUBFUN htmlDocPtr XMLCALL
                htmlNewDocNoDtD         (const xmlChar *URI,
                                         const xmlChar *ExternalID);
-XMLPUBFUN const xmlChar * XMLCALL      
+XMLPUBFUN const xmlChar * XMLCALL
                htmlGetMetaEncoding     (htmlDocPtr doc);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                htmlSetMetaEncoding     (htmlDocPtr doc,
                                         const xmlChar *encoding);
 #ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL     
+XMLPUBFUN void XMLCALL
                htmlDocDumpMemory       (xmlDocPtr cur,
                                         xmlChar **mem,
                                         int *size);
-XMLPUBFUN void XMLCALL     
+XMLPUBFUN void XMLCALL
                htmlDocDumpMemoryFormat (xmlDocPtr cur,
                                         xmlChar **mem,
                                         int *size,
                                         int format);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                htmlDocDump             (FILE *f,
                                         xmlDocPtr cur);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                htmlSaveFile            (const char *filename,
                                         xmlDocPtr cur);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                htmlNodeDump            (xmlBufferPtr buf,
                                         xmlDocPtr doc,
                                         xmlNodePtr cur);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                htmlNodeDumpFile        (FILE *out,
                                         xmlDocPtr doc,
                                         xmlNodePtr cur);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                htmlNodeDumpFileFormat  (FILE *out,
                                         xmlDocPtr doc,
                                         xmlNodePtr cur,
                                         const char *encoding,
                                         int format);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                htmlSaveFileEnc         (const char *filename,
                                         xmlDocPtr cur,
                                         const char *encoding);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                htmlSaveFileFormat      (const char *filename,
                                         xmlDocPtr cur,
                                         const char *encoding,
                                         int format);
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
                                         xmlDocPtr doc,
                                         xmlNodePtr cur,
                                         const char *encoding,
                                         int format);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
                                         xmlDocPtr cur,
                                         const char *encoding);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
                                         xmlDocPtr cur,
                                         const char *encoding,
                                         int format);
-XMLPUBFUN void XMLCALL 
-               htmlNodeDumpOutput      (xmlOutputBufferPtr buf, 
+XMLPUBFUN void XMLCALL
+               htmlNodeDumpOutput      (xmlOutputBufferPtr buf,
                                         xmlDocPtr doc,
-                                        xmlNodePtr cur, 
+                                        xmlNodePtr cur,
                                         const char *encoding);
 
 #endif /* LIBXML_OUTPUT_ENABLED */
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                htmlIsBooleanAttr       (const xmlChar *name);
 
 
index a45d8ca..4ee1ab0 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -48,14 +65,19 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES = xmlversion.h
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+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_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 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/||"`;; \
@@ -77,6 +99,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 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)
 ETAGS = etags
@@ -86,7 +114,6 @@ ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
-AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -123,6 +150,7 @@ 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@
@@ -178,7 +206,6 @@ RANLIB = @RANLIB@
 RDL_LIBS = @RDL_LIBS@
 READER_TEST = @READER_TEST@
 RELDATE = @RELDATE@
-RM = @RM@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -203,7 +230,6 @@ TEST_VTIME = @TEST_VTIME@
 TEST_XINCLUDE = @TEST_XINCLUDE@
 TEST_XPATH = @TEST_XPATH@
 TEST_XPTR = @TEST_XPTR@
-THREADS_W32 = @THREADS_W32@
 THREAD_CFLAGS = @THREAD_CFLAGS@
 THREAD_LIBS = @THREAD_LIBS@
 VERSION = @VERSION@
@@ -236,6 +262,7 @@ 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@
@@ -403,8 +430,11 @@ clean-libtool:
        -rm -rf .libs _libs
 install-xmlincHEADERS: $(xmlinc_HEADERS)
        @$(NORMAL_INSTALL)
-       test -z "$(xmlincdir)" || $(MKDIR_P) "$(DESTDIR)$(xmlincdir)"
        @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"; \
@@ -418,9 +448,7 @@ uninstall-xmlincHEADERS:
        @$(NORMAL_UNINSTALL)
        @list='$(xmlinc_HEADERS)'; test -n "$(xmlincdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(xmlincdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(xmlincdir)" && rm -f $$files
+       dir='$(DESTDIR)$(xmlincdir)'; $(am__uninstall_files_from_dir)
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -521,10 +549,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       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:
index 0ca161b..20093ce 100644 (file)
@@ -25,53 +25,53 @@ extern "C" {
 #endif
 XMLPUBFUN const xmlChar * XMLCALL
                getPublicId                     (void *ctx);
-XMLPUBFUN const xmlChar * XMLCALL      
+XMLPUBFUN const xmlChar * XMLCALL
                getSystemId                     (void *ctx);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                setDocumentLocator              (void *ctx,
                                                 xmlSAXLocatorPtr loc);
-    
-XMLPUBFUN int XMLCALL          
+
+XMLPUBFUN int XMLCALL
                getLineNumber                   (void *ctx);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                getColumnNumber                 (void *ctx);
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                isStandalone                    (void *ctx);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                hasInternalSubset               (void *ctx);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                hasExternalSubset               (void *ctx);
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                internalSubset                  (void *ctx,
                                                 const xmlChar *name,
                                                 const xmlChar *ExternalID,
                                                 const xmlChar *SystemID);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                externalSubset                  (void *ctx,
                                                 const xmlChar *name,
                                                 const xmlChar *ExternalID,
                                                 const xmlChar *SystemID);
-XMLPUBFUN xmlEntityPtr XMLCALL 
+XMLPUBFUN xmlEntityPtr XMLCALL
                getEntity                       (void *ctx,
                                                 const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL 
+XMLPUBFUN xmlEntityPtr XMLCALL
                getParameterEntity              (void *ctx,
                                                 const xmlChar *name);
-XMLPUBFUN xmlParserInputPtr XMLCALL 
+XMLPUBFUN xmlParserInputPtr XMLCALL
                resolveEntity                   (void *ctx,
                                                 const xmlChar *publicId,
                                                 const xmlChar *systemId);
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                entityDecl                      (void *ctx,
                                                 const xmlChar *name,
                                                 int type,
                                                 const xmlChar *publicId,
                                                 const xmlChar *systemId,
                                                 xmlChar *content);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                attributeDecl                   (void *ctx,
                                                 const xmlChar *elem,
                                                 const xmlChar *fullname,
@@ -79,87 +79,87 @@ XMLPUBFUN void XMLCALL
                                                 int def,
                                                 const xmlChar *defaultValue,
                                                 xmlEnumerationPtr tree);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                elementDecl                     (void *ctx,
                                                 const xmlChar *name,
                                                 int type,
                                                 xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                notationDecl                    (void *ctx,
                                                 const xmlChar *name,
                                                 const xmlChar *publicId,
                                                 const xmlChar *systemId);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                unparsedEntityDecl              (void *ctx,
                                                 const xmlChar *name,
                                                 const xmlChar *publicId,
                                                 const xmlChar *systemId,
                                                 const xmlChar *notationName);
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                startDocument                   (void *ctx);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                endDocument                     (void *ctx);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                attribute                       (void *ctx,
                                                 const xmlChar *fullname,
                                                 const xmlChar *value);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                startElement                    (void *ctx,
                                                 const xmlChar *fullname,
                                                 const xmlChar **atts);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                endElement                      (void *ctx,
                                                 const xmlChar *name);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                reference                       (void *ctx,
                                                 const xmlChar *name);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                characters                      (void *ctx,
                                                 const xmlChar *ch,
                                                 int len);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                ignorableWhitespace             (void *ctx,
                                                 const xmlChar *ch,
                                                 int len);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                processingInstruction           (void *ctx,
                                                 const xmlChar *target,
                                                 const xmlChar *data);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                globalNamespace                 (void *ctx,
                                                 const xmlChar *href,
                                                 const xmlChar *prefix);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                setNamespace                    (void *ctx,
                                                 const xmlChar *name);
-XMLPUBFUN xmlNsPtr XMLCALL     
+XMLPUBFUN xmlNsPtr XMLCALL
                getNamespace                    (void *ctx);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                checkNamespace                  (void *ctx,
                                                 xmlChar *nameSpace);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                namespaceDecl                   (void *ctx,
                                                 const xmlChar *href,
                                                 const xmlChar *prefix);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                comment                         (void *ctx,
                                                 const xmlChar *value);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                cdataBlock                      (void *ctx,
                                                 const xmlChar *value,
                                                 int len);
 
 #ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                initxmlDefaultSAXHandler        (xmlSAXHandlerV1 *hdlr,
                                                 int warning);
 #ifdef LIBXML_HTML_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                inithtmlDefaultSAXHandler       (xmlSAXHandlerV1 *hdlr);
 #endif
 #ifdef LIBXML_DOCB_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                initdocbDefaultSAXHandler       (xmlSAXHandlerV1 *hdlr);
 #endif
 #endif /* LIBXML_SAX1_ENABLED */
index 8d2db02..daafd17 100644 (file)
@@ -23,53 +23,53 @@ extern "C" {
 #endif
 XMLPUBFUN const xmlChar * XMLCALL
                xmlSAX2GetPublicId              (void *ctx);
-XMLPUBFUN const xmlChar * XMLCALL      
+XMLPUBFUN const xmlChar * XMLCALL
                xmlSAX2GetSystemId              (void *ctx);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2SetDocumentLocator       (void *ctx,
                                                 xmlSAXLocatorPtr loc);
-    
-XMLPUBFUN int XMLCALL          
+
+XMLPUBFUN int XMLCALL
                xmlSAX2GetLineNumber            (void *ctx);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSAX2GetColumnNumber          (void *ctx);
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSAX2IsStandalone             (void *ctx);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSAX2HasInternalSubset        (void *ctx);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSAX2HasExternalSubset        (void *ctx);
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2InternalSubset           (void *ctx,
                                                 const xmlChar *name,
                                                 const xmlChar *ExternalID,
                                                 const xmlChar *SystemID);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2ExternalSubset           (void *ctx,
                                                 const xmlChar *name,
                                                 const xmlChar *ExternalID,
                                                 const xmlChar *SystemID);
-XMLPUBFUN xmlEntityPtr XMLCALL 
+XMLPUBFUN xmlEntityPtr XMLCALL
                xmlSAX2GetEntity                (void *ctx,
                                                 const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL 
+XMLPUBFUN xmlEntityPtr XMLCALL
                xmlSAX2GetParameterEntity       (void *ctx,
                                                 const xmlChar *name);
-XMLPUBFUN xmlParserInputPtr XMLCALL 
+XMLPUBFUN xmlParserInputPtr XMLCALL
                xmlSAX2ResolveEntity            (void *ctx,
                                                 const xmlChar *publicId,
                                                 const xmlChar *systemId);
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2EntityDecl               (void *ctx,
                                                 const xmlChar *name,
                                                 int type,
                                                 const xmlChar *publicId,
                                                 const xmlChar *systemId,
                                                 xmlChar *content);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2AttributeDecl            (void *ctx,
                                                 const xmlChar *elem,
                                                 const xmlChar *fullname,
@@ -77,33 +77,33 @@ XMLPUBFUN void XMLCALL
                                                 int def,
                                                 const xmlChar *defaultValue,
                                                 xmlEnumerationPtr tree);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2ElementDecl              (void *ctx,
                                                 const xmlChar *name,
                                                 int type,
                                                 xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2NotationDecl             (void *ctx,
                                                 const xmlChar *name,
                                                 const xmlChar *publicId,
                                                 const xmlChar *systemId);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2UnparsedEntityDecl       (void *ctx,
                                                 const xmlChar *name,
                                                 const xmlChar *publicId,
                                                 const xmlChar *systemId,
                                                 const xmlChar *notationName);
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2StartDocument            (void *ctx);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2EndDocument              (void *ctx);
 #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2StartElement             (void *ctx,
                                                 const xmlChar *fullname,
                                                 const xmlChar **atts);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2EndElement               (void *ctx,
                                                 const xmlChar *name);
 #endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED */
@@ -122,25 +122,25 @@ XMLPUBFUN void XMLCALL
                                                 const xmlChar *localname,
                                                 const xmlChar *prefix,
                                                 const xmlChar *URI);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2Reference                (void *ctx,
                                                 const xmlChar *name);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2Characters               (void *ctx,
                                                 const xmlChar *ch,
                                                 int len);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2IgnorableWhitespace      (void *ctx,
                                                 const xmlChar *ch,
                                                 int len);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2ProcessingInstruction    (void *ctx,
                                                 const xmlChar *target,
                                                 const xmlChar *data);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2Comment                  (void *ctx,
                                                 const xmlChar *value);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2CDataBlock               (void *ctx,
                                                 const xmlChar *value,
                                                 int len);
@@ -153,22 +153,22 @@ XMLPUBFUN int XMLCALL
 XMLPUBFUN int XMLCALL
                xmlSAXVersion                   (xmlSAXHandler *hdlr,
                                                 int version);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2InitDefaultSAXHandler    (xmlSAXHandler *hdlr,
                                                 int warning);
 #ifdef LIBXML_HTML_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                htmlDefaultSAXHandlerInit       (void);
 #endif
 #ifdef LIBXML_DOCB_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                docbDefaultSAXHandlerInit       (void);
 #endif
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlDefaultSAXHandlerInit        (void);
 #ifdef __cplusplus
 }
index 3011af7..b8971d9 100644 (file)
@@ -54,7 +54,7 @@ extern "C" {
 
 /*
  * xmlC14NMode:
- * 
+ *
  * Predefined values for C14N modes
  *
  */
index b444137..5a13f51 100644 (file)
@@ -68,111 +68,111 @@ typedef xmlCatalog *xmlCatalogPtr;
  */
 XMLPUBFUN xmlCatalogPtr XMLCALL
                xmlNewCatalog           (int sgml);
-XMLPUBFUN xmlCatalogPtr XMLCALL        
+XMLPUBFUN xmlCatalogPtr XMLCALL
                xmlLoadACatalog         (const char *filename);
-XMLPUBFUN xmlCatalogPtr XMLCALL        
+XMLPUBFUN xmlCatalogPtr XMLCALL
                xmlLoadSGMLSuperCatalog (const char *filename);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlConvertSGMLCatalog   (xmlCatalogPtr catal);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlACatalogAdd          (xmlCatalogPtr catal,
                                         const xmlChar *type,
                                         const xmlChar *orig,
                                         const xmlChar *replace);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlACatalogRemove       (xmlCatalogPtr catal,
                                         const xmlChar *value);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlACatalogResolve      (xmlCatalogPtr catal,
                                         const xmlChar *pubID,
                                         const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlACatalogResolveSystem(xmlCatalogPtr catal,
                                         const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlACatalogResolvePublic(xmlCatalogPtr catal,
                                         const xmlChar *pubID);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlACatalogResolveURI   (xmlCatalogPtr catal,
                                         const xmlChar *URI);
 #ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlACatalogDump         (xmlCatalogPtr catal,
                                         FILE *out);
 #endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeCatalog          (xmlCatalogPtr catal);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlCatalogIsEmpty       (xmlCatalogPtr catal);
 
 /*
  * Global operations.
  */
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlInitializeCatalog    (void);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlLoadCatalog          (const char *filename);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlLoadCatalogs         (const char *paths);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlCatalogCleanup       (void);
 #ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlCatalogDump          (FILE *out);
 #endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlCatalogResolve       (const xmlChar *pubID,
                                         const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlCatalogResolveSystem (const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlCatalogResolvePublic (const xmlChar *pubID);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlCatalogResolveURI    (const xmlChar *URI);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlCatalogAdd           (const xmlChar *type,
                                         const xmlChar *orig,
                                         const xmlChar *replace);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlCatalogRemove        (const xmlChar *value);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlParseCatalogFile     (const char *filename);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlCatalogConvert       (void);
 
 /*
  * Strictly minimal interfaces for per-document catalogs used
  * by the parser.
  */
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlCatalogFreeLocal     (void *catalogs);
-XMLPUBFUN void * XMLCALL               
+XMLPUBFUN void * XMLCALL
                xmlCatalogAddLocal      (void *catalogs,
                                         const xmlChar *URL);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlCatalogLocalResolve  (void *catalogs,
                                         const xmlChar *pubID,
                                         const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlCatalogLocalResolveURI(void *catalogs,
                                         const xmlChar *URI);
 /*
  * Preference settings.
  */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlCatalogSetDebug      (int level);
-XMLPUBFUN xmlCatalogPrefer XMLCALL 
+XMLPUBFUN xmlCatalogPrefer XMLCALL
                xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlCatalogSetDefaults   (xmlCatalogAllow allow);
-XMLPUBFUN xmlCatalogAllow XMLCALL      
+XMLPUBFUN xmlCatalogAllow XMLCALL
                xmlCatalogGetDefaults   (void);
 
 
 /* DEPRECATED interfaces */
-XMLPUBFUN const xmlChar * XMLCALL      
+XMLPUBFUN const xmlChar * XMLCALL
                xmlCatalogGetSystem     (const xmlChar *sysID);
-XMLPUBFUN const xmlChar * XMLCALL      
+XMLPUBFUN const xmlChar * XMLCALL
                xmlCatalogGetPublic     (const xmlChar *pubID);
 
 #ifdef __cplusplus
index 5a9d20b..5b3be13 100644 (file)
@@ -25,18 +25,18 @@ extern "C" {
 /*
  * The standard Dump routines.
  */
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlDebugDumpString      (FILE *output,
                                 const xmlChar *str);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlDebugDumpAttr        (FILE *output,
                                 xmlAttrPtr attr,
                                 int depth);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlDebugDumpAttrList    (FILE *output,
                                 xmlAttrPtr attr,
                                 int depth);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlDebugDumpOneNode     (FILE *output,
                                 xmlNodePtr node,
                                 int depth);
@@ -54,16 +54,16 @@ XMLPUBFUN void XMLCALL
 XMLPUBFUN void XMLCALL
        xmlDebugDumpDocument    (FILE *output,
                                 xmlDocPtr doc);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlDebugDumpDTD         (FILE *output,
                                 xmlDtdPtr dtd);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlDebugDumpEntities    (FILE *output,
                                 xmlDocPtr doc);
 
 /****************************************************************
  *                                                             *
- *                     Checking routines                       *
+ *                     Checking routines                       *
  *                                                             *
  ****************************************************************/
 
@@ -73,16 +73,16 @@ XMLPUBFUN int XMLCALL
 
 /****************************************************************
  *                                                             *
- *                     XML shell helpers                       *
+ *                     XML shell helpers                       *
  *                                                             *
  ****************************************************************/
 
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlLsOneNode            (FILE *output, xmlNodePtr node);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlLsCountNode          (xmlNodePtr node);
 
-XMLPUBFUN const char * XMLCALL 
+XMLPUBFUN const char * XMLCALL
        xmlBoolToText           (int boolval);
 
 /****************************************************************
@@ -136,63 +136,63 @@ typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
                             xmlNodePtr node,
                             xmlNodePtr node2);
 
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlShellPrintXPathError (int errorType,
                                 const char *arg);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlShellPrintXPathResult(xmlXPathObjectPtr list);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlShellList            (xmlShellCtxtPtr ctxt,
                                 char *arg,
                                 xmlNodePtr node,
                                 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlShellBase            (xmlShellCtxtPtr ctxt,
                                 char *arg,
                                 xmlNodePtr node,
                                 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlShellDir             (xmlShellCtxtPtr ctxt,
                                 char *arg,
                                 xmlNodePtr node,
                                 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlShellLoad            (xmlShellCtxtPtr ctxt,
                                 char *filename,
                                 xmlNodePtr node,
                                 xmlNodePtr node2);
 #ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlShellPrintNode       (xmlNodePtr node);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlShellCat             (xmlShellCtxtPtr ctxt,
                                 char *arg,
                                 xmlNodePtr node,
                                 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlShellWrite           (xmlShellCtxtPtr ctxt,
                                 char *filename,
                                 xmlNodePtr node,
                                 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlShellSave            (xmlShellCtxtPtr ctxt,
                                 char *filename,
                                 xmlNodePtr node,
                                 xmlNodePtr node2);
 #endif /* LIBXML_OUTPUT_ENABLED */
 #ifdef LIBXML_VALID_ENABLED
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlShellValidate        (xmlShellCtxtPtr ctxt,
                                 char *dtd,
                                 xmlNodePtr node,
                                 xmlNodePtr node2);
 #endif /* LIBXML_VALID_ENABLED */
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlShellDu              (xmlShellCtxtPtr ctxt,
                                 char *arg,
                                 xmlNodePtr tree,
                                 xmlNodePtr node2);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlShellPwd             (xmlShellCtxtPtr ctxt,
                                 char *buffer,
                                 xmlNodePtr node,
@@ -201,12 +201,12 @@ XMLPUBFUN int XMLCALL
 /*
  * The Shell interface.
  */
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlShell                (xmlDocPtr doc,
                                 char *filename,
                                 xmlShellReadlineFunc input,
                                 FILE *output);
-                        
+
 #endif /* LIBXML_XPATH_ENABLED */
 
 #ifdef __cplusplus
index 5994868..7022ec8 100644 (file)
@@ -11,6 +11,7 @@
 #ifndef __XML_DICT_H__
 #define __XML_DICT_H__
 
+#include <limits.h>
 #include <libxml/xmlversion.h>
 #include <libxml/tree.h>
 
@@ -34,6 +35,11 @@ XMLPUBFUN int XMLCALL  xmlInitializeDict(void);
  */
 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
index 3a3b9b2..7967cc6 100644 (file)
@@ -163,32 +163,32 @@ extern "C" {
 /*
  * Interfaces for encoding handlers.
  */
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlInitCharEncodingHandlers     (void);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlCleanupCharEncodingHandlers  (void);
-XMLPUBFUN void XMLCALL 
+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);
+       xmlNewCharEncodingHandler       (const char *name,
+                                        xmlCharEncodingInputFunc input,
+                                        xmlCharEncodingOutputFunc output);
 
 /*
  * Interfaces for encoding names and aliases.
  */
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlAddEncodingAlias             (const char *name,
                                         const char *alias);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlDelEncodingAlias             (const char *alias);
 XMLPUBFUN const char * XMLCALL
        xmlGetEncodingAlias             (const char *alias);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlCleanupEncodingAliases       (void);
 XMLPUBFUN xmlCharEncoding XMLCALL
        xmlParseCharEncoding            (const char *name);
@@ -202,12 +202,12 @@ XMLPUBFUN xmlCharEncoding XMLCALL
        xmlDetectCharEncoding           (const unsigned char *in,
                                         int len);
 
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlCharEncOutFunc               (xmlCharEncodingHandler *handler,
                                         xmlBufferPtr out,
                                         xmlBufferPtr in);
 
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlCharEncInFunc                (xmlCharEncodingHandler *handler,
                                         xmlBufferPtr out,
                                         xmlBufferPtr in);
@@ -215,20 +215,20 @@ XMLPUBFUN int XMLCALL
        xmlCharEncFirstLine             (xmlCharEncodingHandler *handler,
                                         xmlBufferPtr out,
                                         xmlBufferPtr in);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlCharEncCloseFunc             (xmlCharEncodingHandler *handler);
 
 /*
  * Export a few useful functions
  */
 #ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        UTF8Toisolat1                   (unsigned char *out,
                                         int *outlen,
                                         const unsigned char *in,
                                         int *inlen);
 #endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        isolat1ToUTF8                   (unsigned char *out,
                                         int *outlen,
                                         const unsigned char *in,
index cefb97f..1e91189 100644 (file)
@@ -58,7 +58,8 @@ struct _xmlEntity {
     int                    owner;      /* does the entity own the childrens */
     int                         checked;       /* was the entity content checked */
                                        /* this is also used to count entites
-                                        * references done from that entity */
+                                        * references done from that entity
+                                        * and if it contains '<' */
 };
 
 /*
index 7fe4be7..dc8ab7e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Summary: Chained hash tables
- * Description: This module implements the hash table support used in 
- *             various places in the library.
+ * Description: This module implements the hash table support used in
+ *             various places in the library.
  *
  * Copy: See Copyright for the status of this software.
  *
@@ -108,40 +108,40 @@ XMLPUBFUN xmlHashTablePtr XMLCALL
 XMLPUBFUN xmlHashTablePtr XMLCALL
                        xmlHashCreateDict(int size,
                                         xmlDictPtr dict);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlHashFree     (xmlHashTablePtr table,
                                         xmlHashDeallocator f);
 
 /*
  * Add a new entry to the hash table.
  */
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlHashAddEntry (xmlHashTablePtr table,
                                         const xmlChar *name,
                                         void *userdata);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlHashUpdateEntry(xmlHashTablePtr table,
                                         const xmlChar *name,
                                         void *userdata,
                                         xmlHashDeallocator f);
-XMLPUBFUN int XMLCALL              
+XMLPUBFUN int XMLCALL
                        xmlHashAddEntry2(xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *name2,
                                         void *userdata);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlHashUpdateEntry2(xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *name2,
                                         void *userdata,
                                         xmlHashDeallocator f);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlHashAddEntry3(xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *name2,
                                         const xmlChar *name3,
                                         void *userdata);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlHashUpdateEntry3(xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *name2,
@@ -152,13 +152,13 @@ XMLPUBFUN int XMLCALL
 /*
  * Remove an entry from the hash table.
  */
-XMLPUBFUN int XMLCALL     
+XMLPUBFUN int XMLCALL
                        xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
                            xmlHashDeallocator f);
-XMLPUBFUN int XMLCALL     
+XMLPUBFUN int XMLCALL
                        xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
                             const xmlChar *name2, xmlHashDeallocator f);
-XMLPUBFUN int  XMLCALL    
+XMLPUBFUN int  XMLCALL
                        xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
                             const xmlChar *name2, const xmlChar *name3,
                             xmlHashDeallocator f);
@@ -166,29 +166,29 @@ XMLPUBFUN int  XMLCALL
 /*
  * Retrieve the userdata.
  */
-XMLPUBFUN void * XMLCALL                       
+XMLPUBFUN void * XMLCALL
                        xmlHashLookup   (xmlHashTablePtr table,
                                         const xmlChar *name);
-XMLPUBFUN void * XMLCALL                       
+XMLPUBFUN void * XMLCALL
                        xmlHashLookup2  (xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *name2);
-XMLPUBFUN void * XMLCALL                       
+XMLPUBFUN void * XMLCALL
                        xmlHashLookup3  (xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *name2,
                                         const xmlChar *name3);
-XMLPUBFUN void * XMLCALL                       
+XMLPUBFUN void * XMLCALL
                        xmlHashQLookup  (xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *prefix);
-XMLPUBFUN void * XMLCALL                       
+XMLPUBFUN void * XMLCALL
                        xmlHashQLookup2 (xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *prefix,
                                         const xmlChar *name2,
                                         const xmlChar *prefix2);
-XMLPUBFUN void * XMLCALL                       
+XMLPUBFUN void * XMLCALL
                        xmlHashQLookup3 (xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *prefix,
@@ -200,27 +200,27 @@ XMLPUBFUN void * XMLCALL
 /*
  * Helpers.
  */
-XMLPUBFUN xmlHashTablePtr XMLCALL              
+XMLPUBFUN xmlHashTablePtr XMLCALL
                        xmlHashCopy     (xmlHashTablePtr table,
                                         xmlHashCopier f);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlHashSize     (xmlHashTablePtr table);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlHashScan     (xmlHashTablePtr table,
                                         xmlHashScanner f,
                                         void *data);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlHashScan3    (xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *name2,
                                         const xmlChar *name3,
                                         xmlHashScanner f,
                                         void *data);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlHashScanFull (xmlHashTablePtr table,
                                         xmlHashScannerFull f,
                                         void *data);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlHashScanFull3(xmlHashTablePtr table,
                                         const xmlChar *name,
                                         const xmlChar *name2,
index 1d83482..0504e0c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Summary: lists interfaces
- * Description: this module implement the list support used in 
+ * Description: this module implement the list support used in
  * various place in the library.
  *
  * Copy: See Copyright for the status of this software.
@@ -55,76 +55,76 @@ typedef int (*xmlListWalker) (const void *data, const void *user);
 XMLPUBFUN xmlListPtr XMLCALL
                xmlListCreate           (xmlListDeallocator deallocator,
                                         xmlListDataCompare compare);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlListDelete           (xmlListPtr l);
 
 /* Basic Operators */
-XMLPUBFUN void * XMLCALL               
+XMLPUBFUN void * XMLCALL
                xmlListSearch           (xmlListPtr l,
                                         void *data);
-XMLPUBFUN void * XMLCALL               
+XMLPUBFUN void * XMLCALL
                xmlListReverseSearch    (xmlListPtr l,
                                         void *data);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlListInsert           (xmlListPtr l,
                                         void *data) ;
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlListAppend           (xmlListPtr l,
                                         void *data) ;
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlListRemoveFirst      (xmlListPtr l,
                                         void *data);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlListRemoveLast       (xmlListPtr l,
                                         void *data);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlListRemoveAll        (xmlListPtr l,
                                         void *data);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlListClear            (xmlListPtr l);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlListEmpty            (xmlListPtr l);
-XMLPUBFUN xmlLinkPtr XMLCALL   
+XMLPUBFUN xmlLinkPtr XMLCALL
                xmlListFront            (xmlListPtr l);
-XMLPUBFUN xmlLinkPtr XMLCALL   
+XMLPUBFUN xmlLinkPtr XMLCALL
                xmlListEnd              (xmlListPtr l);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlListSize             (xmlListPtr l);
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlListPopFront         (xmlListPtr l);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlListPopBack          (xmlListPtr l);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlListPushFront        (xmlListPtr l,
                                         void *data);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlListPushBack         (xmlListPtr l,
                                         void *data);
 
 /* Advanced Operators */
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlListReverse          (xmlListPtr l);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlListSort             (xmlListPtr l);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlListWalk             (xmlListPtr l,
                                         xmlListWalker walker,
                                         const void *user);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlListReverseWalk      (xmlListPtr l,
                                         xmlListWalker walker,
                                         const void *user);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlListMerge            (xmlListPtr l1,
                                         xmlListPtr l2);
-XMLPUBFUN xmlListPtr XMLCALL   
+XMLPUBFUN xmlListPtr XMLCALL
                xmlListDup              (const xmlListPtr old);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlListCopy             (xmlListPtr cur,
                                         const xmlListPtr old);
 /* Link operators */
-XMLPUBFUN void * XMLCALL          
+XMLPUBFUN void * XMLCALL
                xmlLinkGetData          (xmlLinkPtr lk);
 
 /* xmlListUnique() */
index 397bbba..abb4bf7 100644 (file)
@@ -31,6 +31,7 @@
  * 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
 
index 1d8ac24..22b8fb4 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Author: Daniel Veillard
  */
+
 #ifndef __NANO_HTTP_H__
 #define __NANO_HTTP_H__
 
@@ -20,22 +20,22 @@ extern "C" {
 #endif
 XMLPUBFUN void XMLCALL
        xmlNanoHTTPInit         (void);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlNanoHTTPCleanup      (void);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlNanoHTTPScanProxy    (const char *URL);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlNanoHTTPFetch        (const char *URL,
                                 const char *filename,
                                 char **contentType);
-XMLPUBFUN void * XMLCALL       
+XMLPUBFUN void * XMLCALL
        xmlNanoHTTPMethod       (const char *URL,
                                 const char *method,
                                 const char *input,
                                 char **contentType,
                                 const char *headers,
                                 int   ilen);
-XMLPUBFUN void * XMLCALL       
+XMLPUBFUN void * XMLCALL
        xmlNanoHTTPMethodRedir  (const char *URL,
                                 const char *method,
                                 const char *input,
@@ -43,16 +43,16 @@ XMLPUBFUN void * XMLCALL
                                 char **redir,
                                 const char *headers,
                                 int   ilen);
-XMLPUBFUN void * XMLCALL       
+XMLPUBFUN void * XMLCALL
        xmlNanoHTTPOpen         (const char *URL,
                                 char **contentType);
-XMLPUBFUN void * XMLCALL       
+XMLPUBFUN void * XMLCALL
        xmlNanoHTTPOpenRedir    (const char *URL,
                                 char **contentType,
                                 char **redir);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlNanoHTTPReturnCode   (void *ctx);
-XMLPUBFUN const char * XMLCALL 
+XMLPUBFUN const char * XMLCALL
        xmlNanoHTTPAuthHeader   (void *ctx);
 XMLPUBFUN const char * XMLCALL
        xmlNanoHTTPRedir        (void *ctx);
@@ -62,16 +62,16 @@ XMLPUBFUN const char * XMLCALL
        xmlNanoHTTPEncoding     (void *ctx);
 XMLPUBFUN const char * XMLCALL
        xmlNanoHTTPMimeType     (void *ctx);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlNanoHTTPRead         (void *ctx,
                                 void *dest,
                                 int len);
 #ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlNanoHTTPSave         (void *ctxt,
                                 const char *filename);
 #endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlNanoHTTPClose        (void *ctx);
 #ifdef __cplusplus
 }
index 04edb9d..3f5730d 100644 (file)
@@ -80,7 +80,7 @@ struct _xmlParserInput {
  * xmlParserNodeInfo:
  *
  * The parser can be asked to collect Node informations, i.e. at what
- * place in the file they were detected. 
+ * place in the file they were detected.
  * NOTE: This is off by default and not very well tested.
  */
 typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
@@ -125,9 +125,9 @@ typedef enum {
     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_EPILOG,         /* the Misc* after the last end tag */
     XML_PARSER_IGNORE,         /* within an IGNORED section */
-    XML_PARSER_PUBLIC_LITERAL  /* within a PUBLIC value */
+    XML_PARSER_PUBLIC_LITERAL  /* within a PUBLIC value */
 } xmlParserInputState;
 
 /**
@@ -221,7 +221,7 @@ struct _xmlParserCtxt {
     xmlValidCtxt        vctxt;        /* The validity context */
 
     xmlParserInputState instate;      /* current type of input */
-    int                 token;        /* next char look-ahead */    
+    int                 token;        /* next char look-ahead */
 
     char           *directory;        /* the data directory */
 
@@ -310,6 +310,7 @@ struct _xmlParserCtxt {
     xmlParserNodeInfo *nodeInfoTab;   /* array of nodeInfos */
 
     int                input_id;      /* we need to label inputs */
+    unsigned long      sizeentcopy;   /* volume of entity copy */
 };
 
 /**
@@ -400,8 +401,8 @@ typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
 /**
  * entityDeclSAXFunc:
  * @ctx:  the user data (XML parser context)
- * @name:  the entity name 
- * @type:  the entity type 
+ * @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).
@@ -431,8 +432,8 @@ typedef void (*notationDeclSAXFunc)(void *ctx,
  * attributeDeclSAXFunc:
  * @ctx:  the user data (XML parser context)
  * @elem:  the name of the element
- * @fullname:  the attribute name 
- * @type:  the attribute type 
+ * @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
@@ -449,8 +450,8 @@ typedef void (*attributeDeclSAXFunc)(void *ctx,
 /**
  * elementDeclSAXFunc:
  * @ctx:  the user data (XML parser context)
- * @name:  the element name 
- * @type:  the element type 
+ * @name:  the element name
+ * @type:  the element type
  * @content: the element value tree
  *
  * An element definition has been parsed.
@@ -537,7 +538,7 @@ typedef void (*attributeSAXFunc) (void *ctx,
  * @ctx:  the user data (XML parser context)
  * @name:  The entity name
  *
- * Called when an entity reference is detected. 
+ * Called when an entity reference is detected.
  */
 typedef void (*referenceSAXFunc) (void *ctx,
                                const xmlChar *name);
@@ -601,7 +602,7 @@ typedef void (*cdataBlockSAXFunc) (
  * @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,
@@ -611,7 +612,7 @@ typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
  * @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,
@@ -621,7 +622,7 @@ typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
  * @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.
@@ -697,7 +698,7 @@ typedef void (*startElementNsSAX2Func) (void *ctx,
                                        int nb_attributes,
                                        int nb_defaulted,
                                        const xmlChar **attributes);
+
 /**
  * endElementNsSAX2Func:
  * @ctx:  the user data (XML parser context)
@@ -792,7 +793,7 @@ struct _xmlSAXHandlerV1 {
  * xmlExternalEntityLoader:
  * @URL: The System ID of the resource requested
  * @ID: The Public ID of the resource requested
- * @context: the XML parser context 
+ * @context: the XML parser context
  *
  * External entity loaders types.
  *
@@ -818,18 +819,18 @@ extern "C" {
 /*
  * Init/Cleanup
  */
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlInitParser           (void);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlCleanupParser        (void);
 
 /*
  * Input functions
  */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlParserInputRead      (xmlParserInputPtr in,
                                         int len);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlParserInputGrow      (xmlParserInputPtr in,
                                         int len);
 
@@ -837,101 +838,101 @@ XMLPUBFUN int XMLCALL
  * Basic parsing Interfaces
  */
 #ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlParseDoc             (const xmlChar *cur);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlParseFile            (const char *filename);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlParseMemory          (const char *buffer,
                                         int size);
 #endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSubstituteEntitiesDefault(int val);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlKeepBlanksDefault    (int val);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlStopParser           (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlPedanticParserDefault(int val);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlLineNumbersDefault   (int val);
 
 #ifdef LIBXML_SAX1_ENABLED
 /*
- * Recovery mode 
+ * Recovery mode
  */
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlRecoverDoc           (const xmlChar *cur);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlRecoverMemory        (const char *buffer,
                                         int size);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlRecoverFile          (const char *filename);
 #endif /* LIBXML_SAX1_ENABLED */
 
 /*
  * Less common routines and SAX interfaces
  */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlParseDocument        (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlParseExtParsedEnt    (xmlParserCtxtPtr ctxt);
 #ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSAXUserParseFile     (xmlSAXHandlerPtr sax,
                                         void *user_data,
                                         const char *filename);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSAXUserParseMemory   (xmlSAXHandlerPtr sax,
                                         void *user_data,
                                         const char *buffer,
                                         int size);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlSAXParseDoc          (xmlSAXHandlerPtr sax,
                                         const xmlChar *cur,
                                         int recovery);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlSAXParseMemory       (xmlSAXHandlerPtr sax,
                                         const char *buffer,
-                                        int size,
+                                        int size,
                                         int recovery);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
                                         const char *buffer,
-                                        int size,
+                                        int size,
                                         int recovery,
                                         void *data);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlSAXParseFile         (xmlSAXHandlerPtr sax,
                                         const char *filename,
                                         int recovery);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
                                         const char *filename,
                                         int recovery,
                                         void *data);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlSAXParseEntity       (xmlSAXHandlerPtr sax,
                                         const char *filename);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlParseEntity          (const char *filename);
 #endif /* LIBXML_SAX1_ENABLED */
 
 #ifdef LIBXML_VALID_ENABLED
-XMLPUBFUN xmlDtdPtr XMLCALL    
+XMLPUBFUN xmlDtdPtr XMLCALL
                xmlSAXParseDTD          (xmlSAXHandlerPtr sax,
                                         const xmlChar *ExternalID,
                                         const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL    
+XMLPUBFUN xmlDtdPtr XMLCALL
                xmlParseDTD             (const xmlChar *ExternalID,
                                         const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL    
+XMLPUBFUN xmlDtdPtr XMLCALL
                xmlIOParseDTD           (xmlSAXHandlerPtr sax,
                                         xmlParserInputBufferPtr input,
                                         xmlCharEncoding enc);
 #endif /* LIBXML_VALID_ENABLE */
 #ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
                xmlParseBalancedChunkMemory(xmlDocPtr doc,
                                         xmlSAXHandlerPtr sax,
                                         void *user_data,
@@ -946,7 +947,7 @@ XMLPUBFUN xmlParserErrors XMLCALL
                                         int options,
                                         xmlNodePtr *lst);
 #ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
                      xmlSAXHandlerPtr sax,
                      void *user_data,
@@ -954,7 +955,7 @@ XMLPUBFUN int XMLCALL
                      const xmlChar *string,
                      xmlNodePtr *lst,
                      int recover);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlParseExternalEntity  (xmlDocPtr doc,
                                         xmlSAXHandlerPtr sax,
                                         void *user_data,
@@ -963,7 +964,7 @@ XMLPUBFUN int XMLCALL
                                         const xmlChar *ID,
                                         xmlNodePtr *lst);
 #endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
                                         const xmlChar *URL,
                                         const xmlChar *ID,
@@ -972,35 +973,35 @@ XMLPUBFUN int XMLCALL
 /*
  * Parser contexts handling.
  */
-XMLPUBFUN xmlParserCtxtPtr XMLCALL     
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
                xmlNewParserCtxt        (void);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlInitParserCtxt       (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlClearParserCtxt      (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeParserCtxt       (xmlParserCtxtPtr ctxt);
 #ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
                                         const xmlChar* buffer,
                                         const char *filename);
 #endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN xmlParserCtxtPtr XMLCALL 
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
                xmlCreateDocParserCtxt  (const xmlChar *cur);
 
 #ifdef LIBXML_LEGACY_ENABLED
 /*
  * Reading/setting optional parsing features.
  */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlGetFeaturesList      (int *len,
                                         const char **result);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlGetFeature           (xmlParserCtxtPtr ctxt,
                                         const char *name,
                                         void *result);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSetFeature           (xmlParserCtxtPtr ctxt,
                                         const char *name,
                                         void *value);
@@ -1010,13 +1011,13 @@ XMLPUBFUN int XMLCALL
 /*
  * Interfaces for the Push mode.
  */
-XMLPUBFUN xmlParserCtxtPtr XMLCALL 
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
                xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
                                         void *user_data,
                                         const char *chunk,
                                         int size,
                                         const char *filename);
-XMLPUBFUN int XMLCALL           
+XMLPUBFUN int XMLCALL
                xmlParseChunk           (xmlParserCtxtPtr ctxt,
                                         const char *chunk,
                                         int size,
@@ -1027,7 +1028,7 @@ XMLPUBFUN int XMLCALL
  * Special I/O mode.
  */
 
-XMLPUBFUN xmlParserCtxtPtr XMLCALL 
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
                xmlCreateIOParserCtxt   (xmlSAXHandlerPtr sax,
                                         void *user_data,
                                         xmlInputReadCallback   ioread,
@@ -1035,7 +1036,7 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
                                         void *ioctx,
                                         xmlCharEncoding enc);
 
-XMLPUBFUN xmlParserInputPtr XMLCALL 
+XMLPUBFUN xmlParserInputPtr XMLCALL
                xmlNewIOInputStream     (xmlParserCtxtPtr ctxt,
                                         xmlParserInputBufferPtr input,
                                         xmlCharEncoding enc);
@@ -1046,14 +1047,14 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
 XMLPUBFUN const xmlParserNodeInfo* XMLCALL
                xmlParserFindNodeInfo   (const xmlParserCtxtPtr ctxt,
                                         const xmlNodePtr node);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlInitNodeInfoSeq      (xmlParserNodeInfoSeqPtr seq);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlClearNodeInfoSeq     (xmlParserNodeInfoSeqPtr seq);
-XMLPUBFUN unsigned long XMLCALL 
+XMLPUBFUN unsigned long XMLCALL
                xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
                                          const xmlNodePtr node);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlParserAddNodeInfo    (xmlParserCtxtPtr ctxt,
                                         const xmlParserNodeInfoPtr info);
 
@@ -1061,7 +1062,7 @@ XMLPUBFUN void XMLCALL
  * External entities handling actually implemented in xmlIO.
  */
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
 XMLPUBFUN xmlExternalEntityLoader XMLCALL
                xmlGetExternalEntityLoader(void);
@@ -1109,7 +1110,8 @@ typedef enum {
     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_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
index a5e75b5..6065320 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Summary: internals routines exported by the parser.
+ * 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.
@@ -36,10 +36,43 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
  * 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
@@ -57,7 +90,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
 
 /************************************************************************
  *                                                                     *
- * UNICODE version of the macros.                                              *
+ * UNICODE version of the macros.                                      *
  *                                                                     *
  ************************************************************************/
 /**
@@ -153,7 +186,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
  *
  * Always false (all combining chars > 0xff)
  */
-#define IS_COMBINING_CH(c) 0 
+#define IS_COMBINING_CH(c) 0
 
 /**
  * IS_EXTENDER:
@@ -194,7 +227,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
  * Macro to check the following production in the XML spec:
  *
  *
- * [84] Letter ::= BaseChar | Ideographic 
+ * [84] Letter ::= BaseChar | Ideographic
  */
 #define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
 
@@ -251,7 +284,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
  *
  * Skips the end of line chars.
  */
-#define SKIP_EOL(p)                                                    \
+#define SKIP_EOL(p)                                                    \
     if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; }                 \
     if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
 
@@ -288,25 +321,25 @@ XMLPUBFUN int XMLCALL                   xmlIsLetter     (int c);
 /**
  * Parser context.
  */
-XMLPUBFUN xmlParserCtxtPtr XMLCALL     
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
                        xmlCreateFileParserCtxt (const char *filename);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL     
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
                        xmlCreateURLParserCtxt  (const char *filename,
                                                 int options);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL     
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
                        xmlCreateMemoryParserCtxt(const char *buffer,
                                                 int size);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL     
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
                        xmlCreateEntityParserCtxt(const xmlChar *URL,
                                                 const xmlChar *ID,
                                                 const xmlChar *base);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlSwitchEncoding       (xmlParserCtxtPtr ctxt,
                                                 xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlSwitchToEncoding     (xmlParserCtxtPtr ctxt,
                                         xmlCharEncodingHandlerPtr handler);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlSwitchInputEncoding  (xmlParserCtxtPtr ctxt,
                                                 xmlParserInputPtr input,
                                         xmlCharEncodingHandlerPtr handler);
@@ -324,29 +357,29 @@ XMLPUBFUN void XMLCALL
 /**
  * Input Streams.
  */
-XMLPUBFUN xmlParserInputPtr XMLCALL    
+XMLPUBFUN xmlParserInputPtr XMLCALL
                        xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
                                                 const xmlChar *buffer);
-XMLPUBFUN xmlParserInputPtr XMLCALL    
+XMLPUBFUN xmlParserInputPtr XMLCALL
                        xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
                                                 xmlEntityPtr entity);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlPushInput            (xmlParserCtxtPtr ctxt,
                                                 xmlParserInputPtr input);
-XMLPUBFUN xmlChar XMLCALL                      
+XMLPUBFUN xmlChar XMLCALL
                        xmlPopInput             (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlFreeInputStream      (xmlParserInputPtr input);
-XMLPUBFUN xmlParserInputPtr XMLCALL    
+XMLPUBFUN xmlParserInputPtr XMLCALL
                        xmlNewInputFromFile     (xmlParserCtxtPtr ctxt,
                                                 const char *filename);
-XMLPUBFUN xmlParserInputPtr XMLCALL    
+XMLPUBFUN xmlParserInputPtr XMLCALL
                        xmlNewInputStream       (xmlParserCtxtPtr ctxt);
 
 /**
  * Namespaces.
  */
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlSplitQName           (xmlParserCtxtPtr ctxt,
                                                 const xmlChar *name,
                                                 xmlChar **prefix);
@@ -354,112 +387,112 @@ XMLPUBFUN xmlChar * XMLCALL
 /**
  * Generic production rules.
  */
-XMLPUBFUN const xmlChar * XMLCALL              
+XMLPUBFUN const xmlChar * XMLCALL
                        xmlParseName            (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlParseNmtoken         (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlParseEntityValue     (xmlParserCtxtPtr ctxt,
                                                 xmlChar **orig);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlParseAttValue        (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlParseSystemLiteral   (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlParsePubidLiteral    (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseCharData        (xmlParserCtxtPtr ctxt,
                                                 int cdata);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlParseExternalID      (xmlParserCtxtPtr ctxt,
                                                 xmlChar **publicID,
                                                 int strict);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseComment         (xmlParserCtxtPtr ctxt);
-XMLPUBFUN const xmlChar * XMLCALL              
+XMLPUBFUN const xmlChar * XMLCALL
                        xmlParsePITarget        (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParsePI              (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseNotationDecl    (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseEntityDecl      (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlParseDefaultDecl     (xmlParserCtxtPtr ctxt,
                                                 xmlChar **value);
-XMLPUBFUN xmlEnumerationPtr XMLCALL    
+XMLPUBFUN xmlEnumerationPtr XMLCALL
                        xmlParseNotationType    (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlEnumerationPtr XMLCALL    
+XMLPUBFUN xmlEnumerationPtr XMLCALL
                        xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlParseEnumeratedType  (xmlParserCtxtPtr ctxt,
                                                 xmlEnumerationPtr *tree);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlParseAttributeType   (xmlParserCtxtPtr ctxt,
                                                 xmlEnumerationPtr *tree);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlElementContentPtr XMLCALL 
+XMLPUBFUN xmlElementContentPtr XMLCALL
                        xmlParseElementMixedContentDecl
                                                (xmlParserCtxtPtr ctxt,
                                                 int inputchk);
-XMLPUBFUN xmlElementContentPtr XMLCALL 
+XMLPUBFUN xmlElementContentPtr XMLCALL
                        xmlParseElementChildrenContentDecl
                                                (xmlParserCtxtPtr ctxt,
                                                 int inputchk);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
                                                 const xmlChar *name,
                                                 xmlElementContentPtr *result);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlParseElementDecl     (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseMarkupDecl      (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlParseCharRef         (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlEntityPtr XMLCALL         
+XMLPUBFUN xmlEntityPtr XMLCALL
                        xmlParseEntityRef       (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseReference       (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParsePEReference     (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseDocTypeDecl     (xmlParserCtxtPtr ctxt);
 #ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN const xmlChar * XMLCALL              
+XMLPUBFUN const xmlChar * XMLCALL
                        xmlParseAttribute       (xmlParserCtxtPtr ctxt,
                                                 xmlChar **value);
-XMLPUBFUN const xmlChar * XMLCALL              
+XMLPUBFUN const xmlChar * XMLCALL
                        xmlParseStartTag        (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseEndTag          (xmlParserCtxtPtr ctxt);
 #endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseCDSect          (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseContent         (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseElement         (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlParseVersionNum      (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlParseVersionInfo     (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlParseEncName         (xmlParserCtxtPtr ctxt);
-XMLPUBFUN const xmlChar * XMLCALL              
+XMLPUBFUN const xmlChar * XMLCALL
                        xmlParseEncodingDecl    (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                        xmlParseSDDecl          (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseXMLDecl         (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseTextDecl        (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseMisc            (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlParseExternalSubset  (xmlParserCtxtPtr ctxt,
                                                 const xmlChar *ExternalID,
-                                                const xmlChar *SystemID); 
+                                                const xmlChar *SystemID);
 /**
  * XML_SUBSTITUTE_NONE:
  *
@@ -483,7 +516,7 @@ XMLPUBFUN void XMLCALL
  *
  * Both general and parameter entities need to be substituted.
  */
-#define XML_SUBSTITUTE_BOTH    3
+#define XML_SUBSTITUTE_BOTH    3
 
 XMLPUBFUN xmlChar * XMLCALL
                xmlStringDecodeEntities         (xmlParserCtxtPtr ctxt,
@@ -563,21 +596,21 @@ XMLPUBFUN htmlParserCtxtPtr XMLCALL       htmlCreateFileParserCtxt(const char *filenam
 typedef        void    (*xmlEntityReferenceFunc)       (xmlEntityPtr ent,
                                                 xmlNodePtr firstNode,
                                                 xmlNodePtr lastNode);
-  
+
 XMLPUBFUN void XMLCALL         xmlSetEntityReferenceFunc       (xmlEntityReferenceFunc func);
 
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlParseQuotedString    (xmlParserCtxtPtr ctxt);
 XMLPUBFUN void XMLCALL
                         xmlParseNamespace       (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlNamespaceParseNSDef  (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlScanName             (xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
 XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL            
+XMLPUBFUN xmlChar * XMLCALL
                        xmlNamespaceParseQName  (xmlParserCtxtPtr ctxt,
                                                 xmlChar **prefix);
 /**
@@ -590,7 +623,7 @@ XMLPUBFUN xmlChar * XMLCALL
                                                 xmlChar end,
                                                 xmlChar  end2,
                                                 xmlChar end3);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                        xmlHandleEntity         (xmlParserCtxtPtr ctxt,
                                                 xmlEntityPtr entity);
 
index b68a6e1..4f0ca9a 100644 (file)
@@ -104,8 +104,8 @@ typedef enum {
     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_TYPE_PARTICLE = 25,
+    XML_SCHEMA_TYPE_ATTRIBUTE_USE,
     XML_SCHEMA_FACET_MININCLUSIVE = 1000,
     XML_SCHEMA_FACET_MINEXCLUSIVE,
     XML_SCHEMA_FACET_MAXINCLUSIVE,
index f442826..364eaec 100644 (file)
@@ -69,17 +69,17 @@ typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
 /*
  * Interfaces for parsing.
  */
-XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL 
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
            xmlSchematronNewParserCtxt  (const char *URL);
-XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL 
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
            xmlSchematronNewMemParserCtxt(const char *buffer,
                                         int size);
 XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
            xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
            xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
 /*****
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
            xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
                                         xmlSchematronValidityErrorFunc err,
                                         xmlSchematronValidityWarningFunc warn,
@@ -92,9 +92,9 @@ XMLPUBFUN int XMLCALL
 XMLPUBFUN int XMLCALL
                xmlSchematronIsValid    (xmlSchematronValidCtxtPtr ctxt);
  *****/
-XMLPUBFUN xmlSchematronPtr XMLCALL     
+XMLPUBFUN xmlSchematronPtr XMLCALL
            xmlSchematronParse          (xmlSchematronParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
            xmlSchematronFree           (xmlSchematronPtr schema);
 /*
  * Interfaces for validating
@@ -105,7 +105,7 @@ XMLPUBFUN void XMLCALL
                                          xmlStructuredErrorFunc serror,
                                          void *ctx);
 /******
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
            xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
                                         xmlSchematronValidityErrorFunc err,
                                         xmlSchematronValidityWarningFunc warn,
@@ -125,12 +125,12 @@ XMLPUBFUN int XMLCALL
                                         xmlNodePtr elem);
  *******/
 
-XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL    
+XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
            xmlSchematronNewValidCtxt   (xmlSchematronPtr schema,
-                                        int options);
-XMLPUBFUN void XMLCALL                 
+                                        int options);
+XMLPUBFUN void XMLCALL
            xmlSchematronFreeValidCtxt  (xmlSchematronValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
            xmlSchematronValidateDoc    (xmlSchematronValidCtxtPtr ctxt,
                                         xmlDocPtr instance);
 
index 2196f8d..7e06686 100644 (file)
@@ -13,6 +13,7 @@
 #define __XML_TREE_H__
 
 #include <stdio.h>
+#include <limits.h>
 #include <libxml/xmlversion.h>
 #include <libxml/xmlstring.h>
 
@@ -81,7 +82,8 @@ typedef enum {
 /**
  * xmlBuffer:
  *
- * A buffer structure.
+ * 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;
@@ -94,6 +96,41 @@ struct _xmlBuffer {
 };
 
 /**
+ * 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 xmlBufPtr buf);
+XMLPUBFUN xmlChar* XMLCALL       xmlBufEnd      (const 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
@@ -480,7 +517,7 @@ struct _xmlNode {
 /**
  * XML_GET_LINE:
  *
- * Macro to extract the line number of an element node. 
+ * Macro to extract the line number of an element node.
  */
 #define XML_GET_LINE(n)                                                \
     (xmlGetLineNo(n))
@@ -523,7 +560,7 @@ struct _xmlDoc {
 
     /* End of common part */
     int             compression;/* level of zlib compression */
-    int             standalone; /* standalone document (no external refs) 
+    int             standalone; /* standalone document (no external refs)
                                     1 if standalone="yes"
                                     0 if standalone="no"
                                    -1 if there is no XML declaration
@@ -554,9 +591,9 @@ typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
 /**
  * xmlDOMWrapAcquireNsFunction:
  * @ctxt:  a DOM wrapper context
- * @node:  the context node (element or attribute) 
+ * @node:  the context node (element or attribute)
  * @nsName:  the requested namespace name
- * @nsPrefix:  the requested namespace prefix 
+ * @nsPrefix:  the requested namespace prefix
  *
  * A function called to acquire namespaces (xmlNs) from the wrapper.
  *
@@ -603,7 +640,7 @@ struct _xmlDOMWrapCtxt {
 /**
  * xmlRootNode:
  *
- * Macro for compatibility naming layer with libxml1. Maps 
+ * Macro for compatibility naming layer with libxml1. Maps
  * to "children".
  */
 #ifndef xmlRootNode
@@ -624,431 +661,436 @@ XMLPUBFUN int XMLCALL
 #endif
 
 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateQName        (const xmlChar *value,
                                         int space);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateName         (const xmlChar *value,
                                         int space);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateNMToken      (const xmlChar *value,
                                         int space);
 #endif
 
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlBuildQName           (const xmlChar *ncname,
                                         const xmlChar *prefix,
                                         xmlChar *memory,
                                         int len);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlSplitQName2          (const xmlChar *name,
                                         xmlChar **prefix);
-XMLPUBFUN const xmlChar * XMLCALL      
+XMLPUBFUN const xmlChar * XMLCALL
                xmlSplitQName3          (const xmlChar *name,
                                         int *len);
 
 /*
- * Handling Buffers.
+ * Handling Buffers, the old ones see @xmlBuf for the new ones.
  */
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
-XMLPUBFUN xmlBufferAllocationScheme XMLCALL     
+XMLPUBFUN xmlBufferAllocationScheme XMLCALL
                xmlGetBufferAllocationScheme(void);
 
-XMLPUBFUN xmlBufferPtr XMLCALL 
+XMLPUBFUN xmlBufferPtr XMLCALL
                xmlBufferCreate         (void);
-XMLPUBFUN xmlBufferPtr XMLCALL 
+XMLPUBFUN xmlBufferPtr XMLCALL
                xmlBufferCreateSize     (size_t size);
-XMLPUBFUN xmlBufferPtr XMLCALL 
+XMLPUBFUN xmlBufferPtr XMLCALL
                xmlBufferCreateStatic   (void *mem,
                                         size_t size);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlBufferResize         (xmlBufferPtr buf,
                                         unsigned int size);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlBufferFree           (xmlBufferPtr buf);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlBufferDump           (FILE *file,
                                         xmlBufferPtr buf);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlBufferAdd            (xmlBufferPtr buf,
                                         const xmlChar *str,
                                         int len);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlBufferAddHead        (xmlBufferPtr buf,
                                         const xmlChar *str,
                                         int len);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlBufferCat            (xmlBufferPtr buf,
                                         const xmlChar *str);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
                xmlBufferCCat           (xmlBufferPtr buf,
                                         const char *str);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlBufferShrink         (xmlBufferPtr buf,
                                         unsigned int len);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlBufferGrow           (xmlBufferPtr buf,
                                         unsigned int len);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlBufferEmpty          (xmlBufferPtr buf);
-XMLPUBFUN const xmlChar* XMLCALL       
+XMLPUBFUN const xmlChar* XMLCALL
                xmlBufferContent        (const xmlBufferPtr buf);
 XMLPUBFUN xmlChar* XMLCALL
-               xmlBufferDetach         (const xmlBufferPtr buf);
-XMLPUBFUN void XMLCALL         
+               xmlBufferDetach         (xmlBufferPtr buf);
+XMLPUBFUN void XMLCALL
                xmlBufferSetAllocationScheme(xmlBufferPtr buf,
                                         xmlBufferAllocationScheme scheme);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlBufferLength         (const xmlBufferPtr buf);
 
 /*
  * Creating/freeing new structures.
  */
-XMLPUBFUN xmlDtdPtr XMLCALL    
+XMLPUBFUN xmlDtdPtr XMLCALL
                xmlCreateIntSubset      (xmlDocPtr doc,
                                         const xmlChar *name,
                                         const xmlChar *ExternalID,
                                         const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL    
+XMLPUBFUN xmlDtdPtr XMLCALL
                xmlNewDtd               (xmlDocPtr doc,
                                         const xmlChar *name,
                                         const xmlChar *ExternalID,
                                         const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL    
+XMLPUBFUN xmlDtdPtr XMLCALL
                xmlGetIntSubset         (xmlDocPtr doc);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeDtd              (xmlDtdPtr cur);
 #ifdef LIBXML_LEGACY_ENABLED
-XMLPUBFUN xmlNsPtr XMLCALL     
+XMLPUBFUN xmlNsPtr XMLCALL
                xmlNewGlobalNs          (xmlDocPtr doc,
                                         const xmlChar *href,
                                         const xmlChar *prefix);
 #endif /* LIBXML_LEGACY_ENABLED */
-XMLPUBFUN xmlNsPtr XMLCALL     
+XMLPUBFUN xmlNsPtr XMLCALL
                xmlNewNs                (xmlNodePtr node,
                                         const xmlChar *href,
                                         const xmlChar *prefix);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeNs               (xmlNsPtr cur);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeNsList           (xmlNsPtr cur);
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlNewDoc               (const xmlChar *version);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeDoc              (xmlDocPtr cur);
-XMLPUBFUN xmlAttrPtr XMLCALL   
+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   
+XMLPUBFUN xmlAttrPtr XMLCALL
                xmlNewProp              (xmlNodePtr node,
                                         const xmlChar *name,
                                         const xmlChar *value);
 #endif
-XMLPUBFUN xmlAttrPtr XMLCALL   
+XMLPUBFUN xmlAttrPtr XMLCALL
                xmlNewNsProp            (xmlNodePtr node,
                                         xmlNsPtr ns,
                                         const xmlChar *name,
                                         const xmlChar *value);
-XMLPUBFUN xmlAttrPtr XMLCALL   
+XMLPUBFUN xmlAttrPtr XMLCALL
                xmlNewNsPropEatName     (xmlNodePtr node,
                                         xmlNsPtr ns,
                                         xmlChar *name,
                                         const xmlChar *value);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreePropList         (xmlAttrPtr cur);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeProp             (xmlAttrPtr cur);
-XMLPUBFUN xmlAttrPtr XMLCALL   
+XMLPUBFUN xmlAttrPtr XMLCALL
                xmlCopyProp             (xmlNodePtr target,
                                         xmlAttrPtr cur);
-XMLPUBFUN xmlAttrPtr XMLCALL   
+XMLPUBFUN xmlAttrPtr XMLCALL
                xmlCopyPropList         (xmlNodePtr target,
                                         xmlAttrPtr cur);
 #ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlDtdPtr XMLCALL    
+XMLPUBFUN xmlDtdPtr XMLCALL
                xmlCopyDtd              (xmlDtdPtr dtd);
 #endif /* LIBXML_TREE_ENABLED */
 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlDocPtr XMLCALL    
+XMLPUBFUN xmlDocPtr XMLCALL
                xmlCopyDoc              (xmlDocPtr doc,
                                         int recursive);
 #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
 /*
  * Creating new nodes.
  */
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewDocNode           (xmlDocPtr doc,
                                         xmlNsPtr ns,
                                         const xmlChar *name,
                                         const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewDocNodeEatName    (xmlDocPtr doc,
                                         xmlNsPtr ns,
                                         xmlChar *name,
                                         const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewNode              (xmlNsPtr ns,
                                         const xmlChar *name);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewNodeEatName       (xmlNsPtr ns,
                                         xmlChar *name);
 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewChild             (xmlNodePtr parent,
                                         xmlNsPtr ns,
                                         const xmlChar *name,
                                         const xmlChar *content);
 #endif
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewDocText           (xmlDocPtr doc,
                                         const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewText              (const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewDocPI             (xmlDocPtr doc,
                                         const xmlChar *name,
                                         const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewPI                (const xmlChar *name,
                                         const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewDocTextLen        (xmlDocPtr doc,
                                         const xmlChar *content,
                                         int len);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewTextLen           (const xmlChar *content,
                                         int len);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewDocComment        (xmlDocPtr doc,
                                         const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewComment           (const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewCDataBlock        (xmlDocPtr doc,
                                         const xmlChar *content,
                                         int len);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewCharRef           (xmlDocPtr doc,
                                         const xmlChar *name);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewReference         (xmlDocPtr doc,
                                         const xmlChar *name);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlCopyNode             (const xmlNodePtr node,
                                         int recursive);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlDocCopyNode          (const xmlNodePtr node,
                                         xmlDocPtr doc,
                                         int recursive);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlDocCopyNodeList      (xmlDocPtr doc,
                                         const xmlNodePtr node);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlCopyNodeList         (const xmlNodePtr node);
 #ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewTextChild         (xmlNodePtr parent,
                                         xmlNsPtr ns,
                                         const xmlChar *name,
                                         const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewDocRawNode        (xmlDocPtr doc,
                                         xmlNsPtr ns,
                                         const xmlChar *name,
                                         const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlNewDocFragment       (xmlDocPtr doc);
 #endif /* LIBXML_TREE_ENABLED */
 
 /*
  * Navigating.
  */
-XMLPUBFUN long XMLCALL         
+XMLPUBFUN long XMLCALL
                xmlGetLineNo            (xmlNodePtr node);
 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlGetNodePath          (xmlNodePtr node);
 #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlDocGetRootElement    (xmlDocPtr doc);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlGetLastChild         (xmlNodePtr parent);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlNodeIsText           (xmlNodePtr node);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlIsBlankNode          (xmlNodePtr node);
 
 /*
  * Changing the structure.
  */
 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlDocSetRootElement    (xmlDocPtr doc,
                                         xmlNodePtr root);
 #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
 #ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlNodeSetName          (xmlNodePtr cur,
                                         const xmlChar *name);
 #endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlAddChild             (xmlNodePtr parent,
                                         xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlAddChildList         (xmlNodePtr parent,
                                         xmlNodePtr cur);
 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL   
+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)
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlAddPrevSibling       (xmlNodePtr cur,
                                         xmlNodePtr elem);
 #endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlAddSibling           (xmlNodePtr cur,
                                         xmlNodePtr elem);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlAddNextSibling       (xmlNodePtr cur,
                                         xmlNodePtr elem);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlUnlinkNode           (xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlTextMerge            (xmlNodePtr first,
                                         xmlNodePtr second);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlTextConcat           (xmlNodePtr node,
                                         const xmlChar *content,
                                         int len);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeNodeList         (xmlNodePtr cur);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeNode             (xmlNodePtr cur);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSetTreeDoc           (xmlNodePtr tree,
                                         xmlDocPtr doc);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSetListDoc           (xmlNodePtr list,
                                         xmlDocPtr doc);
 /*
  * Namespaces.
  */
-XMLPUBFUN xmlNsPtr XMLCALL     
+XMLPUBFUN xmlNsPtr XMLCALL
                xmlSearchNs             (xmlDocPtr doc,
                                         xmlNodePtr node,
                                         const xmlChar *nameSpace);
-XMLPUBFUN xmlNsPtr XMLCALL     
+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   
+XMLPUBFUN xmlNsPtr * XMLCALL
                xmlGetNsList            (xmlDocPtr doc,
                                         xmlNodePtr node);
 #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
 
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSetNs                (xmlNodePtr node,
                                         xmlNsPtr ns);
-XMLPUBFUN xmlNsPtr XMLCALL     
+XMLPUBFUN xmlNsPtr XMLCALL
                xmlCopyNamespace        (xmlNsPtr cur);
-XMLPUBFUN xmlNsPtr XMLCALL     
+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   
+XMLPUBFUN xmlAttrPtr XMLCALL
                xmlSetProp              (xmlNodePtr node,
                                         const xmlChar *name,
                                         const xmlChar *value);
-XMLPUBFUN xmlAttrPtr XMLCALL   
+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    
+XMLPUBFUN xmlChar * XMLCALL
                xmlGetNoNsProp          (xmlNodePtr node,
                                         const xmlChar *name);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlGetProp              (xmlNodePtr node,
                                         const xmlChar *name);
-XMLPUBFUN xmlAttrPtr XMLCALL   
+XMLPUBFUN xmlAttrPtr XMLCALL
                xmlHasProp              (xmlNodePtr node,
                                         const xmlChar *name);
-XMLPUBFUN xmlAttrPtr XMLCALL   
+XMLPUBFUN xmlAttrPtr XMLCALL
                xmlHasNsProp            (xmlNodePtr node,
                                         const xmlChar *name,
                                         const xmlChar *nameSpace);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlGetNsProp            (xmlNodePtr node,
                                         const xmlChar *name,
                                         const xmlChar *nameSpace);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlStringGetNodeList    (xmlDocPtr doc,
                                         const xmlChar *value);
-XMLPUBFUN xmlNodePtr XMLCALL   
+XMLPUBFUN xmlNodePtr XMLCALL
                xmlStringLenGetNodeList (xmlDocPtr doc,
                                         const xmlChar *value,
                                         int len);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlNodeListGetString    (xmlDocPtr doc,
                                         xmlNodePtr list,
                                         int inLine);
 #ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlNodeListGetRawString (xmlDocPtr doc,
                                         xmlNodePtr list,
                                         int inLine);
 #endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlNodeSetContent       (xmlNodePtr cur,
                                         const xmlChar *content);
 #ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlNodeSetContentLen    (xmlNodePtr cur,
                                         const xmlChar *content,
                                         int len);
 #endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlNodeAddContent       (xmlNodePtr cur,
                                         const xmlChar *content);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlNodeAddContentLen    (xmlNodePtr cur,
                                         const xmlChar *content,
                                         int len);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlNodeGetContent       (xmlNodePtr cur);
+
 XMLPUBFUN int XMLCALL
                xmlNodeBufGetContent    (xmlBufferPtr buffer,
                                         xmlNodePtr cur);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN int XMLCALL
+               xmlBufGetNodeContent    (xmlBufPtr buf,
+                                        xmlNodePtr cur);
+
+XMLPUBFUN xmlChar * XMLCALL
                xmlNodeGetLang          (xmlNodePtr cur);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlNodeGetSpacePreserve (xmlNodePtr cur);
 #ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlNodeSetLang          (xmlNodePtr cur,
                                         const xmlChar *lang);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlNodeSetSpacePreserve (xmlNodePtr cur,
                                         int val);
 #endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlNodeGetBase          (xmlDocPtr doc,
                                         xmlNodePtr cur);
 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlNodeSetBase          (xmlNodePtr cur,
                                         const xmlChar *uri);
 #endif
@@ -1056,14 +1098,14 @@ XMLPUBFUN void XMLCALL
 /*
  * Removing content.
  */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlRemoveProp           (xmlAttrPtr cur);
 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlUnsetNsProp          (xmlNodePtr node,
                                         xmlNsPtr ns,
                                         const xmlChar *name);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlUnsetProp            (xmlNodePtr node,
                                         const xmlChar *name);
 #endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
@@ -1071,13 +1113,13 @@ XMLPUBFUN int XMLCALL
 /*
  * Internal, don't use.
  */
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlBufferWriteCHAR      (xmlBufferPtr buf,
                                         const xmlChar *string);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlBufferWriteChar      (xmlBufferPtr buf,
                                         const char *string);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlBufferWriteQuotedString(xmlBufferPtr buf,
                                         const xmlChar *string);
 
@@ -1092,7 +1134,7 @@ XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
 /*
  * Namespace handling.
  */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlReconciliateNs       (xmlDocPtr doc,
                                         xmlNodePtr tree);
 #endif
@@ -1101,61 +1143,67 @@ XMLPUBFUN int XMLCALL
 /*
  * Saving.
  */
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlDocDumpFormatMemory  (xmlDocPtr cur,
                                         xmlChar **mem,
                                         int *size,
                                         int format);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlDocDumpMemory        (xmlDocPtr cur,
                                         xmlChar **mem,
                                         int *size);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlDocDumpMemoryEnc     (xmlDocPtr out_doc,
                                         xmlChar **doc_txt_ptr,
                                         int * doc_txt_len,
                                         const char *txt_encoding);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
                                         xmlChar **doc_txt_ptr,
                                         int * doc_txt_len,
                                         const char *txt_encoding,
                                         int format);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlDocFormatDump        (FILE *f,
                                         xmlDocPtr cur,
                                         int format);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
                xmlDocDump              (FILE *f,
                                         xmlDocPtr cur);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlElemDump             (FILE *f,
                                         xmlDocPtr doc,
                                         xmlNodePtr cur);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSaveFile             (const char *filename,
                                         xmlDocPtr cur);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSaveFormatFile       (const char *filename,
                                         xmlDocPtr cur,
                                         int format);
-XMLPUBFUN int XMLCALL          
+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          
+XMLPUBFUN int XMLCALL
                xmlSaveFileTo           (xmlOutputBufferPtr buf,
                                         xmlDocPtr cur,
                                         const char *encoding);
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                xmlSaveFormatFileTo     (xmlOutputBufferPtr buf,
                                         xmlDocPtr cur,
                                         const char *encoding,
                                         int format);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlNodeDumpOutput       (xmlOutputBufferPtr buf,
                                         xmlDocPtr doc,
                                         xmlNodePtr cur,
@@ -1163,13 +1211,13 @@ XMLPUBFUN void XMLCALL
                                         int format,
                                         const char *encoding);
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSaveFormatFileEnc    (const char *filename,
                                         xmlDocPtr cur,
                                         const char *encoding,
                                         int format);
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSaveFileEnc          (const char *filename,
                                         xmlDocPtr cur,
                                         const char *encoding);
@@ -1178,21 +1226,21 @@ XMLPUBFUN int XMLCALL
 /*
  * XHTML
  */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlIsXHTML              (const xmlChar *systemID,
                                         const xmlChar *publicID);
 
 /*
  * Compression.
  */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlGetDocCompressMode   (xmlDocPtr doc);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSetDocCompressMode   (xmlDocPtr doc,
                                         int mode);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlGetCompressMode      (void);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSetCompressMode      (int mode);
 
 /*
@@ -1210,7 +1258,7 @@ XMLPUBFUN int XMLCALL
            xmlDOMWrapAdoptNode         (xmlDOMWrapCtxtPtr ctxt,
                                         xmlDocPtr sourceDoc,
                                         xmlNodePtr node,
-                                        xmlDocPtr destDoc,                 
+                                        xmlDocPtr destDoc,
                                         xmlNodePtr destParent,
                                         int options);
 XMLPUBFUN int XMLCALL
index a2307f1..2bc7b38 100644 (file)
@@ -150,55 +150,55 @@ typedef struct _xmlHashTable xmlRefTable;
 typedef xmlRefTable *xmlRefTablePtr;
 
 /* Notation */
-XMLPUBFUN xmlNotationPtr XMLCALL           
+XMLPUBFUN xmlNotationPtr XMLCALL
                xmlAddNotationDecl      (xmlValidCtxtPtr ctxt,
                                         xmlDtdPtr dtd,
                                         const xmlChar *name,
                                         const xmlChar *PublicID,
                                         const xmlChar *SystemID);
 #ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlNotationTablePtr XMLCALL 
+XMLPUBFUN xmlNotationTablePtr XMLCALL
                xmlCopyNotationTable    (xmlNotationTablePtr table);
 #endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL             
+XMLPUBFUN void XMLCALL
                xmlFreeNotationTable    (xmlNotationTablePtr table);
 #ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL             
+XMLPUBFUN void XMLCALL
                xmlDumpNotationDecl     (xmlBufferPtr buf,
                                         xmlNotationPtr nota);
-XMLPUBFUN void XMLCALL             
+XMLPUBFUN void XMLCALL
                xmlDumpNotationTable    (xmlBufferPtr buf,
                                         xmlNotationTablePtr table);
 #endif /* LIBXML_OUTPUT_ENABLED */
 
 /* Element Content */
 /* the non Doc version are being deprecated */
-XMLPUBFUN xmlElementContentPtr XMLCALL 
+XMLPUBFUN xmlElementContentPtr XMLCALL
                xmlNewElementContent    (const xmlChar *name,
                                         xmlElementContentType type);
-XMLPUBFUN xmlElementContentPtr XMLCALL 
+XMLPUBFUN xmlElementContentPtr XMLCALL
                xmlCopyElementContent   (xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL              
+XMLPUBFUN void XMLCALL
                xmlFreeElementContent   (xmlElementContentPtr cur);
 /* the new versions with doc argument */
-XMLPUBFUN xmlElementContentPtr XMLCALL 
+XMLPUBFUN xmlElementContentPtr XMLCALL
                xmlNewDocElementContent (xmlDocPtr doc,
                                         const xmlChar *name,
                                         xmlElementContentType type);
-XMLPUBFUN xmlElementContentPtr XMLCALL 
+XMLPUBFUN xmlElementContentPtr XMLCALL
                xmlCopyDocElementContent(xmlDocPtr doc,
                                         xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL              
+XMLPUBFUN void XMLCALL
                xmlFreeDocElementContent(xmlDocPtr doc,
                                         xmlElementContentPtr cur);
-XMLPUBFUN void XMLCALL              
+XMLPUBFUN void XMLCALL
                xmlSnprintfElementContent(char *buf,
                                         int size,
                                         xmlElementContentPtr content,
                                         int englob);
 #ifdef LIBXML_OUTPUT_ENABLED
 /* DEPRECATED */
-XMLPUBFUN void XMLCALL              
+XMLPUBFUN void XMLCALL
                xmlSprintfElementContent(char *buf,
                                         xmlElementContentPtr content,
                                         int englob);
@@ -206,39 +206,39 @@ XMLPUBFUN void XMLCALL
 /* DEPRECATED */
 
 /* Element */
-XMLPUBFUN xmlElementPtr XMLCALL           
+XMLPUBFUN xmlElementPtr XMLCALL
                xmlAddElementDecl       (xmlValidCtxtPtr ctxt,
                                         xmlDtdPtr dtd,
                                         const xmlChar *name,
                                         xmlElementTypeVal type,
                                         xmlElementContentPtr content);
 #ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlElementTablePtr XMLCALL 
+XMLPUBFUN xmlElementTablePtr XMLCALL
                xmlCopyElementTable     (xmlElementTablePtr table);
 #endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                xmlFreeElementTable     (xmlElementTablePtr table);
 #ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                xmlDumpElementTable     (xmlBufferPtr buf,
                                         xmlElementTablePtr table);
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                xmlDumpElementDecl      (xmlBufferPtr buf,
                                         xmlElementPtr elem);
 #endif /* LIBXML_OUTPUT_ENABLED */
 
 /* Enumeration */
-XMLPUBFUN xmlEnumerationPtr XMLCALL 
+XMLPUBFUN xmlEnumerationPtr XMLCALL
                xmlCreateEnumeration    (const xmlChar *name);
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                xmlFreeEnumeration      (xmlEnumerationPtr cur);
 #ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlEnumerationPtr XMLCALL  
+XMLPUBFUN xmlEnumerationPtr XMLCALL
                xmlCopyEnumeration      (xmlEnumerationPtr cur);
 #endif /* LIBXML_TREE_ENABLED */
 
 /* Attribute */
-XMLPUBFUN xmlAttributePtr XMLCALL          
+XMLPUBFUN xmlAttributePtr XMLCALL
                xmlAddAttributeDecl     (xmlValidCtxtPtr ctxt,
                                         xmlDtdPtr dtd,
                                         const xmlChar *elem,
@@ -249,55 +249,55 @@ XMLPUBFUN xmlAttributePtr XMLCALL
                                         const xmlChar *defaultValue,
                                         xmlEnumerationPtr tree);
 #ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlAttributeTablePtr XMLCALL 
+XMLPUBFUN xmlAttributeTablePtr XMLCALL
                xmlCopyAttributeTable  (xmlAttributeTablePtr table);
 #endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL              
+XMLPUBFUN void XMLCALL
                xmlFreeAttributeTable  (xmlAttributeTablePtr table);
 #ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL              
+XMLPUBFUN void XMLCALL
                xmlDumpAttributeTable  (xmlBufferPtr buf,
                                        xmlAttributeTablePtr table);
-XMLPUBFUN void XMLCALL              
+XMLPUBFUN void XMLCALL
                xmlDumpAttributeDecl   (xmlBufferPtr buf,
                                        xmlAttributePtr attr);
 #endif /* LIBXML_OUTPUT_ENABLED */
 
 /* IDs */
-XMLPUBFUN xmlIDPtr XMLCALL     
+XMLPUBFUN xmlIDPtr XMLCALL
                xmlAddID               (xmlValidCtxtPtr ctxt,
                                        xmlDocPtr doc,
                                        const xmlChar *value,
                                        xmlAttrPtr attr);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeIDTable         (xmlIDTablePtr table);
-XMLPUBFUN xmlAttrPtr XMLCALL   
+XMLPUBFUN xmlAttrPtr XMLCALL
                xmlGetID               (xmlDocPtr doc,
                                        const xmlChar *ID);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlIsID                (xmlDocPtr doc,
                                        xmlNodePtr elem,
                                        xmlAttrPtr attr);
-XMLPUBFUN int XMLCALL          
-               xmlRemoveID            (xmlDocPtr doc, 
+XMLPUBFUN int XMLCALL
+               xmlRemoveID            (xmlDocPtr doc,
                                        xmlAttrPtr attr);
 
 /* IDREFs */
-XMLPUBFUN xmlRefPtr XMLCALL    
+XMLPUBFUN xmlRefPtr XMLCALL
                xmlAddRef              (xmlValidCtxtPtr ctxt,
                                        xmlDocPtr doc,
                                        const xmlChar *value,
                                        xmlAttrPtr attr);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlFreeRefTable        (xmlRefTablePtr table);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlIsRef               (xmlDocPtr doc,
                                        xmlNodePtr elem,
                                        xmlAttrPtr attr);
-XMLPUBFUN int XMLCALL          
-               xmlRemoveRef           (xmlDocPtr doc, 
+XMLPUBFUN int XMLCALL
+               xmlRemoveRef           (xmlDocPtr doc,
                                        xmlAttrPtr attr);
-XMLPUBFUN xmlListPtr XMLCALL   
+XMLPUBFUN xmlListPtr XMLCALL
                xmlGetRefs             (xmlDocPtr doc,
                                        const xmlChar *ID);
 
@@ -306,146 +306,146 @@ XMLPUBFUN xmlListPtr XMLCALL
  */
 #ifdef LIBXML_VALID_ENABLED
 /* Allocate/Release Validation Contexts */
-XMLPUBFUN xmlValidCtxtPtr XMLCALL          
+XMLPUBFUN xmlValidCtxtPtr XMLCALL
                xmlNewValidCtxt(void);
-XMLPUBFUN void XMLCALL             
+XMLPUBFUN void XMLCALL
                xmlFreeValidCtxt(xmlValidCtxtPtr);
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateRoot         (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateElementDecl  (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlElementPtr elem);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlValidNormalizeAttributeValue(xmlDocPtr doc,
                                         xmlNodePtr elem,
                                         const xmlChar *name,
                                         const xmlChar *value);
-XMLPUBFUN xmlChar * XMLCALL    
+XMLPUBFUN xmlChar * XMLCALL
                xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlNodePtr elem,
                                         const xmlChar *name,
                                         const xmlChar *value);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlAttributePtr attr);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateAttributeValue(xmlAttributeType type,
                                         const xmlChar *value);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlNotationPtr nota);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateDtd          (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlDtdPtr dtd);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateDtdFinal     (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateDocument     (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateElement      (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlNodePtr elem);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateOneElement   (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlNodePtr elem);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
                xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlNodePtr     elem,
                                         xmlAttrPtr attr,
                                         const xmlChar *value);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlNodePtr elem,
                                         const xmlChar *prefix,
                                         xmlNsPtr ns,
                                         const xmlChar *value);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc);
 #endif /* LIBXML_VALID_ENABLED */
 
 #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateNotationUse  (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         const xmlChar *notationName);
 #endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlIsMixedElement       (xmlDocPtr doc,
                                         const xmlChar *name);
-XMLPUBFUN xmlAttributePtr XMLCALL      
+XMLPUBFUN xmlAttributePtr XMLCALL
                xmlGetDtdAttrDesc       (xmlDtdPtr dtd,
                                         const xmlChar *elem,
                                         const xmlChar *name);
-XMLPUBFUN xmlAttributePtr XMLCALL      
+XMLPUBFUN xmlAttributePtr XMLCALL
                xmlGetDtdQAttrDesc      (xmlDtdPtr dtd,
                                         const xmlChar *elem,
                                         const xmlChar *name,
                                         const xmlChar *prefix);
-XMLPUBFUN xmlNotationPtr XMLCALL       
+XMLPUBFUN xmlNotationPtr XMLCALL
                xmlGetDtdNotationDesc   (xmlDtdPtr dtd,
                                         const xmlChar *name);
-XMLPUBFUN xmlElementPtr XMLCALL        
+XMLPUBFUN xmlElementPtr XMLCALL
                xmlGetDtdQElementDesc   (xmlDtdPtr dtd,
                                         const xmlChar *name,
                                         const xmlChar *prefix);
-XMLPUBFUN xmlElementPtr XMLCALL        
+XMLPUBFUN xmlElementPtr XMLCALL
                xmlGetDtdElementDesc    (xmlDtdPtr dtd,
                                         const xmlChar *name);
 
 #ifdef LIBXML_VALID_ENABLED
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidGetPotentialChildren(xmlElementContent *ctree,
                                         const xmlChar **names,
                                         int *len,
                                         int max);
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidGetValidElements(xmlNode *prev,
                                         xmlNode *next,
                                         const xmlChar **names,
                                         int max);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateNameValue    (const xmlChar *value);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateNamesValue   (const xmlChar *value);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateNmtokenValue (const xmlChar *value);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidateNmtokensValue(const xmlChar *value);
 
 #ifdef LIBXML_REGEXP_ENABLED
 /*
  * Validation based on the regexp support
  */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
                                         xmlElementPtr elem);
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidatePushElement  (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlNodePtr elem,
                                         const xmlChar *qname);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidatePushCData    (xmlValidCtxtPtr ctxt,
                                         const xmlChar *data,
                                         int len);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlValidatePopElement   (xmlValidCtxtPtr ctxt,
                                         xmlDocPtr doc,
                                         xmlNodePtr elem,
index 083c7ed..a209a99 100644 (file)
@@ -57,7 +57,7 @@ typedef enum {
  * 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.
  */
@@ -157,26 +157,26 @@ struct _xlinkHandler {
 
 /*
  * The default detection routine, can be overridden, they call the default
- * detection callbacks. 
+ * detection callbacks.
  */
 
-XMLPUBFUN xlinkNodeDetectFunc XMLCALL  
+XMLPUBFUN xlinkNodeDetectFunc XMLCALL
                xlinkGetDefaultDetect   (void);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                xlinkSetDefaultDetect   (xlinkNodeDetectFunc func);
 
 /*
  * Routines to set/get the default handlers.
  */
-XMLPUBFUN xlinkHandlerPtr XMLCALL      
+XMLPUBFUN xlinkHandlerPtr XMLCALL
                xlinkGetDefaultHandler  (void);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xlinkSetDefaultHandler  (xlinkHandlerPtr handler);
 
 /*
  * Link detection module itself.
  */
-XMLPUBFUN xlinkType XMLCALL     
+XMLPUBFUN xlinkType XMLCALL
                xlinkIsLink             (xmlDocPtr doc,
                                         xmlNodePtr node);
 
index eea9ed6..6c241a8 100644 (file)
@@ -26,7 +26,7 @@ extern "C" {
  * xmlInputMatchCallback:
  * @filename: the filename or URI
  *
- * Callback used in the I/O Input API to detect if the current handler 
+ * 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
@@ -72,7 +72,7 @@ typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
  * xmlOutputMatchCallback:
  * @filename: the filename or URI
  *
- * Callback used in the I/O Output API to detect if the current handler 
+ * 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
@@ -126,11 +126,11 @@ struct _xmlParserInputBuffer {
     void*                  context;
     xmlInputReadCallback   readcallback;
     xmlInputCloseCallback  closecallback;
-    
+
     xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
-    
-    xmlBufferPtr buffer;    /* Local buffer encoded in UTF-8 */
-    xmlBufferPtr raw;       /* if encoder != NULL buffer for raw input */
+
+    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 */
@@ -142,11 +142,11 @@ struct _xmlOutputBuffer {
     void*                   context;
     xmlOutputWriteCallback  writecallback;
     xmlOutputCloseCallback  closecallback;
-    
+
     xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
-    
-    xmlBufferPtr buffer;    /* Local buffer encoded in UTF-8 or ISOLatin */
-    xmlBufferPtr conv;      /* if encoder != NULL buffer for output */
+
+    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;
 };
@@ -155,13 +155,13 @@ struct _xmlOutputBuffer {
 /*
  * Interfaces for input
  */
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlCleanupInputCallbacks                (void);
 
 XMLPUBFUN int XMLCALL
        xmlPopInputCallbacks                    (void);
 
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlRegisterDefaultInputCallbacks        (void);
 XMLPUBFUN xmlParserInputBufferPtr XMLCALL
        xmlAllocParserInputBuffer               (xmlCharEncoding enc);
@@ -186,22 +186,22 @@ XMLPUBFUN xmlParserInputBufferPtr XMLCALL
                                                 xmlInputCloseCallback  ioclose,
                                                 void *ioctx,
                                                 xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlParserInputBufferRead                (xmlParserInputBufferPtr in,
                                                 int len);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlParserInputBufferGrow                (xmlParserInputBufferPtr in,
                                                 int len);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlParserInputBufferPush                (xmlParserInputBufferPtr in,
                                                 int len,
                                                 const char *buf);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlFreeParserInputBuffer                (xmlParserInputBufferPtr in);
-XMLPUBFUN char * XMLCALL       
+XMLPUBFUN char * XMLCALL
        xmlParserGetDirectory                   (const char *filename);
 
-XMLPUBFUN int XMLCALL     
+XMLPUBFUN int XMLCALL
        xmlRegisterInputCallbacks               (xmlInputMatchCallback matchFunc,
                                                 xmlInputOpenCallback openFunc,
                                                 xmlInputReadCallback readFunc,
@@ -215,9 +215,9 @@ xmlParserInputBufferPtr
 /*
  * Interfaces for output
  */
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlCleanupOutputCallbacks               (void);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlRegisterDefaultOutputCallbacks(void);
 XMLPUBFUN xmlOutputBufferPtr XMLCALL
        xmlAllocOutputBuffer            (xmlCharEncodingHandlerPtr encoder);
@@ -245,24 +245,30 @@ XMLPUBFUN xmlOutputBufferPtr XMLCALL
                                         void *ioctx,
                                         xmlCharEncodingHandlerPtr encoder);
 
-XMLPUBFUN int XMLCALL  
+/* 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  
+XMLPUBFUN int XMLCALL
        xmlOutputBufferWriteString      (xmlOutputBufferPtr out,
                                         const char *str);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlOutputBufferWriteEscape      (xmlOutputBufferPtr out,
                                         const xmlChar *str,
                                         xmlCharEncodingOutputFunc escaping);
 
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlOutputBufferFlush            (xmlOutputBufferPtr out);
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlOutputBufferClose            (xmlOutputBufferPtr out);
 
-XMLPUBFUN int XMLCALL     
+XMLPUBFUN int XMLCALL
        xmlRegisterOutputCallbacks      (xmlOutputMatchCallback matchFunc,
                                         xmlOutputOpenCallback openFunc,
                                         xmlOutputWriteCallback writeFunc,
@@ -275,10 +281,10 @@ xmlOutputBufferPtr
 
 #ifdef LIBXML_HTTP_ENABLED
 /*  This function only exists if HTTP support built into the library  */
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlRegisterHTTPPostCallbacks    (void );
 #endif /* LIBXML_HTTP_ENABLED */
-       
+
 #endif /* LIBXML_OUTPUT_ENABLED */
 
 XMLPUBFUN xmlParserInputPtr XMLCALL
@@ -288,69 +294,69 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
 /*
  * A predefined entity loader disabling network accesses
  */
-XMLPUBFUN xmlParserInputPtr XMLCALL 
+XMLPUBFUN xmlParserInputPtr XMLCALL
        xmlNoNetExternalEntityLoader    (const char *URL,
                                         const char *ID,
                                         xmlParserCtxtPtr ctxt);
 
-/* 
- * xmlNormalizeWindowsPath is obsolete, don't use it. 
+/*
+ * xmlNormalizeWindowsPath is obsolete, don't use it.
  * Check xmlCanonicPath in uri.h for a better alternative.
  */
-XMLPUBFUN xmlChar * XMLCALL 
+XMLPUBFUN xmlChar * XMLCALL
        xmlNormalizeWindowsPath         (const xmlChar *path);
 
-XMLPUBFUN int XMLCALL  
+XMLPUBFUN int XMLCALL
        xmlCheckFilename                (const char *path);
 /**
- * Default 'file://' protocol callbacks 
+ * 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, 
+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);
+XMLPUBFUN int XMLCALL
+       xmlFileClose                    (void * context);
 
 /**
- * Default 'http://' protocol callbacks 
+ * Default 'http://' protocol callbacks
  */
 #ifdef LIBXML_HTTP_ENABLED
-XMLPUBFUN int XMLCALL  
-       xmlIOHTTPMatch                  (const char *filename);
-XMLPUBFUN void * XMLCALL       
-       xmlIOHTTPOpen                   (const char *filename);
+XMLPUBFUN int XMLCALL
+       xmlIOHTTPMatch                  (const char *filename);
+XMLPUBFUN void * XMLCALL
+       xmlIOHTTPOpen                   (const char *filename);
 #ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void * XMLCALL       
+XMLPUBFUN void * XMLCALL
        xmlIOHTTPOpenW                  (const char * post_uri,
                                         int   compression );
 #endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN int XMLCALL  
-       xmlIOHTTPRead                   (void * context, 
-                                        char * buffer, 
+XMLPUBFUN int XMLCALL
+       xmlIOHTTPRead                   (void * context,
+                                        char * buffer,
                                         int len);
-XMLPUBFUN int XMLCALL  
-       xmlIOHTTPClose                  (void * context);
+XMLPUBFUN int XMLCALL
+       xmlIOHTTPClose                  (void * context);
 #endif /* LIBXML_HTTP_ENABLED */
 
 /**
- * Default 'ftp://' protocol callbacks 
+ * 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, 
+#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);
+XMLPUBFUN int XMLCALL
+       xmlIOFTPClose                   (void * context);
 #endif /* LIBXML_FTP_ENABLED */
 
 #ifdef __cplusplus
index f98b55e..bf1b131 100644 (file)
@@ -40,25 +40,25 @@ typedef xmlAutomataState *xmlAutomataStatePtr;
 /*
  * Building API
  */
-XMLPUBFUN xmlAutomataPtr XMLCALL               
+XMLPUBFUN xmlAutomataPtr XMLCALL
                    xmlNewAutomata              (void);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                    xmlFreeAutomata             (xmlAutomataPtr am);
 
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataGetInitState     (xmlAutomataPtr am);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                    xmlAutomataSetFinalState    (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr state);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataNewState         (xmlAutomataPtr am);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataNewTransition    (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 const xmlChar *token,
                                                 void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataNewTransition2   (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
@@ -73,7 +73,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
                                                 const xmlChar *token2,
                                                 void *data);
 
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataNewCountTrans    (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
@@ -81,7 +81,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
                                                 int min,
                                                 int max,
                                                 void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataNewCountTrans2   (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
@@ -90,7 +90,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
                                                 int min,
                                                 int max,
                                                 void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataNewOnceTrans     (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
@@ -99,46 +99,46 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
                                                 int max,
                                                 void *data);
 XMLPUBFUN xmlAutomataStatePtr XMLCALL
-                   xmlAutomataNewOnceTrans2    (xmlAutomataPtr am, 
+                   xmlAutomataNewOnceTrans2    (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
-                                                xmlAutomataStatePtr to, 
+                                                xmlAutomataStatePtr to,
                                                 const xmlChar *token,
                                                 const xmlChar *token2,
-                                                int min, 
-                                                int max, 
+                                                int min,
+                                                int max,
                                                 void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataNewAllTrans      (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 int lax);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataNewEpsilon       (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataNewCountedTrans  (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 int counter);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL  
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
                    xmlAutomataNewCounterTrans  (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 int counter);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                    xmlAutomataNewCounter       (xmlAutomataPtr am,
                                                 int min,
                                                 int max);
 
-XMLPUBFUN xmlRegexpPtr XMLCALL         
+XMLPUBFUN xmlRegexpPtr XMLCALL
                    xmlAutomataCompile          (xmlAutomataPtr am);
-XMLPUBFUN int XMLCALL                  
+XMLPUBFUN int XMLCALL
                    xmlAutomataIsDeterminist    (xmlAutomataPtr am);
 
 #ifdef __cplusplus
 }
-#endif 
+#endif
 
 #endif /* LIBXML_AUTOMATA_ENABLED */
 #endif /* LIBXML_REGEXP_ENABLED */
index e924211..537a396 100644 (file)
@@ -62,7 +62,9 @@ typedef enum {
     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_SCHEMATRONV,/* The Schematron validator module */
+    XML_FROM_BUFFER,    /* The buffers module */
+    XML_FROM_URI        /* The URI module */
 } xmlErrorDomain;
 
 /**
@@ -205,6 +207,8 @@ typedef enum {
     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 */
@@ -825,11 +829,8 @@ typedef enum {
     XML_I18N_NO_HANDLER, /* 6001 */
     XML_I18N_EXCESS_HANDLER, /* 6002 */
     XML_I18N_CONV_FAILED, /* 6003 */
-    XML_I18N_NO_OUTPUT /* 6004 */
-#if 0
-    XML_CHECK_, /* 5033 */
-    XML_CHECK_X /* 503 */
-#endif
+    XML_I18N_NO_OUTPUT, /* 6004 */
+    XML_BUF_OVERFLOW = 7000
 } xmlParserErrors;
 
 /**
index c6516b4..2c79f81 100644 (file)
@@ -43,7 +43,7 @@
 /**
  * XMLCDECL:
  *
- * Macro which declares the calling convention for exported functions that 
+ * Macro which declares the calling convention for exported functions that
  * use '...'.
  */
 #define XMLCDECL
index 8f4a560..9667820 100644 (file)
@@ -50,7 +50,7 @@ XMLPUBFUN int XMLCALL xmlModuleFree           (xmlModulePtr module);
 
 #ifdef __cplusplus
 }
-#endif 
+#endif
 
 #endif /* LIBXML_MODULES_ENABLED */
 
index f24e9bb..2c99e3a 100644 (file)
@@ -130,16 +130,16 @@ XMLPUBFUN int XMLCALL
 
 #ifdef LIBXML_WRITER_ENABLED
 XMLPUBFUN xmlChar * XMLCALL
-                       xmlTextReaderReadInnerXml       (xmlTextReaderPtr reader);
+                       xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
 
 XMLPUBFUN xmlChar * XMLCALL
-                       xmlTextReaderReadOuterXml       (xmlTextReaderPtr reader);
+                       xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
 #endif
 
 XMLPUBFUN xmlChar * XMLCALL
-                       xmlTextReaderReadString         (xmlTextReaderPtr reader);
+                       xmlTextReaderReadString (xmlTextReaderPtr reader);
 XMLPUBFUN int XMLCALL
-                       xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader);
+                       xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
 
 /*
  * Attributes of the node
@@ -397,27 +397,26 @@ typedef void *  xmlTextReaderLocatorPtr;
  *
  * Signature of an error callback from a reader parser
  */
-typedef void   (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
-                                                const char *msg,
-                                                xmlParserSeverities severity,
-                                                xmlTextReaderLocatorPtr locator);
+typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
+                                              const char *msg,
+                                              xmlParserSeverities severity,
+                                              xmlTextReaderLocatorPtr locator);
 XMLPUBFUN int XMLCALL
-                   xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
-/*int             xmlTextReaderLocatorLinePosition(xmlTextReaderLocatorPtr locator);*/
+           xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
 XMLPUBFUN xmlChar * XMLCALL
-                   xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
+           xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
 XMLPUBFUN void XMLCALL
-                   xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
-                                                xmlTextReaderErrorFunc f,
-                                                void *arg);
+           xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
+                                        xmlTextReaderErrorFunc f,
+                                        void *arg);
 XMLPUBFUN void XMLCALL
-                   xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
-                                                          xmlStructuredErrorFunc f,
-                                                          void *arg);
+           xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
+                                                  xmlStructuredErrorFunc f,
+                                                  void *arg);
 XMLPUBFUN void XMLCALL
-                   xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
-                                                xmlTextReaderErrorFunc *f,
-                                                void **arg);
+           xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
+                                        xmlTextReaderErrorFunc *f,
+                                        void **arg);
 
 #endif /* LIBXML_READER_ENABLED */
 
index 752bc3a..97930c7 100644 (file)
@@ -92,7 +92,8 @@ typedef xmlSchema *xmlSchemaPtr;
  *
  * Signature of an error callback from an XSD validation
  */
-typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+typedef void (XMLCDECL *xmlSchemaValidityErrorFunc)
+                 (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
 
 /**
  * xmlSchemaValidityWarningFunc:
@@ -102,7 +103,8 @@ typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg,
  *
  * Signature of a warning callback from an XSD validation
  */
-typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+typedef void (XMLCDECL *xmlSchemaValidityWarningFunc)
+                 (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
 
 /**
  * A schemas validation context
@@ -113,6 +115,22 @@ 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.
  */
@@ -171,6 +189,9 @@ XMLPUBFUN int XMLCALL
 XMLPUBFUN int XMLCALL
            xmlSchemaSetValidOptions    (xmlSchemaValidCtxtPtr ctxt,
                                         int options);
+XMLPUBFUN void XMLCALL
+            xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
+                                        const char *filename);
 XMLPUBFUN int XMLCALL
            xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
 
@@ -210,6 +231,13 @@ XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
                                         void **user_data);
 XMLPUBFUN int XMLCALL
             xmlSchemaSAXUnplug         (xmlSchemaSAXPlugPtr plug);
+
+
+XMLPUBFUN void XMLCALL
+            xmlSchemaValidateSetLocator        (xmlSchemaValidCtxtPtr vctxt,
+                                        xmlSchemaValidityLocatorFunc f,
+                                        void *ctxt);
+
 #ifdef __cplusplus
 }
 #endif
index 9a3a7a1..35d48d4 100644 (file)
@@ -30,23 +30,23 @@ typedef enum {
     XML_SCHEMA_WHITESPACE_COLLAPSE = 3
 } xmlSchemaWhitespaceValueType;
 
-XMLPUBFUN void XMLCALL         
-               xmlSchemaInitTypes              (void);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
+               xmlSchemaInitTypes              (void);
+XMLPUBFUN void XMLCALL
                xmlSchemaCleanupTypes           (void);
-XMLPUBFUN xmlSchemaTypePtr XMLCALL 
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
                xmlSchemaGetPredefinedType      (const xmlChar *name,
                                                 const xmlChar *ns);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
                                                 const xmlChar *value,
                                                 xmlSchemaValPtr *val);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSchemaValPredefTypeNode      (xmlSchemaTypePtr type,
                                                 const xmlChar *value,
                                                 xmlSchemaValPtr *val,
                                                 xmlNodePtr node);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSchemaValidateFacet          (xmlSchemaTypePtr base,
                                                 xmlSchemaFacetPtr facet,
                                                 const xmlChar *value,
@@ -54,25 +54,25 @@ XMLPUBFUN int XMLCALL
 XMLPUBFUN int XMLCALL
                xmlSchemaValidateFacetWhtsp     (xmlSchemaFacetPtr facet,
                                                 xmlSchemaWhitespaceValueType fws,
-                                                xmlSchemaValType valType,                                               
+                                                xmlSchemaValType valType,
                                                 const xmlChar *value,
                                                 xmlSchemaValPtr val,
                                                 xmlSchemaWhitespaceValueType ws);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSchemaFreeValue              (xmlSchemaValPtr val);
-XMLPUBFUN xmlSchemaFacetPtr XMLCALL 
+XMLPUBFUN xmlSchemaFacetPtr XMLCALL
                xmlSchemaNewFacet               (void);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSchemaCheckFacet             (xmlSchemaFacetPtr facet,
                                                 xmlSchemaTypePtr typeDecl,
                                                 xmlSchemaParserCtxtPtr ctxt,
                                                 const xmlChar *name);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlSchemaFreeFacet              (xmlSchemaFacetPtr facet);
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlSchemaCompareValues          (xmlSchemaValPtr x,
                                                 xmlSchemaValPtr y);
-XMLPUBFUN xmlSchemaTypePtr XMLCALL             
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
     xmlSchemaGetBuiltInListSimpleTypeItemType  (xmlSchemaTypePtr type);
 XMLPUBFUN int XMLCALL
     xmlSchemaValidateListSimpleTypeFacet       (xmlSchemaFacetPtr facet,
@@ -82,7 +82,7 @@ XMLPUBFUN int XMLCALL
 XMLPUBFUN xmlSchemaTypePtr XMLCALL
                xmlSchemaGetBuiltInType         (xmlSchemaValType type);
 XMLPUBFUN int XMLCALL
-               xmlSchemaIsBuiltInTypeFacet     (xmlSchemaTypePtr type, 
+               xmlSchemaIsBuiltInTypeFacet     (xmlSchemaTypePtr type,
                                                 int facetType);
 XMLPUBFUN xmlChar * XMLCALL
                xmlSchemaCollapseString         (const xmlChar *value);
@@ -91,7 +91,7 @@ XMLPUBFUN xmlChar * XMLCALL
 XMLPUBFUN unsigned long  XMLCALL
                xmlSchemaGetFacetValueAsULong   (xmlSchemaFacetPtr facet);
 XMLPUBFUN int XMLCALL
-               xmlSchemaValidateLengthFacet    (xmlSchemaTypePtr type, 
+               xmlSchemaValidateLengthFacet    (xmlSchemaTypePtr type,
                                                 xmlSchemaFacetPtr facet,
                                                 const xmlChar *value,
                                                 xmlSchemaValPtr val,
@@ -100,19 +100,19 @@ XMLPUBFUN int XMLCALL
                xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
                                                  xmlSchemaValType valType,
                                                  const xmlChar *value,
-                                                 xmlSchemaValPtr val,                                            
+                                                 xmlSchemaValPtr val,
                                                  unsigned long *length,
                                                  xmlSchemaWhitespaceValueType ws);
 XMLPUBFUN int XMLCALL
-               xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type, 
+               xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
                                                 const xmlChar *value,
-                                                xmlSchemaValPtr *val, 
+                                                xmlSchemaValPtr *val,
                                                 xmlNodePtr node);
 XMLPUBFUN int XMLCALL
                xmlSchemaGetCanonValue          (xmlSchemaValPtr val,
                                                 const xmlChar **retValue);
 XMLPUBFUN int XMLCALL
-               xmlSchemaGetCanonValueWhtsp     (xmlSchemaValPtr val,                                            
+               xmlSchemaGetCanonValueWhtsp     (xmlSchemaValPtr val,
                                                 const xmlChar **retValue,
                                                 xmlSchemaWhitespaceValueType ws);
 XMLPUBFUN int XMLCALL
index 0bc6888..2036236 100644 (file)
@@ -113,16 +113,16 @@ XMLPUBFUN int XMLCALL
 XMLPUBFUN int XMLCALL
         xmlUTF8Strsize                   (const xmlChar *utf,
                                          int len);
-XMLPUBFUN xmlChar * XMLCALL 
+XMLPUBFUN xmlChar * XMLCALL
         xmlUTF8Strndup                   (const xmlChar *utf,
                                          int len);
-XMLPUBFUN const xmlChar * XMLCALL 
+XMLPUBFUN const xmlChar * XMLCALL
         xmlUTF8Strpos                    (const xmlChar *utf,
                                          int pos);
 XMLPUBFUN int XMLCALL
         xmlUTF8Strloc                    (const xmlChar *utf,
                                          const xmlChar *utfchar);
-XMLPUBFUN xmlChar * XMLCALL 
+XMLPUBFUN xmlChar * XMLCALL
         xmlUTF8Strsub                    (const xmlChar *utf,
                                          int start,
                                          int len);
index 863c422..09e546f 100644 (file)
@@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
  *
  * the version string like "1.2.3"
  */
-#define LIBXML_DOTTED_VERSION "2.8.0"
+#define LIBXML_DOTTED_VERSION "2.9.1"
 
 /**
  * LIBXML_VERSION:
  *
  * the version number: 1.2.3 value is 10203
  */
-#define LIBXML_VERSION 20800
+#define LIBXML_VERSION 20901
 
 /**
  * LIBXML_VERSION_STRING:
  *
  * the version number string, 1.2.3 value is "10203"
  */
-#define LIBXML_VERSION_STRING "20800"
+#define LIBXML_VERSION_STRING "20901"
 
 /**
  * LIBXML_VERSION_EXTRA:
  *
  * extra version information, used to show a CVS compilation
  */
-#define LIBXML_VERSION_EXTRA "-GITv2.8.0-rc2-1-g22030ef"
+#define LIBXML_VERSION_EXTRA "-GITv2.9.0-69-gc0a8dd1"
 
 /**
  * LIBXML_TEST_VERSION:
@@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int 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(20800);
+#define LIBXML_TEST_VERSION xmlCheckVersion(20901);
 
 #ifndef VMS
 #if 0
@@ -98,6 +98,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
 #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
@@ -412,7 +421,11 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
  */
 
 #ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED __attribute__((unused))
+# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
+#  define ATTRIBUTE_UNUSED __attribute__((unused))
+# else
+#  define ATTRIBUTE_UNUSED
+# endif
 #endif
 
 /**
index ddd4633..00a836f 100644 (file)
@@ -98,6 +98,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
 #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
@@ -412,7 +421,11 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
  */
 
 #ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED __attribute__((unused))
+# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
+#  define ATTRIBUTE_UNUSED __attribute__((unused))
+# else
+#  define ATTRIBUTE_UNUSED
+# endif
 #endif
 
 /**
index 91e683c..dd5add3 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * Summary: text writing API for XML
  * Description: text writing API for XML
@@ -471,6 +470,10 @@ extern "C" {
         xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
                                      const xmlChar * str);
 
+    XMLPUBFUN int XMLCALL
+        xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar);
+
+
 /*
  * misc
  */
index ddd9dd8..d96776c 100644 (file)
@@ -33,7 +33,7 @@
 extern "C" {
 #endif
 #endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
-       
+
 #ifdef LIBXML_XPATH_ENABLED
 
 typedef struct _xmlXPathContext xmlXPathContext;
@@ -69,7 +69,8 @@ typedef enum {
     XPATH_ENCODING_ERROR,
     XPATH_INVALID_CHAR_ERROR,
     XPATH_INVALID_CTXT,
-    XPATH_STACK_ERROR
+    XPATH_STACK_ERROR,
+    XPATH_FORBID_VARIABLE_ERROR
 } xmlXPathError;
 
 /*
@@ -272,11 +273,11 @@ typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
  *
  * 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 
+ *    - 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
@@ -420,7 +421,7 @@ XMLPUBVAR double xmlXPathNINF;
  *         @index is out of range (0 to length-1)
  */
 #define xmlXPathNodeSetItem(ns, index)                         \
-               ((((ns) != NULL) &&                             \
+               ((((ns) != NULL) &&                             \
                  ((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
                 (ns)->nodeTab[(index)]                         \
                 : NULL)
@@ -436,64 +437,64 @@ XMLPUBVAR double xmlXPathNINF;
     (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
 
 
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                    xmlXPathFreeObject          (xmlXPathObjectPtr obj);
-XMLPUBFUN xmlNodeSetPtr XMLCALL           
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                    xmlXPathNodeSetCreate       (xmlNodePtr val);
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                    xmlXPathFreeNodeSetList     (xmlXPathObjectPtr obj);
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                    xmlXPathFreeNodeSet         (xmlNodeSetPtr obj);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPathObjectCopy          (xmlXPathObjectPtr val);
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                    xmlXPathCmpNodes            (xmlNodePtr node1,
                                                 xmlNodePtr node2);
 /**
  * Conversion functions to basic types.
  */
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                    xmlXPathCastNumberToBoolean (double val);
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                    xmlXPathCastStringToBoolean (const xmlChar * val);
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                    xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                    xmlXPathCastToBoolean       (xmlXPathObjectPtr val);
 
-XMLPUBFUN double XMLCALL                  
+XMLPUBFUN double XMLCALL
                    xmlXPathCastBooleanToNumber (int val);
-XMLPUBFUN double XMLCALL                  
+XMLPUBFUN double XMLCALL
                    xmlXPathCastStringToNumber  (const xmlChar * val);
-XMLPUBFUN double XMLCALL                  
+XMLPUBFUN double XMLCALL
                    xmlXPathCastNodeToNumber    (xmlNodePtr node);
-XMLPUBFUN double XMLCALL                  
+XMLPUBFUN double XMLCALL
                    xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
-XMLPUBFUN double XMLCALL                  
+XMLPUBFUN double XMLCALL
                    xmlXPathCastToNumber        (xmlXPathObjectPtr val);
 
-XMLPUBFUN xmlChar * XMLCALL       
+XMLPUBFUN xmlChar * XMLCALL
                    xmlXPathCastBooleanToString (int val);
-XMLPUBFUN xmlChar * XMLCALL       
+XMLPUBFUN xmlChar * XMLCALL
                    xmlXPathCastNumberToString  (double val);
-XMLPUBFUN xmlChar * XMLCALL       
+XMLPUBFUN xmlChar * XMLCALL
                    xmlXPathCastNodeToString    (xmlNodePtr node);
-XMLPUBFUN xmlChar * XMLCALL       
+XMLPUBFUN xmlChar * XMLCALL
                    xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
-XMLPUBFUN xmlChar * XMLCALL       
+XMLPUBFUN xmlChar * XMLCALL
                    xmlXPathCastToString        (xmlXPathObjectPtr val);
 
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPathConvertBoolean      (xmlXPathObjectPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPathConvertNumber       (xmlXPathObjectPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPathConvertString       (xmlXPathObjectPtr val);
 
 /**
  * Context handling.
  */
-XMLPUBFUN xmlXPathContextPtr XMLCALL 
+XMLPUBFUN xmlXPathContextPtr XMLCALL
                    xmlXPathNewContext          (xmlDocPtr doc);
 XMLPUBFUN void XMLCALL
                    xmlXPathFreeContext         (xmlXPathContextPtr ctxt);
@@ -505,36 +506,43 @@ XMLPUBFUN int XMLCALL
 /**
  * Evaluation functions.
  */
-XMLPUBFUN long XMLCALL               
+XMLPUBFUN long XMLCALL
                    xmlXPathOrderDocElems       (xmlDocPtr doc);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
+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  
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPathEvalExpression      (const xmlChar *str,
                                                 xmlXPathContextPtr ctxt);
-XMLPUBFUN int XMLCALL                
+XMLPUBFUN int XMLCALL
                    xmlXPathEvalPredicate       (xmlXPathContextPtr ctxt,
                                                 xmlXPathObjectPtr res);
 /**
  * Separate compilation/evaluation entry points.
  */
-XMLPUBFUN xmlXPathCompExprPtr XMLCALL 
+XMLPUBFUN xmlXPathCompExprPtr XMLCALL
                    xmlXPathCompile             (const xmlChar *str);
-XMLPUBFUN xmlXPathCompExprPtr XMLCALL 
+XMLPUBFUN xmlXPathCompExprPtr XMLCALL
                    xmlXPathCtxtCompile         (xmlXPathContextPtr ctxt,
-                                                const xmlChar *str);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL   
+                                                const xmlChar *str);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPathCompiledEval        (xmlXPathCompExprPtr comp,
                                                 xmlXPathContextPtr ctx);
-XMLPUBFUN int XMLCALL   
+XMLPUBFUN int XMLCALL
                    xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
                                                 xmlXPathContextPtr ctxt);
-XMLPUBFUN void XMLCALL                
+XMLPUBFUN void XMLCALL
                    xmlXPathFreeCompExpr        (xmlXPathCompExprPtr comp);
 #endif /* LIBXML_XPATH_ENABLED */
 #if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                    xmlXPathInit                (void);
 XMLPUBFUN int XMLCALL
                xmlXPathIsNaN   (double val);
index dcd5243..70c9db9 100644 (file)
@@ -100,16 +100,16 @@ extern "C" {
  */
 #define xmlXPathGetContextNode(ctxt)   ((ctxt)->context->node)
 
-XMLPUBFUN int XMLCALL          
+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);
+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:
@@ -296,7 +296,9 @@ XMLPUBFUN void * XMLCALL
 #define CHECK_ARITY(x)                                                 \
     if (ctxt == NULL) return;                                          \
     if (nargs != (x))                                                  \
-        XP_ERROR(XPATH_INVALID_ARITY);
+        XP_ERROR(XPATH_INVALID_ARITY);                                 \
+    if (ctxt->valueNr < ctxt->valueFrame + (x))                                \
+        XP_ERROR(XPATH_STACK_ERROR);
 
 /**
  * CAST_TO_STRING:
@@ -329,7 +331,7 @@ XMLPUBFUN void * XMLCALL
  * Variable Lookup forwarding.
  */
 
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
        xmlXPathRegisterVariableLookup  (xmlXPathContextPtr ctxt,
                                         xmlXPathVariableLookupFunc f,
                                         void *data);
@@ -338,7 +340,7 @@ XMLPUBFUN void XMLCALL
  * Function Lookup forwarding.
  */
 
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
            xmlXPathRegisterFuncLookup  (xmlXPathContextPtr ctxt,
                                         xmlXPathFuncLookupFunc f,
                                         void *funcCtxt);
@@ -346,7 +348,7 @@ XMLPUBFUN void XMLCALL
 /*
  * Error reporting.
  */
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlXPatherror   (xmlXPathParserContextPtr ctxt,
                                 const char *file,
                                 int line,
@@ -357,11 +359,11 @@ XMLPUBFUN void XMLCALL
                                 int error);
 
 #ifdef LIBXML_DEBUG_ENABLED
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                xmlXPathDebugDumpObject (FILE *output,
                                         xmlXPathObjectPtr cur,
                                         int depth);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
            xmlXPathDebugDumpCompExpr(FILE *output,
                                         xmlXPathCompExprPtr comp,
                                         int depth);
@@ -369,48 +371,48 @@ XMLPUBFUN void XMLCALL
 /**
  * NodeSet handling.
  */
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlXPathNodeSetContains         (xmlNodeSetPtr cur,
                                                 xmlNodePtr val);
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathDifference              (xmlNodeSetPtr nodes1,
                                                 xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathIntersection            (xmlNodeSetPtr nodes1,
                                                 xmlNodeSetPtr nodes2);
 
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathDistinctSorted          (xmlNodeSetPtr nodes);
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathDistinct                (xmlNodeSetPtr nodes);
 
-XMLPUBFUN int XMLCALL          
+XMLPUBFUN int XMLCALL
                xmlXPathHasSameNodes            (xmlNodeSetPtr nodes1,
                                                 xmlNodeSetPtr nodes2);
 
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathNodeLeadingSorted       (xmlNodeSetPtr nodes,
                                                 xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathLeadingSorted           (xmlNodeSetPtr nodes1,
                                                 xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathNodeLeading             (xmlNodeSetPtr nodes,
                                                 xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathLeading                 (xmlNodeSetPtr nodes1,
                                                 xmlNodeSetPtr nodes2);
 
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathNodeTrailingSorted      (xmlNodeSetPtr nodes,
                                                 xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathTrailingSorted          (xmlNodeSetPtr nodes1,
                                                 xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathNodeTrailing            (xmlNodeSetPtr nodes,
                                                 xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL        
+XMLPUBFUN xmlNodeSetPtr XMLCALL
                xmlXPathTrailing                (xmlNodeSetPtr nodes1,
                                                 xmlNodeSetPtr nodes2);
 
@@ -419,51 +421,51 @@ XMLPUBFUN xmlNodeSetPtr XMLCALL
  * Extending a context.
  */
 
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                xmlXPathRegisterNs              (xmlXPathContextPtr ctxt,
                                                 const xmlChar *prefix,
                                                 const xmlChar *ns_uri);
-XMLPUBFUN const xmlChar * XMLCALL         
+XMLPUBFUN const xmlChar * XMLCALL
                xmlXPathNsLookup                (xmlXPathContextPtr ctxt,
                                                 const xmlChar *prefix);
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                xmlXPathRegisteredNsCleanup     (xmlXPathContextPtr ctxt);
 
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                xmlXPathRegisterFunc            (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 xmlXPathFunction f);
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                xmlXPathRegisterFuncNS          (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri,
                                                 xmlXPathFunction f);
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                xmlXPathRegisterVariable        (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 xmlXPathObjectPtr value);
-XMLPUBFUN int XMLCALL             
+XMLPUBFUN int XMLCALL
                xmlXPathRegisterVariableNS      (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri,
                                                 xmlXPathObjectPtr value);
-XMLPUBFUN xmlXPathFunction XMLCALL   
+XMLPUBFUN xmlXPathFunction XMLCALL
                xmlXPathFunctionLookup          (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name);
-XMLPUBFUN xmlXPathFunction XMLCALL   
+XMLPUBFUN xmlXPathFunction XMLCALL
                xmlXPathFunctionLookupNS        (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri);
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                xmlXPathRegisteredFuncsCleanup  (xmlXPathContextPtr ctxt);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathVariableLookup          (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL  
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathVariableLookupNS        (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri);
-XMLPUBFUN void XMLCALL            
+XMLPUBFUN void XMLCALL
                xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
 
 /**
@@ -471,79 +473,79 @@ XMLPUBFUN void XMLCALL
  */
 XMLPUBFUN xmlXPathParserContextPtr XMLCALL
                  xmlXPathNewParserContext      (const xmlChar *str,
-                                                xmlXPathContextPtr ctxt);
-XMLPUBFUN void XMLCALL           
+                                                xmlXPathContextPtr ctxt);
+XMLPUBFUN void XMLCALL
                xmlXPathFreeParserContext       (xmlXPathParserContextPtr ctxt);
 
 /* TODO: remap to xmlXPathValuePop and Push. */
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                valuePop                        (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN int XMLCALL            
+XMLPUBFUN int XMLCALL
                valuePush                       (xmlXPathParserContextPtr ctxt,
-                                                xmlXPathObjectPtr value);
+                                                xmlXPathObjectPtr value);
 
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathNewString               (const xmlChar *val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathNewCString              (const char *val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathWrapString              (xmlChar *val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathWrapCString             (char * val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathNewFloat                (double val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathNewBoolean              (int val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathNewNodeSet              (xmlNodePtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathNewValueTree            (xmlNodePtr val);
-XMLPUBFUN void XMLCALL           
+XMLPUBFUN int XMLCALL
                xmlXPathNodeSetAdd              (xmlNodeSetPtr cur,
                                                 xmlNodePtr val);
-XMLPUBFUN void XMLCALL              
+XMLPUBFUN int XMLCALL
                xmlXPathNodeSetAddUnique        (xmlNodeSetPtr cur,
                                                 xmlNodePtr val);
-XMLPUBFUN void XMLCALL           
-               xmlXPathNodeSetAddNs            (xmlNodeSetPtr cur, 
-                                                xmlNodePtr node, 
+XMLPUBFUN int XMLCALL
+               xmlXPathNodeSetAddNs            (xmlNodeSetPtr cur,
+                                                xmlNodePtr node,
                                                 xmlNsPtr ns);
-XMLPUBFUN void XMLCALL              
+XMLPUBFUN void XMLCALL
                xmlXPathNodeSetSort             (xmlNodeSetPtr set);
 
-XMLPUBFUN void XMLCALL           
+XMLPUBFUN void XMLCALL
                xmlXPathRoot                    (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL           
+XMLPUBFUN void XMLCALL
                xmlXPathEvalExpr                (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL      
+XMLPUBFUN xmlChar * XMLCALL
                xmlXPathParseName               (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL      
+XMLPUBFUN xmlChar * XMLCALL
                xmlXPathParseNCName             (xmlXPathParserContextPtr ctxt);
 
 /*
  * Existing functions.
  */
-XMLPUBFUN double XMLCALL 
+XMLPUBFUN double XMLCALL
                xmlXPathStringEvalNumber        (const xmlChar *str);
-XMLPUBFUN int XMLCALL 
-               xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt, 
+XMLPUBFUN int XMLCALL
+               xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
                                                 xmlXPathObjectPtr res);
-XMLPUBFUN void XMLCALL 
+XMLPUBFUN void XMLCALL
                xmlXPathRegisterAllFunctions    (xmlXPathContextPtr ctxt);
-XMLPUBFUN xmlNodeSetPtr XMLCALL 
-               xmlXPathNodeSetMerge            (xmlNodeSetPtr val1, 
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+               xmlXPathNodeSetMerge            (xmlNodeSetPtr val1,
                                                 xmlNodeSetPtr val2);
-XMLPUBFUN void XMLCALL 
-               xmlXPathNodeSetDel              (xmlNodeSetPtr cur, 
+XMLPUBFUN void XMLCALL
+               xmlXPathNodeSetDel              (xmlNodeSetPtr cur,
                                                 xmlNodePtr val);
-XMLPUBFUN void XMLCALL 
-               xmlXPathNodeSetRemove           (xmlNodeSetPtr cur, 
+XMLPUBFUN void XMLCALL
+               xmlXPathNodeSetRemove           (xmlNodeSetPtr cur,
                                                 int val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathNewNodeSetList          (xmlNodeSetPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathWrapNodeSet             (xmlNodeSetPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL 
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                xmlXPathWrapExternal            (void *val);
 
 XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
@@ -621,7 +623,7 @@ XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, in
  * Really internal functions
  */
 XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
+
 #ifdef __cplusplus
 }
 #endif
index dde1dfb..b99112b 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Added support for the element() scheme described in:
  * W3C Proposed Recommendation 13 November 2002
- * http://www.w3.org/TR/2002/PR-xptr-element-20021113/  
+ * http://www.w3.org/TR/2002/PR-xptr-element-20021113/
  *
  * Copy: See Copyright for the status of this software.
  *
@@ -43,68 +43,68 @@ struct _xmlLocationSet {
  * Handling of location sets.
  */
 
-XMLPUBFUN xmlLocationSetPtr XMLCALL                    
+XMLPUBFUN xmlLocationSetPtr XMLCALL
                    xmlXPtrLocationSetCreate    (xmlXPathObjectPtr val);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                    xmlXPtrFreeLocationSet      (xmlLocationSetPtr obj);
-XMLPUBFUN xmlLocationSetPtr XMLCALL    
+XMLPUBFUN xmlLocationSetPtr XMLCALL
                    xmlXPtrLocationSetMerge     (xmlLocationSetPtr val1,
                                                 xmlLocationSetPtr val2);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrNewRange             (xmlNodePtr start,
                                                 int startindex,
                                                 xmlNodePtr end,
                                                 int endindex);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrNewRangePoints       (xmlXPathObjectPtr start,
                                                 xmlXPathObjectPtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrNewRangeNodePoint    (xmlNodePtr start,
                                                 xmlXPathObjectPtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrNewRangePointNode    (xmlXPathObjectPtr start,
                                                 xmlNodePtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL                    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrNewRangeNodes        (xmlNodePtr start,
                                                 xmlNodePtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrNewLocationSetNodes  (xmlNodePtr start,
                                                 xmlNodePtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrNewRangeNodeObject   (xmlNodePtr start,
                                                 xmlXPathObjectPtr end);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrNewCollapsedRange    (xmlNodePtr start);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                    xmlXPtrLocationSetAdd       (xmlLocationSetPtr cur,
                                                 xmlXPathObjectPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrWrapLocationSet      (xmlLocationSetPtr val);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                    xmlXPtrLocationSetDel       (xmlLocationSetPtr cur,
                                                 xmlXPathObjectPtr val);
-XMLPUBFUN void XMLCALL                 
+XMLPUBFUN void XMLCALL
                    xmlXPtrLocationSetRemove    (xmlLocationSetPtr cur,
                                                 int val);
 
 /*
  * Functions.
  */
-XMLPUBFUN xmlXPathContextPtr XMLCALL   
+XMLPUBFUN xmlXPathContextPtr XMLCALL
                    xmlXPtrNewContext           (xmlDocPtr doc,
                                                 xmlNodePtr here,
                                                 xmlNodePtr origin);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL    
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
                    xmlXPtrEval                 (const xmlChar *str,
                                                 xmlXPathContextPtr ctx);
-XMLPUBFUN void XMLCALL                                     
+XMLPUBFUN void XMLCALL
                    xmlXPtrRangeToFunction      (xmlXPathParserContextPtr ctxt,
-                                                        int nargs);
-XMLPUBFUN xmlNodePtr XMLCALL           
+                                                int nargs);
+XMLPUBFUN xmlNodePtr XMLCALL
                    xmlXPtrBuildNodeList        (xmlXPathObjectPtr obj);
-XMLPUBFUN void XMLCALL         
+XMLPUBFUN void XMLCALL
                    xmlXPtrEvalRangePredicate   (xmlXPathParserContextPtr ctxt);
 #ifdef __cplusplus
 }
index c762a64..e6a1a99 100644 (file)
@@ -41,7 +41,7 @@
 #define EWOULDBLOCK             WSAEWOULDBLOCK
 #define ESHUTDOWN               WSAESHUTDOWN
 
-#ifndef _MSC_VER
+#if (!defined(_MSC_VER) || (_MSC_VER < 1600))
 #define EINPROGRESS             WSAEINPROGRESS
 #define EALREADY                WSAEALREADY
 #define ENOTSOCK                WSAENOTSOCK
index 6781b98..a9244eb 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-01-19.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -156,6 +156,10 @@ while test $# -ne 0; do
     -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;;
@@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     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
 
@@ -200,7 +208,11 @@ if test $# -eq 0; then
 fi
 
 if test -z "$dir_arg"; then
-  trap '(exit $?); exit' 1 2 13 15
+  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.
@@ -228,9 +240,9 @@ fi
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for `test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -252,12 +264,7 @@ do
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
@@ -385,7 +392,7 @@ do
 
       case $dstdir in
        /*) prefix='/';;
-       -*) prefix='./';;
+       [-=\(\)!]*) prefix='./';;
        *)  prefix='';;
       esac
 
@@ -403,7 +410,7 @@ do
 
       for d
       do
-       test -z "$d" && continue
+       test X"$d" = X && continue
 
        prefix=$prefix$d
        if test -d "$prefix"; then
index e75178a..e941cb0 100644 (file)
--- a/legacy.c
+++ b/legacy.c
@@ -393,7 +393,7 @@ xmlSetFeature(xmlParserCtxtPtr ctxt, const char *name, void *value)
  * @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
  *
@@ -456,7 +456,7 @@ xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
 /**
  * xmlNamespaceParseQName:
  * @ctxt:  an XML parser context
- * @prefix:  a xmlChar ** 
+ * @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.
@@ -603,7 +603,7 @@ xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
 /**
  * xmlParserHandleReference:
  * @ctxt:  the parser context
- * 
+ *
  * TODO: Remove, now deprecated ... the test is done directly in the
  *       content parsing
  * routines.
@@ -615,7 +615,7 @@ xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
  * [ 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. 
+ * of the following entities: amp, lt, gt, apos, quot.
  *
  * [ WFC: Parsed Entity ]
  * An entity reference must not contain the name of an unparsed entity
@@ -624,7 +624,7 @@ xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
  *                  '&#x' [0-9a-fA-F]+ ';'
  *
  * A PEReference may have been detected in the current input stream
- * the handling is done accordingly to 
+ * the handling is done accordingly to
  *      http://www.w3.org/TR/REC-xml#entproc
  */
 void
@@ -693,7 +693,7 @@ xmlNewGlobalNs(xmlDocPtr doc ATTRIBUTE_UNUSED,
 /**
  * xmlUpgradeOldNs:
  * @doc:  a document pointer
- * 
+ *
  * Upgrade old style Namespaces (PI) and move them to the root of the document.
  * DEPRECATED
  */
@@ -719,7 +719,7 @@ xmlUpgradeOldNs(xmlDocPtr doc ATTRIBUTE_UNUSED)
  *
  * People must migrate their code to xmlEncodeEntitiesReentrant !
  * This routine will issue a warning when encountered.
- * 
+ *
  * Returns NULL
  */
 const xmlChar *
@@ -740,7 +740,7 @@ xmlEncodeEntities(xmlDocPtr doc ATTRIBUTE_UNUSED,
 
 /************************************************************************
  *                                                                     *
- *             Old set of SAXv1 functions                              *
+ *             Old set of SAXv1 functions                              *
  *                                                                     *
  ************************************************************************/
 static int deprecated_v1_msg = 0;
@@ -961,8 +961,8 @@ getParameterEntity(void *ctx, const xmlChar * name)
 /**
  * entityDecl:
  * @ctx: the user data (XML parser context)
- * @name:  the entity name 
- * @type:  the entity type 
+ * @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).
@@ -983,8 +983,8 @@ entityDecl(void *ctx, const xmlChar * name, int type,
  * attributeDecl:
  * @ctx: the user data (XML parser context)
  * @elem:  the name of the element
- * @fullname:  the attribute name 
- * @type:  the attribute type 
+ * @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
@@ -1005,8 +1005,8 @@ attributeDecl(void *ctx, const xmlChar * elem, const xmlChar * fullname,
 /**
  * elementDecl:
  * @ctx: the user data (XML parser context)
- * @name:  the element name 
- * @type:  the element type 
+ * @name:  the element name
+ * @type:  the element type
  * @content: the element value tree
  *
  * An element definition has been parsed
@@ -1159,7 +1159,7 @@ endElement(void *ctx, const xmlChar * name ATTRIBUTE_UNUSED)
  * @ctx: the user data (XML parser context)
  * @name:  The entity name
  *
- * called when an entity reference is detected. 
+ * called when an entity reference is detected.
  * DEPRECATED: use xmlSAX2Reference()
  */
 void
index 0a4c833..cab6834 100644 (file)
@@ -8,5 +8,5 @@ Name: libXML
 Version: @VERSION@
 Description: libXML library version2.
 Requires:
-Libs: -L${libdir} -lxml2 @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@
+Libs: -L${libdir} -lxml2 @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@
 Cflags: -I${includedir} @XML_INCLUDEDIR@ @XML_CFLAGS@
index 31a1b8c..f5f5f03 100644 (file)
@@ -9,5 +9,5 @@ Version: @VERSION@
 Description: libXML library version2.
 Requires:
 Libs: -L${libdir} -lxml2
-Libs.private: @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@
+Libs.private: @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@
 Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@
index 88d3eee..b3e9fef 100644 (file)
--- a/libxml.3
+++ b/libxml.3
@@ -5,7 +5,7 @@ libxml \- library used to parse XML files
 The
 .I  libxml
 library is used to parse XML files. 
-Its internal document repesentation is as close as possible to the 
+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.
index fa3aea4..2da9044 100644 (file)
--- a/libxml.h
+++ b/libxml.h
 #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
@@ -79,6 +84,8 @@ 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
@@ -86,6 +93,8 @@ void __xmlGlobalInitMutexDestroy(void);
 int __xmlRandom(void);
 #endif
 
+int xmlNop(void);
+
 #ifdef IN_LIBXML
 #ifdef __GNUC__
 #ifdef PIC
index 03eb24e..48060bb 100644 (file)
@@ -1,22 +1,22 @@
 Summary: Library providing XML and HTML support
 Name: libxml2
 Version: @VERSION@
-Release: 1
+Release: 1%{?dist}%{?extra_release}
 License: MIT
 Group: Development/Libraries
 Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+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 
+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 subnodes or ranges. A flexible Input/Output mechanism is
+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.
 
@@ -30,28 +30,36 @@ 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 
+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 subnodes or ranges. A flexible Input/Output mechanism is
+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}
-Requires: python
 
 %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 
+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.
@@ -62,29 +70,34 @@ at parse time or later once the document has been modified.
 %build
 %configure
 make %{_smp_mflags}
-gzip -9 ChangeLog
 
 %install
 rm -fr %{buildroot}
 
-%makeinstall
-(cd doc/examples ; make clean ; rm -rf .deps Makefile)
-gzip -9 doc/libxml2-api.xml
+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
-/sbin/ldconfig
+%post -p /sbin/ldconfig
 
-%postun
-/sbin/ldconfig
+%postun -p /sbin/ldconfig
 
 %files
 %defattr(-, root, root)
 
-%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO
+%doc AUTHORS NEWS README Copyright TODO
 %doc %{_mandir}/man1/xmllint.1*
 %doc %{_mandir}/man1/xmlcatalog.1*
 %doc %{_mandir}/man3/libxml.3*
@@ -97,7 +110,7 @@ rm -fr %{buildroot}
 %defattr(-, root, root)
 
 %doc %{_mandir}/man1/xml2-config.1*
-%doc AUTHORS ChangeLog.gz NEWS README Copyright
+%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
@@ -108,16 +121,20 @@ rm -fr %{buildroot}
 %doc %{_datadir}/gtk-doc/html/libxml2/*.css
 
 %{_libdir}/lib*.so
-%{_libdir}/*a
 %{_libdir}/*.sh
 %{_includedir}/*
 %{_bindir}/xml2-config
 %{_datadir}/aclocal/libxml.m4
 %{_libdir}/pkgconfig/libxml-2.0.pc
+
+%files static
+%defattr(-, root, root)
+
+%{_libdir}/*a
+
 %files python
 %defattr(-, root, root)
 
-%doc AUTHORS ChangeLog.gz NEWS README Copyright
 %{_libdir}/python*/site-packages/libxml2.py*
 %{_libdir}/python*/site-packages/drv_libxml2.py*
 %{_libdir}/python*/site-packages/libxml2mod*
index 0e4cdaf..3f2f312 100644 (file)
@@ -1,22 +1,22 @@
 Summary: Library providing XML and HTML support
 Name: libxml2
-Version: 2.8.0
-Release: 1
+Version: 2.9.1
+Release: 1%{?dist}%{?extra_release}
 License: MIT
 Group: Development/Libraries
 Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+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 
+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 subnodes or ranges. A flexible Input/Output mechanism is
+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.
 
@@ -30,28 +30,36 @@ 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 
+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 subnodes or ranges. A flexible Input/Output mechanism is
+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}
-Requires: python
 
 %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 
+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.
@@ -62,29 +70,34 @@ at parse time or later once the document has been modified.
 %build
 %configure
 make %{_smp_mflags}
-gzip -9 ChangeLog
 
 %install
 rm -fr %{buildroot}
 
-%makeinstall
-(cd doc/examples ; make clean ; rm -rf .deps Makefile)
-gzip -9 doc/libxml2-api.xml
+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
-/sbin/ldconfig
+%post -p /sbin/ldconfig
 
-%postun
-/sbin/ldconfig
+%postun -p /sbin/ldconfig
 
 %files
 %defattr(-, root, root)
 
-%doc AUTHORS ChangeLog.gz NEWS README Copyright TODO
+%doc AUTHORS NEWS README Copyright TODO
 %doc %{_mandir}/man1/xmllint.1*
 %doc %{_mandir}/man1/xmlcatalog.1*
 %doc %{_mandir}/man3/libxml.3*
@@ -97,7 +110,7 @@ rm -fr %{buildroot}
 %defattr(-, root, root)
 
 %doc %{_mandir}/man1/xml2-config.1*
-%doc AUTHORS ChangeLog.gz NEWS README Copyright
+%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
@@ -108,16 +121,20 @@ rm -fr %{buildroot}
 %doc %{_datadir}/gtk-doc/html/libxml2/*.css
 
 %{_libdir}/lib*.so
-%{_libdir}/*a
 %{_libdir}/*.sh
 %{_includedir}/*
 %{_bindir}/xml2-config
 %{_datadir}/aclocal/libxml.m4
 %{_libdir}/pkgconfig/libxml-2.0.pc
+
+%files static
+%defattr(-, root, root)
+
+%{_libdir}/*a
+
 %files python
 %defattr(-, root, root)
 
-%doc AUTHORS ChangeLog.gz NEWS README Copyright
 %{_libdir}/python*/site-packages/libxml2.py*
 %{_libdir}/python*/site-packages/drv_libxml2.py*
 %{_libdir}/python*/site-packages/libxml2mod*
@@ -128,6 +145,6 @@ rm -fr %{buildroot}
 %doc doc/python.html
 
 %changelog
-* Wed May 23 2012 Daniel Veillard <veillard@redhat.com>
-- upstream release 2.8.0 see http://xmlsoft.org/news.html
+* Fri Apr 19 2013 Daniel Veillard <veillard@redhat.com>
+- upstream release 2.9.1 see http://xmlsoft.org/news.html
 
index 93eff53..370dcf1 100644 (file)
@@ -2244,3 +2244,38 @@ LIBXML2_2.8.0 {
   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/list.c b/list.c
index 5c01c83..d33d928 100644 (file)
--- a/list.c
+++ b/list.c
@@ -94,15 +94,15 @@ xmlLinkCompare(const void *data0, const void *data1)
  *
  * Returns the link containing the data or NULL
  */
-static xmlLinkPtr 
-xmlListLowerSearch(xmlListPtr l, void *data) 
+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;    
+    return lk;
 }
 
 /**
@@ -114,15 +114,15 @@ xmlListLowerSearch(xmlListPtr l, void *data)
  *
  * Returns the link containing the data or NULL
  */
-static xmlLinkPtr 
-xmlListHigherSearch(xmlListPtr l, void *data) 
+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;    
+    return lk;
 }
 
 /**
@@ -134,8 +134,8 @@ xmlListHigherSearch(xmlListPtr l, void *data)
  *
  * Returns the link containing the data or NULL
  */
-static xmlLinkPtr 
-xmlListLinkSearch(xmlListPtr l, void *data) 
+static xmlLinkPtr
+xmlListLinkSearch(xmlListPtr l, void *data)
 {
     xmlLinkPtr lk;
     if (l == NULL)
@@ -159,8 +159,8 @@ xmlListLinkSearch(xmlListPtr l, void *data)
  *
  * Returns the link containing the data or NULL
  */
-static xmlLinkPtr 
-xmlListLinkReverseSearch(xmlListPtr l, void *data) 
+static xmlLinkPtr
+xmlListLinkReverseSearch(xmlListPtr l, void *data)
 {
     xmlLinkPtr lk;
     if (l == NULL)
@@ -189,16 +189,16 @@ xmlListCreate(xmlListDeallocator deallocator, xmlListDataCompare compare)
 {
     xmlListPtr l;
     if (NULL == (l = (xmlListPtr )xmlMalloc( sizeof(xmlList)))) {
-        xmlGenericError(xmlGenericErrorContext, 
+        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, 
+        xmlGenericError(xmlGenericErrorContext,
                        "Cannot initialize memory for sentinel");
        xmlFree(l);
         return (NULL);
@@ -206,7 +206,7 @@ xmlListCreate(xmlListDeallocator deallocator, xmlListDataCompare compare)
     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;
@@ -217,7 +217,7 @@ xmlListCreate(xmlListDeallocator deallocator, xmlListDataCompare compare)
         l->linkCompare = xmlLinkCompare;
     return l;
 }
-    
+
 /**
  * xmlListSearch:
  * @l:  a list
@@ -228,7 +228,7 @@ xmlListCreate(xmlListDeallocator deallocator, xmlListDataCompare compare)
  * Returns the value associated to @data or NULL in case of error
  */
 void *
-xmlListSearch(xmlListPtr l, void *data) 
+xmlListSearch(xmlListPtr l, void *data)
 {
     xmlLinkPtr lk;
     if (l == NULL)
@@ -249,7 +249,7 @@ xmlListSearch(xmlListPtr l, void *data)
  * Returns the value associated to @data or NULL in case of error
  */
 void *
-xmlListReverseSearch(xmlListPtr l, void *data) 
+xmlListReverseSearch(xmlListPtr l, void *data)
 {
     xmlLinkPtr lk;
     if (l == NULL)
@@ -270,7 +270,7 @@ xmlListReverseSearch(xmlListPtr l, void *data)
  * Returns 0 in case of success, 1 in case of failure
  */
 int
-xmlListInsert(xmlListPtr l, void *data) 
+xmlListInsert(xmlListPtr l, void *data)
 {
     xmlLinkPtr lkPlace, lkNew;
 
@@ -280,7 +280,7 @@ xmlListInsert(xmlListPtr l, void *data)
     /* Add the new link */
     lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink));
     if (lkNew == NULL) {
-        xmlGenericError(xmlGenericErrorContext, 
+        xmlGenericError(xmlGenericErrorContext,
                        "Cannot initialize memory for new link");
         return (1);
     }
@@ -302,7 +302,7 @@ xmlListInsert(xmlListPtr l, void *data)
  *
  * Returns 0 in case of success, 1 in case of failure
  */
-int xmlListAppend(xmlListPtr l, void *data) 
+int xmlListAppend(xmlListPtr l, void *data)
 {
     xmlLinkPtr lkPlace, lkNew;
 
@@ -312,7 +312,7 @@ int xmlListAppend(xmlListPtr l, void *data)
     /* Add the new link */
     lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink));
     if (lkNew == NULL) {
-        xmlGenericError(xmlGenericErrorContext, 
+        xmlGenericError(xmlGenericErrorContext,
                        "Cannot initialize memory for new link");
         return (1);
     }
@@ -353,7 +353,7 @@ int
 xmlListRemoveFirst(xmlListPtr l, void *data)
 {
     xmlLinkPtr lk;
-    
+
     if (l == NULL)
         return(0);
     /*Find the first instance of this data */
@@ -378,7 +378,7 @@ int
 xmlListRemoveLast(xmlListPtr l, void *data)
 {
     xmlLinkPtr lk;
-    
+
     if (l == NULL)
         return(0);
     /*Find the last instance of this data */
@@ -403,7 +403,7 @@ int
 xmlListRemoveAll(xmlListPtr l, void *data)
 {
     int count=0;
-    
+
     if (l == NULL)
         return(0);
 
@@ -422,7 +422,7 @@ void
 xmlListClear(xmlListPtr l)
 {
     xmlLinkPtr  lk;
-    
+
     if (l == NULL)
         return;
     lk = l->sentinel->next;
@@ -458,14 +458,14 @@ xmlListEmpty(xmlListPtr l)
  *
  * Returns the first element in the list, or NULL
  */
-xmlLinkPtr 
+xmlLinkPtr
 xmlListFront(xmlListPtr l)
 {
     if (l == NULL)
         return(NULL);
     return (l->sentinel->next);
 }
-    
+
 /**
  * xmlListEnd:
  * @l:  a list
@@ -474,14 +474,14 @@ xmlListFront(xmlListPtr l)
  *
  * Returns the last element in the list, or NULL
  */
-xmlLinkPtr 
+xmlLinkPtr
 xmlListEnd(xmlListPtr l)
 {
     if (l == NULL)
         return(NULL);
     return (l->sentinel->prev);
 }
-    
+
 /**
  * xmlListSize:
  * @l:  a list
@@ -539,7 +539,7 @@ xmlListPopBack(xmlListPtr l)
  * Returns 1 if successful, 0 otherwise
  */
 int
-xmlListPushFront(xmlListPtr l, void *data) 
+xmlListPushFront(xmlListPtr l, void *data)
 {
     xmlLinkPtr lkPlace, lkNew;
 
@@ -549,7 +549,7 @@ xmlListPushFront(xmlListPtr l, void *data)
     /* Add the new link */
     lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink));
     if (lkNew == NULL) {
-        xmlGenericError(xmlGenericErrorContext, 
+        xmlGenericError(xmlGenericErrorContext,
                        "Cannot initialize memory for new link");
         return (0);
     }
@@ -571,7 +571,7 @@ xmlListPushFront(xmlListPtr l, void *data)
  * Returns 1 if successful, 0 otherwise
  */
 int
-xmlListPushBack(xmlListPtr l, void *data) 
+xmlListPushBack(xmlListPtr l, void *data)
 {
     xmlLinkPtr lkPlace, lkNew;
 
@@ -580,7 +580,7 @@ xmlListPushBack(xmlListPtr l, void *data)
     lkPlace = l->sentinel->prev;
     /* Add the new link */
     if (NULL ==(lkNew = (xmlLinkPtr )xmlMalloc(sizeof(xmlLink)))) {
-        xmlGenericError(xmlGenericErrorContext, 
+        xmlGenericError(xmlGenericErrorContext,
                        "Cannot initialize memory for new link");
         return (0);
     }
@@ -643,7 +643,7 @@ void
 xmlListSort(xmlListPtr l)
 {
     xmlListPtr lTemp;
-    
+
     if (l == NULL)
         return;
     if(xmlListEmpty(l))
@@ -725,10 +725,10 @@ xmlListMerge(xmlListPtr l1, xmlListPtr l2)
  * @old:  the list
  *
  * Duplicate the list
- * 
+ *
  * Returns a new copy of the list or NULL in case of error
  */
-xmlListPtr 
+xmlListPtr
 xmlListDup(const xmlListPtr old)
 {
     xmlListPtr cur;
@@ -754,7 +754,7 @@ xmlListDup(const xmlListPtr old)
  * @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
@@ -771,7 +771,7 @@ xmlListCopy(xmlListPtr cur, const xmlListPtr old)
             return (1);
         }
     }
-    return (0);    
+    return (0);
 }
 /* xmlListUnique() */
 /* xmlListSwap */
old mode 100755 (executable)
new mode 100644 (file)
index aa5624c..63ae69d
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,9 +1,9 @@
 
-# libtool (GNU libtool) 2.4
+# 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 Free Software Foundation, Inc.
+# 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.
 
@@ -41,6 +41,7 @@
 #       --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
@@ -69,7 +70,7 @@
 #         compiler:            $LTCC
 #         compiler flags:              $LTCFLAGS
 #         linker:              $LD (gnu? $with_gnu_ld)
-#         $progname:   (GNU libtool) 2.4
+#         $progname:   (GNU libtool) 2.4.2
 #         automake:    $automake_version
 #         autoconf:    $autoconf_version
 #
@@ -79,9 +80,9 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION=2.4
+VERSION=2.4.2
 TIMESTAMP=""
-package_revision=1.3293
+package_revision=1.3337
 
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -136,15 +137,10 @@ progpath="$0"
 
 : ${CP="cp -f"}
 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
-: ${LN_S="ln -s"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
-: ${SED="/bin/sed"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
 : ${Xsed="$SED -e 1s/^X//"}
 
@@ -387,7 +383,7 @@ case $progpath in
      ;;
   *)
      save_IFS="$IFS"
-     IFS=:
+     IFS=${PATH_SEPARATOR-:}
      for progdir in $PATH; do
        IFS="$save_IFS"
        test -x "$progdir/$progname" && break
@@ -771,8 +767,8 @@ func_help ()
        s*\$LTCFLAGS*'"$LTCFLAGS"'*
        s*\$LD*'"$LD"'*
        s/\$with_gnu_ld/'"$with_gnu_ld"'/
-       s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
-       s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+       s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+       s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
        p
        d
      }
@@ -1052,6 +1048,7 @@ opt_finish=false
 opt_help=false
 opt_help_all=false
 opt_silent=:
+opt_warning=:
 opt_verbose=:
 opt_silent=false
 opt_verbose=false
@@ -1120,6 +1117,10 @@ esac
                        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"
@@ -2059,7 +2060,7 @@ func_mode_compile ()
     *.[cCFSifmso] | \
     *.ada | *.adb | *.ads | *.asm | \
     *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
-    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
       func_xform "$libobj"
       libobj=$func_xform_result
       ;;
@@ -3201,11 +3202,13 @@ func_mode_install ()
 
       # 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 $oldlib" 'exit $?'
+       func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
       fi
 
       # Do each command in the postinstall commands.
@@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() {
          # 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*)
+         *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
            pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
          *-*-hpux*)
            pic_flag_for_symtable=" $pic_flag"  ;;
@@ -3982,14 +3985,17 @@ func_exec_program_core ()
 # launches target application with the remaining arguments.
 func_exec_program ()
 {
-  for lt_wr_arg
-  do
-    case \$lt_wr_arg in
-    --lt-*) ;;
-    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
-    esac
-    shift
-  done
+  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+\"\$@\"}
 }
 
@@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f)
 {
 EOF
            func_emit_wrapper yes |
-              $SED -e 's/\([\\"]\)/\\\1/g' \
-                  -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
-
+             $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/  fputs ("\1", f);/p
+g
+D'
             cat <<"EOF"
 }
 EOF
@@ -5643,7 +5655,8 @@ func_mode_link ()
        continue
        ;;
 
-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+      -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"
@@ -6147,7 +6160,8 @@ func_mode_link ()
        lib=
        found=no
        case $deplib in
-       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+       -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"
@@ -6831,7 +6845,7 @@ func_mode_link ()
                 test "$hardcode_direct_absolute" = no; then
                add="$dir/$linklib"
              elif test "$hardcode_minus_L" = yes; then
-               add_dir="-L$dir"
+               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
@@ -7316,6 +7330,7 @@ func_mode_link ()
          # 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
@@ -7432,7 +7447,7 @@ func_mode_link ()
          versuffix="$major.$revision"
          ;;
 
-       linux)
+       linux) # correct to gnu/linux during the next big refactor
          func_arith $current - $age
          major=.$func_arith_result
          versuffix="$major.$age.$revision"
@@ -8020,6 +8035,11 @@ EOF
 
       # 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=
@@ -8050,7 +8070,7 @@ EOF
            elif test -n "$runpath_var"; then
              case "$perm_rpath " in
              *" $libdir "*) ;;
-             *) func_apped perm_rpath " $libdir" ;;
+             *) func_append perm_rpath " $libdir" ;;
              esac
            fi
          done
@@ -8058,11 +8078,7 @@ EOF
          if test -n "$hardcode_libdir_separator" &&
             test -n "$hardcode_libdirs"; then
            libdir="$hardcode_libdirs"
-           if test -n "$hardcode_libdir_flag_spec_ld"; then
-             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-           else
-             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-           fi
+           eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
          fi
          if test -n "$runpath_var" && test -n "$perm_rpath"; then
            # We should set the runpath_var.
@@ -9152,6 +9168,8 @@ EOF
            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"
@@ -9261,7 +9279,8 @@ EOF
              *.la)
                func_basename "$deplib"
                name="$func_basename_result"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+               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"
index 88de383..56666f0 100644 (file)
@@ -1,8 +1,8 @@
 # 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 Free Software Foundation,
-#                 Inc.
+#                 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
@@ -11,8 +11,8 @@
 
 m4_define([_LT_COPYING], [dnl
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -146,6 +146,8 @@ 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
@@ -637,7 +639,7 @@ 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) 2010 Free Software Foundation, Inc.
+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."
 
@@ -801,6 +803,7 @@ AC_DEFUN([LT_LANG],
 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)],
@@ -822,6 +825,31 @@ m4_defun([_LT_LANG],
 ])# _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],
@@ -852,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_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)])])
@@ -954,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
        $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
          -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+       # 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
@@ -962,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
        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
@@ -973,6 +1012,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
        [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
@@ -990,7 +1030,9 @@ _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 -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+      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
@@ -1035,8 +1077,8 @@ _LT_EOF
 ])
 
 
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
 # Checks for linker and compiler features on darwin
 m4_defun([_LT_DARWIN_LINKER_FEATURES],
 [
@@ -1047,6 +1089,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _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
@@ -1330,14 +1374,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*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*) LD="${LD-ld} -m elf64_sparc" ;;
+      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"
@@ -1414,13 +1471,13 @@ old_postuninstall_cmds=
 if test -n "$RANLIB"; then
   case $host_os in
   openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
@@ -1600,6 +1657,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     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
@@ -1639,7 +1701,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
       # 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"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+      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
@@ -2185,7 +2247,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  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
 
@@ -2194,7 +2256,7 @@ aix3*)
   ;;
 
 aix[[4-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -2259,7 +2321,7 @@ beos*)
   ;;
 
 bsdi[[45]]*)
-  version_type=linux
+  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'
@@ -2398,7 +2460,7 @@ m4_if([$1], [],[
   ;;
 
 dgux*)
-  version_type=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'
@@ -2406,10 +2468,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -2417,7 +2475,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
+    freebsd[[23]].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -2435,7 +2493,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2455,17 +2513,18 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=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}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 haiku*)
-  version_type=linux
+  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"
@@ -2526,7 +2585,7 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[[3-9]]*)
-  version_type=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}'
@@ -2542,7 +2601,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
        if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
+               version_type=linux # correct to gnu/linux during the next big refactor
        else
                version_type=irix
        fi ;;
@@ -2579,9 +2638,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=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}'
@@ -2648,7 +2707,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  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
@@ -2717,7 +2776,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=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}'
@@ -2742,7 +2801,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  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
@@ -2766,7 +2825,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    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
@@ -2797,7 +2856,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=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}'
@@ -2807,7 +2866,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  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
@@ -3229,7 +3288,7 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
+# This must be glibc/ELF.
 linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3649,6 +3708,7 @@ for ac_symprfx in "" "_"; do
     # 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};"\
@@ -4233,7 +4293,9 @@ m4_if([$1], [CXX], [
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+      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
@@ -4325,18 +4387,33 @@ m4_if([$1], [CXX], [
        ;;
       *)
        case `$CC -V 2>&1 | sed 5q` in
-       *Sun\ F* | *Sun*Fortran*)
+       *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
@@ -4496,7 +4573,9 @@ m4_if([$1], [CXX], [
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
-    cl*) ;;
+    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']
@@ -4521,7 +4600,6 @@ m4_if([$1], [CXX], [
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
   _LT_TAGVAR(hardcode_libdir_separator, $1)=
   _LT_TAGVAR(hardcode_minus_L, $1)=no
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -4772,8 +4850,7 @@ _LT_EOF
        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)=
-         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+         _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~
@@ -5068,6 +5145,7 @@ _LT_EOF
        # 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'
@@ -5114,10 +5192,6 @@ _LT_EOF
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-    freebsd1*)
-      _LT_TAGVAR(ld_shlibs, $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
@@ -5130,7 +5204,7 @@ _LT_EOF
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    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
@@ -5169,7 +5243,6 @@ _LT_EOF
       fi
       if test "$with_gnu_ld" = no; then
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
        _LT_TAGVAR(hardcode_direct, $1)=yes
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
@@ -5611,9 +5684,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
 _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_flag_spec_ld], [1],
-    [[If ld is used when linking, 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],
@@ -5771,7 +5841,6 @@ _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_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -6141,7 +6210,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         esac
         ;;
 
-      freebsd[[12]]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
        # switch to ELF
         _LT_TAGVAR(ld_shlibs, $1)=no
@@ -6902,12 +6971,18 @@ public class foo {
   }
 };
 _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
@@ -7104,7 +7179,6 @@ _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_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -7237,7 +7311,6 @@ _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_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -7424,6 +7497,77 @@ 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
@@ -7493,6 +7637,13 @@ 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],
index 17cfd51..5d9acd8 100644 (file)
@@ -326,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 # 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],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
+    [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])
index 9c7b5d4..07a8602 100644 (file)
@@ -9,15 +9,15 @@
 
 # @configure_input@
 
-# serial 3293 ltversion.m4
+# serial 3337 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.4])
-m4_define([LT_PACKAGE_REVISION], [1.3293])
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4'
-macro_revision='1.3293'
+[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/missing b/missing
index 28055d2..86a8fc3 100755 (executable)
--- a/missing
+++ b/missing
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-01-06.13; # UTC
 
 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -84,7 +84,6 @@ Supported PROGRAM values:
   help2man     touch the output file
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
@@ -122,15 +121,6 @@ case $1 in
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar*)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
   *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
@@ -226,7 +216,7 @@ WARNING: \`$1' $msg.  You should only need it if
          \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.y)
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@ -256,7 +246,7 @@ WARNING: \`$1' is $msg.  You should only need it if
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.l)
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@ -318,41 +308,6 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar*)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case $firstarg in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case $firstarg in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
   *)
     echo 1>&2 "\
 WARNING: \`$1' is needed, and is $msg.
index 9b32d66..077bfe2 100644 (file)
--- a/nanoftp.c
+++ b/nanoftp.c
@@ -41,7 +41,7 @@
 #include <netdb.h>
 #endif
 #ifdef HAVE_FCNTL_H
-#include <fcntl.h> 
+#include <fcntl.h>
 #endif
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
@@ -188,7 +188,7 @@ void
 xmlNanoFTPInit(void) {
     const char *env;
 #ifdef _WINSOCKAPI_
-    WSADATA wsaData;    
+    WSADATA wsaData;
 #endif
 
     if (initialized)
@@ -305,15 +305,15 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) {
     /*
      * Clear any existing data from the context
      */
-    if (ctxt->protocol != NULL) { 
+    if (ctxt->protocol != NULL) {
         xmlFree(ctxt->protocol);
        ctxt->protocol = NULL;
     }
-    if (ctxt->hostname != NULL) { 
+    if (ctxt->hostname != NULL) {
         xmlFree(ctxt->hostname);
        ctxt->hostname = NULL;
     }
-    if (ctxt->path != NULL) { 
+    if (ctxt->path != NULL) {
         xmlFree(ctxt->path);
        ctxt->path = NULL;
     }
@@ -327,7 +327,7 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) {
        xmlFreeURI(uri);
        return;
     }
-    
+
     ctxt->protocol = xmlMemStrdup(uri->scheme);
     ctxt->hostname = xmlMemStrdup(uri->server);
     if (uri->path != NULL)
@@ -358,7 +358,7 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) {
  * @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 
+ * 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.
@@ -403,7 +403,7 @@ xmlNanoFTPUpdateURL(void *ctx, const char *URL) {
        ctxt->path = NULL;
     }
 
-    if (uri->path == NULL) 
+    if (uri->path == NULL)
         ctxt->path = xmlMemStrdup("/");
     else
        ctxt->path = xmlMemStrdup(uri->path);
@@ -427,7 +427,7 @@ void
 xmlNanoFTPScanProxy(const char *URL) {
     xmlURIPtr uri;
 
-    if (proxy != NULL) { 
+    if (proxy != NULL) {
         xmlFree(proxy);
        proxy = NULL;
     }
@@ -451,7 +451,7 @@ xmlNanoFTPScanProxy(const char *URL) {
            xmlFreeURI(uri);
        return;
     }
-    
+
     proxy = xmlMemStrdup(uri->server);
     if (uri->port != 0)
        proxyPort = uri->port;
@@ -523,7 +523,7 @@ xmlNanoFTPFreeCtxt(void * ctx) {
  * 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
@@ -535,22 +535,22 @@ xmlNanoFTPParseResponse(char *buf, int len) {
     int val = 0;
 
     if (len < 3) return(-1);
-    if ((*buf >= '0') && (*buf <= '9')) 
+    if ((*buf >= '0') && (*buf <= '9'))
         val = val * 10 + (*buf - '0');
     else
         return(0);
     buf++;
-    if ((*buf >= '0') && (*buf <= '9')) 
+    if ((*buf >= '0') && (*buf <= '9'))
         val = val * 10 + (*buf - '0');
     else
         return(0);
     buf++;
-    if ((*buf >= '0') && (*buf <= '9')) 
+    if ((*buf >= '0') && (*buf <= '9'))
         val = val * 10 + (*buf - '0');
     else
         return(0);
     buf++;
-    if (*buf == '-') 
+    if (*buf == '-')
         return(-val);
     return(val);
 }
@@ -749,7 +749,7 @@ xmlNanoFTPCheckResponse(void *ctx) {
        case -1:
            __xmlIOErr(XML_FROM_FTP, 0, "select");
            return(-1);
-                       
+
     }
 
     return(xmlNanoFTPReadResponse(ctx));
@@ -1103,7 +1103,7 @@ xmlNanoFTPConnect(void *ctx) {
                    /* 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;
@@ -1134,7 +1134,7 @@ xmlNanoFTPConnect(void *ctx) {
                    /* we assume it worked :-\ */
                    proxyType = 2;
                    return(0);
-               }    
+               }
                if (ctxt->passwd == NULL)
                    snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
                else
@@ -1239,7 +1239,7 @@ xmlNanoFTPConnectTo(const char *server, int port) {
     int res;
 
     xmlNanoFTPInit();
-    if (server == NULL) 
+    if (server == NULL)
        return(NULL);
     if (port <= 0)
        return(NULL);
@@ -1332,7 +1332,7 @@ xmlNanoFTPDele(void *ctx, const char *file) {
      *       450, 550
      *       500, 501, 502, 421, 530
      */
-        
+
     snprintf(buf, sizeof(buf), "DELE %s\r\n", file);
     buf[sizeof(buf) - 1] = 0;
     len = strlen(buf);
@@ -1430,7 +1430,7 @@ xmlNanoFTPGetConnection(void *ctx) {
                ctxt->passive = 0;
            }
        }
-       cur = &ctxt->controlBuf[ctxt->controlBufAnswer]; 
+       cur = &ctxt->controlBuf[ctxt->controlBufAnswer];
        while (((*cur < '0') || (*cur > '9')) && *cur != '\0') cur++;
 #ifdef SUPPORT_IP6
        if ((ctxt->ftpAddr).ss_family == AF_INET6) {
@@ -1525,7 +1525,7 @@ xmlNanoFTPGetConnection(void *ctx) {
         }
     }
     return(ctxt->dataFd);
-    
+
 }
 
 /**
@@ -1583,7 +1583,7 @@ xmlNanoFTPCloseConnection(void *ctx) {
  * @callback:  the user callback
  * @userData:  the user callback data
  *
- * Parse at most one entry from the listing. 
+ * Parse at most one entry from the listing.
  *
  * Returns -1 incase of error, the length of data parsed otherwise
  */
@@ -1620,7 +1620,7 @@ xmlNanoFTPParseList(const char *list, ftpListCallback callback, void *userData)
        if (*cur == 0) return(0);
        i = 0;
        while (*cur != ' ') {
-           if (i < 10) 
+           if (i < 10)
                attrib[i++] = *cur;
            cur++;
            if (*cur == 0) return(0);
@@ -1634,7 +1634,7 @@ xmlNanoFTPParseList(const char *list, ftpListCallback callback, void *userData)
        if (*cur == 0) return(0);
        i = 0;
        while (*cur != ' ') {
-           if (i < 10) 
+           if (i < 10)
                owner[i++] = *cur;
            cur++;
            if (*cur == 0) return(0);
@@ -1644,7 +1644,7 @@ xmlNanoFTPParseList(const char *list, ftpListCallback callback, void *userData)
        if (*cur == 0) return(0);
        i = 0;
        while (*cur != ' ') {
-           if (i < 10) 
+           if (i < 10)
                group[i++] = *cur;
            cur++;
            if (*cur == 0) return(0);
@@ -1986,7 +1986,7 @@ xmlNanoFTPRead(void *ctx, void *dest, int len) {
  *
  * Start to fetch the given ftp:// resource
  *
- * Returns an FTP context, or NULL 
+ * Returns an FTP context, or NULL
  */
 
 void*
@@ -2043,9 +2043,9 @@ xmlNanoFTPClose(void *ctx) {
 
 #ifdef STANDALONE
 /************************************************************************
- *                                                                     *
- *                     Basic test in Standalone mode                   *
- *                                                                     *
+ *                                                                     *
+ *                     Basic test in Standalone mode                   *
+ *                                                                     *
  ************************************************************************/
 static
 void ftpList(void *userData, const char *filename, const char* attrib,
@@ -2060,7 +2060,7 @@ void ftpData(void *userData, const char *data, int len) {
     if (len <= 0) {
        fclose((FILE*)userData);
        return;
-    }  
+    }
     fwrite(data, len, 1, (FILE*)userData);
 }
 
@@ -2092,7 +2092,7 @@ int main(int argc, char **argv) {
        if (xmlNanoFTPGet(ctxt, ftpData, (void *) output, tstfile) < 0)
            xmlGenericError(xmlGenericErrorContext,
                    "Failed to get file\n");
-       
+
     }
     xmlNanoFTPClose(ctxt);
     xmlMemoryDump();
index 2437fed..ac47ea6 100644 (file)
@@ -10,7 +10,7 @@
  *
  * daniel@veillard.com
  */
+
 #define NEED_SOCKETS
 #define IN_LIBXML
 #include "libxml.h"
@@ -46,7 +46,7 @@
 #include <resolv.h>
 #endif
 #ifdef HAVE_FCNTL_H
-#include <fcntl.h> 
+#include <fcntl.h>
 #endif
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
@@ -213,7 +213,7 @@ void
 xmlNanoHTTPInit(void) {
     const char *env;
 #ifdef _WINSOCKAPI_
-    WSADATA wsaData;    
+    WSADATA wsaData;
 #endif
 
     if (initialized)
@@ -276,22 +276,24 @@ xmlNanoHTTPCleanup(void) {
 static void
 xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) {
     xmlURIPtr uri;
+    int len;
+
     /*
      * Clear any existing data from the context
      */
-    if (ctxt->protocol != NULL) { 
+    if (ctxt->protocol != NULL) {
         xmlFree(ctxt->protocol);
        ctxt->protocol = NULL;
     }
-    if (ctxt->hostname != NULL) { 
+    if (ctxt->hostname != NULL) {
         xmlFree(ctxt->hostname);
        ctxt->hostname = NULL;
     }
-    if (ctxt->path != NULL) { 
+    if (ctxt->path != NULL) {
         xmlFree(ctxt->path);
        ctxt->path = NULL;
     }
-    if (ctxt->query != NULL) { 
+    if (ctxt->query != NULL) {
         xmlFree(ctxt->query);
        ctxt->query = NULL;
     }
@@ -305,9 +307,17 @@ xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) {
        xmlFreeURI(uri);
        return;
     }
-    
+
     ctxt->protocol = xmlMemStrdup(uri->scheme);
-    ctxt->hostname = xmlMemStrdup(uri->server);
+    /* 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
@@ -334,7 +344,7 @@ void
 xmlNanoHTTPScanProxy(const char *URL) {
     xmlURIPtr uri;
 
-    if (proxy != NULL) { 
+    if (proxy != NULL) {
         xmlFree(proxy);
        proxy = NULL;
     }
@@ -358,7 +368,7 @@ xmlNanoHTTPScanProxy(const char *URL) {
            xmlFreeURI(uri);
        return;
     }
-    
+
     proxy = xmlMemStrdup(uri->server);
     if (uri->port != 0)
        proxyPort = uri->port;
@@ -644,7 +654,7 @@ 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) {
@@ -781,9 +791,9 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) {
            xmlFree(ctxt->location);
        if (*cur == '/') {
            xmlChar *tmp_http = xmlStrdup(BAD_CAST "http://");
-           xmlChar *tmp_loc = 
+           xmlChar *tmp_loc =
                xmlStrcat(tmp_http, (const xmlChar *) ctxt->hostname);
-           ctxt->location = 
+           ctxt->location =
                (char *) xmlStrcat (tmp_loc, (const xmlChar *) cur);
        } else {
            ctxt->location = xmlMemStrdup(cur);
@@ -1267,7 +1277,7 @@ xmlNanoHTTPRead(void *ctx, void *dest, int len) {
 #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;
@@ -1346,7 +1356,7 @@ xmlNanoHTTPMethodRedir(const char *URL, const char *method, const char *input,
 #ifdef DEBUG_HTTP
     int xmt_bytes;
 #endif
-    
+
     if (URL == NULL) return(NULL);
     if (method == NULL) method = "GET";
     xmlNanoHTTPInit();
@@ -1427,13 +1437,13 @@ retry:
 
     if (proxy) {
        if (ctxt->port != 80) {
-           p += snprintf( p, blen - (p - bp), "%s http://%s:%d%s", 
+           p += snprintf( p, blen - (p - bp), "%s http://%s:%d%s",
                        method, ctxt->hostname,
-                       ctxt->port, ctxt->path );
+                       ctxt->port, ctxt->path );
        }
-       else 
+       else
            p += snprintf( p, blen - (p - bp), "%s http://%s%s", method,
-                       ctxt->hostname, ctxt->path);
+                       ctxt->hostname, ctxt->path);
     }
     else
        p += snprintf( p, blen - (p - bp), "%s %s", method, ctxt->path);
@@ -1442,7 +1452,7 @@ retry:
        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", 
+        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",
@@ -1453,7 +1463,7 @@ retry:
     p += snprintf(p, blen - (p - bp), "Accept-Encoding: gzip\r\n");
 #endif
 
-    if (contentType != NULL && *contentType) 
+    if (contentType != NULL && *contentType)
        p += snprintf(p, blen - (p - bp), "Content-Type: %s\r\n", *contentType);
 
     if (headers != NULL)
@@ -1492,7 +1502,7 @@ retry:
 
        if ( xmt_bytes != ilen )
            xmlGenericError( xmlGenericErrorContext,
-                       "xmlNanoHTTPMethodRedir:  Only %d of %d %s %s\n",
+                       "xmlNanoHTTPMethodRedir:  Only %d of %d %s %s\n",
                        xmt_bytes, ilen,
                        "bytes of HTTP content sent to host",
                        ctxt->hostname );
@@ -1620,7 +1630,7 @@ xmlNanoHTTPFetch(const char *URL, const char *filename, char **contentType) {
     ctxt = xmlNanoHTTPOpen(URL, contentType);
     if (ctxt == NULL) return(-1);
 
-    if (!strcmp(filename, "-")) 
+    if (!strcmp(filename, "-"))
         fd = 0;
     else {
         fd = open(filename, O_CREAT | O_WRONLY, 00644);
@@ -1666,7 +1676,7 @@ xmlNanoHTTPSave(void *ctxt, const char *filename) {
 
     if ((ctxt == NULL) || (filename == NULL)) return(-1);
 
-    if (!strcmp(filename, "-")) 
+    if (!strcmp(filename, "-"))
         fd = 0;
     else {
         fd = open(filename, O_CREAT | O_WRONLY, 0666);
@@ -1795,7 +1805,7 @@ xmlNanoHTTPMimeType( void * ctx ) {
  * 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 
+ * -1 if received content length was less than specified or an error
  * occurred.
  */
 static int
@@ -1849,7 +1859,7 @@ int main(int argc, char **argv) {
     char *contentType = NULL;
 
     if (argv[1] != NULL) {
-       if (argv[2] != NULL) 
+       if (argv[2] != NULL)
            xmlNanoHTTPFetch(argv[1], argv[2], &contentType);
         else
            xmlNanoHTTPFetch(argv[1], "-", &contentType);
index 2c38fae..ee429f3 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -17,7 +17,7 @@
  * 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 
+ * 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.
@@ -40,6 +40,7 @@
 #endif
 
 #include <stdlib.h>
+#include <limits.h>
 #include <string.h>
 #include <stdarg.h>
 #include <libxml/xmlmemory.h>
@@ -83,6 +84,9 @@
 #include <lzma.h>
 #endif
 
+#include "buf.h"
+#include "enc.h"
+
 static void
 xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info);
 
@@ -117,16 +121,33 @@ xmlCreateEntityParserCtxtInternal(const xmlChar *URL, const xmlChar *ID,
  * parser option.
  */
 static int
-xmlParserEntityCheck(xmlParserCtxtPtr ctxt, unsigned long size,
-                     xmlEntityPtr ent)
+xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
+                     xmlEntityPtr ent, size_t replacement)
 {
-    unsigned long consumed = 0;
+    size_t consumed = 0;
 
     if ((ctxt == NULL) || (ctxt->options & XML_PARSE_HUGE))
         return (0);
     if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
         return (1);
-    if (size != 0) {
+    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
          */
@@ -149,7 +170,7 @@ xmlParserEntityCheck(xmlParserCtxtPtr ctxt, unsigned long size,
         /*
          * use the number of parsed entities in the replacement
          */
-        size = ent->checked;
+        size = ent->checked / 2;
 
         /*
          * The amount of data parsed counting entities size only once
@@ -172,7 +193,6 @@ xmlParserEntityCheck(xmlParserCtxtPtr ctxt, unsigned long size,
          */
         return (0);
     }
-
     xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
     return (1);
 }
@@ -194,6 +214,17 @@ unsigned int xmlParserMaxDepth = 256;
 #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
  */
@@ -233,7 +264,7 @@ xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity);
 
 /************************************************************************
  *                                                                     *
- *             Some factorized error routines                          *
+ *             Some factorized error routines                          *
  *                                                                     *
  ************************************************************************/
 
@@ -285,193 +316,201 @@ 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\n";
+            errmsg = "CharRef: invalid hexadecimal value";
             break;
         case XML_ERR_INVALID_DEC_CHARREF:
-            errmsg = "CharRef: invalid decimal value\n";
+            errmsg = "CharRef: invalid decimal value";
             break;
         case XML_ERR_INVALID_CHARREF:
-            errmsg = "CharRef: invalid value\n";
+            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\n";
+            errmsg = "PEReference at end of document";
             break;
         case XML_ERR_PEREF_IN_PROLOG:
-            errmsg = "PEReference in prolog\n";
+            errmsg = "PEReference in prolog";
             break;
         case XML_ERR_PEREF_IN_EPILOG:
-            errmsg = "PEReference in epilog\n";
+            errmsg = "PEReference in epilog";
             break;
         case XML_ERR_PEREF_NO_NAME:
-            errmsg = "PEReference: no name\n";
+            errmsg = "PEReference: no name";
             break;
         case XML_ERR_PEREF_SEMICOL_MISSING:
-            errmsg = "PEReference: expecting ';'\n";
+            errmsg = "PEReference: expecting ';'";
             break;
         case XML_ERR_ENTITY_LOOP:
-            errmsg = "Detected an entity reference loop\n";
+            errmsg = "Detected an entity reference loop";
             break;
         case XML_ERR_ENTITY_NOT_STARTED:
-            errmsg = "EntityValue: \" or ' expected\n";
+            errmsg = "EntityValue: \" or ' expected";
             break;
         case XML_ERR_ENTITY_PE_INTERNAL:
-            errmsg = "PEReferences forbidden in internal subset\n";
+            errmsg = "PEReferences forbidden in internal subset";
             break;
         case XML_ERR_ENTITY_NOT_FINISHED:
-            errmsg = "EntityValue: \" or ' expected\n";
+            errmsg = "EntityValue: \" or ' expected";
             break;
         case XML_ERR_ATTRIBUTE_NOT_STARTED:
-            errmsg = "AttValue: \" or ' expected\n";
+            errmsg = "AttValue: \" or ' expected";
             break;
         case XML_ERR_LT_IN_ATTRIBUTE:
-            errmsg = "Unescaped '<' not allowed in attributes values\n";
+            errmsg = "Unescaped '<' not allowed in attributes values";
             break;
         case XML_ERR_LITERAL_NOT_STARTED:
-            errmsg = "SystemLiteral \" or ' expected\n";
+            errmsg = "SystemLiteral \" or ' expected";
             break;
         case XML_ERR_LITERAL_NOT_FINISHED:
-            errmsg = "Unfinished System or Public ID \" or ' expected\n";
+            errmsg = "Unfinished System or Public ID \" or ' expected";
             break;
         case XML_ERR_MISPLACED_CDATA_END:
-            errmsg = "Sequence ']]>' not allowed in content\n";
+            errmsg = "Sequence ']]>' not allowed in content";
             break;
         case XML_ERR_URI_REQUIRED:
-            errmsg = "SYSTEM or PUBLIC, the URI is missing\n";
+            errmsg = "SYSTEM or PUBLIC, the URI is missing";
             break;
         case XML_ERR_PUBID_REQUIRED:
-            errmsg = "PUBLIC, the Public Identifier is missing\n";
+            errmsg = "PUBLIC, the Public Identifier is missing";
             break;
         case XML_ERR_HYPHEN_IN_COMMENT:
-            errmsg = "Comment must not contain '--' (double-hyphen)\n";
+            errmsg = "Comment must not contain '--' (double-hyphen)";
             break;
         case XML_ERR_PI_NOT_STARTED:
-            errmsg = "xmlParsePI : no target name\n";
+            errmsg = "xmlParsePI : no target name";
             break;
         case XML_ERR_RESERVED_XML_NAME:
-            errmsg = "Invalid PI name\n";
+            errmsg = "Invalid PI name";
             break;
         case XML_ERR_NOTATION_NOT_STARTED:
-            errmsg = "NOTATION: Name expected here\n";
+            errmsg = "NOTATION: Name expected here";
             break;
         case XML_ERR_NOTATION_NOT_FINISHED:
-            errmsg = "'>' required to close NOTATION declaration\n";
+            errmsg = "'>' required to close NOTATION declaration";
             break;
         case XML_ERR_VALUE_REQUIRED:
-            errmsg = "Entity value required\n";
+            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\n";
+            errmsg = "'(' required to start ATTLIST enumeration";
             break;
         case XML_ERR_NMTOKEN_REQUIRED:
-            errmsg = "NmToken expected in ATTLIST enumeration\n";
+            errmsg = "NmToken expected in ATTLIST enumeration";
             break;
         case XML_ERR_ATTLIST_NOT_FINISHED:
-            errmsg = "')' required to finish ATTLIST enumeration\n";
+            errmsg = "')' required to finish ATTLIST enumeration";
             break;
         case XML_ERR_MIXED_NOT_STARTED:
-            errmsg = "MixedContentDecl : '|' or ')*' expected\n";
+            errmsg = "MixedContentDecl : '|' or ')*' expected";
             break;
         case XML_ERR_PCDATA_REQUIRED:
-            errmsg = "MixedContentDecl : '#PCDATA' expected\n";
+            errmsg = "MixedContentDecl : '#PCDATA' expected";
             break;
         case XML_ERR_ELEMCONTENT_NOT_STARTED:
-            errmsg = "ContentDecl : Name or '(' expected\n";
+            errmsg = "ContentDecl : Name or '(' expected";
             break;
         case XML_ERR_ELEMCONTENT_NOT_FINISHED:
-            errmsg = "ContentDecl : ',' '|' or ')' expected\n";
+            errmsg = "ContentDecl : ',' '|' or ')' expected";
             break;
         case XML_ERR_PEREF_IN_INT_SUBSET:
             errmsg =
-                "PEReference: forbidden within markup decl in internal subset\n";
+                "PEReference: forbidden within markup decl in internal subset";
             break;
         case XML_ERR_GT_REQUIRED:
-            errmsg = "expected '>'\n";
+            errmsg = "expected '>'";
             break;
         case XML_ERR_CONDSEC_INVALID:
-            errmsg = "XML conditional section '[' expected\n";
+            errmsg = "XML conditional section '[' expected";
             break;
         case XML_ERR_EXT_SUBSET_NOT_FINISHED:
-            errmsg = "Content error in the external subset\n";
+            errmsg = "Content error in the external subset";
             break;
         case XML_ERR_CONDSEC_INVALID_KEYWORD:
             errmsg =
-                "conditional section INCLUDE or IGNORE keyword expected\n";
+                "conditional section INCLUDE or IGNORE keyword expected";
             break;
         case XML_ERR_CONDSEC_NOT_FINISHED:
-            errmsg = "XML conditional section not closed\n";
+            errmsg = "XML conditional section not closed";
             break;
         case XML_ERR_XMLDECL_NOT_STARTED:
-            errmsg = "Text declaration '<?xml' required\n";
+            errmsg = "Text declaration '<?xml' required";
             break;
         case XML_ERR_XMLDECL_NOT_FINISHED:
-            errmsg = "parsing XML declaration: '?>' expected\n";
+            errmsg = "parsing XML declaration: '?>' expected";
             break;
         case XML_ERR_EXT_ENTITY_STANDALONE:
-            errmsg = "external parsed entities cannot be standalone\n";
+            errmsg = "external parsed entities cannot be standalone";
             break;
         case XML_ERR_ENTITYREF_SEMICOL_MISSING:
-            errmsg = "EntityRef: expecting ';'\n";
+            errmsg = "EntityRef: expecting ';'";
             break;
         case XML_ERR_DOCTYPE_NOT_FINISHED:
-            errmsg = "DOCTYPE improperly terminated\n";
+            errmsg = "DOCTYPE improperly terminated";
             break;
         case XML_ERR_LTSLASH_REQUIRED:
-            errmsg = "EndTag: '</' not found\n";
+            errmsg = "EndTag: '</' not found";
             break;
         case XML_ERR_EQUAL_REQUIRED:
-            errmsg = "expected '='\n";
+            errmsg = "expected '='";
             break;
         case XML_ERR_STRING_NOT_CLOSED:
-            errmsg = "String not closed expecting \" or '\n";
+            errmsg = "String not closed expecting \" or '";
             break;
         case XML_ERR_STRING_NOT_STARTED:
-            errmsg = "String not started expecting ' or \"\n";
+            errmsg = "String not started expecting ' or \"";
             break;
         case XML_ERR_ENCODING_NAME:
-            errmsg = "Invalid XML encoding name\n";
+            errmsg = "Invalid XML encoding name";
             break;
         case XML_ERR_STANDALONE_VALUE:
-            errmsg = "standalone accepts only 'yes' or 'no'\n";
+            errmsg = "standalone accepts only 'yes' or 'no'";
             break;
         case XML_ERR_DOCUMENT_EMPTY:
-            errmsg = "Document is empty\n";
+            errmsg = "Document is empty";
             break;
         case XML_ERR_DOCUMENT_END:
-            errmsg = "Extra content at the end of the document\n";
+            errmsg = "Extra content at the end of the document";
             break;
         case XML_ERR_NOT_WELL_BALANCED:
-            errmsg = "chunk is not well balanced\n";
+            errmsg = "chunk is not well balanced";
             break;
         case XML_ERR_EXTRA_CONTENT:
-            errmsg = "extra content at the end of well balanced chunk\n";
+            errmsg = "extra content at the end of well balanced chunk";
             break;
         case XML_ERR_VERSION_MISSING:
-            errmsg = "Malformed declaration expecting version\n";
+            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 = "\n";
+            errmsg = "";
             break;
 #endif
         default:
-            errmsg = "Unregistered error message\n";
+            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, errmsg,
+                    XML_ERR_FATAL, NULL, 0, info, NULL, NULL, 0, 0, &errstr[0],
                     info);
     if (ctxt != NULL) {
        ctxt->wellFormed = 0;
@@ -626,7 +665,7 @@ xmlFatalErrMsgInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
  */
 static void
 xmlFatalErrMsgStrIntStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
-                  const char *msg, const xmlChar *str1, int val, 
+                  const char *msg, const xmlChar *str1, int val,
                  const xmlChar *str2)
 {
     if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
@@ -754,7 +793,7 @@ xmlNsWarn(xmlParserCtxtPtr ctxt, xmlParserErrors error,
 
 /************************************************************************
  *                                                                     *
- *             Library wide options                                    *
+ *             Library wide options                                    *
  *                                                                     *
  ************************************************************************/
 
@@ -978,7 +1017,7 @@ xmlHasFeature(xmlFeature feature)
 
 /************************************************************************
  *                                                                     *
- *             SAX2 defaulted attributes handling                      *
+ *             SAX2 defaulted attributes handling                      *
  *                                                                     *
  ************************************************************************/
 
@@ -1002,8 +1041,8 @@ xmlDetectSAX2(xmlParserCtxtPtr ctxt) {
     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)) {
+    if ((ctxt->str_xml==NULL) || (ctxt->str_xmlns==NULL) ||
+               (ctxt->str_xml_ns == NULL)) {
         xmlErrMemory(ctxt, NULL);
     }
 }
@@ -1517,7 +1556,7 @@ nsPush(xmlParserCtxtPtr ctxt, const xmlChar *prefix, const xmlChar *URL)
 {
     if (ctxt->options & XML_PARSE_NSCLEAN) {
         int i;
-       for (i = 0;i < ctxt->nsNr;i += 2) {
+       for (i = ctxt->nsNr - 2;i >= 0;i -= 2) {
            if (ctxt->nsTab[i] == prefix) {
                /* in scope */
                if (ctxt->nsTab[i + 1] == URL)
@@ -1922,7 +1961,7 @@ static int spacePop(xmlParserCtxtPtr ctxt) {
  *           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 
+ *   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
  *
@@ -1971,10 +2010,10 @@ static int spacePop(xmlParserCtxtPtr ctxt) {
 #define SKIPL(val) do {                                                        \
     int skipl;                                                         \
     for(skipl=0; skipl<val; skipl++) {                                 \
-       if (*(ctxt->input->cur) == '\n') {                              \
+       if (*(ctxt->input->cur) == '\n') {                              \
        ctxt->input->line++; ctxt->input->col = 1;                      \
-       } else ctxt->input->col++;                                      \
-       ctxt->nbChars++;                                                \
+       } else ctxt->input->col++;                                      \
+       ctxt->nbChars++;                                                \
        ctxt->input->cur++;                                             \
     }                                                                  \
     if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt);    \
@@ -2000,6 +2039,13 @@ static void xmlSHRINK (xmlParserCtxtPtr ctxt) {
        xmlGROW (ctxt);
 
 static void xmlGROW (xmlParserCtxtPtr ctxt) {
+    if ((((ctxt->input->end - ctxt->input->cur) > XML_MAX_LOOKUP_LIMIT) ||
+         ((ctxt->input->cur - ctxt->input->base) > 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))
@@ -2144,6 +2190,8 @@ xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) {
                "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);
 }
@@ -2159,7 +2207,7 @@ xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) {
  *
  * [ WFC: Legal Character ]
  * Characters referred to using character references must match the
- * production for Char. 
+ * production for Char.
  *
  * Returns the value parsed (as an int), 0 in case of error
  */
@@ -2180,8 +2228,10 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) {
            if (count++ > 20) {
                count = 0;
                GROW;
+                if (ctxt->instate == XML_PARSER_EOF)
+                    return(0);
            }
-           if ((RAW >= '0') && (RAW <= '9')) 
+           if ((RAW >= '0') && (RAW <= '9'))
                val = val * 16 + (CUR - '0');
            else if ((RAW >= 'a') && (RAW <= 'f') && (count < 20))
                val = val * 16 + (CUR - 'a') + 10;
@@ -2211,8 +2261,10 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) {
            if (count++ > 20) {
                count = 0;
                GROW;
+                if (ctxt->instate == XML_PARSER_EOF)
+                    return(0);
            }
-           if ((RAW >= '0') && (RAW <= '9')) 
+           if ((RAW >= '0') && (RAW <= '9'))
                val = val * 10 + (CUR - '0');
            else {
                xmlFatalErr(ctxt, XML_ERR_INVALID_DEC_CHARREF, NULL);
@@ -2238,7 +2290,7 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) {
     /*
      * [ WFC: Legal Character ]
      * Characters referred to using character references must match the
-     * production for Char. 
+     * production for Char.
      */
     if ((IS_CHAR(val) && (outofrange == 0))) {
         return(val);
@@ -2263,7 +2315,7 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) {
  *
  * [ WFC: Legal Character ]
  * Characters referred to using character references must match the
- * production for Char. 
+ * 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
@@ -2282,7 +2334,7 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) {
        ptr += 3;
        cur = *ptr;
        while (cur != ';') { /* Non input consuming loop */
-           if ((cur >= '0') && (cur <= '9')) 
+           if ((cur >= '0') && (cur <= '9'))
                val = val * 16 + (cur - '0');
            else if ((cur >= 'a') && (cur <= 'f'))
                val = val * 16 + (cur - 'a') + 10;
@@ -2305,7 +2357,7 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) {
        ptr += 2;
        cur = *ptr;
        while (cur != ';') { /* Non input consuming loops */
-           if ((cur >= '0') && (cur <= '9')) 
+           if ((cur >= '0') && (cur <= '9'))
                val = val * 10 + (cur - '0');
            else {
                xmlFatalErr(ctxt, XML_ERR_INVALID_DEC_CHARREF, NULL);
@@ -2329,7 +2381,7 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) {
     /*
      * [ WFC: Legal Character ]
      * Characters referred to using character references must match the
-     * production for Char. 
+     * production for Char.
      */
     if ((IS_CHAR(val) && (outofrange == 0))) {
         return(val);
@@ -2351,9 +2403,9 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) {
  *
  * Returns the new input stream or NULL
  */
+
 static void deallocblankswrapper (xmlChar *str) {xmlFree(str);}
+
 static xmlParserInputPtr
 xmlNewBlanksWrapperInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
     xmlParserInputPtr input;
@@ -2376,7 +2428,7 @@ xmlNewBlanksWrapperInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
     if (buffer == NULL) {
        xmlErrMemory(ctxt, NULL);
         xmlFree(input);
-       return(NULL);
+       return(NULL);
     }
     buffer [0] = ' ';
     buffer [1] = '%';
@@ -2395,12 +2447,12 @@ xmlNewBlanksWrapperInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
 /**
  * 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. 
+ * reference to itself, either directly or indirectly.
  *
  * [ WFC: Entity Declared ]
  * In a document without any DTD, a document with only an internal DTD
@@ -2418,9 +2470,9 @@ xmlNewBlanksWrapperInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
  * NOTE: misleading but this is handled.
  *
  * A PEReference may have been detected in the current input stream
- * the handling is done accordingly to 
+ * the handling is done accordingly to
  *      http://www.w3.org/TR/REC-xml#entproc
- * i.e. 
+ * i.e.
  *   - Included in literal in entity values
  *   - Included as Parameter Entity reference within DTDs
  */
@@ -2497,8 +2549,10 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
            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
@@ -2524,7 +2578,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
                        xmlValidityError(ctxt, XML_WAR_UNDECLARED_ENTITY,
                                         "PEReference: %%%s; not found\n",
                                         name, NULL);
-                   } else 
+                   } else
                        xmlWarningMsg(ctxt, XML_WAR_UNDECLARED_ENTITY,
                                      "PEReference: %%%s; not found\n",
                                      name, NULL);
@@ -2549,7 +2603,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
                    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.
@@ -2559,6 +2613,8 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
                     * 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);
@@ -2589,15 +2645,17 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
 
 /*
  * 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;                                                      \
-    buffer##_size *= 2;                                                        \
-    buffer##_size += n;                                                        \
-    tmp = (xmlChar *)                                                  \
-               xmlRealloc(buffer, buffer##_size * sizeof(xmlChar));    \
+    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;                                           \
 }
 
 /**
@@ -2609,7 +2667,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
  * @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
@@ -2623,14 +2681,14 @@ xmlChar *
 xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
                      int what, xmlChar end, xmlChar  end2, xmlChar end3) {
     xmlChar *buffer = NULL;
-    int buffer_size = 0;
+    size_t buffer_size = 0;
+    size_t nbchars = 0;
 
     xmlChar *current = NULL;
     xmlChar *rep = NULL;
     const xmlChar *last;
     xmlEntityPtr ent;
     int c,l;
-    int nbchars = 0;
 
     if ((ctxt == NULL) || (str == NULL) || (len < 0))
        return(NULL);
@@ -2647,7 +2705,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
      * allocate a translation buffer.
      */
     buffer_size = XML_PARSER_BIG_BUFFER_SIZE;
-    buffer = (xmlChar *) xmlMallocAtomic(buffer_size * sizeof(xmlChar));
+    buffer = (xmlChar *) xmlMallocAtomic(buffer_size);
     if (buffer == NULL) goto mem_error;
 
     /*
@@ -2667,7 +2725,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
            if (val != 0) {
                COPY_BUF(0,buffer,nbchars,val);
            }
-           if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) {
+           if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
                growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
            }
        } else if ((c == '&') && (what & XML_SUBSTITUTE_REF)) {
@@ -2680,12 +2738,12 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
                (ctxt->lastError.code == XML_ERR_INTERNAL_ERROR))
                goto int_error;
            if (ent != NULL)
-               ctxt->nbentities += ent->checked;
+               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 > buffer_size - XML_PARSER_BUFFER_SIZE) {
+                   if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
                        growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
                    }
                } else {
@@ -2702,9 +2760,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
                    current = rep;
                    while (*current != 0) { /* non input consuming loop */
                        buffer[nbchars++] = *current++;
-                       if (nbchars >
-                           buffer_size - XML_PARSER_BUFFER_SIZE) {
-                           if (xmlParserEntityCheck(ctxt, nbchars, ent))
+                       if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
+                           if (xmlParserEntityCheck(ctxt, nbchars, ent, 0))
                                goto int_error;
                            growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
                        }
@@ -2717,7 +2774,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
                const xmlChar *cur = ent->name;
 
                buffer[nbchars++] = '&';
-               if (nbchars > buffer_size - i - XML_PARSER_BUFFER_SIZE) {
+               if (nbchars + i + XML_PARSER_BUFFER_SIZE > buffer_size) {
                    growBuffer(buffer, i + XML_PARSER_BUFFER_SIZE);
                }
                for (;i > 0;i--)
@@ -2732,7 +2789,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
            if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
                goto int_error;
            if (ent != NULL)
-               ctxt->nbentities += ent->checked;
+               ctxt->nbentities += ent->checked / 2;
            if (ent != NULL) {
                 if (ent->content == NULL) {
                    xmlLoadEntityContent(ctxt, ent);
@@ -2745,9 +2802,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
                    current = rep;
                    while (*current != 0) { /* non input consuming loop */
                        buffer[nbchars++] = *current++;
-                       if (nbchars >
-                           buffer_size - XML_PARSER_BUFFER_SIZE) {
-                           if (xmlParserEntityCheck(ctxt, nbchars, ent))
+                       if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
+                           if (xmlParserEntityCheck(ctxt, nbchars, ent, 0))
                                goto int_error;
                            growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
                        }
@@ -2759,8 +2815,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
        } else {
            COPY_BUF(l,buffer,nbchars,c);
            str += l;
-           if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) {
-             growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
+           if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
+               growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
            }
        }
        if (str < last)
@@ -2789,7 +2845,7 @@ int_error:
  * @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
@@ -3152,7 +3208,7 @@ xmlIsNameChar(xmlParserCtxtPtr ctxt, int c) {
     } else {
         if ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
             (c == '.') || (c == '-') ||
-           (c == '_') || (c == ':') || 
+           (c == '_') || (c == ':') ||
            (IS_COMBINING(c)) ||
            (IS_EXTENDER(c)))
            return(1);
@@ -3177,6 +3233,8 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
      * 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) {
         /*
@@ -3225,9 +3283,11 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
                ((c >= 0xFDF0) && (c <= 0xFFFD)) ||
                ((c >= 0x10000) && (c <= 0xEFFFF))
                )) {
-           if (count++ > 100) {
+           if (count++ > XML_PARSER_CHUNK_SIZE) {
                count = 0;
                GROW;
+                if (ctxt->instate == XML_PARSER_EOF)
+                    return(NULL);
            }
            len += l;
            NEXTL(l);
@@ -3246,18 +3306,32 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
        while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */
               ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
                (c == '.') || (c == '-') ||
-               (c == '_') || (c == ':') || 
+               (c == '_') || (c == ':') ||
                (IS_COMBINING(c)) ||
                (IS_EXTENDER(c)))) {
-           if (count++ > 100) {
+           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));
@@ -3307,6 +3381,11 @@ xmlParseName(xmlParserCtxtPtr ctxt) {
            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;
@@ -3342,13 +3421,32 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
 
     while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */
           (xmlIsNameChar(ctxt, c) && (c != ':'))) {
-       if (count++ > 100) {
+       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);
        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, "NCName");
+        return(NULL);
     }
     return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
 }
@@ -3356,7 +3454,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
 /**
  * xmlParseNCName:
  * @ctxt:  an XML parser context
- * @len:  lenght of the string parsed
+ * @len:  length of the string parsed
  *
  * parse an XML name.
  *
@@ -3394,6 +3492,11 @@ xmlParseNCName(xmlParserCtxtPtr ctxt) {
            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;
@@ -3425,6 +3528,8 @@ xmlParseNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *other) {
     const xmlChar *ret;
 
     GROW;
+    if (ctxt->instate == XML_PARSER_EOF)
+        return(NULL);
 
     in = ctxt->input->cur;
     while (*in != 0 && *in == *cmp) {
@@ -3460,7 +3565,7 @@ xmlParseNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *other) {
  *
  * [6] Names ::= Name (#x20 Name)*
  *
- * Returns the Name parsed or NULL. The @str pointer 
+ * Returns the Name parsed or NULL. The @str pointer
  * is updated to the current location in the string.
  */
 
@@ -3504,6 +3609,13 @@ xmlParseStringName(xmlParserCtxtPtr ctxt, const xmlChar** str) {
            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));
@@ -3523,6 +3635,11 @@ xmlParseStringName(xmlParserCtxtPtr ctxt, const xmlChar** str) {
            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));
 }
@@ -3552,16 +3669,25 @@ xmlParseNmtoken(xmlParserCtxtPtr ctxt) {
 #endif
 
     GROW;
+    if (ctxt->instate == XML_PARSER_EOF)
+        return(NULL);
     c = CUR_CHAR(l);
 
     while (xmlIsNameChar(ctxt, c)) {
-       if (count++ > 100) {
+       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
@@ -3577,13 +3703,23 @@ xmlParseNmtoken(xmlParserCtxtPtr ctxt) {
            }
            memcpy(buffer, buf, len);
            while (xmlIsNameChar(ctxt, c)) {
-               if (count++ > 100) {
+               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));
@@ -3604,6 +3740,11 @@ xmlParseNmtoken(xmlParserCtxtPtr ctxt) {
     }
     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));
 }
 
@@ -3650,6 +3791,10 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) {
     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);
     /*
@@ -3657,12 +3802,12 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) {
      * 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. 
+     * 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))) {
+    while (((IS_CHAR(c)) && ((c != stop) || /* checked */
+           (ctxt->input != input))) && (ctxt->instate != XML_PARSER_EOF)) {
        if (len + 5 >= size) {
            xmlChar *tmp;
 
@@ -3691,6 +3836,10 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) {
        }
     }
     buf[len] = 0;
+    if (ctxt->instate == XML_PARSER_EOF) {
+        xmlFree(buf);
+        return(NULL);
+    }
 
     /*
      * Raise problem w.r.t. '&' and '%' being used in non-entities
@@ -3738,12 +3887,12 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) {
         */
        ret = xmlStringDecodeEntities(ctxt, buf, XML_SUBSTITUTE_PEREF,
                                      0, 0, 0);
-       if (orig != NULL) 
+       if (orig != NULL)
            *orig = buf;
        else
            xmlFree(buf);
     }
-    
+
     return(ret);
 }
 
@@ -3764,8 +3913,8 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
     xmlChar limit = 0;
     xmlChar *buf = NULL;
     xmlChar *rep = NULL;
-    int len = 0;
-    int buf_size = 0;
+    size_t len = 0;
+    size_t buf_size = 0;
     int c, l, in_space = 0;
     xmlChar *current = NULL;
     xmlEntityPtr ent;
@@ -3787,15 +3936,26 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
      * allocate a translation buffer.
      */
     buf_size = XML_PARSER_BUFFER_SIZE;
-    buf = (xmlChar *) xmlMallocAtomic(buf_size * sizeof(xmlChar));
+    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 != '<')) {
+    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;
@@ -3804,7 +3964,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
 
                if (val == '&') {
                    if (ctxt->replaceEntities) {
-                       if (len > buf_size - 10) {
+                       if (len + 10 > buf_size) {
                            growBuffer(buf, 10);
                        }
                        buf[len++] = '&';
@@ -3813,7 +3973,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                         * The reparsing will be done in xmlStringGetNodeList()
                         * called by the attribute() function in SAX.c
                         */
-                       if (len > buf_size - 10) {
+                       if (len + 10 > buf_size) {
                            growBuffer(buf, 10);
                        }
                        buf[len++] = '&';
@@ -3823,7 +3983,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                        buf[len++] = ';';
                    }
                } else if (val != 0) {
-                   if (len > buf_size - 10) {
+                   if (len + 10 > buf_size) {
                        growBuffer(buf, 10);
                    }
                    len += xmlCopyChar(0, &buf[len], val);
@@ -3835,7 +3995,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                    ctxt->nbentities += ent->owner;
                if ((ent != NULL) &&
                    (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
-                   if (len > buf_size - 10) {
+                   if (len + 10 > buf_size) {
                        growBuffer(buf, 10);
                    }
                    if ((ctxt->replaceEntities == 0) &&
@@ -3848,7 +4008,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                    } else {
                        buf[len++] = ent->content[0];
                    }
-               } else if ((ent != NULL) && 
+               } else if ((ent != NULL) &&
                           (ctxt->replaceEntities != 0)) {
                    if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) {
                        rep = xmlStringDecodeEntities(ctxt, ent->content,
@@ -3863,7 +4023,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                                     current++;
                                 } else
                                     buf[len++] = *current++;
-                               if (len > buf_size - 10) {
+                               if (len + 10 > buf_size) {
                                    growBuffer(buf, 10);
                                }
                            }
@@ -3871,7 +4031,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                            rep = NULL;
                        }
                    } else {
-                       if (len > buf_size - 10) {
+                       if (len + 10 > buf_size) {
                            growBuffer(buf, 10);
                        }
                        if (ent->content != NULL)
@@ -3886,10 +4046,16 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                     * entities problems
                     */
                    if ((ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
-                       (ent->content != NULL)) {
+                       (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;
                        }
@@ -3899,7 +4065,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                     * Just output the reference
                     */
                    buf[len++] = '&';
-                   while (len > buf_size - i - 10) {
+                   while (len + i + 10 > buf_size) {
                        growBuffer(buf, i + 10);
                    }
                    for (;i > 0;i--)
@@ -3912,7 +4078,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
                if ((len != 0) || (!normalize)) {
                    if ((!normalize) || (!in_space)) {
                        COPY_BUF(l,buf,len,0x20);
-                       while (len > buf_size - 10) {
+                       while (len + 10 > buf_size) {
                            growBuffer(buf, 10);
                        }
                    }
@@ -3921,7 +4087,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
            } else {
                in_space = 0;
                COPY_BUF(l,buf,len,c);
-               if (len > buf_size - 10) {
+               if (len + 10 > buf_size) {
                    growBuffer(buf, 10);
                }
            }
@@ -3930,8 +4096,11 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
        GROW;
        c = CUR_CHAR(l);
     }
+    if (ctxt->instate == XML_PARSER_EOF)
+        goto error;
+
     if ((in_space) && (normalize)) {
-        while (buf[len - 1] == 0x20) len--;
+        while ((len > 0) && (buf[len - 1] == 0x20)) len--;
     }
     buf[len] = 0;
     if (RAW == '<') {
@@ -3946,11 +4115,23 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
         }
     } else
        NEXT;
-    if (attlen != NULL) *attlen = len;
+
+    /*
+     * 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)
@@ -3971,20 +4152,20 @@ mem_error:
  *
  * 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: 
+ * 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 
+ *   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 
+ *   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.  
+ * (#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.
  *
@@ -4001,7 +4182,7 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) {
 /**
  * xmlParseSystemLiteral:
  * @ctxt:  an XML parser context
- * 
+ *
  * parse an XML Literal
  *
  * [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
@@ -4030,7 +4211,7 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) {
        xmlFatalErr(ctxt, XML_ERR_LITERAL_NOT_STARTED, NULL);
        return(NULL);
     }
-    
+
     buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
     if (buf == NULL) {
         xmlErrMemory(ctxt, NULL);
@@ -4042,6 +4223,13 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) {
        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) {
@@ -4056,6 +4244,10 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) {
        if (count > 50) {
            GROW;
            count = 0;
+            if (ctxt->instate == XML_PARSER_EOF) {
+               xmlFree(buf);
+               return(NULL);
+            }
        }
        COPY_BUF(l,buf,len,cur);
        NEXTL(l);
@@ -4119,6 +4311,12 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) {
        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) {
@@ -4133,6 +4331,10 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) {
        if (count > 50) {
            GROW;
            count = 0;
+            if (ctxt->instate == XML_PARSER_EOF) {
+               xmlFree(buf);
+               return(NULL);
+            }
        }
        NEXT;
        cur = CUR;
@@ -4203,7 +4405,7 @@ static const unsigned char test_char_data[256] = {
  * 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. 
+ * string is not marking the end of a CDATA section.
  *
  * [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
  */
@@ -4339,6 +4541,8 @@ get_more:
            }
            SHRINK;
            GROW;
+            if (ctxt->instate == XML_PARSER_EOF)
+               return;
            in = ctxt->input->cur;
        } while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09));
        nbchar = 0;
@@ -4368,7 +4572,7 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
     GROW;
     cur = CUR_CHAR(l);
     while ((cur != '<') && /* checked */
-           (cur != '&') && 
+           (cur != '&') &&
           (IS_CHAR(cur))) /* test also done in xmlCurrentChar() */ {
        if ((cur == ']') && (NXT(1) == ']') &&
            (NXT(2) == '>')) {
@@ -4407,6 +4611,8 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
        if (count > 50) {
            GROW;
            count = 0;
+            if (ctxt->instate == XML_PARSER_EOF)
+               return;
        }
        NEXTL(l);
        cur = CUR_CHAR(l);
@@ -4499,7 +4705,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) {
            }
        } else {
            /*
-            * We handle [83] so we return immediately, if 
+            * 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.
             */
@@ -4508,7 +4714,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) {
 
            ptr = CUR_PTR;
            if (!IS_BLANK_CH(*ptr)) return(NULL);
-           
+
            while (IS_BLANK_CH(*ptr)) ptr++; /* TODO: dangerous, fix ! */
            if ((*ptr != '\'') && (*ptr != '"')) return(NULL);
        }
@@ -4536,11 +4742,12 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) {
  * [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
  */
 static void
-xmlParseCommentComplex(xmlParserCtxtPtr ctxt, xmlChar *buf, int len, int size) {
+xmlParseCommentComplex(xmlParserCtxtPtr ctxt, xmlChar *buf,
+                       size_t len, size_t size) {
     int q, ql;
     int r, rl;
     int cur, l;
-    int count = 0;
+    size_t count = 0;
     int inputid;
 
     inputid = ctxt->input->id;
@@ -4586,16 +4793,26 @@ xmlParseCommentComplex(xmlParserCtxtPtr ctxt, xmlChar *buf, int len, int size) {
        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 *= 2;
-           new_buf = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+            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;
@@ -4607,6 +4824,10 @@ xmlParseCommentComplex(xmlParserCtxtPtr ctxt, xmlChar *buf, int len, int size) {
        if (count > 50) {
            GROW;
            count = 0;
+            if (ctxt->instate == XML_PARSER_EOF) {
+               xmlFree(buf);
+               return;
+            }
        }
        NEXTL(l);
        cur = CUR_CHAR(l);
@@ -4656,11 +4877,12 @@ not_terminated:
 void
 xmlParseComment(xmlParserCtxtPtr ctxt) {
     xmlChar *buf = NULL;
-    int size = XML_PARSER_BUFFER_SIZE;
-    int len = 0;
+    size_t size = XML_PARSER_BUFFER_SIZE;
+    size_t len = 0;
     xmlParserInputState state;
     const xmlChar *in;
-    int nbchar = 0, ccol;
+    size_t nbchar = 0;
+    int ccol;
     int inputid;
 
     /*
@@ -4740,6 +4962,13 @@ get_more:
                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++;
@@ -4757,6 +4986,10 @@ get_more:
        }
        SHRINK;
        GROW;
+        if (ctxt->instate == XML_PARSER_EOF) {
+            xmlFree(buf);
+            return;
+        }
        in = ctxt->input->cur;
        if (*in == '-') {
            if (in[1] == '-') {
@@ -4775,7 +5008,8 @@ get_more:
                    }
                    if (buf != NULL)
                        xmlFree(buf);
-                   ctxt->instate = state;
+                   if (ctxt->instate != XML_PARSER_EOF)
+                       ctxt->instate = state;
                    return;
                }
                if (buf != NULL) {
@@ -4803,7 +5037,7 @@ get_more:
 /**
  * xmlParsePITarget:
  * @ctxt:  an XML parser context
- * 
+ *
  * parse the name of a PI
  *
  * [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
@@ -4840,7 +5074,7 @@ xmlParsePITarget(xmlParserCtxtPtr ctxt) {
                      NULL, NULL);
     }
     if ((name != NULL) && (xmlStrchr(name, ':') != NULL)) {
-       xmlNsErr(ctxt, XML_NS_ERR_COLON, 
+       xmlNsErr(ctxt, XML_NS_ERR_COLON,
                 "colon are forbidden from PI names '%s'\n", name, NULL, NULL);
     }
     return(name);
@@ -4851,7 +5085,7 @@ xmlParsePITarget(xmlParserCtxtPtr ctxt) {
  * 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"?>
@@ -4911,7 +5145,7 @@ error:
 /**
  * xmlParsePI:
  * @ctxt:  an XML parser context
- * 
+ *
  * parse an XML Processing Instruction.
  *
  * [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
@@ -4922,8 +5156,8 @@ error:
 void
 xmlParsePI(xmlParserCtxtPtr ctxt) {
     xmlChar *buf = NULL;
-    int len = 0;
-    int size = XML_PARSER_BUFFER_SIZE;
+    size_t len = 0;
+    size_t size = XML_PARSER_BUFFER_SIZE;
     int cur, l;
     const xmlChar *target;
     xmlParserInputState state;
@@ -4980,9 +5214,8 @@ xmlParsePI(xmlParserCtxtPtr ctxt) {
                   ((cur != '?') || (NXT(1) != '>'))) {
                if (len + 5 >= size) {
                    xmlChar *tmp;
-
-                   size *= 2;
-                   tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+                    size_t new_size = size * 2;
+                   tmp = (xmlChar *) xmlRealloc(buf, new_size);
                    if (tmp == NULL) {
                        xmlErrMemory(ctxt, NULL);
                        xmlFree(buf);
@@ -4990,11 +5223,24 @@ xmlParsePI(xmlParserCtxtPtr ctxt) {
                        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);
@@ -5005,6 +5251,14 @@ xmlParsePI(xmlParserCtxtPtr ctxt) {
                    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,
@@ -5066,7 +5320,7 @@ 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;
@@ -5089,7 +5343,7 @@ xmlParseNotationDecl(xmlParserCtxtPtr ctxt) {
            return;
        }
        if (xmlStrchr(name, ':') != NULL) {
-           xmlNsErr(ctxt, XML_NS_ERR_COLON, 
+           xmlNsErr(ctxt, XML_NS_ERR_COLON,
                     "colon are forbidden from notation names '%s'\n",
                     name, NULL, NULL);
        }
@@ -5149,7 +5403,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
     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;
@@ -5178,7 +5432,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
             return;
        }
        if (xmlStrchr(name, ':') != NULL) {
-           xmlNsErr(ctxt, XML_NS_ERR_COLON, 
+           xmlNsErr(ctxt, XML_NS_ERR_COLON,
                     "colon are forbidden from entities names '%s'\n",
                     name, NULL, NULL);
        }
@@ -5343,6 +5597,8 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
                }
            }
        }
+       if (ctxt->instate == XML_PARSER_EOF)
+           return;
        SKIP_BLANKS;
        if (RAW != '>') {
            xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_NOT_FINISHED,
@@ -5406,13 +5662,13 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
  *
  * [ 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. 
+ * 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. 
+ *          or XML_ATTRIBUTE_FIXED.
  */
 
 int
@@ -5461,7 +5717,7 @@ xmlParseDefaultDecl(xmlParserCtxtPtr ctxt, xmlChar **value) {
  *
  * [ 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. 
+ * in the declaration; all notation names in the declaration must be declared.
  *
  * Returns: the notation attribute tree built while parsing
  */
@@ -5661,15 +5917,15 @@ xmlParseEnumeratedType(xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree) {
  * [ 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.  
+ * 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. 
+ * of type NMTOKENS must match Nmtokens.
  *
  * Returns the attribute type
  */
-int 
+int
 xmlParseAttributeType(xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree) {
     SHRINK;
     if (CMP5(CUR_PTR, 'C', 'D', 'A', 'T', 'A')) {
@@ -5734,7 +5990,7 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) {
        }
        SKIP_BLANKS;
        GROW;
-       while (RAW != '>') {
+       while ((RAW != '>') && (ctxt->instate != XML_PARSER_EOF)) {
            const xmlChar *check = CUR_PTR;
            int type;
            int def;
@@ -5812,7 +6068,7 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) {
                xmlFreeEnumeration(tree);
 
            if ((ctxt->sax2) && (defaultValue != NULL) &&
-               (def != XML_ATTRIBUTE_IMPLIED) && 
+               (def != XML_ATTRIBUTE_IMPLIED) &&
                (def != XML_ATTRIBUTE_REQUIRED)) {
                xmlAddDefAttrs(ctxt, elemName, attrName, defaultValue);
            }
@@ -5841,7 +6097,7 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) {
  *
  * 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? ')'
  *
@@ -5849,7 +6105,7 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) {
  *
  * [ VC: No Duplicate Types ]
  * The same name must not appear more than once in a single
- * mixed-content declaration. 
+ * mixed-content declaration.
  *
  * returns: the list of the xmlElementContentPtr describing the element choices
  */
@@ -5883,7 +6139,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) {
            ret = cur = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_PCDATA);
            if (ret == NULL) return(NULL);
        }
-       while (RAW == '|') {
+       while ((RAW == '|') && (ctxt->instate != XML_PARSER_EOF)) {
            NEXT;
            if (elem == NULL) {
                ret = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_OR);
@@ -5949,7 +6205,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) {
  *
  * parse the declaration for a Mixed Element content
  * The leading '(' and spaces have been skipped in xmlParseElementContentDecl
- * 
+ *
  *
  * [47] children ::= (choice | seq) ('?' | '*' | '+')?
  *
@@ -5970,7 +6226,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) {
  *     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 
+ * Returns the tree of xmlElementContentPtr describing the element
  *          hierarchy.
  */
 static xmlElementContentPtr
@@ -6027,7 +6283,7 @@ xmlParseElementChildrenContentDeclPriv(xmlParserCtxtPtr ctxt, int inputchk,
     }
     SKIP_BLANKS;
     SHRINK;
-    while (RAW != ')') {
+    while ((RAW != ')') && (ctxt->instate != XML_PARSER_EOF)) {
         /*
         * Each loop we parse one separator and one element.
         */
@@ -6283,7 +6539,7 @@ xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt, int inputchk) {
  *
  * 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
@@ -6306,6 +6562,8 @@ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, const xmlChar *name,
     }
     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);
@@ -6409,7 +6667,7 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) {
                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)) {
@@ -6421,7 +6679,7 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) {
                    /*
                     * 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 
+                    * if called from the parser. Avoid duplicating the
                     * interfaces or change the API/ABI
                     */
                    xmlFreeDocElementContent(ctxt->myDoc, content);
@@ -6438,8 +6696,8 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) {
  * xmlParseConditionalSections
  * @ctxt:  an XML parser context
  *
- * [61] conditionalSect ::= includeSect | ignoreSect 
- * [62] includeSect ::= '<![' S? 'INCLUDE' S? '[' extSubsetDecl ']]>' 
+ * [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*)
@@ -6473,8 +6731,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
                    "Entering INCLUDE Conditional Section\n");
        }
 
-       while ((RAW != 0) && ((RAW != ']') || (NXT(1) != ']') ||
-              (NXT(2) != '>'))) {
+       while (((RAW != 0) && ((RAW != ']') || (NXT(1) != ']') ||
+               (NXT(2) != '>'))) && (ctxt->instate != XML_PARSER_EOF)) {
            const xmlChar *check = CUR_PTR;
            unsigned int cons = ctxt->input->consumed;
 
@@ -6542,7 +6800,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
        if (ctxt->recovery == 0) ctxt->disableSAX = 1;
        ctxt->instate = XML_PARSER_IGNORE;
 
-       while ((depth >= 0) && (RAW != 0)) {
+       while (((depth >= 0) && (RAW != 0)) &&
+               (ctxt->instate != XML_PARSER_EOF)) {
          if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) {
            depth++;
            SKIP(3);
@@ -6590,7 +6849,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
 /**
  * xmlParseMarkupDecl:
  * @ctxt:  an XML parser context
- * 
+ *
  * parse Markup declarations
  *
  * [29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl |
@@ -6607,7 +6866,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
  * 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.) 
+ * entities or to the external subset.)
  */
 void
 xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) {
@@ -6736,7 +6995,7 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) {
  * @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
@@ -6813,7 +7072,7 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID,
            break;
        }
     }
-    
+
     if (RAW != 0) {
        xmlFatalErr(ctxt, XML_ERR_EXT_SUBSET_NOT_FINISHED, NULL);
     }
@@ -6915,8 +7174,15 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
      * The first reference to the entity trigger a parsing phase
      * where the ent->children is filled with the result from
      * the parsing.
-     */
-    if (ent->checked == 0) {
+     * 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;
 
        /*
@@ -6958,13 +7224,15 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
         * Store the number of entities needing parsing for this entity
         * content and do checkings
         */
-       ent->checked = ctxt->nbentities - oldnbent;
+       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)) {
+       if (xmlParserEntityCheck(ctxt, 0, ent, 0)) {
            xmlFreeNodeList(list);
            return;
        }
@@ -7023,9 +7291,9 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
            list = NULL;
        }
        if (ent->checked == 0)
-           ent->checked = 1;
+           ent->checked = 2;
     } else if (ent->checked != 1) {
-       ctxt->nbentities += ent->checked;
+       ctxt->nbentities += ent->checked / 2;
     }
 
     /*
@@ -7116,14 +7384,19 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
             * 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.
-            * progressive == 2 means we are operating on the Reader
-            * and since nodes are discarded we must copy all the time.
             */
            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;
+               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)
@@ -7160,9 +7433,17 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
                if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)
                  xmlAddEntityReference(ent, firstChild, nw);
 #endif /* LIBXML_LEGACY_ENABLED */
-           } else if (list == NULL) {
+           } 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;
+               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
@@ -7260,6 +7541,8 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
     xmlEntityPtr ent = NULL;
 
     GROW;
+    if (ctxt->instate == XML_PARSER_EOF)
+        return(NULL);
 
     if (RAW != '&')
         return(NULL);
@@ -7277,7 +7560,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
     NEXT;
 
     /*
-     * Predefined entites override any extra definition
+     * Predefined entities override any extra definition
      */
     if ((ctxt->options & XML_PARSE_OLDSAX) == 0) {
         ent = xmlGetPredefinedEntity(name);
@@ -7286,7 +7569,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
     }
 
     /*
-     * Increate the number of entity references parsed
+     * Increase the number of entity references parsed
      */
     ctxt->nbentities++;
 
@@ -7297,7 +7580,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
     if (ctxt->sax != NULL) {
        if (ctxt->sax->getEntity != NULL)
            ent = ctxt->sax->getEntity(ctxt->userData, name);
-       if ((ctxt->wellFormed == 1 ) && (ent == NULL) && 
+       if ((ctxt->wellFormed == 1 ) && (ent == NULL) &&
            (ctxt->options & XML_PARSE_OLDSAX))
            ent = xmlGetPredefinedEntity(name);
        if ((ctxt->wellFormed == 1 ) && (ent == NULL) &&
@@ -7305,6 +7588,8 @@ xmlParseEntityRef(xmlParserCtxtPtr 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
@@ -7368,14 +7653,16 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
      * [ 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 <. 
+     * 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);
+            (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);
+        }
     }
 
     /*
@@ -7397,7 +7684,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
     /*
      * [ WFC: No Recursion ]
      * A parsed entity must not contain a recursive reference
-     * to itself, either directly or indirectly. 
+     * to itself, either directly or indirectly.
      * Done somewhere else
      */
     return(ent);
@@ -7495,6 +7782,10 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
            ent = xmlSAX2GetEntity(ctxt, name);
        }
     }
+    if (ctxt->instate == XML_PARSER_EOF) {
+       xmlFree(name);
+       return(NULL);
+    }
 
     /*
      * [ WFC: Entity Declared ]
@@ -7515,7 +7806,7 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
      * 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'. 
+     * standalone='yes'.
      */
     if (ent == NULL) {
        if ((ctxt->standalone == 1) ||
@@ -7606,7 +7897,7 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
  *
  * [ WFC: No Recursion ]
  * A parsed entity must not contain a recursive
- * reference to itself, either directly or indirectly. 
+ * reference to itself, either directly or indirectly.
  *
  * [ WFC: Entity Declared ]
  * In a document without any DTD, a document with only an internal DTD
@@ -7656,8 +7947,9 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
      */
     if ((ctxt->sax != NULL) &&
        (ctxt->sax->getParameterEntity != NULL))
-       entity = ctxt->sax->getParameterEntity(ctxt->userData,
-                                              name);
+       entity = ctxt->sax->getParameterEntity(ctxt->userData, name);
+    if (ctxt->instate == XML_PARSER_EOF)
+       return;
     if (entity == NULL) {
        /*
         * [ WFC: Entity Declared ]
@@ -7787,12 +8079,25 @@ xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
     while ((ctxt->input == input) && (ctxt->input->cur < ctxt->input->end) &&
            (IS_CHAR(c))) {
         xmlBufferAdd(buf, ctxt->input->cur, l);
-       if (count++ > 100) {
+       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)) {
@@ -7881,8 +8186,11 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) {
      */
     if ((ctxt->sax != NULL) &&
        (ctxt->sax->getParameterEntity != NULL))
-       entity = ctxt->sax->getParameterEntity(ctxt->userData,
-                                              name);
+       entity = ctxt->sax->getParameterEntity(ctxt->userData, name);
+    if (ctxt->instate == XML_PARSER_EOF) {
+       xmlFree(name);
+       return(NULL);
+    }
     if (entity == NULL) {
        /*
         * [ WFC: Entity Declared ]
@@ -7932,12 +8240,12 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) {
  *
  * parse a DOCTYPE declaration
  *
- * [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? 
+ * [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. 
+ * type of the root element.
  */
 
 void
@@ -7984,6 +8292,8 @@ xmlParseDocTypeDecl(xmlParserCtxtPtr ctxt) {
     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 ?
@@ -8019,11 +8329,11 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) {
         ctxt->instate = XML_PARSER_DTD;
         NEXT;
        /*
-        * Parse the succession of Markup declarations and 
+        * Parse the succession of Markup declarations and
         * PEReferences.
         * Subsequence (markupdecl | PEReference | S)*
         */
-       while (RAW != ']') {
+       while ((RAW != ']') && (ctxt->instate != XML_PARSER_EOF)) {
            const xmlChar *check = CUR_PTR;
            unsigned int cons = ctxt->input->consumed;
 
@@ -8043,7 +8353,7 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) {
                break;
            }
        }
-       if (RAW == ']') { 
+       if (RAW == ']') {
            NEXT;
            SKIP_BLANKS;
        }
@@ -8074,8 +8384,8 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) {
  *
  * [ 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 <. 
- * 
+ * 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.
@@ -8156,7 +8466,7 @@ xmlParseAttribute(xmlParserCtxtPtr ctxt, xmlChar **value) {
 /**
  * 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.
  *
@@ -8164,13 +8474,13 @@ xmlParseAttribute(xmlParserCtxtPtr ctxt, xmlChar **value) {
  *
  * [ WFC: Unique Att Spec ]
  * No attribute name may appear more than once in the same start-tag or
- * empty-element tag. 
+ * 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. 
+ * empty-element tag.
  *
  * With namespace:
  *
@@ -8209,9 +8519,9 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) {
     SKIP_BLANKS;
     GROW;
 
-    while ((RAW != '>') && 
+    while (((RAW != '>') &&
           ((RAW != '/') || (NXT(1) != '>')) &&
-          (IS_BYTE_CHAR(RAW))) {
+          (IS_BYTE_CHAR(RAW))) && (ctxt->instate != XML_PARSER_EOF)) {
        const xmlChar *q = CUR_PTR;
        unsigned int cons = ctxt->input->consumed;
 
@@ -8220,7 +8530,7 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) {
            /*
             * [ WFC: Unique Att Spec ]
             * No attribute name may appear more than once in the same
-            * start-tag or empty-element tag. 
+            * start-tag or empty-element tag.
             */
            for (i = 0; i < nbatts;i += 2) {
                if (xmlStrEqual(atts[i], attname)) {
@@ -8269,7 +8579,7 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) {
                xmlFree(attvalue);
        }
 
-failed:     
+failed:
 
        GROW
        if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
@@ -8351,7 +8661,7 @@ xmlParseEndTag1(xmlParserCtxtPtr ctxt, int line) {
     /*
      * [ WFC: Element Type Match ]
      * The Name in an element's end-tag must match the element type in the
-     * start-tag. 
+     * start-tag.
      *
      */
     if (name != (xmlChar*)1) {
@@ -8447,7 +8757,7 @@ xmlParseQName(xmlParserCtxtPtr ctxt, const xmlChar **prefix) {
         if (CUR == ':') {
            l = xmlParseName(ctxt);
            if (l != NULL) {
-               xmlNsErr(ctxt, XML_NS_ERR_QNAME, 
+               xmlNsErr(ctxt, XML_NS_ERR_QNAME,
                         "Failed to parse QName '%s'\n", l, NULL, NULL);
                *prefix = NULL;
                return(l);
@@ -8530,7 +8840,7 @@ xmlParseQNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *name,
 
     cmp = prefix;
     while (*in != 0 && *in == *cmp) {
-       ++in;
+       ++in;
        ++cmp;
     }
     if ((*cmp == 0) && (*in == ':')) {
@@ -8568,20 +8878,20 @@ xmlParseQNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *name,
  *
  * 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: 
+ * 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 
+ *   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 
+ *   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.  
+ * (#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.
  *
@@ -8627,7 +8937,7 @@ xmlParseAttValueInternal(xmlParserCtxtPtr ctxt, int *len, int *alloc,
         /*
         * Skip any leading spaces
         */
-       while ((in < end) && (*in != limit) && 
+       while ((in < end) && (*in != limit) &&
               ((*in == 0x20) || (*in == 0x9) ||
                (*in == 0xA) || (*in == 0xD))) {
            in++;
@@ -8635,12 +8945,20 @@ xmlParseAttValueInternal(xmlParserCtxtPtr ctxt, int *len, int *alloc,
            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) &&
@@ -8649,12 +8967,20 @@ xmlParseAttValueInternal(xmlParserCtxtPtr ctxt, int *len, int *alloc,
            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;
@@ -8662,13 +8988,15 @@ xmlParseAttValueInternal(xmlParserCtxtPtr ctxt, int *len, int *alloc,
         * skip the trailing blanks
         */
        while ((last[-1] == 0x20) && (last > start)) last--;
-       while ((in < end) && (*in != limit) && 
+       while ((in < end) && (*in != limit) &&
               ((*in == 0x20) || (*in == 0x9) ||
                (*in == 0xA) || (*in == 0xD))) {
            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;
@@ -8676,8 +9004,20 @@ xmlParseAttValueInternal(xmlParserCtxtPtr ctxt, int *len, int *alloc,
                    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) &&
@@ -8686,15 +9026,29 @@ xmlParseAttValueInternal(xmlParserCtxtPtr ctxt, int *len, int *alloc,
            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++;
@@ -8833,7 +9187,7 @@ xmlParseAttribute2(xmlParserCtxtPtr ctxt,
 /**
  * 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
@@ -8842,13 +9196,13 @@ xmlParseAttribute2(xmlParserCtxtPtr ctxt,
  *
  * [ WFC: Unique Att Spec ]
  * No attribute name may appear more than once in the same start-tag or
- * empty-element tag. 
+ * 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. 
+ * empty-element tag.
  *
  * With namespace:
  *
@@ -8917,9 +9271,9 @@ reparse:
     GROW;
     if (ctxt->input->base != base) goto base_changed;
 
-    while ((RAW != '>') && 
+    while (((RAW != '>') &&
           ((RAW != '/') || (NXT(1) != '>')) &&
-          (IS_BYTE_CHAR(RAW))) {
+          (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;
@@ -9090,6 +9444,8 @@ skip_ns:
 failed:
 
        GROW
+        if (ctxt->instate == XML_PARSER_EOF)
+            break;
        if (ctxt->input->base != base) goto base_changed;
        if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
            break;
@@ -9181,7 +9537,7 @@ failed:
                    atts[nbatts++] = defaults->values[5 * i + 3];
                    if ((ctxt->standalone == 1) &&
                        (defaults->values[5 * i + 4] != NULL)) {
-                       xmlValidityError(ctxt, XML_DTD_STANDALONE_DEFAULTED, 
+                       xmlValidityError(ctxt, XML_DTD_STANDALONE_DEFAULTED,
          "standalone: attribute %s on %s defaulted from external subset\n",
                                         attname, localname);
                    }
@@ -9211,7 +9567,7 @@ failed:
        /*
         * [ WFC: Unique Att Spec ]
         * No attribute name may appear more than once in the same
-        * start-tag or empty-element tag. 
+        * start-tag or empty-element tag.
         * As extended by the Namespace in XML REC.
         */
         for (j = 0; j < i;j += 5) {
@@ -9327,6 +9683,8 @@ xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *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);
@@ -9336,7 +9694,7 @@ xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
     /*
      * [ WFC: Element Type Match ]
      * The Name in an element's end-tag must match the element type in the
-     * start-tag. 
+     * start-tag.
      *
      */
     if (name != (xmlChar*)1) {
@@ -9365,7 +9723,7 @@ done:
 /**
  * xmlParseCDSect:
  * @ctxt:  an XML parser context
- * 
+ *
  * Parse escaped pure raw content.
  *
  * [18] CDSect ::= CDStart CData CDEnd
@@ -9418,14 +9776,21 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) {
        if (len + 5 >= size) {
            xmlChar *tmp;
 
-           size *= 2;
-           tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+            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;
@@ -9435,6 +9800,10 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) {
        count++;
        if (count > 50) {
            GROW;
+            if (ctxt->instate == XML_PARSER_EOF) {
+               xmlFree(buf);
+               return;
+            }
            count = 0;
        }
        NEXTL(l);
@@ -9514,7 +9883,7 @@ xmlParseContent(xmlParserCtxtPtr ctxt) {
 
        /*
         * Fifth case : a reference. If if has not been resolved,
-        *    parsing returns it's Name, create the node 
+        *    parsing returns it's Name, create the node
         */
 
        else if (*cur == '&') {
@@ -9555,7 +9924,7 @@ xmlParseContent(xmlParserCtxtPtr ctxt) {
  *
  * [ WFC: Element Type Match ]
  * The Name in an element's end-tag must match the element type in the
- * start-tag. 
+ * start-tag.
  *
  */
 
@@ -9614,7 +9983,7 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
     /*
      * [ VC: Root Element Type ]
      * The Name in the document type declaration must match the element
-     * type of the root element. 
+     * type of the root element.
      */
     if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc &&
         ctxt->node && (ctxt->node == ctxt->myDoc->children))
@@ -9683,6 +10052,8 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
      * 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",
@@ -9895,7 +10266,7 @@ xmlParseEncName(xmlParserCtxtPtr ctxt) {
 /**
  * xmlParseEncodingDecl:
  * @ctxt:  an XML parser context
- * 
+ *
  * parse the XML encoding declaration
  *
  * [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' |  "'" EncName "'")
@@ -9952,7 +10323,7 @@ xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) {
             (!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 
+            * using UTF-16 and no decoder is present i.e. the
             * document is apparently UTF-8 compatible, then raise an
             * encoding mismatch fatal error
             */
@@ -10003,7 +10374,7 @@ xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) {
  * parse the XML standalone declaration
  *
  * [32] SDDecl ::= S 'standalone' Eq
- *                 (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"')) 
+ *                 (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"'))
  *
  * [ VC: Standalone Document Declaration ]
  * TODO The standalone document declaration must have the value "no"
@@ -10083,7 +10454,7 @@ xmlParseSDDecl(xmlParserCtxtPtr ctxt) {
 /**
  * xmlParseXMLDecl:
  * @ctxt:  an XML parser context
- * 
+ *
  * parse an XML declaration header
  *
  * [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
@@ -10197,7 +10568,7 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) {
 /**
  * xmlParseMisc:
  * @ctxt:  an XML parser context
- * 
+ *
  * parse an XML Misc* optional field.
  *
  * [27] Misc ::= Comment | PI |  S
@@ -10205,9 +10576,10 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) {
 
 void
 xmlParseMisc(xmlParserCtxtPtr ctxt) {
-    while (((RAW == '<') && (NXT(1) == '?')) ||
-           (CMP4(CUR_PTR, '<', '!', '-', '-')) ||
-           IS_BLANK_CH(CUR)) {
+    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)) {
@@ -10220,7 +10592,7 @@ xmlParseMisc(xmlParserCtxtPtr ctxt) {
 /**
  * xmlParseDocument:
  * @ctxt:  an XML parser context
- * 
+ *
  * parse an XML document (and build a tree if using the standard SAX
  * interface).
  *
@@ -10254,10 +10626,12 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
      */
     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.
@@ -10305,6 +10679,8 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
     }
     if ((ctxt->sax) && (ctxt->sax->startDocument) && (!ctxt->disableSAX))
         ctxt->sax->startDocument(ctxt->userData);
+    if (ctxt->instate == XML_PARSER_EOF)
+       return(-1);
 
     /*
      * The Misc part of the Prolog
@@ -10324,6 +10700,8 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
        if (RAW == '[') {
            ctxt->instate = XML_PARSER_DTD;
            xmlParseInternalSubset(ctxt);
+           if (ctxt->instate == XML_PARSER_EOF)
+               return(-1);
        }
 
        /*
@@ -10334,6 +10712,8 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
            (!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);
@@ -10400,7 +10780,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
 /**
  * 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.
@@ -10431,7 +10811,7 @@ xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt) {
     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.
@@ -10474,6 +10854,8 @@ xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt) {
     }
     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
@@ -10484,7 +10866,9 @@ xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt) {
     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) {
@@ -10504,7 +10888,7 @@ xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt) {
 #ifdef LIBXML_PUSH_ENABLED
 /************************************************************************
  *                                                                     *
- *             Progressive parsing interfaces                          *
+ *             Progressive parsing interfaces                          *
  *                                                                     *
  ************************************************************************/
 
@@ -10541,8 +10925,8 @@ xmlParseLookupSequence(xmlParserCtxtPtr ctxt, xmlChar first,
        buf = in->base;
        len = in->length;
     } else {
-       buf = in->buf->buffer->content;
-       len = in->buf->buffer->use;
+       buf = xmlBufContent(in->buf->buffer);
+       len = xmlBufUse(in->buf->buffer);
     }
     /* take into account the sequence length */
     if (third) len -= 2;
@@ -10565,7 +10949,7 @@ xmlParseLookupSequence(xmlParserCtxtPtr ctxt, xmlChar first,
                xmlGenericError(xmlGenericErrorContext,
                        "PP: lookup '%c%c' found at %d\n",
                        first, next, base);
-           else 
+           else
                xmlGenericError(xmlGenericErrorContext,
                        "PP: lookup '%c%c%c' found at %d\n",
                        first, next, third, base);
@@ -10581,7 +10965,7 @@ xmlParseLookupSequence(xmlParserCtxtPtr ctxt, xmlChar first,
     else if (third == 0)
        xmlGenericError(xmlGenericErrorContext,
                "PP: lookup '%c%c' failed\n", first, next);
-    else       
+    else
        xmlGenericError(xmlGenericErrorContext,
                "PP: lookup '%c%c%c' failed\n", first, next, third);
 #endif
@@ -10663,7 +11047,7 @@ xmlCheckCdataPush(const xmlChar *utf, int len) {
 
     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 */
@@ -10791,11 +11175,11 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
     }
     xmlParseGetLasts(ctxt, &lastlt, &lastgt);
 
-    while (1) {
+    while (ctxt->instate != XML_PARSER_EOF) {
        if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
            return(0);
 
-        
+
        /*
         * Pop-up of finished entities.
         */
@@ -10810,22 +11194,22 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
            /*
             * If we are operating on converted input, try to flush
             * remainng chars to avoid them stalling in the non-converted
-            * buffer.
+            * 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->input->buf->raw != NULL) &&
-               (ctxt->input->buf->raw->use > 0)) {
-               int base = ctxt->input->base -
-                          ctxt->input->buf->buffer->content;
-               int current = ctxt->input->cur - ctxt->input->base;
+           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, "");
-               ctxt->input->base = ctxt->input->buf->buffer->content + base;
-               ctxt->input->cur = ctxt->input->base + current;
-               ctxt->input->end =
-                   &ctxt->input->buf->buffer->content[
-                                      ctxt->input->buf->buffer->use];
+                xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input,
+                                      base, current);
            }
-           avail = ctxt->input->buf->buffer->use -
+           avail = xmlBufUse(ctxt->input->buf->buffer) -
                    (ctxt->input->cur - ctxt->input->base);
        }
         if (avail < 1)
@@ -10847,7 +11231,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                    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,
@@ -11002,7 +11386,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                /*
                 * [ VC: Root Element Type ]
                 * The Name in the document type declaration must match
-                * the element type of the root element. 
+                * the element type of the root element.
                 */
                if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc &&
                    ctxt->node && (ctxt->node == ctxt->myDoc->children))
@@ -11031,12 +11415,15 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                            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 == '>') {
@@ -11056,6 +11443,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
 #endif /* LIBXML_SAX1_ENABLED */
 
                ctxt->instate = XML_PARSER_CONTENT;
+                ctxt->progressive = 1;
                 break;
            }
             case XML_PARSER_CONTENT: {
@@ -11073,9 +11461,13 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                    break;
                } else if ((cur == '<') && (next == '?')) {
                    if ((!terminate) &&
-                       (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0))
+                       (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;
@@ -11089,10 +11481,13 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                    ctxt->input->cur += 4;
                    term = xmlParseLookupSequence(ctxt, '-', '-', '>');
                    ctxt->input->cur -= 4;
-                   if ((!terminate) && (term < 0))
+                   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') &&
@@ -11187,7 +11582,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                break;
             case XML_PARSER_CDATA_SECTION: {
                /*
-                * The Push mode need to have the SAX callback for 
+                * The Push mode need to have the SAX callback for
                 * cdataBlock merge back contiguous callbacks.
                 */
                int base;
@@ -11197,7 +11592,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                    if (avail >= XML_PARSER_BIG_BUFFER_SIZE + 2) {
                        int tmp;
 
-                       tmp = xmlCheckCdataPush(ctxt->input->cur, 
+                       tmp = xmlCheckCdataPush(ctxt->input->cur,
                                                XML_PARSER_BIG_BUFFER_SIZE);
                        if (tmp < 0) {
                            tmp = -tmp;
@@ -11212,6 +11607,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                                ctxt->sax->characters(ctxt->userData,
                                                      ctxt->input->cur, tmp);
                        }
+                       if (ctxt->instate == XML_PARSER_EOF)
+                           goto done;
                        SKIPL(tmp);
                        ctxt->checkIndex = 0;
                    }
@@ -11247,6 +11644,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                            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;
@@ -11263,7 +11662,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                    avail = ctxt->input->length -
                            (ctxt->input->cur - ctxt->input->base);
                else
-                   avail = ctxt->input->buf->buffer->use -
+                   avail = xmlBufUse(ctxt->input->buf->buffer) -
                            (ctxt->input->cur - ctxt->input->base);
                if (avail < 2)
                    goto done;
@@ -11271,26 +11670,37 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                next = ctxt->input->cur[1];
                if ((cur == '<') && (next == '?')) {
                    if ((!terminate) &&
-                       (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0))
+                       (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))
+                       (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') &&
@@ -11301,14 +11711,20 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                    (ctxt->input->cur[7] == 'P') &&
                    (ctxt->input->cur[8] == 'E')) {
                    if ((!terminate) &&
-                       (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0))
+                       (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
@@ -11338,7 +11754,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                    goto done;
                } else {
                    ctxt->instate = XML_PARSER_START_TAG;
-                   ctxt->progressive = 1;
+                   ctxt->progressive = XML_PARSER_START_TAG;
                    xmlParseGetLasts(ctxt, &lastlt, &lastgt);
 #ifdef DEBUG_PUSH
                    xmlGenericError(xmlGenericErrorContext,
@@ -11351,38 +11767,50 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                if (ctxt->input->buf == NULL)
                    avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base);
                else
-                   avail = ctxt->input->buf->buffer->use - (ctxt->input->cur - ctxt->input->base);
-               if (avail < 2) 
+                   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))
+                       (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))
+                       (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 = 1;
+                       ctxt->progressive = XML_PARSER_START_TAG;
                    xmlParseGetLasts(ctxt, &lastlt, &lastgt);
 #ifdef DEBUG_PUSH
                    xmlGenericError(xmlGenericErrorContext,
@@ -11395,32 +11823,43 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                if (ctxt->input->buf == NULL)
                    avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base);
                else
-                   avail = ctxt->input->buf->buffer->use - (ctxt->input->cur - ctxt->input->base);
+                   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))
+                       (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))
+                       (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;
@@ -11450,29 +11889,28 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                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 = ctxt->input->buf->buffer->content;
-               for (;(unsigned int) base < ctxt->input->buf->buffer->use;
-                    base++) {
+               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;    
+                       continue;
                    }
                    if ((quote == 0) && (buf[base] == '<')) {
                        int found  = 0;
                        /* special handling of comments */
-                       if (((unsigned int) base + 4 <
-                            ctxt->input->buf->buffer->use) &&
+                       if (((unsigned int) base + 4 < use) &&
                            (buf[base + 1] == '!') &&
                            (buf[base + 2] == '-') &&
                            (buf[base + 3] == '-')) {
-                           for (;(unsigned int) base + 3 <
-                                 ctxt->input->buf->buffer->use; base++) {
+                           for (;(unsigned int) base + 3 < use; base++) {
                                if ((buf[base] == '-') &&
                                    (buf[base + 1] == '-') &&
                                    (buf[base + 2] == '>')) {
@@ -11503,17 +11941,14 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                        fprintf(stderr, "%c%c%c%c: ", buf[base],
                                buf[base + 1], buf[base + 2], buf[base + 3]);
 #endif
-                       if ((unsigned int) base +1 >=
-                           ctxt->input->buf->buffer->use)
+                       if ((unsigned int) base +1 >= use)
                            break;
                        if (buf[base + 1] == ']') {
                            /* conditional crap, skip both ']' ! */
                            base++;
                            continue;
                        }
-                       for (i = 1;
-                    (unsigned int) base + i < ctxt->input->buf->buffer->use;
-                            i++) {
+                       for (i = 1; (unsigned int) base + i < use; i++) {
                            if (buf[base + i] == '>') {
 #if 0
                                fprintf(stderr, "found\n");
@@ -11531,7 +11966,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
                        fprintf(stderr, "end of stream\n");
 #endif
                        break;
-                        
+
                    }
 not_end_of_int_subset:
                     continue; /* for */
@@ -11539,6 +11974,10 @@ not_end_of_int_subset:
                /*
                 * 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,
@@ -11547,7 +11986,10 @@ not_end_of_int_subset:
                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))
@@ -11555,6 +11997,8 @@ found_end_int_subset:
                            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
@@ -11637,7 +12081,7 @@ found_end_int_subset:
                break;
        }
     }
-done:    
+done:
 #ifdef DEBUG_PUSH
     xmlGenericError(xmlGenericErrorContext, "PP: done %d\n", ret);
 #endif
@@ -11657,6 +12101,55 @@ encoding_error:
 }
 
 /**
+ * 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
@@ -11672,11 +12165,15 @@ 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) &&
@@ -11689,10 +12186,11 @@ xmldecl_done:
 
     if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
         (ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF))  {
-       int base = ctxt->input->base - ctxt->input->buf->buffer->content;
-       int cur = ctxt->input->cur - ctxt->input->base;
+       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
@@ -11728,16 +12226,13 @@ xmldecl_done:
                 remain = 0;
             }
         }
-       res =xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
+       res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
        if (res < 0) {
            ctxt->errNo = XML_PARSER_EOF;
            ctxt->disableSAX = 1;
            return (XML_PARSER_EOF);
        }
-       ctxt->input->base = ctxt->input->buf->buffer->content + base;
-       ctxt->input->cur = ctxt->input->base + cur;
-       ctxt->input->end =
-           &ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
+        xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
 #ifdef DEBUG_PUSH
        xmlGenericError(xmlGenericErrorContext, "PP: pushed %d\n", size);
 #endif
@@ -11748,21 +12243,48 @@ xmldecl_done:
            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 = xmlCharEncInFunc(in->encoder, in->buffer, in->raw);
+               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)
+    if (remain != 0) {
         xmlParseTryOrFinish(ctxt, 0);
-    else
-        xmlParseTryOrFinish(ctxt, terminate);
+    } 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);
 
@@ -11774,28 +12296,35 @@ 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 avail = 0;
+       int cur_avail = 0;
 
        if (ctxt->input != NULL) {
            if (ctxt->input->buf == NULL)
-               avail = ctxt->input->length -
-                       (ctxt->input->cur - ctxt->input->base);
+               cur_avail = ctxt->input->length -
+                           (ctxt->input->cur - ctxt->input->base);
            else
-               avail = ctxt->input->buf->buffer->use -
-                       (ctxt->input->cur - ctxt->input->base);
+               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) && (avail > 0)) {
+       }
+       if ((ctxt->instate == XML_PARSER_EPILOG) && (cur_avail > 0)) {
            xmlFatalErr(ctxt, XML_ERR_DOCUMENT_END, NULL);
        }
        if (ctxt->instate != XML_PARSER_EOF) {
@@ -11804,12 +12333,15 @@ xmldecl_done:
        }
        ctxt->instate = XML_PARSER_EOF;
     }
-    return((xmlParserErrors) ctxt->errNo);           
+    if (ctxt->wellFormed == 0)
+       return((xmlParserErrors) ctxt->errNo);
+    else
+        return(0);
 }
 
 /************************************************************************
  *                                                                     *
- *             I/O front end functions to the parser                   *
+ *             I/O front end functions to the parser                   *
  *                                                                     *
  ************************************************************************/
 
@@ -11833,7 +12365,7 @@ xmldecl_done:
  */
 
 xmlParserCtxtPtr
-xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, 
+xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
                         const char *chunk, int size, const char *filename) {
     xmlParserCtxtPtr ctxt;
     xmlParserInputPtr inputStream;
@@ -11882,7 +12414,7 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
            memcpy(ctxt->sax, sax, sizeof(xmlSAXHandlerV1));
        if (user_data != NULL)
            ctxt->userData = user_data;
-    }  
+    }
     if (filename == NULL) {
        ctxt->directory = NULL;
     } else {
@@ -11908,11 +12440,7 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
        }
     }
     inputStream->buf = buf;
-    inputStream->base = inputStream->buf->buffer->content;
-    inputStream->cur = inputStream->buf->buffer->content;
-    inputStream->end = 
-       &inputStream->buf->buffer->content[inputStream->buf->buffer->use];
-
+    xmlBufResetInput(inputStream->buf->buffer, inputStream);
     inputPush(ctxt, inputStream);
 
     /*
@@ -11923,15 +12451,12 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
     if ((size == 0) || (chunk == NULL)) {
        ctxt->charset = XML_CHAR_ENCODING_NONE;
     } else if ((ctxt->input != NULL) && (ctxt->input->buf != NULL)) {
-       int base = ctxt->input->base - ctxt->input->buf->buffer->content;
-       int cur = ctxt->input->cur - ctxt->input->base;
+       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);              
+       xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
 
-       ctxt->input->base = ctxt->input->buf->buffer->content + base;
-       ctxt->input->cur = ctxt->input->base + cur;
-       ctxt->input->end =
-           &ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
+        xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
 #ifdef DEBUG_PUSH
        xmlGenericError(xmlGenericErrorContext, "PP: pushed %d\n", size);
 #endif
@@ -11951,11 +12476,12 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
  *
  * Blocks further parser processing
  */
-void           
+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"";
@@ -12032,7 +12558,7 @@ xmlCreateIOParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
 #ifdef LIBXML_VALID_ENABLED
 /************************************************************************
  *                                                                     *
- *             Front ends when parsing a DTD                           *
+ *             Front ends when parsing a DTD                           *
  *                                                                     *
  ************************************************************************/
 
@@ -12043,7 +12569,7 @@ xmlCreateIOParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
  * @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.
  */
@@ -12068,7 +12594,7 @@ xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
     /*
      * Set-up the SAX context
      */
-    if (sax != NULL) { 
+    if (sax != NULL) {
        if (ctxt->sax != NULL)
            xmlFree(ctxt->sax);
         ctxt->sax = sax;
@@ -12122,7 +12648,7 @@ xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
 
     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.
@@ -12161,7 +12687,7 @@ xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
     }
     if (sax != NULL) ctxt->sax = NULL;
     xmlFreeParserCtxt(ctxt);
-    
+
     return(ret);
 }
 
@@ -12172,7 +12698,7 @@ xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
  * @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.
  */
 
@@ -12195,13 +12721,13 @@ xmlSAXParseDTD(xmlSAXHandlerPtr sax, const xmlChar *ExternalID,
     /*
      * Set-up the SAX context
      */
-    if (sax != NULL) { 
+    if (sax != NULL) {
        if (ctxt->sax != NULL)
            xmlFree(ctxt->sax);
         ctxt->sax = sax;
         ctxt->userData = ctxt;
     }
-    
+
     /*
      * Canonicalise the system ID
      */
@@ -12312,7 +12838,7 @@ xmlParseDTD(const xmlChar *ExternalID, const xmlChar *SystemID) {
 
 /************************************************************************
  *                                                                     *
- *             Front ends when parsing an Entity                       *
+ *             Front ends when parsing an Entity                       *
  *                                                                     *
  ************************************************************************/
 
@@ -12428,7 +12954,7 @@ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL,
         */
        if ((xmlStrEqual(ctx->version, BAD_CAST "1.0")) &&
            (!xmlStrEqual(ctxt->input->version, BAD_CAST "1.0"))) {
-           xmlFatalErrMsg(ctxt, XML_ERR_VERSION_MISMATCH, 
+           xmlFatalErrMsg(ctxt, XML_ERR_VERSION_MISMATCH,
                           "Version mismatch between document and entity\n");
        }
     }
@@ -12711,7 +13237,7 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
     if (ctxt->lastError.code != XML_ERR_OK)
         xmlCopyError(&ctxt->lastError, &oldctxt->lastError);
 
-    if (sax != NULL) 
+    if (sax != NULL)
        ctxt->sax = oldsax;
     oldctxt->node_seq.maximum = ctxt->node_seq.maximum;
     oldctxt->node_seq.length = ctxt->node_seq.length;
@@ -13530,7 +14056,7 @@ xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID,
  * @filename:  the filename or URL
  * @options:  a combination of xmlParserOption
  *
- * Create a parser context for a file or URL content. 
+ * 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
  *
@@ -13572,7 +14098,7 @@ xmlCreateURLParserCtxt(const char *filename, int options)
  * xmlCreateFileParserCtxt:
  * @filename:  the filename
  *
- * Create a parser context for a file content. 
+ * Create a parser context for a file content.
  * Automatic support for ZLIB/Compress compressed document is provided
  * by default if found at compile-time.
  *
@@ -13650,7 +14176,7 @@ xmlSAXParseFileWithData(xmlSAXHandlerPtr sax, const char *filename,
     if (sax != NULL)
         ctxt->sax = NULL;
     xmlFreeParserCtxt(ctxt);
-    
+
     return(ret);
 }
 
@@ -13750,7 +14276,7 @@ xmlSetupParserForBuffer(xmlParserCtxtPtr ctxt, const xmlChar* buffer,
         xmlClearParserCtxt(ctxt);
         return;
     }
-  
+
     xmlClearParserCtxt(ctxt);
     if (filename != NULL)
         input->filename = (char *) xmlCanonicPath((const xmlChar *)filename);
@@ -13768,7 +14294,7 @@ xmlSetupParserForBuffer(xmlParserCtxtPtr ctxt, const xmlChar* buffer,
  *
  * 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
@@ -13776,7 +14302,7 @@ 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)
@@ -13786,9 +14312,9 @@ xmlSAXUserParseFile(xmlSAXHandlerPtr sax, void *user_data,
 
     if (user_data != NULL)
        ctxt->userData = user_data;
-    
+
     xmlParseDocument(ctxt);
-    
+
     if (ctxt->wellFormed)
        ret = 0;
     else {
@@ -13804,14 +14330,14 @@ xmlSAXUserParseFile(xmlSAXHandlerPtr sax, void *user_data,
        ctxt->myDoc = NULL;
     }
     xmlFreeParserCtxt(ctxt);
-    
+
     return ret;
 }
 #endif /* LIBXML_SAX1_ENABLED */
 
 /************************************************************************
  *                                                                     *
- *             Front ends when parsing from memory                     *
+ *             Front ends when parsing from memory                     *
  *                                                                     *
  ************************************************************************/
 
@@ -13855,9 +14381,7 @@ xmlCreateMemoryParserCtxt(const char *buffer, int size) {
 
     input->filename = NULL;
     input->buf = buf;
-    input->base = input->buf->buffer->content;
-    input->cur = input->buf->buffer->content;
-    input->end = &input->buf->buffer->content[input->buf->buffer->use];
+    xmlBufResetInput(input->buf->buffer, input);
 
     inputPush(ctxt, input);
     return(ctxt);
@@ -13913,7 +14437,7 @@ xmlSAXParseMemoryWithData(xmlSAXHandlerPtr sax, const char *buffer,
        xmlFreeDoc(ctxt->myDoc);
        ctxt->myDoc = NULL;
     }
-    if (sax != NULL) 
+    if (sax != NULL)
        ctxt->sax = NULL;
     xmlFreeParserCtxt(ctxt);
 
@@ -13931,7 +14455,7 @@ xmlSAXParseMemoryWithData(xmlSAXHandlerPtr sax, const char *buffer,
  * 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
@@ -13946,7 +14470,7 @@ xmlSAXParseMemory(xmlSAXHandlerPtr sax, const char *buffer,
  * @size:  the size of the array
  *
  * parse an XML in-memory block and build a tree.
- * 
+ *
  * Returns the resulting document tree
  */
 
@@ -14000,7 +14524,7 @@ int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data,
        ctxt->userData = user_data;
 
     xmlParseDocument(ctxt);
-    
+
     if (ctxt->wellFormed)
        ret = 0;
     else {
@@ -14016,7 +14540,7 @@ int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data,
        ctxt->myDoc = NULL;
     }
     xmlFreeParserCtxt(ctxt);
-    
+
     return ret;
 }
 #endif /* LIBXML_SAX1_ENABLED */
@@ -14050,7 +14574,7 @@ xmlCreateDocParserCtxt(const xmlChar *cur) {
  * 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
  */
 
@@ -14065,7 +14589,7 @@ xmlSAXParseDoc(xmlSAXHandlerPtr sax, const xmlChar *cur, int recovery) {
 
     ctxt = xmlCreateDocParserCtxt(cur);
     if (ctxt == NULL) return(NULL);
-    if (sax != NULL) { 
+    if (sax != NULL) {
         oldsax = ctxt->sax;
         ctxt->sax = sax;
         ctxt->userData = NULL;
@@ -14082,7 +14606,7 @@ xmlSAXParseDoc(xmlSAXHandlerPtr sax, const xmlChar *cur, int recovery) {
     if (sax != NULL)
        ctxt->sax = oldsax;
     xmlFreeParserCtxt(ctxt);
-    
+
     return(ret);
 }
 
@@ -14091,7 +14615,7 @@ xmlSAXParseDoc(xmlSAXHandlerPtr sax, const xmlChar *cur, int recovery) {
  * @cur:  a pointer to an array of xmlChar
  *
  * parse an XML in-memory document and build a tree.
- * 
+ *
  * Returns the resulting document tree
  */
 
@@ -14104,8 +14628,8 @@ xmlParseDoc(const xmlChar *cur) {
 #ifdef LIBXML_LEGACY_ENABLED
 /************************************************************************
  *                                                                     *
- *     Specific function to keep track of entities references          *
- *     and used by the XSLT debugger                                   *
+ *     Specific function to keep track of entities references          *
+ *     and used by the XSLT debugger                                   *
  *                                                                     *
  ************************************************************************/
 
@@ -14115,7 +14639,7 @@ 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 
+ * @lastNode : A valid last node of children entity
  *
  * Notify of a reference to an entity of type XML_EXTERNAL_GENERAL_PARSED_ENTITY
  */
@@ -14144,7 +14668,7 @@ xmlSetEntityReferenceFunc(xmlEntityReferenceFunc func)
 
 /************************************************************************
  *                                                                     *
- *                             Miscellaneous                           *
+ *                             Miscellaneous                           *
  *                                                                     *
  ************************************************************************/
 
@@ -14260,7 +14784,7 @@ xmlCleanupParser(void) {
  * current scope
  */
 #define DICT_FREE(str)                                         \
-       if ((str) && ((!dict) ||                                \
+       if ((str) && ((!dict) ||                                \
            (xmlDictOwns(dict, (const xmlChar *)(str)) == 0)))  \
            xmlFree((char *)(str));
 
@@ -14275,7 +14799,7 @@ xmlCtxtReset(xmlParserCtxtPtr ctxt)
 {
     xmlParserInputPtr input;
     xmlDictPtr dict;
-    
+
     if (ctxt == NULL)
         return;
 
@@ -14343,6 +14867,7 @@ xmlCtxtReset(xmlParserCtxtPtr ctxt)
     ctxt->catalogs = NULL;
     ctxt->nbentities = 0;
     ctxt->sizeentities = 0;
+    ctxt->sizeentcopy = 0;
     xmlInitNodeInfoSeq(&ctxt->node_seq);
 
     if (ctxt->attsDefault != NULL) {
@@ -14427,25 +14952,18 @@ xmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk,
         inputStream->filename = (char *)
             xmlCanonicPath((const xmlChar *) filename);
     inputStream->buf = buf;
-    inputStream->base = inputStream->buf->buffer->content;
-    inputStream->cur = inputStream->buf->buffer->content;
-    inputStream->end =
-        &inputStream->buf->buffer->content[inputStream->buf->buffer->use];
+    xmlBufResetInput(buf->buffer, inputStream);
 
     inputPush(ctxt, inputStream);
 
     if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
         (ctxt->input->buf != NULL)) {
-        int base = ctxt->input->base - ctxt->input->buf->buffer->content;
-        int cur = ctxt->input->cur - ctxt->input->base;
+       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);
 
-        ctxt->input->base = ctxt->input->buf->buffer->content + base;
-        ctxt->input->cur = ctxt->input->base + cur;
-        ctxt->input->end =
-            &ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->
-                                               use];
+        xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
 #ifdef DEBUG_PUSH
         xmlGenericError(xmlGenericErrorContext, "PP: pushed %d\n", size);
 #endif
@@ -14596,6 +15114,8 @@ xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options, const char *encodi
     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;
@@ -14605,6 +15125,10 @@ xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options, const char *encodi
        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);
 }
@@ -14679,7 +15203,7 @@ xmlDoRead(xmlParserCtxtPtr ctxt, const char *URL, const char *encoding,
  * @options:  a combination of xmlParserOption
  *
  * parse an XML in-memory document and build a tree.
- * 
+ *
  * Returns the resulting document tree
  */
 xmlDocPtr
@@ -14703,7 +15227,7 @@ xmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int optio
  * @options:  a combination of xmlParserOption
  *
  * parse an XML file from the filesystem or the network.
- * 
+ *
  * Returns the resulting document tree
  */
 xmlDocPtr
@@ -14726,7 +15250,7 @@ xmlReadFile(const char *filename, const char *encoding, int options)
  * @options:  a combination of xmlParserOption
  *
  * parse an XML in-memory document and build a tree.
- * 
+ *
  * Returns the resulting document tree
  */
 xmlDocPtr
@@ -14750,7 +15274,7 @@ xmlReadMemory(const char *buffer, int size, const char *URL, const char *encodin
  * 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
@@ -14871,7 +15395,7 @@ xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar * cur,
  *
  * parse an XML file from the filesystem or the network.
  * This reuses the existing @ctxt parser context
- * 
+ *
  * Returns the resulting document tree
  */
 xmlDocPtr
@@ -14906,7 +15430,7 @@ xmlCtxtReadFile(xmlParserCtxtPtr ctxt, const char *filename,
  *
  * parse an XML in-memory document and build a tree.
  * This reuses the existing @ctxt parser context
- * 
+ *
  * Returns the resulting document tree
  */
 xmlDocPtr
@@ -14950,7 +15474,7 @@ xmlCtxtReadMemory(xmlParserCtxtPtr ctxt, const char *buffer, int size,
  * 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
index 746b7fd..f8a7041 100644 (file)
@@ -55,6 +55,9 @@
 #include <libxml/globals.h>
 #include <libxml/chvalid.h>
 
+#include "buf.h"
+#include "enc.h"
+
 /*
  * Various global defaults for parsing
  */
@@ -73,15 +76,15 @@ xmlCheckVersion(int version) {
     xmlInitParser();
 
     if ((myversion / 10000) != (version / 10000)) {
-       xmlGenericError(xmlGenericErrorContext, 
+       xmlGenericError(xmlGenericErrorContext,
                "Fatal: program compiled against libxml %d using libxml %d\n",
                (version / 10000), (myversion / 10000));
-       fprintf(stderr, 
+       fprintf(stderr,
                "Fatal: program compiled against libxml %d using libxml %d\n",
                (version / 10000), (myversion / 10000));
     }
     if ((myversion / 100) < (version / 100)) {
-       xmlGenericError(xmlGenericErrorContext, 
+       xmlGenericError(xmlGenericErrorContext,
                "Warning: program compiled against libxml %d using older %d\n",
                (version / 100), (myversion / 100));
     }
@@ -90,7 +93,7 @@ xmlCheckVersion(int version) {
 
 /************************************************************************
  *                                                                     *
- *             Some factorized error routines                          *
+ *             Some factorized error routines                          *
  *                                                                     *
  ************************************************************************/
 
@@ -225,7 +228,7 @@ xmlIsLetter(int c) {
 
 /************************************************************************
  *                                                                     *
- *             Input handling functions for progressive parsing        *
+ *             Input handling functions for progressive parsing        *
  *                                                                     *
  ************************************************************************/
 
@@ -242,7 +245,7 @@ xmlIsLetter(int c) {
 
 static
 void check_buffer(xmlParserInputPtr in) {
-    if (in->base != in->buf->buffer->content) {
+    if (in->base != xmlBufContent(in->buf->buffer)) {
         xmlGenericError(xmlGenericErrorContext,
                "xmlParserInput: base mismatch problem\n");
     }
@@ -250,17 +253,17 @@ void check_buffer(xmlParserInputPtr in) {
         xmlGenericError(xmlGenericErrorContext,
                "xmlParserInput: cur < base problem\n");
     }
-    if (in->cur > in->base + in->buf->buffer->use) {
+    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, size %d\n",
-            (int) in, (int) in->buf->buffer->content, in->cur - in->base,
-           in->buf->buffer->use, in->buf->buffer->size);
+    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) 
+#define CHECK_BUFFER(in)
 #endif
 
 
@@ -269,50 +272,13 @@ void check_buffer(xmlParserInputPtr in) {
  * @in:  an XML parser input
  * @len:  an indicative size for the lookahead
  *
- * This function refresh the input for the parser. It doesn't try to
- * preserve pointers to the input buffer, and discard already read data
+ * This function was internal and is deprecated.
  *
- * Returns the number of xmlChars read, or -1 in case of error, 0 indicate the
- * end of this entity
+ * Returns -1 as this is an error to use it.
  */
 int
-xmlParserInputRead(xmlParserInputPtr in, int len) {
-    int ret;
-    int used;
-    int indx;
-
-    if (in == NULL) return(-1);
-#ifdef DEBUG_INPUT
-    xmlGenericError(xmlGenericErrorContext, "Read\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);
-    if (in->buf->readcallback == NULL) return(-1);
-
-    CHECK_BUFFER(in);
-
-    used = in->cur - in->buf->buffer->content;
-    ret = xmlBufferShrink(in->buf->buffer, used);
-    if (ret > 0) {
-       in->cur -= ret;
-       in->consumed += ret;
-    }
-    ret = xmlParserInputBufferRead(in->buf, len);
-    if (in->base != in->buf->buffer->content) {
-        /*
-        * the buffer has been reallocated
-        */
-       indx = in->cur - in->base;
-       in->base = in->buf->buffer->content;
-       in->cur = &in->buf->buffer->content[indx];
-    }
-    in->end = &in->buf->buffer->content[in->buf->buffer->use];
-
-    CHECK_BUFFER(in);
-
-    return(ret);
+xmlParserInputRead(xmlParserInputPtr in ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED) {
+    return(-1);
 }
 
 /**
@@ -323,15 +289,16 @@ xmlParserInputRead(xmlParserInputPtr in, int len) {
  * This function increase the input for the parser. It tries to
  * preserve pointers to the input buffer, and keep already read data
  *
- * Returns the number of xmlChars read, or -1 in case of error, 0 indicate the
+ * 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) {
-    int ret;
-    int indx;
+    size_t ret;
+    size_t indx;
+    const xmlChar *content;
 
-    if (in == NULL) return(-1);
+    if ((in == NULL) || (len < 0)) return(-1);
 #ifdef DEBUG_INPUT
     xmlGenericError(xmlGenericErrorContext, "Grow\n");
 #endif
@@ -343,15 +310,15 @@ xmlParserInputGrow(xmlParserInputPtr in, int len) {
     CHECK_BUFFER(in);
 
     indx = in->cur - in->base;
-    if (in->buf->buffer->use > (unsigned int) indx + INPUT_CHUNK) {
+    if (xmlBufUse(in->buf->buffer) > (unsigned int) indx + INPUT_CHUNK) {
 
        CHECK_BUFFER(in);
 
         return(0);
     }
-    if (in->buf->readcallback != NULL)
+    if (in->buf->readcallback != NULL) {
        ret = xmlParserInputBufferGrow(in->buf, len);
-    else       
+    } else
         return(0);
 
     /*
@@ -360,15 +327,17 @@ xmlParserInputGrow(xmlParserInputPtr in, int len) {
      *        pointer arithmetic. Insure will raise it as a bug but in
      *        that specific case, that's not !
      */
-    if (in->base != in->buf->buffer->content) {
+
+    content = xmlBufContent(in->buf->buffer);
+    if (in->base != content) {
         /*
         * the buffer has been reallocated
         */
        indx = in->cur - in->base;
-       in->base = in->buf->buffer->content;
-       in->cur = &in->buf->buffer->content[indx];
+       in->base = content;
+       in->cur = &content[indx];
     }
-    in->end = &in->buf->buffer->content[in->buf->buffer->use];
+    in->end = xmlBufEnd(in->buf->buffer);
 
     CHECK_BUFFER(in);
 
@@ -383,9 +352,10 @@ xmlParserInputGrow(xmlParserInputPtr in, int len) {
  */
 void
 xmlParserInputShrink(xmlParserInputPtr in) {
-    int used;
-    int ret;
-    int indx;
+    size_t used;
+    size_t ret;
+    size_t indx;
+    const xmlChar *content;
 
 #ifdef DEBUG_INPUT
     xmlGenericError(xmlGenericErrorContext, "Shrink\n");
@@ -398,42 +368,43 @@ xmlParserInputShrink(xmlParserInputPtr in) {
 
     CHECK_BUFFER(in);
 
-    used = in->cur - in->buf->buffer->content;
+    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 = xmlBufferShrink(in->buf->buffer, used - LINE_LEN);
+       ret = xmlBufShrink(in->buf->buffer, used - LINE_LEN);
        if (ret > 0) {
            in->cur -= ret;
            in->consumed += ret;
        }
-       in->end = &in->buf->buffer->content[in->buf->buffer->use];
+       in->end = xmlBufEnd(in->buf->buffer);
     }
 
     CHECK_BUFFER(in);
 
-    if (in->buf->buffer->use > INPUT_CHUNK) {
+    if (xmlBufUse(in->buf->buffer) > INPUT_CHUNK) {
         return;
     }
     xmlParserInputBufferRead(in->buf, 2 * INPUT_CHUNK);
-    if (in->base != in->buf->buffer->content) {
+    content = xmlBufContent(in->buf->buffer);
+    if (in->base != content) {
         /*
         * the buffer has been reallocated
         */
        indx = in->cur - in->base;
-       in->base = in->buf->buffer->content;
-       in->cur = &in->buf->buffer->content[indx];
+       in->base = content;
+       in->cur = &content[indx];
     }
-    in->end = &in->buf->buffer->content[in->buf->buffer->use];
+    in->end = xmlBufEnd(in->buf->buffer);
 
     CHECK_BUFFER(in);
 }
 
 /************************************************************************
  *                                                                     *
- *             UTF8 character input and related functions              *
+ *             UTF8 character input and related functions              *
  *                                                                     *
  ************************************************************************/
 
@@ -484,7 +455,7 @@ xmlNextChar(xmlParserCtxtPtr ctxt)
              * 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 
+             * 0000 0800-0000 FFFF   1110xxxx 10xxxxxx 10xxxxxx
              *
              * Check for the 0x110000 limit too
              */
@@ -634,7 +605,7 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
         * 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 
+        * 0000 0800-0000 FFFF   1110xxxx 10xxxxxx 10xxxxxx
         *
         * Check for the 0x110000 limit too
         */
@@ -695,7 +666,7 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
            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 */
@@ -759,7 +730,7 @@ encoding_error:
                     "Input is not proper UTF-8, indicate encoding !\n%s",
                     BAD_CAST buffer, NULL);
     }
-    ctxt->charset = XML_CHAR_ENCODING_8859_1; 
+    ctxt->charset = XML_CHAR_ENCODING_8859_1;
     *len = 1;
     return((int) *ctxt->input->cur);
 }
@@ -788,7 +759,7 @@ xmlStringCurrentChar(xmlParserCtxtPtr ctxt, const xmlChar * cur, int *len)
          * 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 
+         * 0000 0800-0000 FFFF   1110xxxx 10xxxxxx 10xxxxxx
          *
          * Check for the 0x110000 limit too
          */
@@ -881,7 +852,7 @@ encoding_error:
  * @out:  pointer to an array of xmlChar
  * @val:  the char value
  *
- * append the char value in the array 
+ * append the char value in the array
  *
  * Returns the number of xmlChar written
  */
@@ -895,7 +866,7 @@ xmlCopyCharMultiByte(xmlChar *out, int val) {
      * 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 
+     * 0000 0800-0000 FFFF   1110xxxx 10xxxxxx 10xxxxxx
      */
     if  (val >= 0x80) {
        xmlChar *savedout = out;
@@ -923,7 +894,7 @@ xmlCopyCharMultiByte(xmlChar *out, int val) {
  * @out:  pointer to an array of xmlChar
  * @val:  the char value
  *
- * append the char value in the array 
+ * append the char value in the array
  *
  * Returns the number of xmlChar written
  */
@@ -945,11 +916,6 @@ xmlCopyChar(int len ATTRIBUTE_UNUSED, xmlChar *out, int val) {
  *                                                                     *
  ************************************************************************/
 
-/* defined in encoding.c, not public */
-int
-xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
-                       xmlBufferPtr in, int len);
-
 static int
 xmlSwitchToEncodingInt(xmlParserCtxtPtr ctxt,
                        xmlCharEncodingHandlerPtr handler, int len);
@@ -1189,12 +1155,12 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
         /*
          * Is there already some content down the pipe to convert ?
          */
-        if ((input->buf->buffer != NULL) && (input->buf->buffer->use > 0)) {
+        if (xmlBufIsEmpty(input->buf->buffer) == 0) {
             int processed;
            unsigned int use;
 
             /*
-             * Specific handling of the Byte Order Mark for 
+             * Specific handling of the Byte Order Mark for
              * UTF-16
              */
             if ((handler->name != NULL) &&
@@ -1225,19 +1191,17 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
              * Move it as the raw buffer and create a new input buffer
              */
             processed = input->cur - input->base;
-            xmlBufferShrink(input->buf->buffer, processed);
+            xmlBufShrink(input->buf->buffer, processed);
             input->buf->raw = input->buf->buffer;
-            input->buf->buffer = xmlBufferCreate();
+            input->buf->buffer = xmlBufCreate();
            input->buf->rawconsumed = processed;
-           use = input->buf->raw->use;
+           use = xmlBufUse(input->buf->raw);
 
             if (ctxt->html) {
                 /*
                  * convert as much as possible of the buffer
                  */
-                nbchars = xmlCharEncInFunc(input->buf->encoder,
-                                           input->buf->buffer,
-                                           input->buf->raw);
+                nbchars = xmlCharEncInput(input->buf, 1);
             } else {
                 /*
                  * convert just enough to get
@@ -1245,10 +1209,7 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
                  * parsed with the autodetected encoding
                  * into the parser reading buffer.
                  */
-                nbchars = xmlCharEncFirstLineInt(input->buf->encoder,
-                                                 input->buf->buffer,
-                                                 input->buf->raw,
-                                                 len);
+                nbchars = xmlCharEncFirstLineInput(input->buf, len);
             }
             if (nbchars < 0) {
                 xmlErrInternal(ctxt,
@@ -1256,10 +1217,8 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
                                NULL);
                 return (-1);
             }
-           input->buf->rawconsumed += use - input->buf->raw->use;
-            input->base = input->cur = input->buf->buffer->content;
-            input->end = &input->base[input->buf->buffer->use];
-
+           input->buf->rawconsumed += use - xmlBufUse(input->buf->raw);
+            xmlBufResetInput(input->buf->buffer, input);
         }
         return (0);
     } else if (input->length == 0) {
@@ -1294,7 +1253,7 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
  * xmlSwitchToEncodingInt:
  * @ctxt:  the parser context
  * @handler:  the encoding handler
- * @len: the lenght to convert or -1
+ * @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
@@ -1336,7 +1295,7 @@ xmlSwitchToEncodingInt(xmlParserCtxtPtr ctxt,
  * Returns 0 in case of success, -1 otherwise
  */
 int
-xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler) 
+xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
 {
     return (xmlSwitchToEncodingInt(ctxt, handler, -1));
 }
@@ -1363,7 +1322,7 @@ xmlFreeInputStream(xmlParserInputPtr input) {
     if (input->version != NULL) xmlFree((char *) input->version);
     if ((input->free != NULL) && (input->base != NULL))
         input->free((xmlChar *) input->base);
-    if (input->buf != NULL) 
+    if (input->buf != NULL)
         xmlFreeParserInputBuffer(input->buf);
     xmlFree(input);
 }
@@ -1426,9 +1385,8 @@ xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input,
     }
     inputStream->filename = NULL;
     inputStream->buf = input;
-    inputStream->base = inputStream->buf->buffer->content;
-    inputStream->cur = inputStream->buf->buffer->content;
-    inputStream->end = &inputStream->base[inputStream->buf->buffer->use];
+    xmlBufResetInput(inputStream->buf->buffer, inputStream);
+
     if (enc != XML_CHAR_ENCODING_NONE) {
         xmlSwitchEncoding(ctxt, enc);
     }
@@ -1570,7 +1528,7 @@ xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) {
     inputStream = xmlCheckHTTPInput(ctxt, inputStream);
     if (inputStream == NULL)
         return(NULL);
-    
+
     if (inputStream->filename == NULL)
        URI = xmlStrdup((xmlChar *) filename);
     else
@@ -1581,9 +1539,7 @@ xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) {
     if (URI != NULL) xmlFree((char *) URI);
     inputStream->directory = directory;
 
-    inputStream->base = inputStream->buf->buffer->content;
-    inputStream->cur = inputStream->buf->buffer->content;
-    inputStream->end = &inputStream->base[inputStream->buf->buffer->use];
+    xmlBufResetInput(inputStream->buf->buffer, inputStream);
     if ((ctxt->directory == NULL) && (directory != NULL))
         ctxt->directory = (char *) xmlStrdup((const xmlChar *) directory);
     return(inputStream);
@@ -1622,6 +1578,8 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
         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) {
@@ -1761,6 +1719,8 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
     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);
@@ -1807,7 +1767,7 @@ xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
     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) 
+    if (ctxt->attsDefault != NULL)
         xmlHashFree(ctxt->attsDefault, (xmlHashDeallocator) xmlFree);
     if (ctxt->attsSpecial != NULL)
         xmlHashFree(ctxt->attsSpecial, NULL);
@@ -1907,7 +1867,7 @@ xmlClearParserCtxt(xmlParserCtxtPtr ctxt)
  * @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 *
@@ -1965,7 +1925,7 @@ xmlClearNodeInfoSeq(xmlParserNodeInfoSeqPtr seq)
  * @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
  *
@@ -2022,7 +1982,7 @@ xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
     pos = xmlParserFindNodeInfoIndex(&ctxt->node_seq, (xmlNodePtr)
                                      info->node);
 
-    if ((pos < ctxt->node_seq.length) && 
+    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;
@@ -2075,7 +2035,7 @@ xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
  ************************************************************************/
 /**
  * xmlPedanticParserDefault:
- * @val:  int 0 or 1 
+ * @val:  int 0 or 1
  *
  * Set and return the previous value for enabling pedantic warnings.
  *
@@ -2092,7 +2052,7 @@ xmlPedanticParserDefault(int val) {
 
 /**
  * xmlLineNumbersDefault:
- * @val:  int 0 or 1 
+ * @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.
@@ -2110,7 +2070,7 @@ xmlLineNumbersDefault(int val) {
 
 /**
  * xmlSubstituteEntitiesDefault:
- * @val:  int 0 or 1 
+ * @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
@@ -2132,7 +2092,7 @@ xmlSubstituteEntitiesDefault(int val) {
 
 /**
  * xmlKeepBlanksDefault:
- * @val:  int 0 or 1 
+ * @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
@@ -2143,7 +2103,7 @@ xmlSubstituteEntitiesDefault(int val) {
  * 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 
+ * 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"
index 1570001..33dee3a 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -3,7 +3,7 @@
  *
  * Reference:
  *   http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/
- *   to some extent 
+ *   to some extent
  *   http://www.w3.org/TR/1999/REC-xml-19991116
  *
  * See Copyright for the status of this software.
@@ -56,7 +56,7 @@
 * 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. 
+*   reserved values for xmlPatternFlags.
 */
 #define XML_STREAM_FINAL_IS_ANY_NODE 1<<14
 #define XML_STREAM_FROM_ROOT 1<<15
@@ -162,7 +162,7 @@ struct _xmlStepOp {
 #define PAT_FROM_CUR   (1<<9)
 
 struct _xmlPattern {
-    void *data;                /* the associated template */
+    void *data;                /* the associated template */
     xmlDictPtr dict;           /* the optional dictionary */
     struct _xmlPattern *next;  /* next pattern if | is used */
     const xmlChar *pattern;    /* the pattern */
@@ -181,15 +181,15 @@ struct _xmlPatParserContext {
     int                   error;               /* error code */
     xmlDictPtr     dict;               /* the dictionary if any */
     xmlPatternPtr  comp;               /* the result */
-    xmlNodePtr     elem;               /* the current node if any */    
+    xmlNodePtr     elem;               /* the current node if any */
     const xmlChar **namespaces;                /* the namespaces definitions */
     int   nb_namespaces;               /* the number of namespaces */
 };
 
 /************************************************************************
- *                                                                     *
- *                     Type functions                                  *
- *                                                                     *
+ *                                                                     *
+ *                     Type functions                                  *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -327,7 +327,7 @@ xmlNewPatParserContext(const xmlChar *pattern, xmlDictPtr dict,
 static void
 xmlFreePatParserContext(xmlPatParserContextPtr ctxt) {
     if (ctxt == NULL)
-       return;    
+       return;
     memset(ctxt, -1, sizeof(xmlPatParserContext));
     xmlFree(ctxt);
 }
@@ -455,9 +455,9 @@ xmlReversePattern(xmlPatternPtr comp) {
 }
 
 /************************************************************************
- *                                                                     *
- *             The interpreter for the precompiled patterns            *
- *                                                                     *
+ *                                                                     *
+ *             The interpreter for the precompiled patterns            *
+ *                                                                     *
  ************************************************************************/
 
 static int
@@ -709,7 +709,7 @@ rollback:
  *                                                                     *
  ************************************************************************/
 
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
@@ -719,14 +719,14 @@ rollback:
 #define PEEKPREV(val) ctxt->cur[-(val)]
 #define CUR_PTR ctxt->cur
 
-#define SKIP_BLANKS                                                    \
+#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)                                            \
+#define PUSH(op, val, val2)                                            \
     if (xmlPatternAdd(ctxt, ctxt->comp, (op), (val), (val2))) goto error;
 
 #define XSLT_ERROR(X)                                                  \
@@ -772,7 +772,7 @@ xmlPatScanLiteral(xmlPatParserContextPtr ctxt) {
            if (ctxt->dict)
                ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
            else
-               ret = xmlStrndup(q, cur - q);       
+               ret = xmlStrndup(q, cur - q);
         }
        cur += len;
        CUR_PTR = cur;
@@ -791,7 +791,7 @@ xmlPatScanLiteral(xmlPatParserContextPtr ctxt) {
            if (ctxt->dict)
                ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
            else
-               ret = xmlStrndup(q, cur - q);       
+               ret = xmlStrndup(q, cur - q);
         }
        cur += len;
        CUR_PTR = cur;
@@ -808,7 +808,7 @@ xmlPatScanLiteral(xmlPatParserContextPtr ctxt) {
  * xmlPatScanName:
  * @ctxt:  the XPath Parser context
  *
- * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | 
+ * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' |
  *                  CombiningChar | Extender
  *
  * [5] Name ::= (Letter | '_' | ':') (NameChar)*
@@ -833,7 +833,7 @@ xmlPatScanName(xmlPatParserContextPtr ctxt) {
 
     while ((IS_LETTER(val)) || (IS_DIGIT(val)) ||
            (val == '.') || (val == '-') ||
-          (val == '_') || 
+          (val == '_') ||
           (IS_COMBINING(val)) ||
           (IS_EXTENDER(val))) {
        cur += len;
@@ -842,7 +842,7 @@ xmlPatScanName(xmlPatParserContextPtr ctxt) {
     if (ctxt->dict)
        ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
     else
-       ret = xmlStrndup(q, cur - q);    
+       ret = xmlStrndup(q, cur - q);
     CUR_PTR = cur;
     return(ret);
 }
@@ -922,7 +922,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
     xmlChar *token = NULL;
     xmlChar *name = NULL;
     xmlChar *URL = NULL;
-    
+
     SKIP_BLANKS;
     name = xmlPatScanNCName(ctxt);
     if (name == NULL) {
@@ -939,10 +939,10 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
     if (CUR == ':') {
        int i;
        xmlChar *prefix = name;
-       
+
        NEXT;
 
-       if (IS_BLANK_CH(CUR)) {     
+       if (IS_BLANK_CH(CUR)) {
            ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
            XML_PAT_FREE_STRING(ctxt, prefix);
            ctxt->error = 1;
@@ -957,11 +957,11 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
            (prefix[2] == 'l') &&
            (prefix[3] == 0))
        {
-           XML_PAT_COPY_NSNAME(ctxt, URL, XML_XML_NAMESPACE);      
+           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])                 
+                   XML_PAT_COPY_NSNAME(ctxt, URL, ctxt->namespaces[2 * i])
                    break;
                }
            }
@@ -969,7 +969,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
                ERROR5(NULL, NULL, NULL,
                    "xmlCompileAttributeTest : no namespace bound to prefix %s\n",
                    prefix);
-               ctxt->error = 1;            
+               ctxt->error = 1;
                goto error;
            }
        }
@@ -983,7 +983,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
                    "xmlCompileAttributeTest : Name expected\n");
                ctxt->error = 1;
                goto error;
-           }       
+           }
        } else {
            PUSH(XML_OP_ATTR, token, URL);
        }
@@ -993,7 +993,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
     return;
 error:
     if (URL != NULL)
-       XML_PAT_FREE_STRING(ctxt, URL)  
+       XML_PAT_FREE_STRING(ctxt, URL)
     if (token != NULL)
        XML_PAT_FREE_STRING(ctxt, token);
 }
@@ -1006,7 +1006,7 @@ error:
  * form suitable for fast matching.
  *
  * [3]    Step    ::=    '.' | NameTest
- * [4]    NameTest    ::=    QName | '*' | NCName ':' '*' 
+ * [4]    NameTest    ::=    QName | '*' | NCName ':' '*'
  */
 
 static void
@@ -1037,7 +1037,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
        }
        NEXT;
        xmlCompileAttributeTest(ctxt);
-       if (ctxt->error != 0) 
+       if (ctxt->error != 0)
            goto error;
        return;
     }
@@ -1062,7 +1062,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
        NEXT;
        if (CUR != ':') {
            xmlChar *prefix = name;
-           int i;          
+           int i;
 
            if (hasBlanks || IS_BLANK_CH(CUR)) {
                ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
@@ -1111,7 +1111,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
            }
        } else {
            NEXT;
-           if (xmlStrEqual(name, (const xmlChar *) "child")) {         
+           if (xmlStrEqual(name, (const xmlChar *) "child")) {
                XML_PAT_FREE_STRING(ctxt, name);
                name = xmlPatScanName(ctxt);
                if (name == NULL) {
@@ -1129,7 +1129,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
                if (CUR == ':') {
                    xmlChar *prefix = name;
                    int i;
-                   
+
                    NEXT;
                    if (IS_BLANK_CH(CUR)) {
                        ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
@@ -1145,11 +1145,11 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
                        (prefix[2] == 'l') &&
                        (prefix[3] == 0))
                    {
-                       XML_PAT_COPY_NSNAME(ctxt, URL, XML_XML_NAMESPACE)                       
+                       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])                         
+                               XML_PAT_COPY_NSNAME(ctxt, URL, ctxt->namespaces[2 * i])
                                break;
                            }
                        }
@@ -1197,7 +1197,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
                    "The 'element' or 'attribute' axis is expected.\n", NULL);
                ctxt->error = 1;
                goto error;
-           }       
+           }
        }
     } else if (CUR == '*') {
         if (name != NULL) {
@@ -1212,7 +1212,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
     return;
 error:
     if (URL != NULL)
-       XML_PAT_FREE_STRING(ctxt, URL)  
+       XML_PAT_FREE_STRING(ctxt, URL)
     if (token != NULL)
        XML_PAT_FREE_STRING(ctxt, token)
     if (name != NULL)
@@ -1226,7 +1226,7 @@ error:
  * Compile the Path Pattern and generates a precompiled
  * form suitable for fast matching.
  *
- * [5]    Path    ::=    ('.//')? ( Step '/' )* ( Step | '@' NameTest ) 
+ * [5]    Path    ::=    ('.//')? ( Step '/' )* ( Step | '@' NameTest )
  */
 static void
 xmlCompilePathPattern(xmlPatParserContextPtr ctxt) {
@@ -1236,7 +1236,7 @@ xmlCompilePathPattern(xmlPatParserContextPtr ctxt) {
     } 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;
@@ -1299,7 +1299,7 @@ xmlCompilePathPattern(xmlPatParserContextPtr ctxt) {
                    ERROR5(NULL, NULL, NULL,
                    "Incomplete expression '%s'.\n", ctxt->base);
                    ctxt->error = 1;
-                   goto error;             
+                   goto error;
                }
                xmlCompileStepPattern(ctxt);
                if (ctxt->error != 0)
@@ -1323,7 +1323,7 @@ error:
  * Compile the Path Pattern and generates a precompiled
  * form suitable for fast matching.
  *
- * [5]    Path    ::=    ('.//')? ( Step '/' )* ( Step | '@' NameTest ) 
+ * [5]    Path    ::=    ('.//')? ( Step '/' )* ( Step | '@' NameTest )
  */
 static void
 xmlCompileIDCXPathPath(xmlPatParserContextPtr ctxt) {
@@ -1378,7 +1378,7 @@ xmlCompileIDCXPathPath(xmlPatParserContextPtr ctxt) {
     */
     do {
        xmlCompileStepPattern(ctxt);
-       if (ctxt->error != 0) 
+       if (ctxt->error != 0)
            goto error;
        SKIP_BLANKS;
        if (CUR != '/')
@@ -1397,7 +1397,7 @@ xmlCompileIDCXPathPath(xmlPatParserContextPtr ctxt) {
        }
        if (CUR == 0)
            goto error_unfinished;
-       
+
     } while (CUR != 0);
 
     if (CUR != 0) {
@@ -1413,7 +1413,7 @@ error:
 error_unfinished:
     ctxt->error = 1;
     ERROR5(NULL, NULL, NULL,
-       "Unfinished expression '%s'.\n", ctxt->base);    
+       "Unfinished expression '%s'.\n", ctxt->base);
     return;
 }
 
@@ -1568,7 +1568,7 @@ xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name,
 /**
  * xmlStreamCompile:
  * @comp: the precompiled pattern
- * 
+ *
  * Tries to stream compile a pattern
  *
  * Returns -1 in case of failure and 0 in case of success.
@@ -1605,7 +1605,7 @@ xmlStreamCompile(xmlPatternPtr comp) {
        xmlDictReference(stream->dict);
     }
 
-    i = 0;        
+    i = 0;
     if (comp->flags & PAT_FROM_ROOT)
        stream->flags |= XML_STREAM_FROM_ROOT;
 
@@ -1621,12 +1621,12 @@ xmlStreamCompile(xmlPatternPtr comp) {
                break;
            case XML_OP_NS:
                s = xmlStreamCompAddStep(stream, NULL, step.value,
-                   XML_ELEMENT_NODE, flags);           
+                   XML_ELEMENT_NODE, flags);
                if (s < 0)
                    goto error;
                prevs = s;
-               flags = 0;              
-               break;      
+               flags = 0;
+               break;
            case XML_OP_ATTR:
                flags |= XML_STREAM_STEP_ATTR;
                prevs = -1;
@@ -1636,7 +1636,7 @@ xmlStreamCompile(xmlPatternPtr comp) {
                if (s < 0)
                    goto error;
                break;
-           case XML_OP_ELEM:           
+           case XML_OP_ELEM:
                if ((step.value == NULL) && (step.value2 == NULL)) {
                    /*
                    * We have a "." or "self::node()" here.
@@ -1655,7 +1655,7 @@ xmlStreamCompile(xmlPatternPtr comp) {
                        if (comp->nbStep == i + 1) {
                            stream->flags |= XML_STREAM_FINAL_IS_ANY_NODE;
                        }
-                       flags |= XML_STREAM_STEP_NODE;                  
+                       flags |= XML_STREAM_STEP_NODE;
                        s = xmlStreamCompAddStep(stream, NULL, NULL,
                            XML_STREAM_ANY_NODE, flags);
                        if (s < 0)
@@ -1671,39 +1671,39 @@ xmlStreamCompile(xmlPatternPtr comp) {
                            stream->steps[prevs].flags |= XML_STREAM_STEP_IN_SET;
                            prevs = -1;
                        }
-                       break;  
+                       break;
 
                    } else {
                        /* Just skip this one. */
                        continue;
                    }
                }
-               /* An element node. */          
+               /* An element node. */
                s = xmlStreamCompAddStep(stream, step.value, step.value2,
-                   XML_ELEMENT_NODE, flags);           
+                   XML_ELEMENT_NODE, flags);
                if (s < 0)
                    goto error;
                prevs = s;
-               flags = 0;              
-               break;          
+               flags = 0;
+               break;
            case XML_OP_CHILD:
                /* An element node child. */
                s = xmlStreamCompAddStep(stream, step.value, step.value2,
-                   XML_ELEMENT_NODE, flags);           
+                   XML_ELEMENT_NODE, flags);
                if (s < 0)
                    goto error;
                prevs = s;
                flags = 0;
-               break;      
+               break;
            case XML_OP_ALL:
                s = xmlStreamCompAddStep(stream, NULL, NULL,
-                   XML_ELEMENT_NODE, flags);           
+                   XML_ELEMENT_NODE, flags);
                if (s < 0)
                    goto error;
                prevs = s;
                flags = 0;
                break;
-           case XML_OP_PARENT: 
+           case XML_OP_PARENT:
                break;
            case XML_OP_ANCESTOR:
                /* Skip redundant continuations. */
@@ -1717,7 +1717,7 @@ xmlStreamCompile(xmlPatternPtr comp) {
                    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
@@ -1729,7 +1729,7 @@ xmlStreamCompile(xmlPatternPtr comp) {
 
        if (stream->nbStep > 0) {
            if ((stream->steps[0].flags & XML_STREAM_STEP_DESC) == 0)
-               stream->steps[0].flags |= XML_STREAM_STEP_DESC;     
+               stream->steps[0].flags |= XML_STREAM_STEP_DESC;
        }
     }
     if (stream->nbStep <= s)
@@ -1922,7 +1922,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
            if ((nodeType != XML_ATTRIBUTE_NODE) &&
                (((stream->flags & XML_PATTERN_NOTPATTERN) == 0) ||
                (stream->level == 0))) {
-                   ret = 1;            
+                   ret = 1;
            }
            stream->level++;
            goto stream_next;
@@ -1931,7 +1931,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
            /*
            * Skip blocked expressions.
            */
-           stream->level++;
+           stream->level++;
            goto stream_next;
        }
 
@@ -1974,7 +1974,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
                * 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 */
@@ -1992,7 +1992,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
                if ((tmp < stream->level) && (!desc))
                    goto next_state;
            }
-           /* 
+           /*
            * Check for correct node-type.
            */
            step = comp->steps[stepNr];
@@ -2006,7 +2006,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
                    goto next_state;
                } else if (step.nodeType != XML_STREAM_ANY_NODE)
                    goto next_state;
-           }       
+           }
            /*
            * Compare local/namespace-name.
            */
@@ -2027,9 +2027,9 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
                xmlStrEqual(step.name, name) &&
                ((step.ns == ns) || xmlStrEqual(step.ns, ns)))
            {
-               match = 1;          
-           }    
-#if 0 
+               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,
@@ -2044,8 +2044,8 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
                } else {
                    match = ((step.name == name) && (step.ns == ns));
                }
-#endif /* if 0 ------------------------------------------------------- */          
-           if (match) {                
+#endif /* if 0 ------------------------------------------------------- */
+           if (match) {
                final = step.flags & XML_STREAM_STEP_FINAL;
                if (desc) {
                    if (final) {
@@ -2070,7 +2070,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
                    */
                    ret = 1;
                }
-           }       
+           }
            if (((comp->flags & XML_STREAM_DESC) == 0) &&
                ((! match) || final))  {
                /*
@@ -2101,7 +2101,7 @@ next_state:
            * 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)) {
                    /*
@@ -2111,7 +2111,7 @@ next_state:
                    goto stream_next;
                } else
                    goto compare;
-           }       
+           }
            /*
            * A "//" is always reentrant.
            */
@@ -2121,14 +2121,14 @@ next_state:
            /*
            * XS-IDC: Process the 2nd level, since the missing
            * "self::node()" is responsible for the 2nd level being
-           * the real start level.         
-           */      
+           * the real start level.
+           */
            if ((stream->level == 2) && XML_STREAM_XS_IDC(stream))
                goto compare;
 
            goto stream_next;
        }
-       
+
 compare:
        /*
        * Check expected node-type.
@@ -2137,7 +2137,7 @@ compare:
            if (nodeType == XML_ATTRIBUTE_NODE)
                goto stream_next;
            else if (step.nodeType != XML_STREAM_ANY_NODE)
-               goto stream_next;            
+               goto stream_next;
        }
        /*
        * Compare local/namespace-name.
@@ -2159,10 +2159,10 @@ compare:
            xmlStrEqual(step.name, name) &&
            ((step.ns == ns) || xmlStrEqual(step.ns, ns)))
        {
-           match = 1;      
-       }           
+           match = 1;
+       }
        final = step.flags & XML_STREAM_STEP_FINAL;
-       if (match) {        
+       if (match) {
            if (final)
                ret = 1;
            else
@@ -2187,7 +2187,7 @@ compare:
 stream_next:
         stream = stream->next;
     } /* while stream != NULL */
+
     if (err > 0)
         ret = -1;
 #ifdef DEBUG_STREAMING
@@ -2279,7 +2279,7 @@ xmlStreamPushAttr(xmlStreamCtxtPtr stream,
 int
 xmlStreamPop(xmlStreamCtxtPtr stream) {
     int i, lev;
-    
+
     if (stream == NULL)
         return(-1);
     while (stream != NULL) {
@@ -2298,7 +2298,7 @@ xmlStreamPop(xmlStreamCtxtPtr stream) {
            stream->level--;
        /*
         * Check evolution of existing states
-        */     
+        */
        for (i = stream->nbState -1; i >= 0; i--) {
            /* discard obsoleted states */
            lev = stream->states[(2 * i) + 1];
@@ -2326,11 +2326,11 @@ xmlStreamPop(xmlStreamCtxtPtr stream) {
  */
 int
 xmlStreamWantsAnyNode(xmlStreamCtxtPtr streamCtxt)
-{    
+{
     if (streamCtxt == NULL)
        return(-1);
     while (streamCtxt != NULL) {
-       if (streamCtxt->comp->flags & XML_STREAM_FINAL_IS_ANY_NODE)     
+       if (streamCtxt->comp->flags & XML_STREAM_FINAL_IS_ANY_NODE)
            return(1);
        streamCtxt = streamCtxt->next;
     }
@@ -2381,13 +2381,13 @@ xmlPatterncompile(const xmlChar *pattern, xmlDict *dict, int flags,
            }
            or++;
        }
-       if (ctxt == NULL) goto error;   
+       if (ctxt == NULL) goto error;
        cur = xmlNewPattern();
        if (cur == NULL) goto error;
        /*
        * Assign string dict.
        */
-       if (dict) {         
+       if (dict) {
            cur->dict = dict;
            xmlDictReference(dict);
        }
@@ -2570,7 +2570,7 @@ xmlPatternMaxDepth(xmlPatternPtr comp) {
  * part of the set.
  *
  * Returns -1 in case of error otherwise the depth,
- *         
+ *
  */
 int
 xmlPatternMinDepth(xmlPatternPtr comp) {
index 68d2236..34aed96 100644 (file)
@@ -1,67 +1,54 @@
 # Makefile for libxml2 python library
 AUTOMAKE_OPTIONS = 1.4 foreign
 
-SUBDIRS= . tests
-
-INCLUDES = \
-       -I$(PYTHON_INCLUDES) \
-       -I$(top_srcdir)/include \
-       -I$(top_builddir)/include \
-       -I$(top_builddir)/$(subdir)
+SUBDIRS = . tests
 
 docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
-# libxml2class.txt is generated
 dist_docs_DATA = TODO
 
 EXTRA_DIST =                   \
        setup.py                \
-       setup.py.in             \
        generator.py            \
-       libxml_wrap.h           \
        libxml.py               \
-       libxml2-python-api.xml
-
-libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version 
+       libxml2-export.c        \
+       libxml2-python-api.xml  \
+       libxml2class.py         \
+       libxml2class.txt
 
 if WITH_PYTHON
-mylibs = \
-       $(top_builddir)/libxml2.la
+AM_CPPFLAGS = \
+       -I$(top_builddir)/include \
+       -I$(top_srcdir)/include \
+       -I$(PYTHON_INCLUDES)
 
 python_LTLIBRARIES = libxml2mod.la
 
-libxml2mod_la_SOURCES = $(srcdir)/libxml.c $(srcdir)/types.c
-nodist_libxml2mod_la_SOURCES = libxml2-py.c
-libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ @WIN32_EXTRA_PYTHON_LIBADD@ @PYTHON_LIBS@ -lpython$(PYTHON_VERSION)
+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)
 
-$(srcdir)/libxml.c: libxml2-py.h # to generate before to compile
+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 libxml2class.py > $@
-
-python_DATA = \
-       libxml2.py
+       cat $(srcdir)/libxml.py `test -f libxml2class.py || echo $(srcdir)/`libxml2class.py > $@
 
 dist_python_DATA = \
-       drv_libxml2.py
+       drv_libxml2.py \
+       libxml2.py
        
-GENERATE = generator.py
-API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
-GENERATED= libxml2class.py \
-           libxml2-export.c \
-           libxml2class.txt \
-          libxml2-py.c \
-          libxml2-py.h
+CLEANFILES = *.pyc
 
-CLEANFILES= $(GENERATED) gen_prog libxml2.py
+MAINTAINERCLEANFILES = libxml2.py libxml2class.*
 
-$(GENERATED): gen_prog
+API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
+GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
 
-gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
-       $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
-       touch gen_prog
+$(GENERATED): $(srcdir)/generator.py $(API_DESC)
+       $(PYTHON) $(srcdir)/generator.py $(srcdir)
 endif
 
 tests test: all
-       cd tests && $(MAKE) MAKEFLAGS+=--silent tests
-
+       cd tests && $(MAKE) tests
index 7b19b89..efdea43 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -71,17 +88,23 @@ am__nobase_list = $(am__nobase_strip_setup); \
 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)" "$(DESTDIR)$(pythondir)"
+       "$(DESTDIR)$(pythondir)"
 LTLIBRARIES = $(python_LTLIBRARIES)
-@WITH_PYTHON_TRUE@libxml2mod_la_DEPENDENCIES = $(mylibs)
-am__libxml2mod_la_SOURCES_DIST = $(srcdir)/libxml.c $(srcdir)/types.c
-@WITH_PYTHON_TRUE@am_libxml2mod_la_OBJECTS = libxml.lo types.lo
-@WITH_PYTHON_TRUE@nodist_libxml2mod_la_OBJECTS = libxml2-py.lo
-libxml2mod_la_OBJECTS = $(am_libxml2mod_la_OBJECTS) \
-       $(nodist_libxml2mod_la_OBJECTS)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+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
 libxml2mod_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -97,23 +120,23 @@ 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_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+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_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 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_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+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_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
-SOURCES = $(libxml2mod_la_SOURCES) $(nodist_libxml2mod_la_SOURCES)
+SOURCES = $(libxml2mod_la_SOURCES)
 DIST_SOURCES = $(am__libxml2mod_la_SOURCES_DIST)
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        html-recursive info-recursive install-data-recursive \
@@ -122,8 +145,13 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        install-pdf-recursive install-ps-recursive install-recursive \
        installcheck-recursive installdirs-recursive pdf-recursive \
        ps-recursive uninstall-recursive
-am__dist_python_DATA_DIST = drv_libxml2.py
-DATA = $(dist_docs_DATA) $(dist_python_DATA) $(python_DATA)
+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=) \
@@ -162,7 +190,6 @@ ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
-AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -199,6 +226,7 @@ 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@
@@ -254,7 +282,6 @@ RANLIB = @RANLIB@
 RDL_LIBS = @RDL_LIBS@
 READER_TEST = @READER_TEST@
 RELDATE = @RELDATE@
-RM = @RM@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -279,7 +306,6 @@ TEST_VTIME = @TEST_VTIME@
 TEST_XINCLUDE = @TEST_XINCLUDE@
 TEST_XPATH = @TEST_XPATH@
 TEST_XPTR = @TEST_XPTR@
-THREADS_W32 = @THREADS_W32@
 THREAD_CFLAGS = @THREAD_CFLAGS@
 THREAD_LIBS = @THREAD_LIBS@
 VERSION = @VERSION@
@@ -312,6 +338,7 @@ 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@
@@ -389,47 +416,38 @@ top_srcdir = @top_srcdir@
 # Makefile for libxml2 python library
 AUTOMAKE_OPTIONS = 1.4 foreign
 SUBDIRS = . tests
-INCLUDES = \
-       -I$(PYTHON_INCLUDES) \
-       -I$(top_srcdir)/include \
-       -I$(top_builddir)/include \
-       -I$(top_builddir)/$(subdir)
-
 docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
-# libxml2class.txt is generated
 dist_docs_DATA = TODO
 EXTRA_DIST = \
        setup.py                \
-       setup.py.in             \
        generator.py            \
-       libxml_wrap.h           \
        libxml.py               \
-       libxml2-python-api.xml
+       libxml2-export.c        \
+       libxml2-python-api.xml  \
+       libxml2class.py         \
+       libxml2class.txt
 
-libxml2mod_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -module -avoid-version 
-@WITH_PYTHON_TRUE@mylibs = \
-@WITH_PYTHON_TRUE@     $(top_builddir)/libxml2.la
+@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 = $(srcdir)/libxml.c $(srcdir)/types.c
-@WITH_PYTHON_TRUE@nodist_libxml2mod_la_SOURCES = libxml2-py.c
-@WITH_PYTHON_TRUE@libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ @WIN32_EXTRA_PYTHON_LIBADD@ @PYTHON_LIBS@ -lpython$(PYTHON_VERSION)
-@WITH_PYTHON_TRUE@python_DATA = \
-@WITH_PYTHON_TRUE@     libxml2.py
+@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@     drv_libxml2.py \
+@WITH_PYTHON_TRUE@     libxml2.py
 
-@WITH_PYTHON_TRUE@GENERATE = generator.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 \
-@WITH_PYTHON_TRUE@           libxml2-export.c \
-@WITH_PYTHON_TRUE@           libxml2class.txt \
-@WITH_PYTHON_TRUE@        libxml2-py.c \
-@WITH_PYTHON_TRUE@        libxml2-py.h
-
-@WITH_PYTHON_TRUE@CLEANFILES = $(GENERATED) gen_prog libxml2.py
-all: all-recursive
+@WITH_PYTHON_TRUE@GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
 .SUFFIXES: .c .lo .o .obj
@@ -467,7 +485,6 @@ setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 install-pythonLTLIBRARIES: $(python_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)"
        @list='$(python_LTLIBRARIES)'; test -n "$(pythondir)" || list=; \
        list2=; for p in $$list; do \
          if test -f $$p; then \
@@ -475,6 +492,8 @@ install-pythonLTLIBRARIES: $(python_LTLIBRARIES)
          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)"; \
        }
@@ -496,7 +515,7 @@ clean-pythonLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
-libxml2mod.la: $(libxml2mod_la_OBJECTS) $(libxml2mod_la_DEPENDENCIES) 
+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:
@@ -512,42 +531,23 @@ distclean-compile:
 .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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@  $(COMPILE) -c $<
+@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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@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
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
-
-libxml.lo: $(srcdir)/libxml.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libxml.lo -MD -MP -MF $(DEPDIR)/libxml.Tpo -c -o libxml.lo `test -f '$(srcdir)/libxml.c' || echo '$(srcdir)/'`$(srcdir)/libxml.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/libxml.Tpo $(DEPDIR)/libxml.Plo
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/libxml.c' object='libxml.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libxml.lo `test -f '$(srcdir)/libxml.c' || echo '$(srcdir)/'`$(srcdir)/libxml.c
-
-types.lo: $(srcdir)/types.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT types.lo -MD -MP -MF $(DEPDIR)/types.Tpo -c -o types.lo `test -f '$(srcdir)/types.c' || echo '$(srcdir)/'`$(srcdir)/types.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/types.Tpo $(DEPDIR)/types.Plo
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$(srcdir)/types.c' object='types.lo' libtool=yes @AMDEPBACKSLASH@
+@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@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o types.lo `test -f '$(srcdir)/types.c' || echo '$(srcdir)/'`$(srcdir)/types.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -556,8 +556,11 @@ clean-libtool:
        -rm -rf .libs _libs
 install-dist_docsDATA: $(dist_docs_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(docsdir)" || $(MKDIR_P) "$(DESTDIR)$(docsdir)"
        @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"; \
@@ -571,13 +574,14 @@ 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|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(docsdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(docsdir)" && rm -f $$files
+       dir='$(DESTDIR)$(docsdir)'; $(am__uninstall_files_from_dir)
 install-dist_pythonDATA: $(dist_python_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)"
        @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"; \
@@ -591,29 +595,7 @@ 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|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(pythondir)" && rm -f $$files
-install-pythonDATA: $(python_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(pythondir)" || $(MKDIR_P) "$(DESTDIR)$(pythondir)"
-       @list='$(python_DATA)'; test -n "$(pythondir)" || list=; \
-       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-pythonDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(python_DATA)'; test -n "$(pythondir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(pythondir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(pythondir)" && rm -f $$files
+       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.
@@ -782,13 +764,10 @@ distdir: $(DISTFILES)
        done
        @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(MKDIR_P) "$(distdir)/$$subdir" \
-           || 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; \
@@ -809,14 +788,16 @@ distdir: $(DISTFILES)
          fi; \
        done
 check-am: all-am
-check: check-recursive
+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)" "$(DESTDIR)$(pythondir)"; do \
+       for dir in "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(pythondir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
-install: install-recursive
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-recursive
 install-exec: install-exec-recursive
 install-data: install-data-recursive
 uninstall: uninstall-recursive
@@ -826,10 +807,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       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:
@@ -842,6 +828,8 @@ distclean-generic:
 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 \
@@ -866,7 +854,7 @@ info: info-recursive
 info-am:
 
 install-data-am: install-dist_docsDATA install-dist_pythonDATA \
-       install-pythonDATA install-pythonLTLIBRARIES
+       install-pythonLTLIBRARIES
 
 install-dvi: install-dvi-recursive
 
@@ -913,10 +901,11 @@ ps: ps-recursive
 ps-am:
 
 uninstall-am: uninstall-dist_docsDATA uninstall-dist_pythonDATA \
-       uninstall-pythonDATA uninstall-pythonLTLIBRARIES
+       uninstall-pythonLTLIBRARIES
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-       install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+       ctags-recursive install install-am install-strip \
+       tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am check check-am clean clean-generic clean-libtool \
@@ -928,28 +917,26 @@ uninstall-am: uninstall-dist_docsDATA uninstall-dist_pythonDATA \
        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-pythonDATA 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-recursive uninstall uninstall-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-recursive uninstall uninstall-am \
        uninstall-dist_docsDATA uninstall-dist_pythonDATA \
-       uninstall-pythonDATA uninstall-pythonLTLIBRARIES
+       uninstall-pythonLTLIBRARIES
 
 
-@WITH_PYTHON_TRUE@$(srcdir)/libxml.c: libxml2-py.h # to generate before to compile
+# 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 libxml2class.py > $@
-
-@WITH_PYTHON_TRUE@$(GENERATED): gen_prog
+@WITH_PYTHON_TRUE@     cat $(srcdir)/libxml.py `test -f libxml2class.py || echo $(srcdir)/`libxml2class.py > $@
 
-@WITH_PYTHON_TRUE@gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
-@WITH_PYTHON_TRUE@     $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
-@WITH_PYTHON_TRUE@     touch gen_prog
+@WITH_PYTHON_TRUE@$(GENERATED): $(srcdir)/generator.py $(API_DESC)
+@WITH_PYTHON_TRUE@     $(PYTHON) $(srcdir)/generator.py $(srcdir)
 
 tests test: all
-       cd tests && $(MAKE) MAKEFLAGS+=--silent tests
+       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.
index 767c4bb..82109e3 100755 (executable)
@@ -47,19 +47,19 @@ class docParser(xml.sax.handler.ContentHandler):
 
     def close(self):
         if debug:
-            print "close"
+            print("close")
 
     def getmethodname(self):
         return self._methodname
 
     def data(self, text):
         if debug:
-            print "data %s" % text
+            print("data %s" % text)
         self._data.append(text)
 
     def start(self, tag, attrs):
         if debug:
-            print "start %s, %s" % (tag, attrs)
+            print("start %s, %s" % (tag, attrs))
         if tag == 'function':
             self._data = []
             self.in_function = 1
@@ -69,9 +69,9 @@ class docParser(xml.sax.handler.ContentHandler):
             self.function_descr = None
             self.function_return = None
             self.function_file = None
-            if attrs.has_key('name'):
+            if 'name' in attrs.keys():
                 self.function = attrs['name']
-            if attrs.has_key('file'):
+            if 'file' in attrs.keys():
                 self.function_file = attrs['file']
         elif tag == 'cond':
             self._data = []
@@ -82,29 +82,29 @@ class docParser(xml.sax.handler.ContentHandler):
                 self.function_arg_name = None
                 self.function_arg_type = None
                 self.function_arg_info = None
-                if attrs.has_key('name'):
+                if 'name' in attrs.keys():
                     self.function_arg_name = attrs['name']
-                if attrs.has_key('type'):
+                if 'type' in attrs.keys():
                     self.function_arg_type = attrs['type']
-                if attrs.has_key('info'):
+                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 attrs.has_key('type'):
+                if 'type' in attrs.keys():
                     self.function_return_type = attrs['type']
-                if attrs.has_key('info'):
+                if 'info' in attrs.keys():
                     self.function_return_info = attrs['info']
-                if attrs.has_key('field'):
+                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
+            print("end %s" % tag)
         if tag == 'function':
             if self.function != None:
                 function(self.function, self.function_descr,
@@ -133,13 +133,13 @@ class docParser(xml.sax.handler.ContentHandler):
                 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 not enums.has_key(type):
+    if type not in enums:
         enums[type] = {}
     enums[type][name] = value
 
@@ -339,6 +339,8 @@ def skip_function(name):
         return 1
     if name == "xmlValidateAttributeDecl":
         return 1
+    if name == "xmlPopInputCallbacks":
+        return 1
 
     return 0
 
@@ -351,10 +353,10 @@ def print_function_wrapper(name, output, export, include):
     try:
         (desc, ret, args, file, cond) = functions[name]
     except:
-        print "failed to get function %s infos"
+        print("failed to get function %s infos")
         return
 
-    if skipped_modules.has_key(file):
+    if file in skipped_modules:
         return 0
     if skip_function(name) == 1:
         return 0
@@ -368,16 +370,17 @@ def print_function_wrapper(name, output, export, include):
     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 py_types.has_key(arg[1]):
+        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 = 't#'
+                f = 's#'
             if f != None:
                 format = format + f
             if t != None:
@@ -388,17 +391,20 @@ def print_function_wrapper(name, output, export, include):
                    arg[1], t, arg[0])
             else:
                 format_args = format_args + ", &%s" % (arg[0])
-            if f == 't#':
+            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 skipped_types.has_key(arg[1]):
+            if arg[1] in skipped_types:
                 return 0
-            if unknown_types.has_key(arg[1]):
+            if arg[1] in unknown_types:
                 lst = unknown_types[arg[1]]
                 lst.append(name)
             else:
@@ -420,25 +426,25 @@ def print_function_wrapper(name, output, export, include):
         else:
             c_call = "\n    %s(%s);\n" % (name, c_call)
         ret_convert = "    Py_INCREF(Py_None);\n    return(Py_None);\n"
-    elif py_types.has_key(ret[0]):
+    elif ret[0] in py_types:
         (f, t, n, c) = py_types[ret[0]]
-        c_return = "    %s c_retval;\n" % (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 py_return_types.has_key(ret[0]):
+    elif ret[0] in py_return_types:
         (f, t, n, c) = py_return_types[ret[0]]
-        c_return = "    %s c_retval;\n" % (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 skipped_types.has_key(ret[0]):
+        if ret[0] in skipped_types:
             return 0
-        if unknown_types.has_key(ret[0]):
+        if ret[0] in unknown_types:
             lst = unknown_types[ret[0]]
             lst.append(name)
         else:
@@ -489,8 +495,10 @@ def print_function_wrapper(name, output, export, include):
         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 != "":
@@ -510,19 +518,19 @@ def buildStubs():
         (parser, target)  = getparser()
         parser.feed(data)
         parser.close()
-    except IOError, msg:
+    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, msg:
-            print file, ":", msg
+        except IOError as msg:
+            print(file, ":", msg)
             sys.exit(1)
 
-    n = len(functions.keys())
-    print "Found %d functions in libxml2-api.xml" % (n)
+    n = len(list(functions.keys()))
+    print("Found %d functions in libxml2-api.xml" % (n))
 
     py_types['pythonObject'] = ('O', "pythonObject", "pythonObject", "pythonObject")
     try:
@@ -531,12 +539,12 @@ def buildStubs():
         (parser, target)  = getparser()
         parser.feed(data)
         parser.close()
-    except IOError, msg:
-        print file, ":", msg
+    except IOError as msg:
+        print(file, ":", msg)
 
 
-    print "Found %d functions in libxml2-python-api.xml" % (
-          len(functions.keys()) - n)
+    print("Found %d functions in libxml2-python-api.xml" % (
+          len(list(functions.keys())) - n))
     nb_wrap = 0
     failed = 0
     skipped = 0
@@ -567,12 +575,12 @@ def buildStubs():
     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 unknown_types.keys():
-        print "%s:%d " % (type, len(unknown_types[type])),
-    print
+    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()
 
 #######################################################################
 #
@@ -697,40 +705,40 @@ def nameFixup(name, classe, type, file):
     l = len(classe)
     if name[0:l] == listname:
         func = name[l:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:12] == "xmlParserGet" and file == "python_accessor":
         func = name[12:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:12] == "xmlParserSet" and file == "python_accessor":
         func = name[12:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:10] == "xmlNodeGet" and file == "python_accessor":
         func = name[10:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:9] == "xmlURIGet" and file == "python_accessor":
         func = name[9:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:9] == "xmlURISet" and file == "python_accessor":
         func = name[6:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:11] == "xmlErrorGet" and file == "python_accessor":
         func = name[11:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:17] == "xmlXPathParserGet" and file == "python_accessor":
         func = name[17:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:11] == "xmlXPathGet" and file == "python_accessor":
         func = name[11:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:11] == "xmlXPathSet" and file == "python_accessor":
         func = name[8:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:15] == "xmlOutputBuffer" and file != "python":
         func = name[15:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:20] == "xmlParserInputBuffer" and file != "python":
         func = name[20:]
-        func = string.lower(func[0:1]) + func[1:]
+        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":
@@ -745,19 +753,19 @@ def nameFixup(name, classe, type, file):
         func = name[9:]
     elif name[0:11] == "xmlACatalog":
         func = name[11:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:l] == classe:
         func = name[l:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:7] == "libxml_":
         func = name[7:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:6] == "xmlGet":
         func = name[6:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     elif name[0:3] == "xml":
         func = name[3:]
-        func = string.lower(func[0:1]) + func[1:]
+        func = func[0:1].lower() + func[1:]
     else:
         func = name
     if func[0:5] == "xPath":
@@ -795,11 +803,29 @@ def functionCompare(info1, info2):
         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 = string.replace(val, "NULL", "None")
+     val = val.replace("NULL", "None")
      output.write(indent)
      output.write('"""')
      while len(val) > 60:
@@ -807,7 +833,7 @@ def writeDoc(name, args, indent, output):
              val = val[1:]
              continue
          str = val[0:60]
-         i = string.rfind(str, " ")
+         i = str.rfind(" ")
          if i < 0:
              i = 60
          str = val[0:i]
@@ -857,13 +883,13 @@ def buildWrappers():
                 ctypes.append(type)
                 ctypes_processed[type] = ()
     for type in sorted(classes_type.keys()):
-        if ctypes_processed.has_key(type):
+        if type in ctypes_processed:
             continue
         tinfo = classes_type[type]
-        if not classes_processed.has_key(tinfo[2]):
+        if tinfo[2] not in classes_processed:
             classes_list.append(tinfo[2])
             classes_processed[tinfo[2]] = ()
-            
+
         ctypes.append(type)
         ctypes_processed[type] = ()
 
@@ -912,9 +938,9 @@ def buildWrappers():
     txt.write("          Generated Classes for libxml2-python\n\n")
 
     txt.write("#\n# Global functions of the module\n#\n\n")
-    if function_classes.has_key("None"):
+    if "None" in function_classes:
         flist = function_classes["None"]
-        flist.sort(functionCompare)
+        flist = sorted(flist, key=cmp_to_key(functionCompare))
         oldfile = ""
         for info in flist:
             (index, func, name, ret, args, file) = info
@@ -934,11 +960,17 @@ def buildWrappers():
             writeDoc(name, args, '    ', classes)
 
             for arg in args:
-                if classes_type.has_key(arg[1]):
+                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:
@@ -949,26 +981,36 @@ def buildWrappers():
                 if n != 0:
                     classes.write(", ")
                 classes.write("%s" % arg[0])
-                if classes_type.has_key(arg[1]):
+                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 classes_type.has_key(ret[0]):
+                if ret[0] in classes_type:
                     #
                     # Raise an exception
                     #
-                    if functions_noexcept.has_key(name):
+                    if name in functions_noexcept:
                         classes.write("    if ret is None:return None\n")
-                    elif string.find(name, "URI") >= 0:
+                    elif name.find("URI") >= 0:
                         classes.write(
                         "    if ret is None:raise uriError('%s() failed')\n"
                                       % (name))
-                    elif string.find(name, "XPath") >= 0:
+                    elif name.find("XPath") >= 0:
                         classes.write(
                         "    if ret is None:raise xpathError('%s() failed')\n"
                                       % (name))
-                    elif string.find(name, "Parse") >= 0:
+                    elif name.find("Parse") >= 0:
                         classes.write(
                         "    if ret is None:raise parserError('%s() failed')\n"
                                       % (name))
@@ -988,7 +1030,7 @@ def buildWrappers():
         if classname == "None":
             pass
         else:
-            if classes_ancestor.has_key(classname):
+            if classname in classes_ancestor:
                 txt.write("\n\nClass %s(%s)\n" % (classname,
                           classes_ancestor[classname]))
                 classes.write("class %s(%s):\n" % (classname,
@@ -996,12 +1038,11 @@ def buildWrappers():
                 classes.write("    def __init__(self, _obj=None):\n")
                 if classes_ancestor[classname] == "xmlCore" or \
                    classes_ancestor[classname] == "xmlNode":
-                    classes.write("        if type(_obj).__name__ != ")
-                    classes.write("'PyCObject':\n")
-                    classes.write("            raise TypeError, ")
-                    classes.write("'%s needs a PyCObject argument'\n" % \
+                    classes.write("        if checkWrapper(_obj) != 0:")
+                    classes.write("            raise TypeError")
+                    classes.write("('%s got a wrong wrapper object type')\n" % \
                                 classname)
-                if reference_keepers.has_key(classname):
+                if classname in reference_keepers:
                     rlist = reference_keepers[classname]
                     for ref in rlist:
                         classes.write("        self.%s = None\n" % ref[1])
@@ -1012,20 +1053,20 @@ def buildWrappers():
                    classes_ancestor[classname] == "xmlNode":
                     classes.write("    def __repr__(self):\n")
                     format = "<%s (%%s) object at 0x%%x>" % (classname)
-                    classes.write("        return \"%s\" %% (self.name, long(pos_id (self)))\n\n" % (
+                    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 reference_keepers.has_key(classname):
+                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 classes_destructors.has_key(classname):
+            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" %
@@ -1033,7 +1074,7 @@ def buildWrappers():
                 classes.write("        self._o = None\n\n")
                 destruct=classes_destructors[classname]
             flist = function_classes[classname]
-            flist.sort(functionCompare)
+            flist = sorted(flist, key=cmp_to_key(functionCompare))
             oldfile = ""
             for info in flist:
                 (index, func, name, ret, args, file) = info
@@ -1065,7 +1106,7 @@ def buildWrappers():
                 writeDoc(name, args, '        ', classes)
                 n = 0
                 for arg in args:
-                    if classes_type.has_key(arg[1]):
+                    if arg[1] in classes_type:
                         if n != index:
                             classes.write("        if %s is None: %s__o = None\n" %
                                           (arg[0], arg[0]))
@@ -1083,31 +1124,31 @@ def buildWrappers():
                         classes.write(", ")
                     if n != index:
                         classes.write("%s" % arg[0])
-                        if classes_type.has_key(arg[1]):
+                        if arg[1] in classes_type:
                             classes.write("__o")
                     else:
                         classes.write("self")
-                        if classes_type.has_key(arg[1]):
+                        if arg[1] in classes_type:
                             classes.write(classes_type[arg[1]][0])
                     n = n + 1
                 classes.write(")\n")
                 if ret[0] != "void":
-                    if classes_type.has_key(ret[0]):
+                    if ret[0] in classes_type:
                         #
                         # Raise an exception
                         #
-                        if functions_noexcept.has_key(name):
+                        if name in functions_noexcept:
                             classes.write(
                                 "        if ret is None:return None\n")
-                        elif string.find(name, "URI") >= 0:
+                        elif name.find("URI") >= 0:
                             classes.write(
                     "        if ret is None:raise uriError('%s() failed')\n"
                                           % (name))
-                        elif string.find(name, "XPath") >= 0:
+                        elif name.find("XPath") >= 0:
                             classes.write(
                     "        if ret is None:raise xpathError('%s() failed')\n"
                                           % (name))
-                        elif string.find(name, "Parse") >= 0:
+                        elif name.find("Parse") >= 0:
                             classes.write(
                     "        if ret is None:raise parserError('%s() failed')\n"
                                           % (name))
@@ -1129,7 +1170,7 @@ def buildWrappers():
                         # See reference_keepers for the list
                         #
                         tclass = classes_type[ret[0]][2]
-                        if reference_keepers.has_key(tclass):
+                        if tclass in reference_keepers:
                             list = reference_keepers[tclass]
                             for pref in list:
                                 if pref[0] == classname:
@@ -1139,22 +1180,22 @@ def buildWrappers():
                         # return the class
                         #
                         classes.write("        return __tmp\n")
-                    elif converter_type.has_key(ret[0]):
+                    elif ret[0] in converter_type:
                         #
                         # Raise an exception
                         #
-                        if functions_noexcept.has_key(name):
+                        if name in functions_noexcept:
                             classes.write(
                                 "        if ret is None:return None")
-                        elif string.find(name, "URI") >= 0:
+                        elif name.find("URI") >= 0:
                             classes.write(
                     "        if ret is None:raise uriError('%s() failed')\n"
                                           % (name))
-                        elif string.find(name, "XPath") >= 0:
+                        elif name.find("XPath") >= 0:
                             classes.write(
                     "        if ret is None:raise xpathError('%s() failed')\n"
                                           % (name))
-                        elif string.find(name, "Parse") >= 0:
+                        elif name.find("Parse") >= 0:
                             classes.write(
                     "        if ret is None:raise parserError('%s() failed')\n"
                                           % (name))
@@ -1175,7 +1216,7 @@ def buildWrappers():
     for type,enum in enums.items():
         classes.write("# %s\n" % type)
         items = enum.items()
-        items.sort(lambda i1,i2: cmp(long(i1[1]),long(i2[1])))
+        items = sorted(items, key=(lambda i: int(i[1])))
         for name,value in items:
             classes.write("%s = %s\n" % (name,value))
         classes.write("\n")
index 9dabf89..03cfb9f 100644 (file)
@@ -28,9 +28,7 @@
 #include "libxml_wrap.h"
 #include "libxml2-py.h"
 
-#if defined(_MSC_VER) && !defined(vsnprintf)
-#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
-#elif defined(WITH_TRIO) && !defined(vsnprintf)
+#if defined(WITH_TRIO)
 #include "trio.h"
 #define vsnprintf trio_vsnprintf
 #endif
 /* #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:
@@ -282,18 +290,42 @@ xmlPythonFileReadRaw (void * context, char * buffer, int len) {
     if (ret == NULL) {
        printf("xmlPythonFileReadRaw: result is NULL\n");
        return(-1);
-    } else if (PyString_Check(ret)) {
-       lenread = PyString_Size(ret);
-       data = PyString_AsString(ret);
-       if (lenread > len)
-           memcpy(buffer, data, len);
-       else
-           memcpy(buffer, data, lenread);
-       Py_DECREF(ret);
+    } 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
+        size_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);
 }
 
@@ -323,18 +355,42 @@ xmlPythonFileRead (void * context, char * buffer, int len) {
     if (ret == NULL) {
        printf("xmlPythonFileRead: result is NULL\n");
        return(-1);
-    } else if (PyString_Check(ret)) {
-       lenread = PyString_Size(ret);
-       data = PyString_AsString(ret);
-       if (lenread > len)
-           memcpy(buffer, data, len);
-       else
-           memcpy(buffer, data, lenread);
-       Py_DECREF(ret);
+    } 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
+        size_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);
 }
 
@@ -360,7 +416,7 @@ xmlPythonFileWrite (void * context, const char * buffer, int len) {
 #endif
     file = (PyObject *) context;
     if (file == NULL) return(-1);
-    string = PyString_FromStringAndSize(buffer, len);
+    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)",
@@ -373,8 +429,8 @@ xmlPythonFileWrite (void * context, const char * buffer, int len) {
     if (ret == NULL) {
        printf("xmlPythonFileWrite: result is NULL\n");
        return(-1);
-    } else if (PyInt_Check(ret)) {
-       written = (int) PyInt_AsLong(ret);
+    } else if (PyLong_Check(ret)) {
+       written = (int) PyLong_AsLong(ret);
        Py_DECREF(ret);
     } else if (ret == Py_None) {
        written = len;
@@ -667,7 +723,7 @@ pythonExternalEntityLoader(const char *URL, const char *ID,
        Py_XDECREF(ctxtobj);
 #ifdef DEBUG_LOADER
        printf("pythonExternalEntityLoader: result ");
-       PyObject_Print(ret, stderr, 0);
+       PyObject_Print(ret, stdout, 0);
        printf("\n");
 #endif
 
@@ -713,19 +769,114 @@ libxml_xmlSetEntityLoader(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
                &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 = PyInt_FromLong(0);
+    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);
+}
 
 /************************************************************************
  *                                                                     *
@@ -766,10 +917,10 @@ pythonStartElement(void *user_data, const xmlChar * name,
         } else {
             dict = PyDict_New();
             for (i = 0; attrs[i] != NULL; i++) {
-                attrname = PyString_FromString((char *) attrs[i]);
+                attrname = PY_IMPORT_STRING((char *) attrs[i]);
                 i++;
                 if (attrs[i] != NULL) {
-                    attrvalue = PyString_FromString((char *) attrs[i]);
+                    attrvalue = PY_IMPORT_STRING((char *) attrs[i]);
                 } else {
                     Py_XINCREF(Py_None);
                     attrvalue = Py_None;
@@ -1172,7 +1323,7 @@ pythonAttributeDecl(void *user_data,
         nameList = PyList_New(count);
         count = 0;
         for (node = tree; node != NULL; node = node->next) {
-            newName = PyString_FromString((char *) node->name);
+            newName = PY_IMPORT_STRING((char *) node->name);
             PyList_SetItem(nameList, count, newName);
            Py_DECREF(newName);
             count++;
@@ -1367,6 +1518,7 @@ libxml_htmlCreatePushParser(ATTRIBUTE_UNUSED PyObject * self,
 PyObject *
 libxml_xmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
 {
+#ifdef LIBXML_SAX1_ENABLED
     int recover;
     const char *URI;
     PyObject *pyobj_SAX = NULL;
@@ -1388,6 +1540,7 @@ libxml_xmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
     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);
 }
@@ -2033,7 +2186,7 @@ libxml_xmlFreeTextReader(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
 
     if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeTextReader", &pyobj_reader))
         return(NULL);
-    if (!PyCObject_Check(pyobj_reader)) {
+    if (!PyCapsule_CheckExact(pyobj_reader)) {
        Py_INCREF(Py_None);
        return(Py_None);
     }
@@ -2234,6 +2387,32 @@ libxml_xmlRegisterXPathFunction(ATTRIBUTE_UNUSED PyObject * self,
     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                        *
@@ -2566,6 +2745,10 @@ libxml_type(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
     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);
@@ -2682,7 +2865,7 @@ libxml_xmlNodeRemoveNsDef(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
     PyObject *pyobj_node;
     xmlChar *href;
     xmlNsPtr c_retval;
-    
+
     if (!PyArg_ParseTuple
         (args, (char *) "Oz:xmlNodeRemoveNsDef", &pyobj_node, &href))
         return (NULL);
@@ -2844,16 +3027,12 @@ libxml_saveNodeTo(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
                           &py_file, &encoding, &format))
         return (NULL);
     node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
-
     if (node == NULL) {
-        return (PyInt_FromLong((long) -1));
-    }
-    if ((py_file == NULL) || (!(PyFile_Check(py_file)))) {
-        return (PyInt_FromLong((long) -1));
+        return (PyLong_FromLong((long) -1));
     }
-    output = PyFile_AsFile(py_file);
+    output = PyFile_Get(py_file);
     if (output == NULL) {
-        return (PyInt_FromLong((long) -1));
+        return (PyLong_FromLong((long) -1));
     }
 
     if (node->type == XML_DOCUMENT_NODE) {
@@ -2872,7 +3051,7 @@ libxml_saveNodeTo(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
     if (encoding != NULL) {
         handler = xmlFindCharEncodingHandler(encoding);
         if (handler == NULL) {
-            return (PyInt_FromLong((long) -1));
+            return (PyLong_FromLong((long) -1));
         }
     }
     if (doc->type == XML_HTML_DOCUMENT_NODE) {
@@ -2897,7 +3076,8 @@ libxml_saveNodeTo(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
         xmlNodeDumpOutput(buf, doc, node, 0, format, encoding);
         len = xmlOutputBufferClose(buf);
     }
-    return (PyInt_FromLong((long) len));
+    PyFile_Release(output);
+    return (PyLong_FromLong((long) len));
 }
 #endif /* LIBXML_OUTPUT_ENABLED */
 
@@ -3403,7 +3583,7 @@ PystringSet_Convert(PyObject *py_strings, xmlChar *** result)
     {
         int idx;
         for (idx=0; idx < count; ++idx) {
-            char* s = PyString_AsString
+            char* s = PyBytes_AsString
                 (is_tuple
                  ? PyTuple_GET_ITEM(py_strings, idx)
                  : PyList_GET_ITEM(py_strings, idx));
@@ -3492,8 +3672,8 @@ libxml_C14NDocDumpMemory(ATTRIBUTE_UNUSED PyObject * self,
         return NULL;
     }
     else {
-        py_retval = PyString_FromStringAndSize((const char *) doc_txt,
-                                               result);
+        py_retval = PY_IMPORT_STRING_SIZE((const char *) doc_txt,
+                                                result);
         xmlFree(doc_txt);
         return py_retval;
     }
@@ -3534,11 +3714,7 @@ libxml_C14NDocSaveTo(ATTRIBUTE_UNUSED PyObject * self,
         return NULL;
     }
 
-    if ((py_file == NULL) || (!(PyFile_Check(py_file)))) {
-        PyErr_SetString(PyExc_TypeError, "bad file.");
-        return NULL;
-    }
-    output = PyFile_AsFile(py_file);
+    output = PyFile_Get(py_file);
     if (output == NULL) {
         PyErr_SetString(PyExc_TypeError, "bad file.");
         return NULL;
@@ -3576,6 +3752,7 @@ libxml_C14NDocSaveTo(ATTRIBUTE_UNUSED PyObject * self,
         xmlFree(prefixes);
     }
 
+    PyFile_Release(output);
     len = xmlOutputBufferClose(buf);
 
     if (result < 0) {
@@ -3584,7 +3761,7 @@ libxml_C14NDocSaveTo(ATTRIBUTE_UNUSED PyObject * self,
         return NULL;
     }
     else
-        return PyInt_FromLong((long) len);
+        return PyLong_FromLong((long) len);
 }
 
 #endif
@@ -3598,7 +3775,7 @@ libxml_getObjDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
 
     if (!PyArg_ParseTuple(args, (char *)"O:getObjDesc", &obj))
         return NULL;
-    str = PyCObject_GetDesc(obj);
+    str = PyCapsule_GetPointer(obj, PyCapsule_GetName(obj));
     return Py_BuildValue((char *)"s", str);
 }
 
@@ -3693,31 +3870,64 @@ static PyMethodDef libxmlMethods[] = {
     {(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
 
-void
-initlibxml2mod(void)
-{
-    static int initialized = 0;
+#endif
 
-    if (initialized != 0)
-        return;
+#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 */
-    Py_InitModule((char *) "libxml2mod", libxmlMethods);
+    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();
 
-    initialized = 1;
-
+#if PY_MAJOR_VERSION < 3
 #ifdef MERGED_MODULES
     initlibxsltmod();
 #endif
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+    return module;
+#endif
 }
index c861a70..e507e0f 100644 (file)
@@ -5,13 +5,23 @@ 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.maxint - i)
+        return (sys.maxsize - i)
     return i
 
 #
@@ -62,9 +72,20 @@ class ioWrapper:
     def io_read(self, len = -1):
         if self.__io == None:
             return(-1)
-        if len < 0:
-            return(self.__io.read())
-        return(self.__io.read(len))
+        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:
@@ -79,7 +100,7 @@ class ioReadWrapper(ioWrapper):
         self._o = libxml2mod.xmlCreateInputBuffer(self, enc)
 
     def __del__(self):
-        print "__del__"
+        print("__del__")
         self.io_close()
         if self._o != None:
             libxml2mod.xmlFreeParserInputBuffer(self._o)
@@ -95,12 +116,19 @@ class ioWriteWrapper(ioWrapper):
     def __init__(self, _obj, enc = ""):
 #        print "ioWriteWrapper.__init__", _obj
         if type(_obj) == type(''):
-            print "write io from a string"
+            print("write io from a string")
             self.o = None
-        elif type(_obj) == types.InstanceType:
-            print "write io from instance of %s" % (_obj.__class__)
-            ioWrapper.__init__(self, _obj)
-            self._o = libxml2mod.xmlCreateOutputBuffer(self, enc)
+        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:
@@ -265,22 +293,22 @@ class xmlCore:
         ret = libxml2mod.parent(self._o)
         if ret == None:
             return None
-        return xmlNode(_obj=ret)
+        return nodeWrap(ret)
     def get_children(self):
         ret = libxml2mod.children(self._o)
         if ret == None:
             return None
-        return xmlNode(_obj=ret)
+        return nodeWrap(ret)
     def get_last(self):
         ret = libxml2mod.last(self._o)
         if ret == None:
             return None
-        return xmlNode(_obj=ret)
+        return nodeWrap(ret)
     def get_next(self):
         ret = libxml2mod.next(self._o)
         if ret == None:
             return None
-        return xmlNode(_obj=ret)
+        return nodeWrap(ret)
     def get_properties(self):
         ret = libxml2mod.properties(self._o)
         if ret == None:
@@ -290,7 +318,7 @@ class xmlCore:
         ret = libxml2mod.prev(self._o)
         if ret == None:
             return None
-        return xmlNode(_obj=ret)
+        return nodeWrap(ret)
     def get_content(self):
         return libxml2mod.xmlNodeGetContent(self._o)
     getContent = get_content  # why is this duplicate naming needed ?
@@ -317,7 +345,7 @@ class xmlCore:
                 ret = libxml2mod.parent(self._o)
                 if ret == None:
                     return None
-                return xmlNode(_obj=ret)
+                return nodeWrap(ret)
             elif attr == "properties":
                 ret = libxml2mod.properties(self._o)
                 if ret == None:
@@ -327,22 +355,22 @@ class xmlCore:
                 ret = libxml2mod.children(self._o)
                 if ret == None:
                     return None
-                return xmlNode(_obj=ret)
+                return nodeWrap(ret)
             elif attr == "last":
                 ret = libxml2mod.last(self._o)
                 if ret == None:
                     return None
-                return xmlNode(_obj=ret)
+                return nodeWrap(ret)
             elif attr == "next":
                 ret = libxml2mod.next(self._o)
                 if ret == None:
                     return None
-                return xmlNode(_obj=ret)
+                return nodeWrap(ret)
             elif attr == "prev":
                 ret = libxml2mod.prev(self._o)
                 if ret == None:
                     return None
-                return xmlNode(_obj=ret)
+                return nodeWrap(ret)
             elif attr == "content":
                 return libxml2mod.xmlNodeGetContent(self._o)
             elif attr == "name":
@@ -357,7 +385,7 @@ class xmlCore:
                     else:
                         return None
                 return xmlDoc(_obj=ret)
-            raise AttributeError,attr
+            raise AttributeError(attr)
     else:
         parent = property(get_parent, None, None, "Parent node")
         children = property(get_children, None, None, "First child node")
@@ -400,7 +428,7 @@ class xmlCore:
                    prefixes=None,
                    with_comments=0):
         if nodes:
-            nodes = map(lambda n: n._o, nodes)
+            nodes = [n._o for n in nodes]
         return libxml2mod.xmlC14NDocDumpMemory(
             self.get_doc()._o,
             nodes,
@@ -414,7 +442,7 @@ class xmlCore:
                    prefixes=None,
                    with_comments=0):
         if nodes:
-            nodes = map(lambda n: n._o, nodes)
+            nodes = [n._o for n in nodes]
         return libxml2mod.xmlC14NDocSaveTo(
             self.get_doc()._o,
             nodes,
@@ -564,10 +592,10 @@ def nodeWrap(o):
 def xpathObjectRet(o):
     otype = type(o)
     if otype == type([]):
-        ret = map(xpathObjectRet, o)
+        ret = list(map(xpathObjectRet, o))
         return ret
     elif otype == type(()):
-        ret = map(xpathObjectRet, o)
+        ret = list(map(xpathObjectRet, o))
         return tuple(ret)
     elif otype == type('') or otype == type(0) or otype == type(0.0):
         return o
@@ -603,7 +631,7 @@ 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 not sys.modules.has_key('libxslt'):
+    if 'libxslt' not in sys.modules:
         # normal behaviour when libxslt is not imported
         ret = libxml2mod.xmlRegisterErrorHandler(f,ctx)
     else:
@@ -682,8 +710,9 @@ class relaxNgValidCtxtCore:
         libxml2mod.xmlRelaxNGSetValidErrors(self._o, err_func, warn_func, arg)
 
     
-def _xmlTextReaderErrorFunc((f,arg),msg,severity,locator):
+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:
@@ -719,11 +748,35 @@ class xmlTextReaderCore:
             return arg
 
 #
-# The cleanup now goes though a wrappe in libxml.c
+# 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 
diff --git a/python/libxml2-export.c b/python/libxml2-export.c
new file mode 100644 (file)
index 0000000..f7d96e1
--- /dev/null
@@ -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)
+    { (char *)"xmlAddPrevSibling", libxml_xmlAddPrevSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_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)
+    { (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) */
+#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 (file)
index 0000000..5d66e54
--- /dev/null
@@ -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)
+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) */
+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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlDocGetRootElement", &pyobj_doc))
+        return(NULL);
+    doc = (xmlDocPtr) 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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+    xmlChar * input;
+
+    if (!PyArg_ParseTuple(args, (char *)"Oz:xmlEncodeSpecialChars", &pyobj_doc, &input))
+        return(NULL);
+    doc = (xmlDocPtr) 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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlGetDocCompressMode", &pyobj_doc))
+        return(NULL);
+    doc = (xmlDocPtr) 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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+    xmlChar * name;
+
+    if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetDocEntity", &pyobj_doc, &name))
+        return(NULL);
+    doc = (xmlDocPtr) 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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlGetIntSubset", &pyobj_doc))
+        return(NULL);
+    doc = (xmlDocPtr) 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;
+    xmlNodePtr parent;
+    PyObject *pyobj_parent;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlGetLastChild", &pyobj_parent))
+        return(NULL);
+    parent = (xmlNodePtr) 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;
+    xmlNodePtr node;
+    PyObject *pyobj_node;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlGetLineNo", &pyobj_node))
+        return(NULL);
+    node = (xmlNodePtr) 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;
+    xmlNodePtr node;
+    PyObject *pyobj_node;
+    xmlChar * name;
+
+    if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetNoNsProp", &pyobj_node, &name))
+        return(NULL);
+    node = (xmlNodePtr) 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;
+    xmlNodePtr node;
+    PyObject *pyobj_node;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlGetNodePath", &pyobj_node))
+        return(NULL);
+    node = (xmlNodePtr) 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;
+    xmlNodePtr node;
+    PyObject *pyobj_node;
+    xmlChar * name;
+    xmlChar * nameSpace;
+
+    if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlGetNsProp", &pyobj_node, &name, &nameSpace))
+        return(NULL);
+    node = (xmlNodePtr) 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;
+    xmlNodePtr node;
+    PyObject *pyobj_node;
+    xmlChar * name;
+
+    if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetProp", &pyobj_node, &name))
+        return(NULL);
+    node = (xmlNodePtr) 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;
+    xmlNodePtr node;
+    PyObject *pyobj_node;
+    xmlChar * name;
+    xmlChar * nameSpace;
+
+    if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlHasNsProp", &pyobj_node, &name, &nameSpace))
+        return(NULL);
+    node = (xmlNodePtr) 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;
+    xmlNodePtr node;
+    PyObject *pyobj_node;
+    xmlChar * name;
+
+    if (!PyArg_ParseTuple(args, (char *)"Oz:xmlHasProp", &pyobj_node, &name))
+        return(NULL);
+    node = (xmlNodePtr) 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;
+    xmlNodePtr node;
+    PyObject *pyobj_node;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlIsBlankNode", &pyobj_node))
+        return(NULL);
+    node = (xmlNodePtr) 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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+    xmlChar * content;
+
+    if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewDocText", &pyobj_doc, &content))
+        return(NULL);
+    doc = (xmlDocPtr) 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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+    xmlChar * name;
+
+    if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewReference", &pyobj_doc, &name))
+        return(NULL);
+    doc = (xmlDocPtr) 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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+    xmlNodePtr cur;
+    PyObject *pyobj_cur;
+
+    if (!PyArg_ParseTuple(args, (char *)"OO:xmlNodeGetBase", &pyobj_doc, &pyobj_cur))
+        return(NULL);
+    doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+    cur = (xmlNodePtr) 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;
+    xmlNodePtr cur;
+    PyObject *pyobj_cur;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeGetContent", &pyobj_cur))
+        return(NULL);
+    cur = (xmlNodePtr) 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;
+    xmlNodePtr cur;
+    PyObject *pyobj_cur;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeGetLang", &pyobj_cur))
+        return(NULL);
+    cur = (xmlNodePtr) 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;
+    xmlNodePtr cur;
+    PyObject *pyobj_cur;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeGetSpacePreserve", &pyobj_cur))
+        return(NULL);
+    cur = (xmlNodePtr) 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;
+    xmlNodePtr node;
+    PyObject *pyobj_node;
+
+    if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeIsText", &pyobj_node))
+        return(NULL);
+    node = (xmlNodePtr) 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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+    xmlNodePtr list;
+    PyObject *pyobj_list;
+    int inLine;
+
+    if (!PyArg_ParseTuple(args, (char *)"OOi:xmlNodeListGetRawString", &pyobj_doc, &pyobj_list, &inLine))
+        return(NULL);
+    doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+    list = (xmlNodePtr) 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;
+    xmlNodePtr 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 = (xmlNodePtr) 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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+    xmlChar * value;
+
+    if (!PyArg_ParseTuple(args, (char *)"Oz:xmlStringGetNodeList", &pyobj_doc, &value))
+        return(NULL);
+    doc = (xmlDocPtr) 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;
+    xmlDocPtr doc;
+    PyObject *pyobj_doc;
+    xmlChar * value;
+    int len;
+
+    if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlStringLenGetNodeList", &pyobj_doc, &value, &len))
+        return(NULL);
+    doc = (xmlDocPtr) 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)
+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) */
+#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 (file)
index 0000000..ab57087
--- /dev/null
@@ -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)
+PyObject * libxml_xmlAddPrevSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_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)
+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) */
+#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) */
index 42f661d..032b44b 100644 (file)
       <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"/>
diff --git a/python/libxml2.py b/python/libxml2.py
new file mode 100644 (file)
index 0000000..9712d16
--- /dev/null
@@ -0,0 +1,9315 @@
+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
+
+#
+# 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
+
+#
+# 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. 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 (file)
index 0000000..48aa7ba
--- /dev/null
@@ -0,0 +1,8529 @@
+#
+# 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. 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 (file)
index 0000000..ca88544
--- /dev/null
@@ -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()
index eaa5e96..a9b9739 100644 (file)
 #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
+
+#define PyCapsule_New PyCObject_FromVoidPtrAndDesc
+#define PyCapsule_CheckExact PyCObject_Check
+#define PyCapsule_GetPointer(o, n) PyCObject_GetDesc((o))
+
+#endif
+#endif
+
 /**
  * ATTRIBUTE_UNUSED:
  *
@@ -150,8 +169,16 @@ typedef struct {
 } 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 {
@@ -247,3 +274,6 @@ 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);
index b985979..f24674c 100755 (executable)
@@ -32,7 +32,7 @@ except:
 if WITHDLLS:
     # libxml dlls (expected in ROOT/bin)
     dlls = [ 'iconv.dll','libxml2.dll','libxslt.dll','libexslt.dll' ]
-    dlls = map(lambda dll: os.path.join(ROOT,'bin',dll),dlls)
+    dlls = [os.path.join(ROOT,'bin',dll) for dll in dlls]
 
     # create __init__.py for the libxmlmods package
     if not os.path.exists("libxmlmods"):
@@ -70,7 +70,7 @@ for dir in includes_dir:
        break;
 
 if xml_includes == "":
-    print "failed to find headers for libxml2: update includes_dir"
+    print("failed to find headers for libxml2: update includes_dir")
     sys.exit(1)
 
 iconv_includes=""
@@ -80,7 +80,7 @@ for dir in includes_dir:
        break;
 
 if iconv_includes == "":
-    print "failed to find headers for libiconv: update includes_dir"
+    print("failed to find headers for libiconv: update includes_dir")
     sys.exit(1)
 
 # those are added in the linker search path for libraries
@@ -103,8 +103,8 @@ if missing("libxml2-py.c") or missing("libxml2.py"):
        except:
            import generator
     except:
-       print "failed to find and generate stubs for libxml2, aborting ..."
-       print sys.exc_type, sys.exc_value
+       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")
@@ -124,13 +124,13 @@ if missing("libxml2-py.c") or missing("libxml2.py"):
 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"
+        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_type, sys.exc_value
+           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")
@@ -157,7 +157,7 @@ if with_xslt == 1:
            break;
 
     if xslt_includes == "":
-       print "failed to find headers for libxslt: update includes_dir"
+       print("failed to find headers for libxslt: update includes_dir")
        with_xslt = 0
 
 
@@ -226,7 +226,7 @@ else:
 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.8.0",
+       version = "2.9.1",
        description = descr,
        author = "Daniel Veillard",
        author_email = "veillard@redhat.com",
index 7eaf530..0e72338 100755 (executable)
@@ -32,7 +32,7 @@ except:
 if WITHDLLS:
     # libxml dlls (expected in ROOT/bin)
     dlls = [ 'iconv.dll','libxml2.dll','libxslt.dll','libexslt.dll' ]
-    dlls = map(lambda dll: os.path.join(ROOT,'bin',dll),dlls)
+    dlls = [os.path.join(ROOT,'bin',dll) for dll in dlls]
 
     # create __init__.py for the libxmlmods package
     if not os.path.exists("libxmlmods"):
@@ -70,7 +70,7 @@ for dir in includes_dir:
        break;
 
 if xml_includes == "":
-    print "failed to find headers for libxml2: update includes_dir"
+    print("failed to find headers for libxml2: update includes_dir")
     sys.exit(1)
 
 iconv_includes=""
@@ -80,7 +80,7 @@ for dir in includes_dir:
        break;
 
 if iconv_includes == "":
-    print "failed to find headers for libiconv: update includes_dir"
+    print("failed to find headers for libiconv: update includes_dir")
     sys.exit(1)
 
 # those are added in the linker search path for libraries
@@ -103,8 +103,8 @@ if missing("libxml2-py.c") or missing("libxml2.py"):
        except:
            import generator
     except:
-       print "failed to find and generate stubs for libxml2, aborting ..."
-       print sys.exc_type, sys.exc_value
+       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")
@@ -124,13 +124,13 @@ if missing("libxml2-py.c") or missing("libxml2.py"):
 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"
+        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_type, sys.exc_value
+           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")
@@ -157,7 +157,7 @@ if with_xslt == 1:
            break;
 
     if xslt_includes == "":
-       print "failed to find headers for libxslt: update includes_dir"
+       print("failed to find headers for libxslt: update includes_dir")
        with_xslt = 0
 
 
index 52c89fc..95ebead 100644 (file)
@@ -19,6 +19,7 @@ PYTESTS=      \
     xpath.py   \
     outbuf.py  \
     inbuf.py   \
+    input_callback.py \
     resolver.py \
     regexp.py  \
     reader.py  \
@@ -55,8 +56,11 @@ XMLS=                \
     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; \
@@ -69,6 +73,3 @@ tests: $(PYTESTS)
 else
 tests:
 endif
-
-clean:
-       rm -f *.pyc core
index a2aaf89..132538f 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 @SET_MAKE@
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -48,14 +65,19 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+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_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 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/||"`;; \
@@ -77,6 +99,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 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)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -84,7 +112,6 @@ ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
-AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -121,6 +148,7 @@ 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@
@@ -176,7 +204,6 @@ RANLIB = @RANLIB@
 RDL_LIBS = @RDL_LIBS@
 READER_TEST = @READER_TEST@
 RELDATE = @RELDATE@
-RM = @RM@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -201,7 +228,6 @@ TEST_VTIME = @TEST_VTIME@
 TEST_XINCLUDE = @TEST_XINCLUDE@
 TEST_XPATH = @TEST_XPATH@
 TEST_XPTR = @TEST_XPTR@
-THREADS_W32 = @THREADS_W32@
 THREAD_CFLAGS = @THREAD_CFLAGS@
 THREAD_LIBS = @THREAD_LIBS@
 VERSION = @VERSION@
@@ -234,6 +260,7 @@ 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@
@@ -327,6 +354,7 @@ PYTESTS = \
     xpath.py   \
     outbuf.py  \
     inbuf.py   \
+    input_callback.py \
     resolver.py \
     regexp.py  \
     reader.py  \
@@ -363,6 +391,7 @@ XMLS = \
     invalid.xml        \
     test.dtd
 
+CLEANFILES = core tmp.xml *.pyc
 all: all-am
 
 .SUFFIXES:
@@ -404,8 +433,11 @@ clean-libtool:
        -rm -rf .libs _libs
 install-dist_exampleDATA: $(dist_example_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
        @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"; \
@@ -419,9 +451,7 @@ 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|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(exampledir)" && rm -f $$files
+       dir='$(DESTDIR)$(exampledir)'; $(am__uninstall_files_from_dir)
 tags: TAGS
 TAGS:
 
@@ -476,13 +506,19 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       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)
@@ -491,6 +527,8 @@ distclean-generic:
 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
@@ -571,6 +609,7 @@ 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; \
@@ -582,9 +621,6 @@ uninstall-am: uninstall-dist_exampleDATA
 @WITH_PYTHON_TRUE@        echo "-- $$test" ; echo "$$log" ; fi ; done)
 @WITH_PYTHON_FALSE@tests:
 
-clean:
-       rm -f *.pyc core
-
 # 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:
index 9331a27..99132c2 100755 (executable)
@@ -20,7 +20,7 @@ doc = libxml2.parseDoc(
 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"
+    print("Failed to find defaulted attribute abc:attr")
     sys.exit(1)
 
 doc.freeDoc()
@@ -28,7 +28,7 @@ doc.freeDoc()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index bfc776c..b2d3f78 100755 (executable)
@@ -23,29 +23,29 @@ doc = libxml2.parseFile("tmp.xml")
 comment = doc.children
 if comment.type != "comment" or \
    comment.content != "This is a generated document":
-   print "error rereading comment"
+   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"
+   print("error rereading PI")
    sys.exit(1)
 root = pi.next
 if root.name != "doc":
-   print "error rereading root"
+   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"
+   print("error rereading namespace")
    sys.exit(1)
 elem = root.children
 if elem.name != "foo":
-   print "error rereading elem"
+   print("error rereading elem")
    sys.exit(1)
 if elem.getBase(None) != "http://example.com/imgs":
-   print "error rereading base"
+   print("error rereading base")
    sys.exit(1)
 if elem.prop("img") != "image.gif":
-   print "error rereading property"
+   print("error rereading property")
    sys.exit(1)
 
 doc.freeDoc()
@@ -53,7 +53,7 @@ doc.freeDoc()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index ec04323..ca5a5a2 100755 (executable)
@@ -17,25 +17,25 @@ 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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    print("Error hash values for two unequal nodes are equal")
     sys.exit(1)
 
 # Basic tests successful
@@ -44,7 +44,7 @@ doc.freeDoc()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index f2a897a..416e384 100755 (executable)
@@ -23,7 +23,7 @@ s = """<x xmlns="foo"></y>"""
 parserCtxt = libxml2.createPushParser(None,"",0,"test.xml")
 parserCtxt.setErrorHandler(callback, "-->")
 if parserCtxt.getErrorHandler() != (callback,"-->"):
-    print "getErrorHandler failed"
+    print("getErrorHandler failed")
     sys.exit(1)
 parserCtxt.parseChunk(s,len(s),1)
 doc = parserCtxt.doc()
@@ -31,9 +31,9 @@ doc.freeDoc()
 parserCtxt = None
 
 if err != expect:
-    print "error"
-    print "received %s" %(err)
-    print "expected %s" %(expect)
+    print("error")
+    print("received %s" %(err))
+    print("expected %s" %(expect))
     sys.exit(1)
 
 i = 10000
@@ -50,7 +50,7 @@ while i > 0:
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 0f9665a..7787246 100755 (executable)
@@ -35,14 +35,14 @@ 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"
+    print("reconciliateNs() failed")
     sys.exit(1)
 target.freeDoc()
 
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 2011f2c..d4049b8 100755 (executable)
@@ -14,7 +14,7 @@ ctxt = libxml2.newValidCtxt()
 doc = libxml2.parseDoc(instance)
 ret = doc.validateDtd(ctxt, dtd)
 if ret != 1:
-    print "error doing DTD validation"
+    print("error doing DTD validation")
     sys.exit(1)
 
 doc.freeDoc()
@@ -25,8 +25,8 @@ del ctxt
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
 
index da6d0c1..530c2ee 100755 (executable)
@@ -24,13 +24,13 @@ except libxml2.parserError:
     got_exc = 1
 
 if got_exc == 0:
-    print "Failed to get a parser exception"
+    print("Failed to get a parser exception")
     sys.exit(1)
 
 if err != expect:
-    print "error"
-    print "received %s" %(err)
-    print "expected %s" %(expect)
+    print("error")
+    print("received %s" %(err))
+    print("expected %s" %(expect))
     sys.exit(1)
 
 i = 10000
@@ -45,7 +45,7 @@ while i > 0:
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index a7cc7a6..0c16674 100755 (executable)
@@ -1,14 +1,19 @@
 #!/usr/bin/python -u
 import sys
 import libxml2
-import StringIO
+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 = StringIO.StringIO("foobar")
+    f = str_io("foobar")
     buf = libxml2.inputBuffer(f)
     i = i + 1
 
@@ -18,8 +23,8 @@ del buf
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
 
index 8d7a7fc..e41a0d9 100755 (executable)
@@ -20,16 +20,16 @@ class callback:
     def startDocument(self):
         global ctxt
         if ctxt.byteConsumed() != self.startd:
-            print "document start at wrong index: %d expecting %d\n" % (
-                  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)
+            print("document end at wrong index: %d expecting %d\n" % (
+                  ctxt.byteConsumed(), expect))
             sys.exit(1)
 
     def startElement(self, tag, attrs):
@@ -37,8 +37,8 @@ class callback:
         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)
+                print("element start at wrong index: %d expecting %d\n" % (
+                   ctxt.byteConsumed(), expect))
                 sys.exit(1)
             
 
@@ -47,8 +47,8 @@ class callback:
         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)
+                print("element end at wrong index: %d expecting %d\n" % (
+                      ctxt.byteConsumed(), expect))
                 sys.exit(1)
             self.count = self.count + 1
 
@@ -107,7 +107,7 @@ ctxt=None
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    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 (executable)
index 0000000..495ab62
--- /dev/null
@@ -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);
index c06ded3..079399a 100755 (executable)
@@ -19,7 +19,7 @@ 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)
+        raise Exception("Error: saw %d namespace declarations.  Expected %d" % (len(nsList), count))
     
 # Memory debug specific
 libxml2.debugMemory(1)
@@ -56,7 +56,7 @@ doc.freeDoc()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 09cd9b5..62761cc 100755 (executable)
@@ -1,17 +1,22 @@
 #!/usr/bin/python -u
 import sys
 import libxml2
-import StringIO
+try:
+    import StringIO
+    str_io = StringIO.StringIO
+except:
+    import io
+    str_io = io.StringIO
 
 def testSimpleBufferWrites():
-    f = StringIO.StringIO()
+    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"
+        print("Failed to save to StringIO")
         sys.exit(1)
 
 def testSaveDocToBuffer():
@@ -23,15 +28,15 @@ def testSaveDocToBuffer():
 <?xml version="1.0" encoding="UTF-8"?>
 <foo>Hello</foo>
 '''
-    f = StringIO.StringIO()
+    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)
+        print('xmlDoc.saveFileTo() call failed.')
+        print('     got: %s' % repr(f.getvalue()))
+        print('expected: %s' % repr(expected))
         sys.exit(1)
 
 def testSaveFormattedDocToBuffer():
@@ -49,13 +54,13 @@ def testSaveFormattedDocToBuffer():
 ''')
     doc = libxml2.parseDoc(input)
     for i in (0, 1):
-        f = StringIO.StringIO()
+        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])
+            print('xmlDoc.saveFormatFileTo() call failed.')
+            print('     got: %s' % repr(f.getvalue()))
+            print('expected: %s' % repr(expected[i]))
             sys.exit(1)
     doc.freeDoc()
 
@@ -69,22 +74,22 @@ def testSaveIntoOutputBuffer():
 <?xml version="1.0" encoding="UTF-8"?>
 <foo>Hello</foo>
 '''
-    f = StringIO.StringIO()
+    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)
+        print('outputBuffer.saveFileTo() call failed.')
+        print('     got: %s' % repr(f.getvalue()))
+        print('expected: %s' % repr(expected))
         sys.exit(1)
-    f = StringIO.StringIO()
+    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)
+        print('outputBuffer.saveFormatFileTo() call failed.')
+        print('     got: %s' % repr(f.getvalue()))
+        print('expected: %s' % repr(expected))
         sys.exit(1)
     doc.freeDoc()
 
@@ -99,7 +104,7 @@ if __name__ == '__main__':
 
     libxml2.cleanupParser()
     if libxml2.debugMemory(1) == 0:
-        print "OK"
+        print("OK")
     else:
-        print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+        print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
         libxml2.dumpMemory()
index 5b60a16..0edd61d 100755 (executable)
@@ -10,11 +10,11 @@ ctxt.parseChunk("/>", 2, 1)
 doc = ctxt.doc()
 ctxt=None
 if doc.name != "test.xml":
-    print "document name error"
+    print("document name error")
     sys.exit(1)
 root = doc.children
 if root.name != "foo":
-    print "root element name error"
+    print("root element name error")
     sys.exit(1)
 doc.freeDoc()
 i = 10000
@@ -29,7 +29,7 @@ ctxt=None
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 1c1e786..48f6e82 100755 (executable)
@@ -51,14 +51,14 @@ 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
+    print("Error got: %s" % log)
+    print("Exprected: %s" % reference)
     sys.exit(1)
 
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index e6e89d9..159d308 100755 (executable)
@@ -52,14 +52,14 @@ 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
+    print("Error got: %s" % log)
+    print("Exprected: %s" % reference)
     sys.exit(1)
 
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 6c37762..173ce66 100755 (executable)
@@ -4,91 +4,96 @@
 # this tests the basic APIs of the XmlTextReader interface
 #
 import libxml2
-import StringIO
 import sys
+try:
+    import StringIO
+    str_io = StringIO.StringIO
+except:
+    import io
+    str_io = io.StringIO
 
 # Memory debug specific
 libxml2.debugMemory(1)
 
-f = StringIO.StringIO("""<a><b b1="b1"/><c>content of c</c></a>""")
+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"
+    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"
+    print("test1: Error reading the first element")
     sys.exit(1)
 ret = reader.Read()
 if ret != 1:
-    print "test1: Error reading to second element"
+    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"
+    print("test1: Error reading the second element")
     sys.exit(1)
 ret = reader.Read()
 if ret != 1:
-    print "test1: Error reading to third element"
+    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"
+    print("test1: Error reading the third element")
     sys.exit(1)
 ret = reader.Read()
 if ret != 1:
-    print "test1: Error reading to text node"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    print("test1: Error reading to end of document")
     sys.exit(1)
 
 #
 # example from the XmlTextReader docs
 #
-f = StringIO.StringIO("""<test xmlns:dt="urn:datatypes" dt:type="int"/>""")
+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"
+    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"
+    print("error reading test attributes")
     sys.exit(1)
 
 #
 # example from the XmlTextReader docs
 #
-f = StringIO.StringIO("""<root xmlns:a="urn:456">
+f = str_io("""<root xmlns:a="urn:456">
 <item>
 <ref href="a:b"/>
 </item>
@@ -100,203 +105,203 @@ ret = reader.Read()
 while ret == 1:
     if reader.Name() == "ref":
         if reader.LookupNamespace("a") != "urn:456":
-            print "error resolving namespace prefix"
+            print("error resolving namespace prefix")
             sys.exit(1)
         break
     ret = reader.Read()
 if ret != 1:
-    print "Error finding the ref element"
+    print("Error finding the ref element")
     sys.exit(1)
 
 #
 # Home made example for the various attribute access functions
 #
-f = StringIO.StringIO("""<testattr xmlns="urn:1" xmlns:a="urn:2" b="b" a:b="a:b"/>""")
+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"
+    print("Error reading the testattr element")
     sys.exit(1)
 #
 # Attribute exploration by index
 #
 if reader.MoveToAttributeNo(0) != 1:
-    print "Failed moveToAttribute(0)"
+    print("Failed moveToAttribute(0)")
     sys.exit(1)
 if reader.Value() != "urn:1":
-    print "Failed to read attribute(0)"
+    print("Failed to read attribute(0)")
     sys.exit(1)
 if reader.Name() != "xmlns":
-    print "Failed to read attribute(0) name"
+    print("Failed to read attribute(0) name")
     sys.exit(1)
 if reader.MoveToAttributeNo(1) != 1:
-    print "Failed moveToAttribute(1)"
+    print("Failed moveToAttribute(1)")
     sys.exit(1)
 if reader.Value() != "urn:2":
-    print "Failed to read attribute(1)"
+    print("Failed to read attribute(1)")
     sys.exit(1)
 if reader.Name() != "xmlns:a":
-    print "Failed to read attribute(1) name"
+    print("Failed to read attribute(1) name")
     sys.exit(1)
 if reader.MoveToAttributeNo(2) != 1:
-    print "Failed moveToAttribute(2)"
+    print("Failed moveToAttribute(2)")
     sys.exit(1)
 if reader.Value() != "b":
-    print "Failed to read attribute(2)"
+    print("Failed to read attribute(2)")
     sys.exit(1)
 if reader.Name() != "b":
-    print "Failed to read attribute(2) name"
+    print("Failed to read attribute(2) name")
     sys.exit(1)
 if reader.MoveToAttributeNo(3) != 1:
-    print "Failed moveToAttribute(3)"
+    print("Failed moveToAttribute(3)")
     sys.exit(1)
 if reader.Value() != "a:b":
-    print "Failed to read attribute(3)"
+    print("Failed to read attribute(3)")
     sys.exit(1)
 if reader.Name() != "a:b":
-    print "Failed to read attribute(3) name"
+    print("Failed to read attribute(3) name")
     sys.exit(1)
 #
 # Attribute exploration by name
 #
 if reader.MoveToAttribute("xmlns") != 1:
-    print "Failed moveToAttribute('xmlns')"
+    print("Failed moveToAttribute('xmlns')")
     sys.exit(1)
 if reader.Value() != "urn:1":
-    print "Failed to read attribute('xmlns')"
+    print("Failed to read attribute('xmlns')")
     sys.exit(1)
 if reader.MoveToAttribute("xmlns:a") != 1:
-    print "Failed moveToAttribute('xmlns')"
+    print("Failed moveToAttribute('xmlns')")
     sys.exit(1)
 if reader.Value() != "urn:2":
-    print "Failed to read attribute('xmlns:a')"
+    print("Failed to read attribute('xmlns:a')")
     sys.exit(1)
 if reader.MoveToAttribute("b") != 1:
-    print "Failed moveToAttribute('b')"
+    print("Failed moveToAttribute('b')")
     sys.exit(1)
 if reader.Value() != "b":
-    print "Failed to read attribute('b')"
+    print("Failed to read attribute('b')")
     sys.exit(1)
 if reader.MoveToAttribute("a:b") != 1:
-    print "Failed moveToAttribute('a:b')"
+    print("Failed moveToAttribute('a:b')")
     sys.exit(1)
 if reader.Value() != "a:b":
-    print "Failed to read attribute('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')"
+    print("Failed moveToAttribute('b', 'urn:2')")
     sys.exit(1)
 if reader.Value() != "a:b":
-    print "Failed to read attribute('b', 'urn:2')"
+    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"
+    print("Failed to move back to element")
     sys.exit(1)
 if reader.MoveToFirstAttribute() != 1:
-    print "Failed to move to first attribute"
+    print("Failed to move to first attribute")
     sys.exit(1)
 if reader.Value() != "urn:1":
-    print "Failed to read attribute(0)"
+    print("Failed to read attribute(0)")
     sys.exit(1)
 if reader.Name() != "xmlns":
-    print "Failed to read attribute(0) name"
+    print("Failed to read attribute(0) name")
     sys.exit(1)
 if reader.MoveToNextAttribute() != 1:
-    print "Failed to move to next attribute"
+    print("Failed to move to next attribute")
     sys.exit(1)
 if reader.Value() != "urn:2":
-    print "Failed to read attribute(1)"
+    print("Failed to read attribute(1)")
     sys.exit(1)
 if reader.Name() != "xmlns:a":
-    print "Failed to read attribute(1) name"
+    print("Failed to read attribute(1) name")
     sys.exit(1)
 if reader.MoveToNextAttribute() != 1:
-    print "Failed to move to next attribute"
+    print("Failed to move to next attribute")
     sys.exit(1)
 if reader.Value() != "b":
-    print "Failed to read attribute(2)"
+    print("Failed to read attribute(2)")
     sys.exit(1)
 if reader.Name() != "b":
-    print "Failed to read attribute(2) name"
+    print("Failed to read attribute(2) name")
     sys.exit(1)
 if reader.MoveToNextAttribute() != 1:
-    print "Failed to move to next attribute"
+    print("Failed to move to next attribute")
     sys.exit(1)
 if reader.Value() != "a:b":
-    print "Failed to read attribute(3)"
+    print("Failed to read attribute(3)")
     sys.exit(1)
 if reader.Name() != "a:b":
-    print "Failed to read attribute(3) name"
+    print("Failed to read attribute(3) name")
     sys.exit(1)
 if reader.MoveToNextAttribute() != 0:
-    print "Failed to detect last attribute"
+    print("Failed to detect last attribute")
     sys.exit(1)
 
     
 #
 # a couple of tests for namespace nodes
 #
-f = StringIO.StringIO("""<a xmlns="http://example.com/foo"/>""")
+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()"
+    print("test6: failed to Read()")
     sys.exit(1)
 ret = reader.MoveToFirstAttribute()
 if ret != 1:
-    print "test6: failed to MoveToFirstAttribute()"
+    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"
+    print("test6: failed to read the namespace node")
     sys.exit(1)
 
-f = StringIO.StringIO("""<a xmlns:prefix="http://example.com/foo"/>""")
+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()"
+    print("test7: failed to Read()")
     sys.exit(1)
 ret = reader.MoveToFirstAttribute()
 if ret != 1:
-    print "test7: failed to MoveToFirstAttribute()"
+    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"
+    print("test7: failed to read the namespace node")
     sys.exit(1)
 
 #
 # Test for a limit case:
 #
-f = StringIO.StringIO("""<a/>""")
+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"
+    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"
+    print("test8: failed to analyze the node")
     sys.exit(1)
 ret = reader.Read()
 if ret != 0:
-    print "test8: failed to detect the EOF"
+    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 = StringIO.StringIO(s)
+    f = str_io(s)
     input = libxml2.inputBuffer(f)
     reader = input.newTextReader("tst")
     res = ""
@@ -322,8 +327,8 @@ expect="""1 (a) [None] 0 0
 """
 res = tst_reader(doc)
 if res != expect:
-    print "test5 failed"
-    print res
+    print("test5 failed")
+    print(res)
     sys.exit(1)
 
 doc="""<test><b/><c/></test>"""
@@ -334,8 +339,8 @@ expect="""1 (test) [None] 0 0
 """
 res = tst_reader(doc)
 if res != expect:
-    print "test9 failed"
-    print res
+    print("test9 failed")
+    print(res)
     sys.exit(1)
 
 doc="""<a><b>bbb</b><c>ccc</c></a>"""
@@ -350,8 +355,8 @@ expect="""1 (a) [None] 0 0
 """
 res = tst_reader(doc)
 if res != expect:
-    print "test10 failed"
-    print res
+    print("test10 failed")
+    print(res)
     sys.exit(1)
 
 doc="""<test a="a"/>"""
@@ -360,8 +365,8 @@ expect="""1 (test) [None] 1 0
 """
 res = tst_reader(doc)
 if res != expect:
-    print "test11 failed"
-    print res
+    print("test11 failed")
+    print(res)
     sys.exit(1)
 
 doc="""<test><a>aaa</a><b/></test>"""
@@ -374,8 +379,8 @@ expect="""1 (test) [None] 0 0
 """
 res = tst_reader(doc)
 if res != expect:
-    print "test12 failed"
-    print res
+    print("test12 failed")
+    print(res)
     sys.exit(1)
 
 doc="""<test><p></p></test>"""
@@ -386,8 +391,8 @@ expect="""1 (test) [None] 0 0
 """
 res = tst_reader(doc)
 if res != expect:
-    print "test13 failed"
-    print res
+    print("test13 failed")
+    print(res)
     sys.exit(1)
 
 doc="""<p></p>"""
@@ -396,8 +401,8 @@ expect="""1 (p) [None] 0 0
 """
 res = tst_reader(doc)
 if res != expect:
-    print "test14 failed"
-    print res
+    print("test14 failed")
+    print(res)
     sys.exit(1)
 
 #
@@ -421,8 +426,8 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 """
 res = tst_reader(doc)
 if res != expect:
-    print "test15 failed"
-    print res
+    print("test15 failed")
+    print(res)
     sys.exit(1)
 
 #
@@ -435,7 +440,7 @@ del reader
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index ea890ec..8570575 100755 (executable)
@@ -5,8 +5,13 @@
 import sys
 import glob
 import string
-import StringIO
 import libxml2
+try:
+    import StringIO
+    str_io = StringIO.StringIO
+except:
+    import io
+    str_io = io.StringIO
 
 # Memory debug specific
 libxml2.debugMemory(1)
@@ -30,7 +35,11 @@ libxml2.registerErrorHandler(callback, "")
 valid_files = glob.glob("../../test/valid/*.x*")
 valid_files.sort()
 for file in valid_files:
-    if string.find(file, "t8") != -1:
+    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)
@@ -39,11 +48,11 @@ for file in valid_files:
     while ret == 1:
         ret = reader.Read()
     if ret != 0:
-        print "Error parsing and validating %s" % (file)
+        print("Error parsing and validating %s" % (file))
        #sys.exit(1)
 
 if err != expect:
-    print err
+    print(err)
 
 #
 # another separate test based on Stephane Bidoul one
@@ -79,7 +88,7 @@ expect="""10,test
 res=""
 err=""
 
-input = libxml2.inputBuffer(StringIO.StringIO(s))
+input = libxml2.inputBuffer(str_io(s))
 reader = input.newTextReader("test2")
 reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
 reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
@@ -89,12 +98,12 @@ while reader.Read() == 1:
     res = res + "%s,%s\n" % (reader.NodeType(),reader.Name())
 
 if res != expect:
-    print "test2 failed: unexpected output"
-    print res
+    print("test2 failed: unexpected output")
+    print(res)
     sys.exit(1)
 if err != "":
-    print "test2 failed: validation error found"
-    print err
+    print("test2 failed: validation error found")
+    print(err)
     sys.exit(1)
 
 #
@@ -124,12 +133,12 @@ res=""
 
 def myResolver(URL, ID, ctxt):
     if URL == "tst.ent":
-        return(StringIO.StringIO(tst_ent))
+        return(str_io(tst_ent))
     return None
 
 libxml2.setEntityLoader(myResolver)
 
-input = libxml2.inputBuffer(StringIO.StringIO(s))
+input = libxml2.inputBuffer(str_io(s))
 reader = input.newTextReader("test3")
 reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
 reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
@@ -139,12 +148,12 @@ while reader.Read() == 1:
     res = res + "%s %s\n" % (reader.NodeType(),reader.Name())
 
 if res != expect:
-    print "test3 failed: unexpected output"
-    print res
+    print("test3 failed: unexpected output")
+    print(res)
     sys.exit(1)
 if err != "":
-    print "test3 failed: validation error found"
-    print err
+    print("test3 failed: validation error found")
+    print(err)
     sys.exit(1)
 
 #
@@ -183,7 +192,7 @@ expect="""10 test 0
 res=""
 err=""
 
-input = libxml2.inputBuffer(StringIO.StringIO(s))
+input = libxml2.inputBuffer(str_io(s))
 reader = input.newTextReader("test4")
 reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
 reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
@@ -193,12 +202,12 @@ 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
+    print("test4 failed: unexpected output")
+    print(res)
     sys.exit(1)
 if err != "":
-    print "test4 failed: validation error found"
-    print err
+    print("test4 failed: validation error found")
+    print(err)
     sys.exit(1)
 
 #
@@ -228,18 +237,18 @@ expect="""10 test 0
 res=""
 err=""
 
-input = libxml2.inputBuffer(StringIO.StringIO(s))
+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
+    print("test5 failed: unexpected output")
+    print(res)
 if err != "":
-    print "test5 failed: validation error found"
-    print err
+    print("test5 failed: validation error found")
+    print(err)
 
 #
 # cleanup
@@ -250,7 +259,7 @@ del reader
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 2458c89..4302b6c 100755 (executable)
@@ -3,8 +3,13 @@
 # this tests the entities substitutions with the XmlTextReader interface
 #
 import sys
-import StringIO
 import libxml2
+try:
+    import StringIO
+    str_io = StringIO.StringIO
+except:
+    import io
+    str_io = io.StringIO
 
 docstr="""<?xml version='1.0'?>
 <!DOCTYPE doc [
@@ -18,90 +23,90 @@ libxml2.debugMemory(1)
 #
 # First test, normal don't substitute entities.
 #
-f = StringIO.StringIO(docstr)
+f = str_io(docstr)
 input = libxml2.inputBuffer(f)
 reader = input.newTextReader("test_noent")
 ret = reader.Read()
 if ret != 1:
-    print "Error reading to root"
+    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"
+    print("Error reading to root")
     sys.exit(1)
 if reader.Name() != "doc" or reader.NodeType() != 1:
-    print "test_normal: Error reading the root element"
+    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"
+    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"
+    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"
+    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"
+    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"
+    print("test_normal: Error detecting the end")
     sys.exit(1)
 
 #
 # Second test, completely substitute the entities.
 #
-f = StringIO.StringIO(docstr)
+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"
+    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"
+    print("Error reading to root")
     sys.exit(1)
 if reader.Name() != "doc" or reader.NodeType() != 1:
-    print "test_noent: Error reading the root element"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    print("test_noent: Error detecting the end")
     sys.exit(1)
 
 #
@@ -122,12 +127,12 @@ simplestruct2_ent="""<descr/>"""
 
 def myResolver(URL, ID, ctxt):
     if URL == "simplestruct2.ent":
-        return(StringIO.StringIO(simplestruct2_ent))
+        return(str_io(simplestruct2_ent))
     return None
 
 libxml2.setEntityLoader(myResolver)
 
-input = libxml2.inputBuffer(StringIO.StringIO(s))
+input = libxml2.inputBuffer(str_io(s))
 reader = input.newTextReader("test3")
 reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
 while reader.Read() == 1:
@@ -135,8 +140,8 @@ while reader.Read() == 1:
                                    reader.Depth(),reader.IsEmptyElement())
 
 if res != expect:
-    print "test3 failed: unexpected output"
-    print res
+    print("test3 failed: unexpected output")
+    print(res)
     sys.exit(1)
 
 #
@@ -149,7 +154,7 @@ del reader
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 0824929..0bb3e3f 100755 (executable)
@@ -3,14 +3,19 @@
 # this tests the basic APIs of the XmlTextReader interface
 #
 import libxml2
-import StringIO
 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 = StringIO.StringIO(s)
+    f = str_io(s)
     input = libxml2.inputBuffer(f)
     reader = input.newTextReader("tst")
     res = ""
@@ -32,14 +37,14 @@ expect="""1 (test) [None] 0
 res = tst_reader("""<test><b/><c/></test>""")
 
 if res != expect:
-    print "Did not get the expected error message:"
-    print res
+    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"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index fcbad61..82d0dae 100755 (executable)
@@ -4,7 +4,6 @@
 # this extract the Dragon bibliography entries from the XML specification
 #
 import libxml2
-import StringIO
 import sys
 
 # Memory debug specific
@@ -15,11 +14,11 @@ 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')
+f = open('../../test/valid/REC-xml-19980210.xml', 'rb')
 input = libxml2.inputBuffer(f)
 reader = input.newTextReader("REC")
 res=""
-while reader.Read():
+while reader.Read() > 0:
     while reader.Name() == 'bibl':
         node = reader.Expand()            # expand the subtree
         if node.xpathEval("@id = 'Aho'"): # use XPath on it
@@ -28,9 +27,9 @@ while reader.Read():
             break;
 
 if res != expect:
-    print "Error: didn't get the expected output"
-    print "got '%s'" % (res)
-    print "expected '%s'" % (expect)
+    print("Error: didn't get the expected output")
+    print("got '%s'" % (res))
+    print("expected '%s'" % (expect))
     
 
 #
@@ -42,7 +41,7 @@ del reader
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 7a34601..ef33b18 100755 (executable)
@@ -3,8 +3,13 @@
 # this tests the entities substitutions with the XmlTextReader interface
 #
 import sys
-import StringIO
 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">
@@ -41,7 +46,7 @@ docstr="""<foo>
 <item>100</item>
 </foo>"""
 
-f = StringIO.StringIO(docstr)
+f = str_io(docstr)
 input = libxml2.inputBuffer(f)
 reader = input.newTextReader("correct")
 reader.RelaxNGSetSchema(rngs)
@@ -50,11 +55,11 @@ while ret == 1:
     ret = reader.Read()
 
 if ret != 0:
-    print "Error parsing the document"
+    print("Error parsing the document")
     sys.exit(1)
 
 if reader.IsValid() != 1:
-    print "Document failed to validate"
+    print("Document failed to validate")
     sys.exit(1)
 
 #
@@ -84,7 +89,7 @@ def callback(ctx, str):
     err = err + "%s" % (str)
 libxml2.registerErrorHandler(callback, "")
 
-f = StringIO.StringIO(docstr)
+f = str_io(docstr)
 input = libxml2.inputBuffer(f)
 reader = input.newTextReader("error")
 reader.RelaxNGSetSchema(rngs)
@@ -93,16 +98,16 @@ while ret == 1:
     ret = reader.Read()
 
 if ret != 0:
-    print "Error parsing the document"
+    print("Error parsing the document")
     sys.exit(1)
 
 if reader.IsValid() != 0:
-    print "Document failed to detect the validation error"
+    print("Document failed to detect the validation error")
     sys.exit(1)
 
 if err != expect:
-    print "Did not get the expected error message:"
-    print err
+    print("Did not get the expected error message:")
+    print(err)
     sys.exit(1)
 
 #
@@ -117,7 +122,7 @@ libxml2.relaxNGCleanupTypes()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 35a426f..c88e370 100755 (executable)
@@ -3,7 +3,6 @@
 # this tests the entities substitutions with the XmlTextReader interface
 #
 import sys
-import StringIO
 import libxml2
 
 # Memory debug specific
@@ -44,12 +43,12 @@ while ret == 1:
     ret = reader.Read()
 
 if ret != 0:
-    print "Error parsing the document test1"
+    print("Error parsing the document test1")
     sys.exit(1)
 
 if result != expect:
-    print "Unexpected result for test1"
-    print result
+    print("Unexpected result for test1")
+    print(result)
     sys.exit(1)
 
 #
@@ -80,12 +79,12 @@ while ret == 1:
     ret = reader.Read()
 
 if ret != 0:
-    print "Error parsing the document test2"
+    print("Error parsing the document test2")
     sys.exit(1)
 
 if result != expect:
-    print "Unexpected result for test2"
-    print result
+    print("Unexpected result for test2")
+    print(result)
     sys.exit(1)
 
 #
@@ -96,7 +95,7 @@ del reader
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 53b7f27..de2dcd6 100755 (executable)
@@ -3,7 +3,6 @@
 # this tests the entities substitutions with the XmlTextReader interface
 #
 import sys
-import StringIO
 import libxml2
 
 # Memory debug specific
@@ -23,7 +22,7 @@ ret = reader.Read()
 ret = reader.Close()
 
 if ret != 0:
-    print "Error closing the document test1"
+    print("Error closing the document test1")
     sys.exit(1)
 
 del reader
@@ -31,7 +30,7 @@ del reader
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
old mode 100644 (file)
new mode 100755 (executable)
index 0dad36e..c8ceba5
@@ -3,8 +3,13 @@
 # this tests the basic APIs of the XmlTextReader interface
 #
 import libxml2
-import StringIO
 import sys
+try:
+    import StringIO
+    str_io = StringIO.StringIO
+except:
+    import io
+    str_io = io.StringIO
 
 # Memory debug specific
 libxml2.debugMemory(1)
@@ -17,7 +22,7 @@ def myErrorHandler(arg,msg,severity,locator):
     global err
     err = err + "%s (%d) %s:%d:%s" % (arg,severity,locator.BaseURI(),locator.LineNumber(),msg)
 
-f = StringIO.StringIO("""<a xmlns="foo"><b b1="b1"/><c>content of c</a>""")
+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,"-->")
@@ -25,14 +30,14 @@ while reader.Read() == 1:
     pass
 
 if err != expect:
-    print "error"
-    print "received %s" %(err)
-    print "expected %s" %(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"
+    print("GetErrorHandler failed")
     sys.exit(1)
 
 #
@@ -45,7 +50,7 @@ del reader
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index b01a49d..fcb9ae3 100755 (executable)
@@ -4,65 +4,70 @@
 # this tests the next API of the XmlTextReader interface
 #
 import libxml2
-import StringIO
 import sys
+try:
+    import StringIO
+    str_io = StringIO.StringIO
+except:
+    import io
+    str_io = io.StringIO
 
 # Memory debug specific
 libxml2.debugMemory(1)
 
-f = StringIO.StringIO("""<a><b><c /></b><d>content of d</d></a>""")
+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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    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"
+    print("test_next: Error reading to end of document")
     sys.exit(1)
 
 #
@@ -75,7 +80,7 @@ del reader
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
old mode 100644 (file)
new mode 100755 (executable)
index 4c05502..a03e459
@@ -6,19 +6,19 @@ libxml2.debugMemory(1)
 
 re = libxml2.regexpCompile("a|b")
 if re.regexpExec("a") != 1:
-    print "error checking 'a'"
+    print("error checking 'a'")
     sys.exit(1)
 if re.regexpExec("b") != 1:
-    print "error checking 'b'"
+    print("error checking 'b'")
     sys.exit(1)
 if re.regexpExec("ab") != 0:
-    print "error checking 'ab'"
+    print("error checking 'ab'")
     sys.exit(1)
 if re.regexpExec("") != 0:
-    print "error checking 'ab'"
+    print("error checking 'ab'")
     sys.exit(1)
 if re.regexpIsDeterminist() != 1:
-    print "error checking determinism"
+    print("error checking determinism")
     sys.exit(1)
 del re
     
@@ -26,7 +26,7 @@ del re
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 2c83635..fa3d327 100755 (executable)
@@ -29,7 +29,7 @@ ctxt = rngs.relaxNGNewValidCtxt()
 doc = libxml2.parseDoc(instance)
 ret = doc.relaxNGValidateDoc(ctxt)
 if ret != 0:
-    print "error doing RelaxNG validation"
+    print("error doing RelaxNG validation")
     sys.exit(1)
 
 doc.freeDoc()
@@ -41,8 +41,8 @@ libxml2.relaxNGCleanupTypes()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
 
index 9f4a478..6f21f52 100755 (executable)
@@ -1,20 +1,25 @@
 #!/usr/bin/python -u
 import sys
 import libxml2
-import StringIO
+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(StringIO.StringIO("<foo/>"))
+    return(str_io("<foo/>"))
 
 libxml2.setEntityLoader(myResolver)
 
 doc = libxml2.parseFile("doesnotexist.xml")
 root = doc.children
 if root.name != "foo":
-    print "root element name error"
+    print("root element name error")
     sys.exit(1)
 doc.freeDoc()
 
@@ -23,7 +28,7 @@ while i < 5000:
     doc = libxml2.parseFile("doesnotexist.xml")
     root = doc.children
     if root.name != "foo":
-        print "root element name error"
+        print("root element name error")
         sys.exit(1)
     doc.freeDoc()
     i = i + 1
@@ -32,8 +37,8 @@ while i < 5000:
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
 
index bfa8423..8089272 100755 (executable)
@@ -33,7 +33,7 @@ ctxt_valid  = ctxt_schema.schemaNewValidCtxt()
 doc = libxml2.parseDoc(instance)
 ret = doc.schemaValidateDoc(ctxt_valid)
 if ret != 0:
-    print "error doing schema validation"
+    print("error doing schema validation")
     sys.exit(1)
 
 doc.freeDoc()
@@ -45,8 +45,8 @@ libxml2.schemaCleanupTypes()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
 
index 91753e7..80b901a 100755 (executable)
@@ -13,13 +13,13 @@ str = doc.serialize()
 if str != """<?xml version="1.0"?>
 <root><foo>hello</foo></root>
 """:
-   print "error serializing XML document 1"
+   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"
+   print("error serializing XML document 2")
    sys.exit(1)
 str = doc.serialize(format=1)
 if str != """<?xml version="1.0"?>
@@ -27,7 +27,7 @@ if str != """<?xml version="1.0"?>
   <foo>hello</foo>
 </root>
 """:
-   print "error serializing XML document 3"
+   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"?>
@@ -35,7 +35,7 @@ if str != """<?xml version="1.0" encoding="iso-8859-1"?>
   <foo>hello</foo>
 </root>
 """:
-   print "error serializing XML document 4"
+   print("error serializing XML document 4")
    sys.exit(1)
 
 #
@@ -44,23 +44,23 @@ if str != """<?xml version="1.0" encoding="iso-8859-1"?>
 root = doc.getRootElement()
 str = root.serialize()
 if str != """<root><foo>hello</foo></root>""":
-   print "error serializing XML root 1"
+   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"
+   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"
+   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"
+   print("error serializing XML root 4")
    sys.exit(1)
 doc.freeDoc()
 
@@ -72,13 +72,13 @@ 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"
+   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"
+   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">
@@ -90,7 +90,7 @@ if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http
 <body><p>hello</p></body>
 </html>
 """:
-   print "error serializing HTML document 3"
+   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">
@@ -102,7 +102,7 @@ if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http
 <body><p>hello</p></body>
 </html>
 """:
-   print "error serializing HTML document 4"
+   print("error serializing HTML document 4")
    sys.exit(1)
 
 #
@@ -112,11 +112,11 @@ 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"
+   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"
+   print("error serializing HTML root 2")
    sys.exit(1)
 str = root.serialize(format=1)
 if str != """<html>
@@ -126,7 +126,7 @@ if str != """<html>
 </head>
 <body><p>hello</p></body>
 </html>""":
-   print "error serializing HTML root 3"
+   print("error serializing HTML root 3")
    sys.exit(1)
 str = root.serialize("iso-8859-1", 1)
 if str != """<html>
@@ -136,7 +136,7 @@ if str != """<html>
 </head>
 <body><p>hello</p></body>
 </html>""":
-   print "error serializing HTML root 4"
+   print("error serializing HTML root 4")
    sys.exit(1)
 
 doc.freeDoc()
@@ -144,7 +144,7 @@ doc.freeDoc()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 2141875..9d565db 100755 (executable)
@@ -50,8 +50,8 @@ ctxt=None
 
 reference = "startDocument:startElement foo None:startElement bar2 None:endElement bar2:"
 if log != reference:
-    print "Error got: %s" % log
-    print "Exprected: %s" % reference
+    print("Error got: %s" % log)
+    print("Exprected: %s" % reference)
     sys.exit(1)
 
 log=""
@@ -62,8 +62,8 @@ ctxt=None
 
 reference = "startDocument:startElement foo None:startElement bar2 None:endElement bar2:"
 if log != reference:
-    print "Error got: %s" % log
-    print "Exprected: %s" % reference
+    print("Error got: %s" % log)
+    print("Exprected: %s" % reference)
     sys.exit(1)
 
 log=""
@@ -74,8 +74,8 @@ ctxt=None
 
 reference = "startDocument:startElement foo None:startElement bar2 None:"
 if log != reference:
-    print "Error got: %s" % log
-    print "Exprected: %s" % reference
+    print("Error got: %s" % log)
+    print("Exprected: %s" % reference)
     sys.exit(1)
 
 log=""
@@ -86,8 +86,8 @@ ctxt=None
 
 reference = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:endElement bar2:"
 if log != reference:
-    print "Error got: %s" % log
-    print "Exprected: %s" % reference
+    print("Error got: %s" % log)
+    print("Exprected: %s" % reference)
     sys.exit(1)
 
 log=""
@@ -98,8 +98,8 @@ ctxt=None
 
 reference = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:"
 if log != reference:
-    print "Error got: %s" % log
-    print "Exprected: %s" % reference
+    print("Error got: %s" % log)
+    print("Exprected: %s" % reference)
     sys.exit(1)
 
 log=""
@@ -110,8 +110,8 @@ ctxt=None
 
 reference = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:endElement bar2:"
 if log != reference:
-    print "Error got: %s" % log
-    print "Exprected: %s" % reference
+    print("Error got: %s" % log)
+    print("Exprected: %s" % reference)
     sys.exit(1)
 
 log=""
@@ -122,14 +122,14 @@ ctxt=None
 
 reference = "startDocument:startElement foo None:"
 if log != reference:
-    print "Error got: %s" % log
-    print "Exprected: %s" % 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"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index c8ac5ed..2749eb0 100755 (executable)
@@ -1,6 +1,9 @@
 #!/usr/bin/python -u
 import string, sys, time
-import thread
+try:
+    from _thread import get_ident
+except:
+    from thread import get_ident
 from threading import Thread, Lock
 
 import libxml2
@@ -31,8 +34,8 @@ def test(expectedLineNumbersDefault):
     # check a per thread-global
     if expectedLineNumbersDefault != getLineNumbersDefault():
         failed = 1
-        print "FAILED to obtain correct value for " \
-              "lineNumbersDefault in thread %d" % thread.get_ident()
+        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:
@@ -51,7 +54,7 @@ libxml2.lineNumbersDefault(1)
 test(1)
 ec = len(eh.errors)
 if ec == 0:
-    print "FAILED: should have obtained errors"
+    print("FAILED: should have obtained errors")
     sys.exit(1)
 
 ts = []
@@ -65,7 +68,7 @@ for t in ts:
     t.join()
 
 if len(eh.errors) != ec+THREADS_COUNT*ec:
-    print "FAILED: did not obtain the correct number of errors"
+    print("FAILED: did not obtain the correct number of errors")
     sys.exit(1)
 
 # set lineNumbersDefault for future new threads
@@ -80,17 +83,17 @@ 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"
+    print("FAILED: did not obtain the correct number of errors")
     sys.exit(1)
 
 if failed:
-    print "FAILED"
+    print("FAILED")
     sys.exit(1)
 
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 9540cda..57a7318 100755 (executable)
@@ -7,22 +7,22 @@ libxml2.debugMemory(1)
 
 doc = libxml2.parseFile("tst.xml")
 if doc.name != "tst.xml":
-    print "doc.name failed"
+    print("doc.name failed")
     sys.exit(1)
 root = doc.children
 if root.name != "doc":
-    print "root.name failed"
+    print("root.name failed")
     sys.exit(1)
 child = root.children
 if child.name != "foo":
-    print "child.name failed"
+    print("child.name failed")
     sys.exit(1)
 doc.freeDoc()
 
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index d26e82c..d5f9be7 100755 (executable)
@@ -17,8 +17,8 @@ class TestCase(unittest.TestCase):
         if libxml2.debugMemory(1) != 0:
             libxml2.dumpMemory() 
             self.fail("Memory leak %d bytes" % (libxml2.debugMemory(1),))
-       else:
-           print "OK"
+        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;
@@ -27,19 +27,19 @@ class TestCase(unittest.TestCase):
         # disable the default error handler
         libxml2.registerErrorHandler(None,None)
         try:
-           apply(f,args)
+            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
+                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())
index 58b7ad8..e4d58af 100755 (executable)
@@ -7,35 +7,35 @@ 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"
+    print("Error parsing URI: wrong scheme")
     sys.exit(1)
 if uri.server() != 'example.org':
-    print "Error parsing URI: wrong server"
+    print("Error parsing URI: wrong server")
     sys.exit(1)
 if uri.port() != 8088:
-    print "Error parsing URI: wrong port"
+    print("Error parsing URI: wrong port")
     sys.exit(1)
 if uri.path() != '/foo/bar':
-    print "Error parsing URI: wrong path"
+    print("Error parsing URI: wrong path")
     sys.exit(1)
 if uri.query() != 'query=simple':
-    print "Error parsing URI: wrong query"
+    print("Error parsing URI: wrong query")
     sys.exit(1)
 if uri.fragment() != 'fragid':
-    print "Error parsing URI: wrong query"
+    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"
+    print("Error modifying or saving the URI")
 uri = None
 
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 553096d..6b34cf3 100755 (executable)
@@ -19,7 +19,7 @@ libxml2mod.xmlSetValidErrors(ctxt._o, error, error)
 doc = libxml2.parseDoc(instance)
 ret = doc.validateDtd(ctxt, dtd)
 if ret != 1:
-    print "error doing DTD validation"
+    print("error doing DTD validation")
     sys.exit(1)
 
 doc.freeDoc()
@@ -30,7 +30,7 @@ del ctxt
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index e47c34d..0ba5a6d 100755 (executable)
@@ -25,10 +25,10 @@ doc = libxml2.parseFile("tst.xml")
 ctxt = doc.xpathNewContext()
 res = ctxt.xpathEval("//*")
 if len(res) != 2:
-    print "xpath query: wrong node set size"
+    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"
+    print("xpath query: wrong node set value")
     sys.exit(1)
 libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
 libxml2.registerXPathFunction(ctxt._o, "bar", None, bar)
@@ -36,28 +36,28 @@ i = 10000
 while i > 0:
     res = ctxt.xpathEval("foo(1)")
     if res != 2:
-        print "xpath extension failure"
+        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'"
+        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)
+    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"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 1222f9f..4b03b8e 100755 (executable)
@@ -11,7 +11,7 @@ class ErrorHandler:
 
     def handler(self, msg, data):
         if data != ARG:
-            raise Exception, "Error handler did not receive correct argument"
+            raise Exception("Error handler did not receive correct argument")
         self.errors.append(msg)
 
 
@@ -34,7 +34,7 @@ ctxt.setValidityErrorHandler(e.handler, e.handler, ARG)
 doc = libxml2.parseDoc(valid)
 ret = doc.validateDtd(ctxt, dtd)
 if ret != 1 or e.errors:
-    print "error doing DTD validation"
+    print("error doing DTD validation")
     sys.exit(1)
 doc.freeDoc()
 
@@ -42,7 +42,7 @@ doc.freeDoc()
 doc = libxml2.parseDoc(invalid)
 ret = doc.validateDtd(ctxt, dtd)
 if ret != 0 or not e.errors:
-    print "Error: document supposed to be invalid"
+    print("Error: document supposed to be invalid")
 doc.freeDoc()
 
 dtd.freeDtd()
@@ -52,8 +52,8 @@ del ctxt
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
 
index 7022efe..57f13a4 100755 (executable)
@@ -11,7 +11,7 @@ class ErrorHandler:
 
     def handler(self, msg, data):
         if data != ARG:
-            raise Exception, "Error handler did not receive correct argument"
+            raise Exception("Error handler did not receive correct argument")
         self.errors.append(msg)
 
 # Memory debug specific
@@ -49,7 +49,7 @@ ctxt.setValidityErrorHandler(e.handler, e.handler, ARG)
 doc = libxml2.parseDoc(valid)
 ret = doc.relaxNGValidateDoc(ctxt)
 if ret != 0 or e.errors:
-    print "error doing RelaxNG validation"
+    print("error doing RelaxNG validation")
     sys.exit(1)
 doc.freeDoc()
 
@@ -57,7 +57,7 @@ doc.freeDoc()
 doc = libxml2.parseDoc(invalid)
 ret = doc.relaxNGValidateDoc(ctxt)
 if ret == 0 or not e.errors:
-    print "Error: document supposed to be RelaxNG invalid"
+    print("Error: document supposed to be RelaxNG invalid")
     sys.exit(1)
 doc.freeDoc()
 
@@ -69,8 +69,8 @@ libxml2.relaxNGCleanupTypes()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
 
index d4d62b2..cc543f3 100755 (executable)
@@ -11,7 +11,7 @@ class ErrorHandler:
 
     def handler(self, msg, data):
         if data != ARG:
-            raise Exception, "Error handler did not receive correct argument"
+            raise Exception("Error handler did not receive correct argument")
         self.errors.append(msg)
 
 # Memory debug specific
@@ -56,7 +56,7 @@ ctxt_valid.setValidityErrorHandler(e.handler, e.handler, ARG)
 doc = libxml2.parseDoc(valid)
 ret = doc.schemaValidateDoc(ctxt_valid)
 if ret != 0 or e.errors:
-    print "error doing schema validation"
+    print("error doing schema validation")
     sys.exit(1)
 doc.freeDoc()
 
@@ -64,7 +64,7 @@ doc.freeDoc()
 doc = libxml2.parseDoc(invalid)
 ret = doc.schemaValidateDoc(ctxt_valid)
 if ret == 0 or not e.errors:
-    print "Error: document supposer to be schema invalid"
+    print("Error: document supposer to be schema invalid")
     sys.exit(1)
 doc.freeDoc()
 
@@ -76,8 +76,8 @@ libxml2.schemaCleanupTypes()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
 
index 0dc86f4..16c0386 100755 (executable)
@@ -12,14 +12,14 @@ doc = ctxt.doc()
 valid = ctxt.isValid()
 
 if doc.name != "valid.xml":
-    print "doc.name failed"
+    print("doc.name failed")
     sys.exit(1)
 root = doc.children
 if root.name != "doc":
-    print "root.name failed"
+    print("root.name failed")
     sys.exit(1)
 if valid != 1:
-    print "validity chec failed"
+    print("validity chec failed")
     sys.exit(1)
 doc.freeDoc()
 
@@ -32,7 +32,7 @@ while i > 0:
     valid = ctxt.isValid()
     doc.freeDoc()
     if valid != 1:
-        print "validity check failed"
+        print("validity check failed")
         sys.exit(1)
     i = i - 1
 
@@ -48,14 +48,14 @@ ctxt.parseDocument()
 doc = ctxt.doc()
 valid = ctxt.isValid()
 if doc.name != "invalid.xml":
-    print "doc.name failed"
+    print("doc.name failed")
     sys.exit(1)
 root = doc.children
 if root.name != "doc":
-    print "root.name failed"
+    print("root.name failed")
     sys.exit(1)
 if valid != 0:
-    print "validity chec failed"
+    print("validity chec failed")
     sys.exit(1)
 doc.freeDoc()
 
@@ -68,7 +68,7 @@ while i > 0:
     valid = ctxt.isValid()
     doc.freeDoc()
     if valid != 0:
-        print "validity check failed"
+        print("validity check failed")
         sys.exit(1)
     i = i - 1
 del ctxt
@@ -76,7 +76,7 @@ del ctxt
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 3b5a62a..47f0557 100755 (executable)
@@ -3,7 +3,6 @@
 # this tests the entities substitutions with the XmlTextReader interface
 #
 import sys
-import StringIO
 import libxml2
 
 # Memory debug specific
@@ -45,12 +44,12 @@ while ret == 1:
     ret = reader.Read()
 
 if ret != 0:
-    print "Error parsing the document test1"
+    print("Error parsing the document test1")
     sys.exit(1)
 
 if result != expect:
-    print "Unexpected result for test1"
-    print result
+    print("Unexpected result for test1")
+    print(result)
     sys.exit(1)
 
 doc.freeDoc()
@@ -85,12 +84,12 @@ while ret == 1:
     ret = reader.Read()
 
 if ret != 0:
-    print "Error parsing the document test2"
+    print("Error parsing the document test2")
     sys.exit(1)
 
 if result != expect:
-    print "Unexpected result for test2"
-    print result
+    print("Unexpected result for test2")
+    print(result)
     sys.exit(1)
 
 doc.freeDoc()
@@ -123,12 +122,12 @@ while ret == 1:
     ret = reader.Read()
 
 if ret != 0:
-    print "Error parsing the document test3"
+    print("Error parsing the document test3")
     sys.exit(1)
 
 if result != expect:
-    print "Unexpected result for test3"
-    print result
+    print("Unexpected result for test3")
+    print(result)
     sys.exit(1)
 
 #
@@ -139,7 +138,7 @@ del reader
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 2e036e1..72e6c9d 100755 (executable)
@@ -11,24 +11,24 @@ libxml2.debugMemory(1)
 
 doc = libxml2.parseFile("tst.xml")
 if doc.name != "tst.xml":
-    print "doc.name error"
+    print("doc.name error")
     sys.exit(1);
 
 ctxt = doc.xpathNewContext()
 res = ctxt.xpathEval("//*")
 if len(res) != 2:
-    print "xpath query: wrong node set size"
+    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"
+    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"
+    print("xpath query: wrong node set size")
     sys.exit(1)
 if res[0].name != "foo":
-    print "xpath query: wrong node set value"
+    print("xpath query: wrong node set value")
     sys.exit(1)
 doc.freeDoc()
 ctxt.xpathFreeContext()
@@ -45,7 +45,7 @@ del ctxt
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 4769626..b83d283 100755 (executable)
@@ -15,10 +15,10 @@ doc = libxml2.parseFile("tst.xml")
 ctxt = doc.xpathNewContext()
 res = ctxt.xpathEval("//*")
 if len(res) != 2:
-    print "xpath query: wrong node set size"
+    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"
+    print("xpath query: wrong node set value")
     sys.exit(1)
 
 libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
@@ -27,14 +27,14 @@ i = 10000
 while i > 0:
     res = ctxt.xpathEval("foo(1)")
     if res != 2:
-        print "xpath extension failure"
+        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'"
+        print("xpath extension failure got %s expecting '3'")
         sys.exit(1)
     i = i - 1
 doc.freeDoc()
@@ -43,7 +43,7 @@ ctxt.xpathFreeContext()
 # Memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
old mode 100644 (file)
new mode 100755 (executable)
index 39f49e3..33ab61c
@@ -42,24 +42,24 @@ badexprs = (
 for expr in badexprs:
        try:
                ctxt.xpathEval(expr)
-       except libxml2.xpathError, e:
+       except libxml2.xpathError:
                pass
        else:
-               print "Unexpectedly legal expression:", expr
+               print("Unexpectedly legal expression:", expr)
 ctxt.xpathFreeContext()
 doc.freeDoc()
 
 if err != expect:
-    print "error"
-    print "received %s" %(err)
-    print "expected %s" %(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"
+       print("OK")
 else:
-       print "Memory leak", leakedbytes, "bytes"
+       print("Memory leak", leakedbytes, "bytes")
        # drop file to .memdump file in cwd, but won't work if not compiled in
        libxml2.dumpMemory()
index e67e550..379535e 100755 (executable)
@@ -14,8 +14,8 @@ for n in d.xpathEval("//namespace::*"):
 d.freeDoc()
 
 if res != expect:
-    print "test5 failed: unexpected output"
-    print res
+    print("test5 failed: unexpected output")
+    print(res)
 del res
 del d
 del n
@@ -23,7 +23,7 @@ del n
 libxml2.cleanupParser()
 
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 2b5576a..11c8b32 100755 (executable)
@@ -27,21 +27,21 @@ 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"
+    print("Failed to return a nodeset")
     sys.exit(1)
 if len(res) != 1:
-    print "Unexpected nodeset size"
+    print("Unexpected nodeset size")
     sys.exit(1)
 node = res[0]
 if node.name != 'p':
-    print "Unexpected nodeset element result"
+    print("Unexpected nodeset element result")
     sys.exit(1)
 node = node.children
 if node.type != 'text':
-    print "Unexpected nodeset element children type"
+    print("Unexpected nodeset element children type")
     sys.exit(1)
 if node.content != 'hello':
-    print "Unexpected nodeset element children content"
+    print("Unexpected nodeset element children content")
     sys.exit(1)
 
 doc.freeDoc()
@@ -51,7 +51,7 @@ ctxt.xpathFreeContext()
 #memory debug specific
 libxml2.cleanupParser()
 if libxml2.debugMemory(1) == 0:
-    print "OK"
+    print("OK")
 else:
-    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+    print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
     libxml2.dumpMemory()
index 54b50de..31c909a 100644 (file)
@@ -9,6 +9,83 @@
 #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)
 {
@@ -17,7 +94,7 @@ libxml_intWrap(int val)
 #ifdef DEBUG
     printf("libxml_intWrap: val = %d\n", val);
 #endif
-    ret = PyInt_FromLong((long) val);
+    ret = PY_IMPORT_INT((long) val);
     return (ret);
 }
 
@@ -29,7 +106,7 @@ libxml_longWrap(long val)
 #ifdef DEBUG
     printf("libxml_longWrap: val = %ld\n", val);
 #endif
-    ret = PyInt_FromLong(val);
+    ret = PyLong_FromLong(val);
     return (ret);
 }
 
@@ -57,8 +134,7 @@ libxml_charPtrWrap(char *str)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    /* TODO: look at deallocation */
-    ret = PyString_FromString(str);
+    ret = PY_IMPORT_STRING(str);
     xmlFree(str);
     return (ret);
 }
@@ -75,8 +151,7 @@ libxml_charPtrConstWrap(const char *str)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    /* TODO: look at deallocation */
-    ret = PyString_FromString(str);
+    ret = PY_IMPORT_STRING(str);
     return (ret);
 }
 
@@ -92,8 +167,7 @@ libxml_xmlCharPtrWrap(xmlChar * str)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    /* TODO: look at deallocation */
-    ret = PyString_FromString((char *) str);
+    ret = PY_IMPORT_STRING((char *) str);
     xmlFree(str);
     return (ret);
 }
@@ -110,8 +184,7 @@ libxml_xmlCharPtrConstWrap(const xmlChar * str)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    /* TODO: look at deallocation */
-    ret = PyString_FromString((char *) str);
+    ret = PY_IMPORT_STRING((char *) str);
     return (ret);
 }
 
@@ -127,8 +200,7 @@ libxml_constcharPtrWrap(const char *str)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    /* TODO: look at deallocation */
-    ret = PyString_FromString(str);
+    ret = PY_IMPORT_STRING(str);
     return (ret);
 }
 
@@ -144,8 +216,7 @@ libxml_constxmlCharPtrWrap(const xmlChar * str)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    /* TODO: look at deallocation */
-    ret = PyString_FromString((char *) str);
+    ret = PY_IMPORT_STRING((char *) str);
     return (ret);
 }
 
@@ -162,9 +233,7 @@ libxml_xmlDocPtrWrap(xmlDocPtr doc)
         return (Py_None);
     }
     /* TODO: look at deallocation */
-    ret =
-        PyCObject_FromVoidPtrAndDesc((void *) doc, (char *) "xmlDocPtr",
-                                     NULL);
+    ret = PyCapsule_New((void *) doc, (char *) "xmlDocPtr", NULL);
     return (ret);
 }
 
@@ -180,9 +249,7 @@ libxml_xmlNodePtrWrap(xmlNodePtr node)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    ret =
-        PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "xmlNodePtr",
-                                     NULL);
+    ret = PyCapsule_New((void *) node, (char *) "xmlNodePtr", NULL);
     return (ret);
 }
 
@@ -198,9 +265,7 @@ libxml_xmlURIPtrWrap(xmlURIPtr uri)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    ret =
-        PyCObject_FromVoidPtrAndDesc((void *) uri, (char *) "xmlURIPtr",
-                                     NULL);
+    ret = PyCapsule_New((void *) uri, (char *) "xmlURIPtr", NULL);
     return (ret);
 }
 
@@ -216,9 +281,7 @@ libxml_xmlNsPtrWrap(xmlNsPtr ns)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    ret =
-        PyCObject_FromVoidPtrAndDesc((void *) ns, (char *) "xmlNsPtr",
-                                     NULL);
+    ret = PyCapsule_New((void *) ns, (char *) "xmlNsPtr", NULL);
     return (ret);
 }
 
@@ -234,9 +297,7 @@ libxml_xmlAttrPtrWrap(xmlAttrPtr attr)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    ret =
-        PyCObject_FromVoidPtrAndDesc((void *) attr, (char *) "xmlAttrPtr",
-                                     NULL);
+    ret = PyCapsule_New((void *) attr, (char *) "xmlAttrPtr", NULL);
     return (ret);
 }
 
@@ -252,9 +313,7 @@ libxml_xmlAttributePtrWrap(xmlAttributePtr attr)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    ret =
-        PyCObject_FromVoidPtrAndDesc((void *) attr,
-                                     (char *) "xmlAttributePtr", NULL);
+    ret = PyCapsule_New((void *) attr, (char *) "xmlAttributePtr", NULL);
     return (ret);
 }
 
@@ -270,9 +329,7 @@ libxml_xmlElementPtrWrap(xmlElementPtr elem)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    ret =
-        PyCObject_FromVoidPtrAndDesc((void *) elem,
-                                     (char *) "xmlElementPtr", NULL);
+    ret = PyCapsule_New((void *) elem, (char *) "xmlElementPtr", NULL);
     return (ret);
 }
 
@@ -288,9 +345,7 @@ libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    ret =
-        PyCObject_FromVoidPtrAndDesc((void *) ctxt,
-                                     (char *) "xmlXPathContextPtr", NULL);
+    ret = PyCapsule_New((void *) ctxt, (char *) "xmlXPathContextPtr", NULL);
     return (ret);
 }
 
@@ -306,9 +361,7 @@ libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    ret = PyCObject_FromVoidPtrAndDesc((void *) ctxt,
-                                       (char *) "xmlXPathParserContextPtr",
-                                       NULL);
+    ret = PyCapsule_New((void *)ctxt, (char *)"xmlXPathParserContextPtr", NULL);
     return (ret);
 }
 
@@ -325,28 +378,35 @@ libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt)
         return (Py_None);
     }
 
-    ret =
-        PyCObject_FromVoidPtrAndDesc((void *) ctxt,
-                                     (char *) "xmlParserCtxtPtr", NULL);
+    ret = PyCapsule_New((void *) ctxt, (char *) "xmlParserCtxtPtr", NULL);
     return (ret);
 }
 
 /**
  * libxml_xmlXPathDestructNsNode:
- * cobj: xmlNsPtr namespace node
- * desc: ignored string
+ * 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(void *cobj, void *desc ATTRIBUTE_UNUSED) {
+libxml_xmlXPathDestructNsNode(PyObject *cap)
+#endif
+{
 #ifdef DEBUG
-    fprintf(stderr, "libxml_xmlXPathDestructNsNode called %p\n", cobj);
+    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
-    xmlXPathNodeSetFreeNs((xmlNsPtr) cobj);
 }
 
 PyObject *
@@ -400,8 +460,7 @@ libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
                 for (i = 0; i < obj->nodesetval->nodeNr; i++) {
                     node = obj->nodesetval->nodeTab[i];
                     if (node->type == XML_NAMESPACE_DECL) {
-                       PyObject *ns = 
-                           PyCObject_FromVoidPtrAndDesc((void *) node,
+                       PyObject *ns = PyCapsule_New((void *) node,
                                      (char *) "xmlNsPtr",
                                     libxml_xmlXPathDestructNsNode);
                        PyList_SetItem(ret, i, ns);
@@ -414,13 +473,13 @@ libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
             }
             break;
         case XPATH_BOOLEAN:
-            ret = PyInt_FromLong((long) obj->boolval);
+            ret = PY_IMPORT_INT((long) obj->boolval);
             break;
         case XPATH_NUMBER:
             ret = PyFloat_FromDouble(obj->floatval);
             break;
         case XPATH_STRING:
-            ret = PyString_FromString((char *) obj->stringval);
+           ret = PY_IMPORT_STRING((char *) obj->stringval);
             break;
         case XPATH_POINT:
         {
@@ -429,7 +488,7 @@ libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
             PyObject *tuple;
 
             node = libxml_xmlNodePtrWrap(obj->user);
-            indexIntoNode = PyInt_FromLong((long) obj->index);
+            indexIntoNode = PY_IMPORT_INT((long) obj->index);
 
             tuple = PyTuple_New(2);
             PyTuple_SetItem(tuple, 0, node);
@@ -453,7 +512,7 @@ libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
                 list = PyList_New(1);
 
                 node = libxml_xmlNodePtrWrap(obj->user);
-                indexIntoNode = PyInt_FromLong((long) obj->index);
+                indexIntoNode = PY_IMPORT_INT((long) obj->index);
 
                 tuple = PyTuple_New(2);
                 PyTuple_SetItem(tuple, 0, node);
@@ -471,7 +530,7 @@ libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
                 list = PyList_New(2);
 
                 node = libxml_xmlNodePtrWrap(obj->user);
-                indexIntoNode = PyInt_FromLong((long) obj->index);
+                indexIntoNode = PY_IMPORT_INT((long) obj->index);
 
                 tuple = PyTuple_New(2);
                 PyTuple_SetItem(tuple, 0, node);
@@ -480,7 +539,7 @@ libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
                 PyList_SetItem(list, 0, tuple);
 
                 node = libxml_xmlNodePtrWrap(obj->user2);
-                indexIntoNode = PyInt_FromLong((long) obj->index2);
+                indexIntoNode = PY_IMPORT_INT((long) obj->index2);
 
                 tuple = PyTuple_New(2);
                 PyTuple_SetItem(tuple, 0, node);
@@ -545,14 +604,14 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj)
     if (obj == NULL) {
         return (NULL);
     }
-    if PyFloat_Check
-        (obj) {
+    if PyFloat_Check (obj) {
         ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
-
-    } else if PyInt_Check(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) {
 
@@ -563,15 +622,37 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj)
           ret = xmlXPathNewBoolean(0);
         }
 #endif
-    } else if PyString_Check
-        (obj) {
+    } else if PyBytes_Check (obj) {
         xmlChar *str;
 
-        str = xmlStrndup((const xmlChar *) PyString_AS_STRING(obj),
-                         PyString_GET_SIZE(obj));
+        str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj),
+                         PyBytes_GET_SIZE(obj));
         ret = xmlXPathWrapString(str);
-    } else if PyList_Check
-        (obj) {
+#ifdef PyUnicode_Check
+    } else if PyUnicode_Check (obj) {
+#if PY_VERSION_HEX >= 0x03030000
+        xmlChar *str;
+       const char *tmp;
+       size_t size;
+
+       /* tmp doesn't need to be deallocated */
+        tmp = PyUnicode_AsUTF8AndSize(obj, &size);
+        str = xmlStrndup(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;
@@ -585,28 +666,18 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj)
                 continue;
 
             cur = NULL;
-            if (PyCObject_Check(node)) {
+            if (PyCapsule_CheckExact(node)) {
 #ifdef DEBUG
-                printf("Got a CObject\n");
+                printf("Got a Capsule\n");
 #endif
                 cur = PyxmlNode_Get(node);
-            } else if (PyInstance_Check(node)) {
-                PyInstanceObject *inst = (PyInstanceObject *) node;
-                PyObject *name = inst->in_class->cl_name;
-
-                if PyString_Check
-                    (name) {
-                    char *type = PyString_AS_STRING(name);
-                    PyObject *wrapper;
-
-                    if (!strcmp(type, "xmlNode")) {
-                        wrapper =
-                            PyObject_GetAttrString(node, (char *) "_o");
-                        if (wrapper != NULL) {
-                            cur = PyxmlNode_Get(wrapper);
-                        }
-                    }
-                    }
+            } 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");
@@ -622,7 +693,6 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj)
         printf("Unable to convert Python Object to XPath");
 #endif
     }
-    Py_DECREF(obj);
     return (ret);
 }
 
@@ -630,7 +700,7 @@ PyObject *
 libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid)
 {
        PyObject *ret;
-       
+
 #ifdef DEBUG
        printf("libxml_xmlValidCtxtPtrWrap: valid = %p\n", valid);
 #endif
@@ -640,7 +710,7 @@ libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid)
        }
 
        ret = 
-               PyCObject_FromVoidPtrAndDesc((void *) valid,
+               PyCapsule_New((void *) valid,
                                                                         (char *) "xmlValidCtxtPtr", NULL);
 
        return (ret);
@@ -659,7 +729,7 @@ libxml_xmlCatalogPtrWrap(xmlCatalogPtr catal)
         return (Py_None);
     }
     ret =
-        PyCObject_FromVoidPtrAndDesc((void *) catal,
+        PyCapsule_New((void *) catal,
                                      (char *) "xmlCatalogPtr", NULL);
     return (ret);
 }
@@ -677,7 +747,7 @@ libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer)
         return (Py_None);
     }
     ret =
-        PyCObject_FromVoidPtrAndDesc((void *) buffer,
+        PyCapsule_New((void *) buffer,
                                      (char *) "xmlOutputBufferPtr", NULL);
     return (ret);
 }
@@ -695,7 +765,7 @@ libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer)
         return (Py_None);
     }
     ret =
-        PyCObject_FromVoidPtrAndDesc((void *) buffer,
+        PyCapsule_New((void *) buffer,
                                      (char *) "xmlParserInputBufferPtr", NULL);
     return (ret);
 }
@@ -714,7 +784,7 @@ libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp)
         return (Py_None);
     }
     ret =
-        PyCObject_FromVoidPtrAndDesc((void *) regexp,
+        PyCapsule_New((void *) regexp,
                                      (char *) "xmlRegexpPtr", NULL);
     return (ret);
 }
@@ -734,7 +804,7 @@ libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader)
         return (Py_None);
     }
     ret =
-        PyCObject_FromVoidPtrAndDesc((void *) reader,
+        PyCapsule_New((void *) reader,
                                      (char *) "xmlTextReaderPtr", NULL);
     return (ret);
 }
@@ -752,7 +822,7 @@ libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator)
         return (Py_None);
     }
     ret =
-        PyCObject_FromVoidPtrAndDesc((void *) locator,
+        PyCapsule_New((void *) locator,
                                      (char *) "xmlTextReaderLocatorPtr", NULL);
     return (ret);
 }
@@ -772,7 +842,7 @@ libxml_xmlRelaxNGPtrWrap(xmlRelaxNGPtr ctxt)
         return (Py_None);
     }
     ret =
-        PyCObject_FromVoidPtrAndDesc((void *) ctxt,
+        PyCapsule_New((void *) ctxt,
                                      (char *) "xmlRelaxNGPtr", NULL);
     return (ret);
 }
@@ -790,7 +860,7 @@ libxml_xmlRelaxNGParserCtxtPtrWrap(xmlRelaxNGParserCtxtPtr ctxt)
         return (Py_None);
     }
     ret =
-        PyCObject_FromVoidPtrAndDesc((void *) ctxt,
+        PyCapsule_New((void *) ctxt,
                                      (char *) "xmlRelaxNGParserCtxtPtr", NULL);
     return (ret);
 }
@@ -807,7 +877,7 @@ libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid)
         return (Py_None);
     }
     ret =
-        PyCObject_FromVoidPtrAndDesc((void *) valid,
+        PyCapsule_New((void *) valid,
                                      (char *) "xmlRelaxNGValidCtxtPtr", NULL);
     return (ret);
 }
@@ -825,7 +895,7 @@ libxml_xmlSchemaPtrWrap(xmlSchemaPtr ctxt)
                return (Py_None);
        }
        ret =
-               PyCObject_FromVoidPtrAndDesc((void *) ctxt,
+               PyCapsule_New((void *) ctxt,
                                                                         (char *) "xmlSchemaPtr", NULL);
        return (ret);
 }
@@ -843,7 +913,7 @@ libxml_xmlSchemaParserCtxtPtrWrap(xmlSchemaParserCtxtPtr ctxt)
                return (Py_None);
        }
        ret = 
-               PyCObject_FromVoidPtrAndDesc((void *) ctxt,
+               PyCapsule_New((void *) ctxt,
                                                                         (char *) "xmlSchemaParserCtxtPtr", NULL);
 
        return (ret);
@@ -863,7 +933,7 @@ libxml_xmlSchemaValidCtxtPtrWrap(xmlSchemaValidCtxtPtr valid)
        }
 
        ret = 
-               PyCObject_FromVoidPtrAndDesc((void *) valid,
+               PyCapsule_New((void *) valid,
                                                                         (char *) "xmlSchemaValidCtxtPtr", NULL);
 
        return (ret);
@@ -882,8 +952,6 @@ libxml_xmlErrorPtrWrap(xmlErrorPtr error)
         Py_INCREF(Py_None);
         return (Py_None);
     }
-    ret =
-        PyCObject_FromVoidPtrAndDesc((void *) error,
-                                     (char *) "xmlErrorPtr", NULL);
+    ret = PyCapsule_New((void *) error, (char *) "xmlErrorPtr", NULL);
     return (ret);
 }
index 18f6a0b..370e314 100644 (file)
--- a/relaxng.c
+++ b/relaxng.c
 static const xmlChar *xmlRelaxNGNs = (const xmlChar *)
     "http://relaxng.org/ns/structure/1.0";
 
-#define IS_RELAXNG(node, type)                                         \
+#define IS_RELAXNG(node, typ                                         \
    ((node != NULL) && (node->ns != NULL) &&                            \
-    (xmlStrEqual(node->name, (const xmlChar *) type)) &&               \
+    (node->type == XML_ELEMENT_NODE) &&                                        \
+    (xmlStrEqual(node->name, (const xmlChar *) typ)) &&                \
     (xmlStrEqual(node->ns->href, xmlRelaxNGNs)))
 
 
@@ -60,7 +61,7 @@ static const xmlChar *xmlRelaxNGNs = (const xmlChar *)
 
 #define DEBUG_LIST 1
 
-#define DEBUG_INCLUDE 1 
+#define DEBUG_INCLUDE 1
 
 #define DEBUG_ERROR 1
 
@@ -71,7 +72,7 @@ static const xmlChar *xmlRelaxNGNs = (const xmlChar *)
 
 #define MAX_ERROR 5
 
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
@@ -421,7 +422,7 @@ struct _xmlRelaxNGDocument {
 
 /************************************************************************
  *                                                                     *
- *             Some factorized error routines                          *
+ *             Some factorized error routines                          *
  *                                                                     *
  ************************************************************************/
 
@@ -564,9 +565,9 @@ xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error,
 }
 
 /************************************************************************
- *                                                                     *
- *             Preliminary type checking interfaces                    *
- *                                                                     *
+ *                                                                     *
+ *             Preliminary type checking interfaces                    *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -654,9 +655,9 @@ struct _xmlRelaxNGTypeLibrary {
 };
 
 /************************************************************************
- *                                                                     *
- *                     Allocation functions                            *
- *                                                                     *
+ *                                                                     *
+ *                     Allocation functions                            *
+ *                                                                     *
  ************************************************************************/
 static void xmlRelaxNGFreeGrammar(xmlRelaxNGGrammarPtr grammar);
 static void xmlRelaxNGFreeDefine(xmlRelaxNGDefinePtr define);
@@ -1397,9 +1398,9 @@ xmlRelaxNGFreeValidState(xmlRelaxNGValidCtxtPtr ctxt,
 }
 
 /************************************************************************
- *                                                                     *
- *                     Semi internal functions                         *
- *                                                                     *
+ *                                                                     *
+ *                     Semi internal functions                         *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -1429,9 +1430,9 @@ xmlRelaxParserSetFlag(xmlRelaxNGParserCtxtPtr ctxt, int flags)
 }
 
 /************************************************************************
- *                                                                     *
- *                     Document functions                              *
- *                                                                     *
+ *                                                                     *
+ *                     Document functions                              *
+ *                                                                     *
  ************************************************************************/
 static xmlDocPtr xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt,
                                       xmlDocPtr doc);
@@ -2007,9 +2008,9 @@ xmlRelaxNGLoadExternalRef(xmlRelaxNGParserCtxtPtr ctxt,
 }
 
 /************************************************************************
- *                                                                     *
- *                     Error functions                                 *
- *                                                                     *
+ *                                                                     *
+ *                     Error functions                                 *
+ *                                                                     *
  ************************************************************************/
 
 #define VALID_ERR(a) xmlRelaxNGAddValidError(ctxt, a, NULL, NULL, 0);
@@ -2360,7 +2361,7 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt,
      * generate the error directly
      */
     if (((ctxt->flags & FLAGS_IGNORABLE) == 0) ||
-        (ctxt->flags & FLAGS_NEGATIVE)) {
+        (ctxt->flags & FLAGS_NEGATIVE)) {
         xmlNodePtr node, seq;
 
         /*
@@ -2390,9 +2391,9 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt,
 
 
 /************************************************************************
- *                                                                     *
- *                     Type library hooks                              *
- *                                                                     *
+ *                                                                     *
+ *                     Type library hooks                              *
+ *                                                                     *
  ************************************************************************/
 static xmlChar *xmlRelaxNGNormalize(xmlRelaxNGValidCtxtPtr ctxt,
                                     const xmlChar * str);
@@ -2847,12 +2848,12 @@ xmlRelaxNGCleanupTypes(void)
 }
 
 /************************************************************************
- *                                                                     *
- *             Compiling element content into regexp                   *
- *                                                                     *
+ *                                                                     *
+ *             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 */
@@ -3325,9 +3326,9 @@ xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def)
 }
 
 /************************************************************************
- *                                                                     *
- *                     Parsing functions                               *
- *                                                                     *
+ *                                                                     *
+ *                     Parsing functions                               *
+ *                                                                     *
  ************************************************************************/
 
 static xmlRelaxNGDefinePtr xmlRelaxNGParseAttribute(xmlRelaxNGParserCtxtPtr
@@ -6705,9 +6706,9 @@ xmlRelaxNGParseDocument(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
 }
 
 /************************************************************************
- *                                                                     *
- *                     Reading RelaxNGs                                *
- *                                                                     *
+ *                                                                     *
+ *                     Reading RelaxNGs                                *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -7521,7 +7522,7 @@ xmlRelaxNGParse(xmlRelaxNGParserCtxtPtr ctxt)
         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);
@@ -7663,9 +7664,9 @@ xmlRelaxNGSetParserStructuredErrors(xmlRelaxNGParserCtxtPtr ctxt,
 #ifdef LIBXML_OUTPUT_ENABLED
 
 /************************************************************************
- *                                                                     *
- *                     Dump back a compiled form                       *
- *                                                                     *
+ *                                                                     *
+ *                     Dump back a compiled form                       *
+ *                                                                     *
  ************************************************************************/
 static void xmlRelaxNGDumpDefine(FILE * output,
                                  xmlRelaxNGDefinePtr define);
@@ -7806,7 +7807,7 @@ xmlRelaxNGDumpDefine(FILE * output, xmlRelaxNGDefinePtr define)
  * xmlRelaxNGDumpGrammar:
  * @output:  the file output
  * @grammar:  a grammar structure
- * @top:  is this a top grammar 
+ * @top:  is this a top grammar
  *
  * Dump a RelaxNG structure back
  */
@@ -7899,9 +7900,9 @@ xmlRelaxNGDumpTree(FILE * output, xmlRelaxNGPtr schema)
 #endif /* LIBXML_OUTPUT_ENABLED */
 
 /************************************************************************
- *                                                                     *
- *             Validation of compiled content                          *
- *                                                                     *
+ *                                                                     *
+ *             Validation of compiled content                          *
+ *                                                                     *
  ************************************************************************/
 static int xmlRelaxNGValidateDefinition(xmlRelaxNGValidCtxtPtr ctxt,
                                         xmlRelaxNGDefinePtr define);
@@ -8044,9 +8045,9 @@ xmlRelaxNGValidateCompiledContent(xmlRelaxNGValidCtxtPtr ctxt,
 }
 
 /************************************************************************
- *                                                                     *
- *             Progressive validation of when possible                 *
- *                                                                     *
+ *                                                                     *
+ *             Progressive validation of when possible                 *
+ *                                                                     *
  ************************************************************************/
 static int xmlRelaxNGValidateAttributeList(xmlRelaxNGValidCtxtPtr ctxt,
                                            xmlRelaxNGDefinePtr defines);
@@ -8346,7 +8347,7 @@ xmlRelaxNGValidatePushElement(xmlRelaxNGValidCtxtPtr ctxt,
  * xmlRelaxNGValidatePushCData:
  * @ctxt:  the RelaxNG validation context
  * @data:  some character data read
- * @len:  the lenght of the data
+ * @len:  the length of the data
  *
  * check the CData parsed for validation in the current stack
  *
@@ -8480,9 +8481,9 @@ xmlRelaxNGValidateFullElement(xmlRelaxNGValidCtxtPtr ctxt,
 }
 
 /************************************************************************
- *                                                                     *
- *             Generic interpreted validation implementation           *
- *                                                                     *
+ *                                                                     *
+ *             Generic interpreted validation implementation           *
+ *                                                                     *
  ************************************************************************/
 static int xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt,
                                    xmlRelaxNGDefinePtr define);
@@ -10842,9 +10843,9 @@ xmlRelaxNGCleanPSVI(xmlNodePtr node) {
     return;
 }
 /************************************************************************
- *                                                                     *
- *                     Validation interfaces                           *
- *                                                                     *
+ *                                                                     *
+ *                     Validation interfaces                           *
+ *                                                                     *
  ************************************************************************/
 
 /**
index acdad7c..f4902af 100644 (file)
@@ -1,5 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html><head><style>
+<html>
+<head>
+<style>
 .......
 ...............................................................
 ...............................................................
@@ -63,4 +65,6 @@
 ...............................................................
 ...............................................................
 ...............................................................
-</style></head></html>
+</style>
+</head>
+</html>
index 929ed8a..8489033 100644 (file)
@@ -1,6 +1,9 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html>
-<head><title>This service is temporary down</title></head>
+<head>
+  <title>This service is temporary down</title>
+</head>
+
 <body bgcolor="#FFFFFF">
 <h1 align="center">Sorry, this service is temporary down</h1>
 We are doing our best to get it back on-line,
index 0433f48..f7feaa6 100644 (file)
@@ -1,4 +1,6 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html><body bgcolor="#FFFFFF">\r
-                <a href="mailto:katherine@cbfanc.org,website@bis.doc.gov?subject=South%20San%20Francisco%20BIS%20Seminar%20-%20October%2016th"></a><br>
-</body></html>
+<html>\r
+<body bgcolor="#FFFFFF">\r
+                <a href="mailto:katherine@cbfanc.org,website@bis.doc.gov?subject=South%20San%20Francisco%20BIS%20Seminar%20-%20October%2016th"></a><br>\r
+</body>\r
+</html>
index 1a54517..cacf4ed 100644 (file)
@@ -1,2 +1,4 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html><body><hr></body></html>
+<html><body>
+<hr>
+</body></html>
index b3e6b41..e2261ea 100644 (file)
@@ -1,16 +1,24 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
 <html>
-<head><title>gnome-xml push mode bug</title></head>
+<head>
+<title>gnome-xml push mode bug</title>
+</head>
 <body>
 
-<table border="4"><tr>
-<td bgcolor="white">
+<table border="4">
+  <tr>
+    <td bgcolor="white">
        Foo1
-       <table border="4"><tr><td>Foo2<p></p>
+       <table border="4">
+         <tr>
+           <td>Foo2<p></p>
 <p></p>
-</td></tr></table>
 </td>
+</tr>
+</table>
+    </td>
     <td bgcolor="blue">Foo3</td>
-   </tr></table>
-</body>
+   </tr>
+  </table>
+  </body>
 </html>
index 2c7e230..4f959e9 100644 (file)
@@ -7,7 +7,9 @@
           function NS_NullWindow(){this.window;}
           function NS_NewOpen(url,nam,atr){return(new NS_NullWindow());}
           window.open=NS_NewOpen;
-</script><!-- END Naviscope Javascript --><!-- saved from url=(0027)http://www.agents-tech.com/ --><meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+</script>
+<!-- END Naviscope Javascript --><!-- saved from url=(0027)http://www.agents-tech.com/ -->
+<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
 <meta content="Copernic.com Inc. develops innovative agent technology solutions to efficiently access and manage the overwhelming quantity of information available on the Internet and intranets." name="DESCRIPTION">
 <meta content="agent,technology,intranet,extranet,management,filtering,ranking,solution,service,intelligent,intelligence,client,server,architecture,developer,development,information,telecommunication,announcement,press,product,profile,contact,multi-agent,meta-search,metasearch,multi-thread,mobile,wireless,shopping,robot,PCS,Copernic,engine,toolkit,CDK,EDK" name="KEYWORDS">
 <meta content="MSHTML 5.00.3103.1000" name="GENERATOR">
index e66e256..e9d5e44 100644 (file)
@@ -1,21 +1,24 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <!-- saved from url=(0025)http://bp6.gamesquad.net/ --><!-- BEGIN Naviscope Javascript --><html>
 <head>
-<title>BP6.com #1 online resource for the BP6 Mobo....</title>
+<title>BP6.com #1 online resource for the BP6 Mobo....</title>\r
 <script language="javascript">\r
           NS_ActualOpen=window.open;\r
           function NS_NullWindow(){this.window;}\r
           function NS_NewOpen(url,nam,atr){return(new NS_NullWindow());}\r
           window.open=NS_NewOpen;\r
-</script><!-- END Naviscope Javascript --><!--last modified on Tuesday, February 22, 2000 11:47 PM --><meta content="text/html;CHARSET=iso-8859-1" http-equiv="Content-Type">
-<meta content="Tim" name="Author">
+</script>\r
+<!-- END Naviscope Javascript --><!--last modified on Tuesday, February 22, 2000 11:47 PM -->\r
+<meta content="text/html;CHARSET=iso-8859-1" http-equiv="Content-Type">\r
+<meta content="Tim" name="Author">\r
 <style type="text/css">A.nav {\r
        COLOR: #003399; TEXT-DECORATION: none\r
 }\r
 A.nav:hover {\r
        COLOR: #3366cc; TEXT-DECORATION: underline\r
 }\r
-</style>
+</style>\r
+\r
 <script language="JavaScript">
 <!-- Idea by:  Nic Wolfe (Nic@TimelapseProductions.com) -->
 <!-- Web URL:  http://fineline.xs.mw -->
@@ -30,33 +33,46 @@ id = day.getTime();
 eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width=145, height=250');");
 }
 // End -->
-</script><meta content="MSHTML 5.00.3103.1000" name="GENERATOR">
-</head>
+</script>\r
+\r
+<meta content="MSHTML 5.00.3103.1000" name="GENERATOR">
+</head>\r
 <body alink="red" bgcolor="black" link="red" text="white" vlink="red">\r
 <p>\r
 </p>
 <div align="center">\r
-<table border="0" cellpadding="0" cellspacing="0" width="80%"><tbody>
-<tr>
-<td valign="top" width="31"><a href="http://bp6.gamesquad.net/"><img align="bottom" border="0" height="74" src="doc3_files/logo.gif" width="252"></a></td>\r
+<table border="0" cellpadding="0" cellspacing="0" width="80%">\r
+  <tbody>\r
+  <tr>\r
+    <td valign="top" width="31"><a href="http://bp6.gamesquad.net/"><img align="bottom" border="0" height="74" src="doc3_files/logo.gif" width="252"></a></td>\r
     <td align="left" bgcolor="#000000">
-<img height="15" src="doc3_files/spacer.gif" width="15"><!-- START GAMESQUAD.NET IFRAME RICH MEDIA CODE --><!-- © 2000 GameSquad.net All Rights Reserved. --><iframe border="0" frameborder="no" height="60" marginheight="0" marginwidth="0" scrolling="no" src="doc3_files/adcycle.htm" width="468">
+<img height="15" src="doc3_files/spacer.gif" width="15"><!-- START GAMESQUAD.NET IFRAME RICH MEDIA CODE --> <!-- © 2000 GameSquad.net All Rights Reserved. --><iframe border="0" frameborder="no" height="60" marginheight="0" marginwidth="0" scrolling="no" src="doc3_files/adcycle.htm" width="468">
 <a href="http://ads.gamesquad.net/addclick.exe/adclick.cgi?REGION=game%7Ctech%7Cent&amp;id=1" target="_top"><img src="http://ads.gamesquad.net/addclick.exe/adcycle.cgi?group=52&amp;media=1&amp;id=1" width="468" height="60" border="0" alt="GSN ROS Ad"></a>
-</iframe><!-- END GAMESQUAD.NET IFRAME RICH MEDIA CODE --><br><img height="15" src="doc3_files/spacer.gif" width="400">
-</td>
-</tr>
-<tr><td bgcolor="#003399" colspan="2">\r
+</iframe><!-- END GAMESQUAD.NET IFRAME RICH MEDIA CODE --><br><img height="15" src="doc3_files/spacer.gif" width="400"> </td>
+</tr>\r
+  <tr>\r
+    <td bgcolor="#003399" colspan="2">\r
       <p align="right"><img align="right" border="0" height="18" hspace="0" src="doc3_files/trcorner.gif" width="20"><img align="left" border="0" height="18" hspace="0" src="doc3_files/tlcorner.gif" width="20"><font face="Verdana" size="2">Monday, July 31st, 2000</font> </p>
-</td></tr>
-<tr><td colspan="2">\r
-      <table bgcolor="#003399" border="0" cellpadding="0" cellspacing="4" width="100%"><tbody><tr><td bgcolor="#666666" width="100%">\r
+</td>
+</tr>\r
+  <tr>\r
+    <td colspan="2">\r
+      <table bgcolor="#003399" border="0" cellpadding="0" cellspacing="4" width="100%"><tbody>\r
+        <tr>\r
+          <td bgcolor="#666666" width="100%">\r
             <center>\r
             <p>\r
             </p>
-<table bgcolor="black" border="0" cellpadding="0" cellspacing="1" width="100%"><tbody><tr><td background="doc3_files/hscan.gif" bgcolor="#666666" width="100%">
-<img height="1" src="doc3_files/spacer.gif" width="738"><br><center>\r
-                  <table border="0" cellpadding="2" cellspacing="0" width="91%"><tbody><tr>
-<td valign="top" width="15%">\r
+<table bgcolor="black" border="0" cellpadding="0" cellspacing="1" width="100%">\r
+              <tbody>\r
+              <tr>\r
+                <td background="doc3_files/hscan.gif" bgcolor="#666666" width="100%">
+<img height="1" src="doc3_files/spacer.gif" width="738"><br>\r
+                  <center>\r
+                  <table border="0" cellpadding="2" cellspacing="0" width="91%">\r
+                    <tbody>\r
+                    <tr>\r
+                      <td valign="top" width="15%">\r
                         <p align="center"><a href="http://bp6.gamesquad.net/specs.phtml"><img align="bottom" alt="Abit BP6 Motherboard specification and information." border="0" height="45" src="doc3_files/bp6icon.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/specs.phtml"><font color="white" face="Verdana" size="1">BP6 Specs</font></a> \r
                       </p>
 </td>\r
@@ -84,35 +100,63 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
                         <p align="center"><a href="http://www.gentus.com/"><img align="bottom" alt="Taking a first look at the Abit Linux release called " border="0" height="45" src="doc3_files/gentusbox.gif" width="70" gentus></a><br><a href="http://www.gentus.com/"><font color="white" face="Verdana" size="1">Gentus</font></a> \r
                   </p>
 </td>
-</tr></tbody></table>
+</tr>
+</tbody>
+</table>
 </center>
-</td></tr></tbody></table>
+</td>
+</tr>
+</tbody>
+</table>
 </center>
-</td></tr></tbody></table>
-</td></tr>
+</td>
+</tr>
 </tbody></table>
-<table bgcolor="#003399" border="0" cellspacing="6" width="80%"><tbody><tr>
-<td bgcolor="black" valign="top" width="10%">\r
-      <table border="0" cellpadding="3" cellspacing="0" width="100%"><tbody><tr><td width="100%">
-<img height="1" src="doc3_files/spacer.gif" width="111"><br><b><font color="yellow" face="Verdana" size="2">REVIEWS</font></b><font face="Verdana" size="2"><br><hr align="center"></font><a href="http://bp6.gamesquad.net/bp6reviews.phtml"><font color="white" face="Verdana" size="1">BP6 Reviews</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/h2o.phtml"><font color="white" face="Verdana" size="1">BP6 Watercooling</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/bxcool.phtml"><font color="white" face="Verdana" size="1">BX Chipset Cooling</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/benchmark.phtml"><font color="white" face="Verdana" size="1">Benchmarks</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/bp6fsb.phtml"><font color="white" face="Verdana" size="1">BP6FSB Utility</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/powerleap.phtml"><font color="white" face="Verdana" size="1">PowerLeap NEO S370</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/seti.phtml"><font color="white" face="Verdana" size="1">SETI on the BP6</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/orbs.phtml"><font color="white" face="Verdana" size="1">Golden Orbs I</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/orbs/orbs2.phtml"><font color="white" face="Verdana" size="1">Golden Orbs II</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/Q6fix.phtml"><font color="white" face="Verdana" size="1">VTT Solution</font></a><font face="Verdana" size="1"><br><br></font><b><font color="yellow" face="Verdana" size="2">NAVIGATE</font></b><font color="yellow" face="Verdana" size="2"> \r
-            <hr align="center"></font><a href="http://www.bp6.com/"><font color="white" face="Verdana" size="1">News</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/chat.phtml"><font color="white" face="Verdana" size="1">Online Text Chat</font></a><font face="Verdana" size="1"><br></font><a href="javascript:popUp('chat_popup.htm')"><font color="white" face="Verdana" size="1">Voice Chat</font></a><br><a href="http://216.247.220.192/Forum"><font color="white" face="Verdana" size="1">Messageboard</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/cooling"><font color="white" face="Verdana" size="1">Temp. Converter</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">Picture Gallery</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/bios.phtml"><font color="white" face="Verdana" size="1">Latest BIOS</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/files/"><font color="white" face="Verdana" size="1">Drivers &amp; Files</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">UGM of the week</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/contest.phtml"><font color="white" face="Verdana" size="1">BP6 Contest</font></a><font face="Verdana" size="1"><br><br></font><b><font color="yellow" face="Verdana" size="2">OTHER STUFF</font></b><font color="yellow" face="Verdana" size="2"> \r
+</td>
+</tr>
+</tbody>
+</table>\r
+<table bgcolor="#003399" border="0" cellspacing="6" width="80%">\r
+  <tbody>\r
+  <tr>\r
+    <td bgcolor="black" valign="top" width="10%">\r
+      <table border="0" cellpadding="3" cellspacing="0" width="100%">\r
+        <tbody>\r
+        <tr>\r
+          <td width="100%">
+<img height="1" src="doc3_files/spacer.gif" width="111"><br><b><font color="yellow" face="Verdana" size="2">REVIEWS</font></b><font face="Verdana" size="2"><br>\r
+            <hr align="center">\r
+            </font><a href="http://bp6.gamesquad.net/bp6reviews.phtml"><font color="white" face="Verdana" size="1">BP6 Reviews</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/h2o.phtml"><font color="white" face="Verdana" size="1">BP6 Watercooling</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/bxcool.phtml"><font color="white" face="Verdana" size="1">BX Chipset Cooling</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/benchmark.phtml"><font color="white" face="Verdana" size="1">Benchmarks</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/bp6fsb.phtml"><font color="white" face="Verdana" size="1">BP6FSB Utility</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/powerleap.phtml"><font color="white" face="Verdana" size="1">PowerLeap NEO S370</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/seti.phtml"><font color="white" face="Verdana" size="1">SETI on the BP6</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/orbs.phtml"><font color="white" face="Verdana" size="1">Golden Orbs I</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/orbs/orbs2.phtml"><font color="white" face="Verdana" size="1">Golden Orbs II</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/Q6fix.phtml"><font color="white" face="Verdana" size="1">VTT Solution</font></a><font face="Verdana" size="1"><br><br></font><b><font color="yellow" face="Verdana" size="2">NAVIGATE</font></b><font color="yellow" face="Verdana" size="2"> \r
+            <hr align="center">\r
+            </font><a href="http://www.bp6.com/"><font color="white" face="Verdana" size="1">News</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/chat.phtml"><font color="white" face="Verdana" size="1">Online Text Chat</font></a><font face="Verdana" size="1"><br></font><a href="javascript:popUp('chat_popup.htm')"><font color="white" face="Verdana" size="1">Voice Chat</font></a><br><a href="http://216.247.220.192/Forum"><font color="white" face="Verdana" size="1">Messageboard</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/cooling"><font color="white" face="Verdana" size="1">Temp. Converter</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">Picture Gallery</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/bios.phtml"><font color="white" face="Verdana" size="1">Latest BIOS</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/files/"><font color="white" face="Verdana" size="1">Drivers &amp; Files</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">UGM of the week</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/contest.phtml"><font color="white" face="Verdana" size="1">BP6 Contest</font></a><font face="Verdana" size="1"><br><br></font><b><font color="yellow" face="Verdana" size="2">OTHER STUFF</font></b><font color="yellow" face="Verdana" size="2"> \r
 \r
-            <hr align="center"></font><a href="http://bp6.gamesquad.net/whois.phtml"><font color="white" face="Verdana" size="1">Who is Tim?</font></a><font face="Verdana" size="1"><br></font><a href="mailto:tim@bp6.com"><font color="white" face="Verdana" size="1">Contact BP6.com</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">Affiliates Section</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">Sponsors Section <br></font></a><a href="http://bp6.gamesquad.net/links.phtml"><font color="white" face="Verdana" size="1">Links<br><br></font></a><b><font color="yellow" face="Verdana" size="2">PC SPECIALS</font></b><font color="yellow" face="Verdana" size="2"> \r
-            <hr align="center"></font><a href="http://bp6.gamesquad.net/specials.phtml"><font color="white" face="Verdana" size="1">Vendor \r
+            <hr align="center">\r
+            </font><a href="http://bp6.gamesquad.net/whois.phtml"><font color="white" face="Verdana" size="1">Who is Tim?</font></a><font face="Verdana" size="1"><br></font><a href="mailto:tim@bp6.com"><font color="white" face="Verdana" size="1">Contact BP6.com</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">Affiliates Section</font></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">Sponsors Section <br></font></a><a href="http://bp6.gamesquad.net/links.phtml"><font color="white" face="Verdana" size="1">Links<br><br></font></a><b><font color="yellow" face="Verdana" size="2">PC SPECIALS</font></b><font color="yellow" face="Verdana" size="2"> \r
+            <hr align="center">\r
+            </font><a href="http://bp6.gamesquad.net/specials.phtml"><font color="white" face="Verdana" size="1">Vendor \r
             Specials<br><br></font></a><br><b><font color="yellow" face="Verdana" size="2">Pic of the day</font></b>\r
-            <hr>
-<center>\r
+            <hr>\r
+             \r
+            <center>\r
             <p align="center"><font face="Verdana, Arial, Helvetica" size="1"><a href="http://bp6.gamesquad.net/cgi-bin/schlabo/potd.pl"><img alt="No picture is available for today." border="0" src="doc3_files/potd_na_110x83.gif"></a> </font></p>
 </center>
-<br><center></center>
+<br>\r
+            <center></center>
 <br><!--<A HREF="code:javascript:ID_FTPWebView.InvokeHelp()"><FONT SIZE="1" COLOR="white" FACE="Verdana">FTP Help</FONT></A>-->
-</td></tr></tbody></table>
+</td>
+</tr>
+</tbody>
+</table>
 </td>\r
     <td bgcolor="white" valign="top" width="80%">
-<img height="1" src="doc3_files/spacer.gif" width="490"><br><center>\r
+<img height="1" src="doc3_files/spacer.gif" width="490"><br>\r
+      <center>\r
       <p>\r
       </p>
-<table bgcolor="white" border="0" cellpadding="10" cellspacing="0" height="100%" width="100%"><tbody><tr><td bgcolor="white" valign="top" width="100%">\r
+<table bgcolor="white" border="0" cellpadding="10" cellspacing="0" height="100%" width="100%">\r
+        <tbody>\r
+        <tr>\r
+          <td bgcolor="white" valign="top" width="100%">\r
             <center>
 <a href="http://www.encounter2001.com/" target="_blank"><img border="0" height="60" src="doc3_files/banner2.gif" width="468"></a> \r
             </center>
@@ -128,8 +172,14 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             the heck is a Peltier?!?! - 10:05AM PDT</a></font><br><font face="arial" size="1"><a class="nav" href="http://bp6.gamesquad.net/index.phtml#newsitem964587833,74573,">HELLO \r
             EVERYONE!!! - 10:03PM PDT</a></font><br><font face="arial" size="1"><a class="nav" href="http://bp6.gamesquad.net/index.phtml#newsitem964429577,13375,">BP6 \r
             Q3 server up and running.. - 2:06AM PDT</a></font><br><br><!-- NP v3.7.5 --><a name="newsitem965012956,78924,"></a>\r
-            <table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Sunday, \r
-                  July 30, 2000</b></font></td></tr></tbody></table>
+            <table bgcolor="#003399" width="100%">\r
+              <tbody>\r
+              <tr>\r
+                <td><font color="#ffffff" face="Verdana,arial" size="2"><b>Sunday, \r
+                  July 30, 2000</b></font></td>
+</tr>
+</tbody>
+</table>
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">Chat with \r
             ABIT</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:Holodeck@bp6.com">Holodeck2</a> @ 8:09PM \r
             PDT</small>  <a href="http://bp6.gamesquad.net/news/965012956,78924,.html"><img border="0" src="doc3_files/comments.gif">0 comments</a> \r
@@ -141,8 +191,14 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             BP6-2??<br>[EricBoeing] We already have a micro ATX dual flip-chip \r
             board<br>[EricBoeing] but it's OEM only<br>[EricBoeing] the full ATX \r
             version should be out Septemberish<br></font><br><br><a name="newsitem964766837,26344,"></a>\r
-            <table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Thursday, \r
-                  July 27, 2000</b></font></td></tr></tbody></table>
+            <table bgcolor="#003399" width="100%">\r
+              <tbody>\r
+              <tr>\r
+                <td><font color="#ffffff" face="Verdana,arial" size="2"><b>Thursday, \r
+                  July 27, 2000</b></font></td>
+</tr>
+</tbody>
+</table>
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">Fixed \r
             wallpaper</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:Holodeck@bp6.com">Holodeck2</a> @ 11:47PM \r
             PDT</small>  <a href="http://bp6.gamesquad.net/news/964766837,26344,.html"><img border="0" src="doc3_files/comments.gif">5 comments</a> \r
@@ -155,7 +211,9 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             error.<br>And 1 more person, THANK YOU TIM for letting me borrow \r
             your server space ;-)<br><br>If you need a weird resolution, feel \r
             free to <a href="mailto:Holodeck2@home.com">e-mail</a> me requesting \r
-            for one.<br>If you have ideas or more errors to point out, <a href="mailto:Holodeck2@home.com">mailto:Holodeck2@home.com</a><br><br><a href="doc3_files/3-800.jpg" target="800">800x600 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1024.jpg" target="800">1024x768 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1152.jpg" target="800">1152x864 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1280x1024.jpg" target="800">1280x1024 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1600.jpg" target="800">1600x1200 </a><br><p>Enjoy :-)<br></p>
+            for one.<br>If you have ideas or more errors to point out, <a href="mailto:Holodeck2@home.com">mailto:Holodeck2@home.com</a><br><br><a href="doc3_files/3-800.jpg" target="800">800x600 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1024.jpg" target="800">1024x768 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1152.jpg" target="800">1152x864 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1280x1024.jpg" target="800">1280x1024 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1600.jpg" target="800">1600x1200 </a><br>\r
+            <p>Enjoy :-)<br>\r
+            </p>
 <p><a href="mailto:Holodeck2@home.com">Holodeck2,</a><br>[H]ard at \r
             work on the Brand Spanking New Wallpaper.<br></p></font><br><br><a name="newsitem964762841,25865,"></a><b><u><font color="#003366" face="Verdana, Arial" size="2">Seti update</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:Holodeck@bp6.com">Holodeck2</a> @ 10:40PM \r
             PDT</small>  <a href="http://bp6.gamesquad.net/news/964762841,25865,.html"><img border="0" src="doc3_files/comments.gif">5 comments</a> \r
@@ -183,8 +241,14 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
              | <a href="http://bp6.gamesquad.net/#news_top">top</a></font> <br><font color="black" face="Arial" size="2">Need some cooling for your Videocard \r
             memory to get a little extra overclockability and FPS? <a href="http://www.overclockershideout.com/RamSinks.html" target="_BLANK">Overclockers Hiedout Ram Sinks</a> They just notified \r
             me of their new design.<br><img border="1" src="doc3_files/ramsink.jpg"></font><br><br><a name="newsitem964671589,7831,"></a>\r
-            <table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Wednesday, July 26, \r
-            2000</b></font></td></tr></tbody></table>
+            <table bgcolor="#003399" width="100%">\r
+              <tbody>\r
+              <tr>\r
+                <td><font color="#ffffff" face="Verdana,arial" size="2"><b>Wednesday, July 26, \r
+            2000</b></font></td>
+</tr>
+</tbody>
+</table>
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">is it \r
             [H]ard?</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:Holodeck@bp6.com">Holodeck2</a> @ 9:19PM \r
             PDT</small>  <a href="http://bp6.gamesquad.net/news/964671589,7831,.html"><img border="0" src="doc3_files/comments.gif">0 comments</a> \r
@@ -212,8 +276,14 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             sleeping it would be like 4 in the morning here. Just to let you \r
             know <img src="doc3_files/smile.gif"><br>I'm not angry at anyone... \r
             good thing I have a long fuse <img src="doc3_files/tongue.gif"><br></font><br><br><a name="newsitem964587833,74573,"></a>\r
-            <table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Tuesday, \r
-                  July 25, 2000</b></font></td></tr></tbody></table>
+            <table bgcolor="#003399" width="100%">\r
+              <tbody>\r
+              <tr>\r
+                <td><font color="#ffffff" face="Verdana,arial" size="2"><b>Tuesday, \r
+                  July 25, 2000</b></font></td>
+</tr>
+</tbody>
+</table>
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">HELLO \r
             EVERYONE!!!</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:Holodeck@bp6.com">Holodeck2</a> @ 10:03PM \r
             PDT</small>  <br><font color="black" face="Arial" size="2">Hello \r
@@ -233,8 +303,14 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             if I&#8217;m in front of my comp and not trying to frag someone)<br><a href="http://www.icq.com/download">ICQ: </a>82640218 (rarely \r
             on)<br><br>P.S. If someone named &#8220;Digital Vortex&#8221; on either Quake 3 \r
             or 2 frags you, it&#8217;s probably me. ;-)<br></font><br><br><a name="newsitem964429577,13375,"></a>\r
-            <table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Monday, \r
-                  July 24, 2000</b></font></td></tr></tbody></table>
+            <table bgcolor="#003399" width="100%">\r
+              <tbody>\r
+              <tr>\r
+                <td><font color="#ffffff" face="Verdana,arial" size="2"><b>Monday, \r
+                  July 24, 2000</b></font></td>
+</tr>
+</tbody>
+</table>
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">BP6 Q3 server up and \r
             running..</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:tim@bp6.com">tim</a> @ 2:06AM PDT</small>  <a href="http://bp6.gamesquad.net/news/964429577,13375,.html"><img border="0" src="doc3_files/comments.gif">3 comments</a> \r
              | <a href="http://bp6.gamesquad.net/#news_top">top</a></font> <br><font color="black" face="Arial" size="2">Setup a Q3 server for anyone wanting \r
@@ -254,8 +330,14 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             system, and flash again. This is also good as a failsafe in case you \r
             don't believe in Virus Protecting your computer. (Thanks to Fred for \r
             link)<br><a href="http://www.ioss.com.tw/eg/rd1/RD1info0004.PDF" target="_NEW">Manufacturers Brochure</a> (PDF Format)<br><a href="http://192.216.185.10/mwave/doc/A06950.html" target='_BLANK"'>Another info page</a><br><a href="http://192.216.185.10/mwave/ProdMB-AC-MW.hmx?UID=&amp;CID=&amp;updepts=MB&amp;DNAME=%3Cb%3EMotherboards%3C%2Fb%3E&amp;Back=ProdMB-AC-MW.hmx?" target="_BLANK">Available for about $20</a><br><br><img src="doc3_files/rd1.jpg"></font><br><br><a name="newsitem963875853,12731,"></a>\r
-            <table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Monday, \r
-                  July 17, 2000</b></font></td></tr></tbody></table>
+            <table bgcolor="#003399" width="100%">\r
+              <tbody>\r
+              <tr>\r
+                <td><font color="#ffffff" face="Verdana,arial" size="2"><b>Monday, \r
+                  July 17, 2000</b></font></td>
+</tr>
+</tbody>
+</table>
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">How To \r
             Overclock</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:killz@i82hq.com">DareDevil</a> @ 4:17PM \r
             PDT</small>  <a href="http://bp6.gamesquad.net/news/963875853,12731,.html"><img border="0" src="doc3_files/comments.gif">3 comments</a> \r
@@ -277,7 +359,8 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             PDT</small>  <a href="http://bp6.gamesquad.net/news/963859982,88982,.html"><img border="0" src="doc3_files/comments.gif">1 comments</a> \r
              | <a href="http://bp6.gamesquad.net/#news_top">top</a></font> <br><font color="black" face="Arial" size="2">We all need to have some fun \r
             sometimes! Check out this little web site that sells 'nerd' clothing \r
-            ;) (I like the bibs in the Junior Hackerz section) :-Þ<br><br><div align="center"><a href="http://www.nerdgear.com/" target="_blank"><img border="0" src="doc3_files/nerdinside.gif"></a></div></font><br><br><a name="newsitem963819796,9688,"></a><b><u><font color="#003366" face="Verdana, Arial" size="2">Dual PSU Wiring diagram... (preview to \r
+            ;) (I like the bibs in the Junior Hackerz section) :-Þ<br><br>\r
+            <div align="center"><a href="http://www.nerdgear.com/" target="_blank"><img border="0" src="doc3_files/nerdinside.gif"></a></div></font><br><br><a name="newsitem963819796,9688,"></a><b><u><font color="#003366" face="Verdana, Arial" size="2">Dual PSU Wiring diagram... (preview to \r
             Part 1 Watercooling Project)</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:tim@bp6.com">tim</a> @ 12:43AM PDT</small>  <a href="http://bp6.gamesquad.net/news/963819796,9688,.html"><img border="0" src="doc3_files/comments.gif">11 comments</a> \r
              | <a href="http://bp6.gamesquad.net/#news_top">top</a></font> <br><font color="black" face="Arial" size="2">When is comes to overclocking your \r
             system, cooling plays a big role. Powering all of those fans in your \r
@@ -293,8 +376,14 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             <br><br>View Diagram 1 <a href="http://bp6.gamesquad.net/images/wiring.jpg" target="_BLANK">here</a>.<br>View Diagram 2 <a href="http://bp6.gamesquad.net/images/psu2.gif" target="_BLANK">here</a>.<br><br>I used Tap-In Squeeze Connectors and \r
             22 guage wire to connect the wires. You can get them at Radio Shack \r
             Part# 64-3053 or <a href="http://www.radioshack.com/ProductCatalog/ProductDetail/Index/1,2098,,00.html?SKUString1=64&amp;SKUString2=3053" target="_blank">click here</a>.</font><br><br><a name="newsitem963766655,78511,"></a>\r
-            <table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Sunday, \r
-                  July 16, 2000</b></font></td></tr></tbody></table>
+            <table bgcolor="#003399" width="100%">\r
+              <tbody>\r
+              <tr>\r
+                <td><font color="#ffffff" face="Verdana,arial" size="2"><b>Sunday, \r
+                  July 16, 2000</b></font></td>
+</tr>
+</tbody>
+</table>
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">RAM Overclocking? \r
             Hmmmmm.</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:killz@i82hq.com">DareDevil</a> @ 9:57AM \r
             PDT</small>  <a href="http://bp6.gamesquad.net/news/963766655,78511,.html"><img border="0" src="doc3_files/comments.gif">3 comments</a> \r
@@ -319,9 +408,16 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
              | <a href="http://bp6.gamesquad.net/#news_top">top</a></font> <br><font color="black" face="Arial" size="2">A follow up on the 'Weekly CPU \r
             Prices', this guide will help you determine which cpu is best for \r
             you (and your board ;-)). Sent to me by Spanky, here's the \r
-            link:<br><br><li><a href="http://www6.tomshardware.com/howto/00q2/000412/index.html" target="_blank">http://www6.tomshardware.com/howto/00q2/000412/index.html</a></li></font><br><br><a name="newsitem963685749,28290,"></a>\r
-            <table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Saturday, \r
-                  July 15, 2000</b></font></td></tr></tbody></table>
+            link:<br><br>\r
+            <li><a href="http://www6.tomshardware.com/howto/00q2/000412/index.html" target="_blank">http://www6.tomshardware.com/howto/00q2/000412/index.html</a></li></font><br><br><a name="newsitem963685749,28290,"></a>\r
+            <table bgcolor="#003399" width="100%">\r
+              <tbody>\r
+              <tr>\r
+                <td><font color="#ffffff" face="Verdana,arial" size="2"><b>Saturday, \r
+                  July 15, 2000</b></font></td>
+</tr>
+</tbody>
+</table>
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">Weekly CPU \r
             Prices</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:killz@i82hq.com">DareDevil</a> @ 11:29AM \r
             PDT</small>  <a href="http://bp6.gamesquad.net/news/963685749,28290,.html"><img border="0" src="doc3_files/comments.gif">2 comments</a> \r
@@ -341,8 +437,14 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             any porno piccies in my mailbox! I have enough of those!) Kidding \r
             guys.<br><br>Okay, that's all for now.<br><br>The \r
             ÐÐ.</font><br><br><a name="newsitem963619505,3764,"></a>\r
-            <table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Friday, \r
-                  July 14, 2000</b></font></td></tr></tbody></table>
+            <table bgcolor="#003399" width="100%">\r
+              <tbody>\r
+              <tr>\r
+                <td><font color="#ffffff" face="Verdana,arial" size="2"><b>Friday, \r
+                  July 14, 2000</b></font></td>
+</tr>
+</tbody>
+</table>
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">Hey \r
             There!</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:killz@i82hq.com">DareDevil</a> @ 5:05PM \r
             PDT</small>  <a href="http://bp6.gamesquad.net/news/963619505,3764,.html"><img border="0" src="doc3_files/comments.gif">7 comments</a> \r
@@ -351,15 +453,22 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             I'll be posting up news from time to time now so, if you'd like, you \r
             may send me some news to be posted if you find any ( we don't want \r
             to flood Tim ;-) ).<br><br>My e-mail address is <a href="mailto:killz@i82hq.com">killz@i82hq.com</a><br><br>Ciao for \r
-            now.<br><br>The ÐÐ.</font><br><br></font><center><iframe frameborder="0" height="60" marginheight="0" marginwidth="0" noresize scrolling="no" src="doc3_files/ad_iframe.htm" width="468"><a href="http://ads.adflight.com/go_static.asp?asid=7708" target="_top"><img width="468" height="60" border="0" alt="Advertisement" src="http://ads.adflight.com/ad_static.asp?pid=2097&amp;sid=1881&amp;asid=7708"></a></iframe></center>
-</td></tr></tbody></table>
+            now.<br><br>The ÐÐ.</font><br><br>\r
+            </font><center><iframe frameborder="0" height="60" marginheight="0" marginwidth="0" noresize scrolling="no" src="doc3_files/ad_iframe.htm" width="468"><a href="http://ads.adflight.com/go_static.asp?asid=7708" target="_top"><img width="468" height="60" border="0" alt="Advertisement" src="http://ads.adflight.com/ad_static.asp?pid=2097&amp;sid=1881&amp;asid=7708"></a></iframe></center>
+</td>
+</tr>
+</tbody>
+</table>
 </center>
 </td>\r
     <td bgcolor="silver" valign="top" width="10%">\r
       <center>\r
       <p>\r
       </p>
-<table bgcolor="silver" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td colstart="1">\r
+<table bgcolor="silver" border="0" cellpadding="0" cellspacing="0" width="100%">\r
+        <tbody>\r
+        <tr>\r
+          <td colstart="1">\r
             <center>
 <!--   <FORM ACTION="/cgi-bin/subscribe.pl" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded">\r
                                                <IMG SRC="/images/spacer.gif" WIDTH="111" HEIGHT="1"><BR>\r
@@ -375,7 +484,10 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
             <form action="http://bp6.gamesquad.net/cgi-bin/news/viewnews.cgi?search" method="post">Search news<br><input name="searchstring" size="13"><br><input name="submit" style="BACKGROUND-COLOR: #000000; COLOR: #ffffff; FONT-FAMILY: Verdana; FONT-SIZE: xx-small; FONT-WEIGHT: bold" type="submit" value="Submit"><br><a href="http://bp6.gamesquad.net/cgi-bin/news/viewnews.cgi?newsall">News \r
             archive</a>
 </form></font> </center>
-</td></tr></tbody></table>
+</td>
+</tr>
+</tbody>
+</table>
 <!--                           <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" BGCOLOR="silver">\r
                                        <TR>\r
                                                <TD WIDTH="100%">\r
@@ -384,7 +496,11 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
                                                </TD>\r
                                        </TR>\r
                                </TABLE> \r
---><table bgcolor="silver" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="middle" width="100%">
+-->\r
+      <table bgcolor="silver" border="0" cellpadding="0" cellspacing="0" width="100%">\r
+        <tbody>\r
+        <tr>\r
+          <td align="middle" width="100%">
 <!-- BEGIN GoTo.com Search Box -->\r
             <script language="javascript" type="text/javascript">\r
                                                        <!--\r
@@ -415,31 +531,49 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
                                                        document.write("ype=gif&size=100x90>");\r
                                                        }\r
                                                        // -->\r
-                                                       </script><b><noscript></noscript></b><a href="http://www.goto.com/d/search/ssn/?fromGIF=true" target="_blank"><img align="bottom" border="0" height="90" ismap src="doc3_files/100x90.gif" width="100"></a><b><a href="http://www.goto.com/d/search/ssn/?fromGIF=true" target="_blank"> \r
+                                                       </script>\r
+            <b><noscript></noscript></b><a href="http://www.goto.com/d/search/ssn/?fromGIF=true" target="_blank"><img align="bottom" border="0" height="90" ismap src="doc3_files/100x90.gif" width="100"></a><b><a href="http://www.goto.com/d/search/ssn/?fromGIF=true" target="_blank"> \r
             </a></b><b></b><b><!-- END GoTo.com Search Box --></b><!-- Pricewatch Search Box -->\r
             <form action="http://www.pricewatch.com/search/search.asp" method="get" target="_Blank">\r
             <center>\r
             <p><b><font color="white" face="ARIAL, HELVETICA" size="1">PC Price \r
-            Search<br></font></b><input maxlength="30" name="criteria" size="10"><br><input name="submit" style="BACKGROUND-COLOR: #000000; COLOR: #ffffff; FONT-FAMILY: Verdana; FONT-SIZE: xx-small; FONT-WEIGHT: bold" type="submit" value="Search"></p>
+            Search<br></font></b><input maxlength="30" name="criteria" size="10"><br><input name="submit" style="BACKGROUND-COLOR: #000000; COLOR: #ffffff; FONT-FAMILY: Verdana; FONT-SIZE: xx-small; FONT-WEIGHT: bold" type="submit" value="Search"> \r
+            </p>
 </center>
 </form>
 <!-- Pricewatch Search Box --><a href="http://www.puicorp.com/bp6specials.htm" target="_BLANK"><img src="doc3_files/puibp6.gif"></a><br><br><br><br><a href="http://store.yahoo.com/dunamis-site/maxtor.html" target="_BLANK"><img alt="BP6.com Special - Enter CODE: BP6-hd in the order (notes) to receive a discount" src="doc3_files/hd5.gif"><font size="1"><br>BP6.COM \r
-            Special<br>Code:BP6-hd</font></a> </td></tr></tbody></table>
-<table bgcolor="silver" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%"><tbody><tr><td width="100%"> </td></tr></tbody></table>
+            Special<br>Code:BP6-hd</font></a> </td>
+</tr>
+</tbody>
+</table>\r
+      <table bgcolor="silver" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">\r
+        <tbody>\r
+        <tr>\r
+          <td width="100%"> </td>
+</tr>
+</tbody>
+</table>
 </center>
 </td>
-</tr></tbody></table>
-<!--   </TABLE>--><center></center>
+</tr>
+</tbody>
+</table>
+<!--   </TABLE>-->\r
+<center></center>
 <tr>
-<td colspan="3" valign="TOP" height="70"> </td> </tr>
-<table border="0" width="780"><tbody>
-<tr><td width="780">\r
+<td colspan="3" valign="TOP" height="70"> </td> </tr>\r
+<table border="0" width="780">\r
+  <tbody>\r
+  <tr>\r
+    <td width="780">\r
       <p align="center"><font color="#999999" face="verdana,arial" size="1">Copyright \r
       ©1999-2000 BP6.com, All rights reserved.<br>Got news? Send it to </font><a href="mailto:tim@bp6.com"><font color="white" face="Verdana" size="1">Tim</font></a> </p>
-</td></tr>
+</td>
+</tr>
 <!--   <TR>            <TD WIDTH="780">                        <P ALIGN="CENTER"><FONT SIZE="1" COLOR="#999999" FACE="Verdana,arial">Site design by Tim Brinkley</FONT>                </TD>   </TR> -->
-</tbody></table>
+</tbody>
+</table>
 </div>\r
-<script> window.open=NS_ActualOpen; </script>
+<script> window.open=NS_ActualOpen; </script>\r
 </body>
 </html>
index 6e53680..f84424c 100644 (file)
@@ -1,6 +1,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html><body><p tst="a&amp;b" tst2="a&amp;b" tst3="a &amp; b">
+<html><body>
+<p tst="a&amp;b" tst2="a&amp;b" tst3="a &amp; b">
 a&amp;b
 a&amp;b
 a &amp; b
-</p></body></html>
+</p>
+</body></html>
index 0b85caf..8e854d3 100644 (file)
@@ -1,6 +1,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html><body>
+<html>
+<body>
 <form>
   <input type="text" name="test" value="&scaron;">
 </form>
-</body></html>
+</body>
+</html>
index a1244dd..8affc19 100644 (file)
@@ -1,10 +1,12 @@
 <!DOCTYPE html PUBLIC "-//IETF//DTD HTML//EN">
 <html>
+
 <head>
 <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
 <title>README - Microsoft FrontPage 2000 Server Extensions</title>
 <meta name="Microsoft Theme" content="none">
 </head>
+
 <body>
 <font face="Verdana">
 <h1><a name="top">Microsoft FrontPage 2000 Server Extensions, UNIX</a></h1>
 
 </p>
 <ul>
-<li>Authoring FrontPage webs</li>
+  <li>Authoring FrontPage webs</li>
   <li>Administering FrontPage webs</li>
   <li>Browse-time FrontPage web functionality</li>
 </ul>
+
+
 <h2>Contents&nbsp;</h2>
 
-<a href="#relnotes">Release Notes</a><br><a href="#moreinfo">Resources for More Information</a>
+<a href="#relnotes">Release Notes</a><br>
+<a href="#moreinfo">Resources for More Information</a>
 <p>&nbsp;</p>
 <hr>
 <h2><a name="relnotes">Release Notes</a></h2>
@@ -30,7 +35,9 @@
 <p>This section provides complementary or late-breaking 
 information to supplement the Microsoft FrontPage Server Extensions documentation.</p>
 
-<p><a href="#apache">Apache 1.3.4 Support</a><br><a href="#upgrading">Upgrading from previous version of FrontPage Server Extensions</a><br><a href="#executables">Uploading files into executable folders</a></p>
+<p><a href="#apache">Apache 1.3.4 Support</a><br>
+<a href="#upgrading">Upgrading from previous version of FrontPage Server Extensions</a><br>
+<a href="#executables">Uploading files into executable folders</a></p>
 
 
 <p align="right"><font size="1"><a href="#top">Top of Page</a></font></p>
@@ -100,12 +107,17 @@ see the FrontPage 2000 Server Extensions Resource Kit at <a href="http://officeu
 
 
 <hr>
+
+
+
 <h2><a name="moreinfo">Resources for More Information</a></h2>
 
 <p>This section lists sources of more information about the
 FrontPage Server Extensions.</p>
 
-<p><a href="#serk">Server Extensions Resource Kit</a><br><a href="#serkupdate">Server Extensions Resource Kit Update</a><br><a href="#kb">Knowledge Base</a></p>
+<p><a href="#serk">Server Extensions Resource Kit</a><br>
+<a href="#serkupdate">Server Extensions Resource Kit Update</a><br>
+<a href="#kb">Knowledge Base</a></p>
 
 
 <p align="right"><font size="1"><a href="#top">Top of Page</a></font></p>
index 596d54d..44ceebc 100644 (file)
@@ -1,6 +1,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html>
-<head><meta charset="iso-8859-1"></head>
+<head>
+<meta charset="iso-8859-1">
+</head>
 <body>
   <p>tr&egrave;s</p>
 </body>
index f4e4edb..62391dc 100644 (file)
@@ -1,6 +1,8 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html>
-<head><title></title></head>
+<head>
+  <title></title>
+</head>
 <body>
 <ul>
 <li>First item
@@ -8,5 +10,6 @@
 <li>Second item, closes the first one
 </li>
 </ul>
+
 </body>
 </html>
index ca28039..c29f74f 100644 (file)
@@ -1,2 +1,6 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html><head><meta name="Author" content="Root &lt;root@aol.com&gt;"></head></html>
+<html>
+<head>
+<meta name="Author" content="Root &lt;root@aol.com&gt;">
+</head>
+</html>
index 09d98ce..454e943 100644 (file)
@@ -1,10 +1,10 @@
 <!DOCTYPE html>
 <html>
-<head>
-<title>omg</title>
-<noscript><link rel="stylesheet" href="http://foo.com"></noscript>
-</head>
-<body id="xxx">
+    <head>
+        <title>omg</title>
+        <noscript><link rel="stylesheet" href="http://foo.com"></noscript>
+    </head>
+    <body id="xxx">
         <p>yo</p>
     </body>
 </html>
index 5308b6d..f83a7cb 100644 (file)
@@ -1,4 +1,6 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html><body>
+<html>
+<body>
 <pre><a href="toto"></a><img src="titi"></pre>
-</body></html>
+</body>
+</html>
index 5fdc6a2..ea0be18 100644 (file)
@@ -1,6 +1,9 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <?xml-stylesheet href="./css/ht2html.css" type="text/css"?><html>
-<!-- THIS PAGE IS AUTOMATICALLY GENERATED.  DO NOT EDIT. --><head><title>Python Programming Language</title></head>
+<!-- THIS PAGE IS AUTOMATICALLY GENERATED.  DO NOT EDIT. -->
+<head>
+<title>Python Programming Language</title>
+</head>
 <body>
 </body>
 </html>
index ef9f2e1..893d6a2 100644 (file)
@@ -1,6 +1,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html>
-<head><title>Regression test 1</title></head>
+<head>
+<title>Regression test 1</title>
+</head>
 <body>
 <h1>Regression test 1</h1>
 <p>
index ac12028..88cf9d3 100644 (file)
@@ -1,6 +1,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html>
-<head><title>Regression test 2</title></head>
+<head>
+<title>Regression test 2</title>
+</head>
 <body>
 <h1>Regression test 2</h1>
 <p>
index 7b1bc1d..d35ac0d 100644 (file)
@@ -1,6 +1,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html>
-<head><title>Regression test 3</title></head>
+<head>
+<title>Regression test 3</title>
+</head>
 <body>
 <h1>Regression test 3</h1>
 <p>
index f6a6ab8..eb1ba09 100644 (file)
@@ -1,11 +1,14 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html>
-<head><title>Regression test 4</title></head>
+<head>
+<title>Regression test 4</title>
+</head>
 <body>
 <h1>Regression test 4</h1>
 <p>
 Wrong close of tag P
 </p>
 <hr>
+
 </body>
 </html>
index 550c66f..71cf72e 100644 (file)
@@ -1,5 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html><body>
 <td></td>
-<td><!-- <a><b> --></td>
+<td>
+<!-- <a><b> -->
+</td>
 </body></html>
index 908723e..5b95a1f 100644 (file)
@@ -4,6 +4,7 @@
 <body>
 <script language="javascript">
     if (window.open<max) ;
-</script><input onclick="if(window.open&lt;max);">
+</script>
+<input onclick="if(window.open&lt;max);">
 </body>
 </html>
index 2be4f93..2ad9b95 100644 (file)
@@ -1,14 +1,15 @@
 <!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">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+       <head>
+               <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Test Page</title>
 </head>
 <body>
 <div id="portal">
 <script type="text/javascript">
        documen.write("Příliš žluťoučký kůň úpěl ďábelksé ódy");
-</script><p>
+</script>
+       <p>
        Příliš žluťoučký kůň úpěl ďábelksé ódy;
        </p>
 </div>
index 98a2716..eaa8864 100644 (file)
@@ -1,11 +1,13 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html>
-<head><title>Linux Today</title></head>
+<head> <title>Linux Today</title>
+</head>
 <body bgcolor="White" link="Blue" text="Black" vlink="Black" alink="Red">
 
 <center>
-<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr bgcolor="#FFFFFF">
-<td height="90">
+<table border="0" width="100%" cellspacing="0" cellpadding="0">
+        <tr bgcolor="#FFFFFF">
+                <td height="90">
 <a href="http://linuxtoday.com/cgi-bin/click.pl?adnum=49"><img src="/pics/door_linux.gif" border="0" width="468" height="60" alt="Atipa Linux solutions. Your reliable cluster, server, and workstation solution. Win a Free Celeron Linux Workstation!"></a>
 
                 </td>
@@ -13,7 +15,8 @@
 <img src="/pics/lt.gif" vspace="5" alt="Linux Today Logo"><br><font size="-1"><a href="http://linux.com">linux.com</a> partner</font><p></p>
 </td>
 
-        </tr></table>
+        </tr>
+</table>
 <font size="2" face="Helvetica">
 [ <a href="http://linuxtoday.com/">headlines</a> |
 <a href="http://features.linuxtoday.com/">features</a> |
index 903723c..b37a1c7 100644 (file)
@@ -1,11 +1,13 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-<head><base target="contents"></head>
+<html>\r
+<head>\r
+<base target="contents">\r
+</head>\r
 <body>
 <a name="ProblemDomain.Package"><h2>Component Package diagram ProblemDomain</h2>\r
 </a><p></p>
-<hr>
-<dl>
+<hr>\r
+<dl>\r
 <dt>
 <b>Stereotype </b>problem domain</dt>\r
 <dt>
 <dd>Interface, thats stores and manipulates the Family Tree.\r
 </dd>
 </dd>
-</dl>
+</dl>\r
 <p></p>
-<hr>
-<dl>
+<hr>\r
+<dl>\r
+\r
 <dt><h4>Class <a href="HumanInterface.FamilyFrame.html#HumanInterface.FamilyFrame">HumanInterface.FamilyFrame</a>
 </h4></dt>\r
 <dt><h4>Class <a href="ProblemDomain.Birth.html#ProblemDomain.Birth">ProblemDomain.Birth</a>
 </h4></dt>\r
 <dt><h4>Class <a href="ProblemDomain.Note.html#ProblemDomain.Note">ProblemDomain.Note</a>
 </h4></dt>\r
-</dl>
+</dl>\r
+\r
 <h4><b>Links</b></h4>\r
 <ul><li>
 <b>Link to </b><a href="HumanInterface.Package.html#HumanInterface.Package">HumanInterface</a>
-</li></ul>
-<dir></dir>
+</li></ul>\r
+<dir></dir>\r
 <ul><li>
 <b>Link to </b><a href="DataManagement.FlatFile.Package.html#DataManagement.FlatFile.Package">DataManagement.FlatFile</a>
-</li></ul>
-<dir></dir>
+</li></ul>\r
+<dir></dir>\r
 <ul><li>
 <b>Link to </b><a href="DataManagement.Package.html#DataManagement.Package">DataManagement</a>
-</li></ul>
-<dir></dir>
+</li></ul>\r
+<dir></dir>\r
 </body>
 </html>
index 42fbb43..66a498a 100644 (file)
@@ -1,5 +1,6 @@
 <!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-Language" content="en-us">
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -7,24 +8,28 @@
 <link rel="SHORTCUT ICON" href="favicon.ico">
 <title>شهير بلاگ</title>
 </head>
+
 <body>
 
 <table border="0" width="100%" id="MainTBL" cellspacing="0" cellpadding="0">
-<tr>
-<td class="Header1">
-               <table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%"><tr>
-<td>
+       <tr>
+               <td class="Header1">
+               <table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
+                       <tr>
+                               <td>
                                <img border="0" src="Shell/Shahir.ShahidSales1.png" width="442" height="110">
 </td>
                                <td> </td>
-                       </tr></table>
-</td>
+                       </tr>
+               </table>
+               </td>
        </tr>
-<tr>
-<td height="28">
+       <tr>
+               <td height="28">
                        <div id="SideBar1">
-                               <table width="100%"><tr>
-<td>
+                               <table width="100%">
+                               <tr>
+                               <td>
                                 <span class="Item">
 <a href="Index.asp">
 خانه </a></span> <span class="Item">
@@ -52,13 +57,19 @@ RSS </a></span> <span class="Item">
                                </p>
 </div>
                                </td>
-                               </tr></table>
-</div>
+                               </tr>
+                               </table>
+                       </div>
                </td>
        </tr>
-<tr><td valign="top">
-               <table border="0" width="100%" cellspacing="0" cellpadding="0" id="Content"><tr><td class="Right" valign="top" style="padding-right: 60px">
-                                       <table width="100%"><tr><td valign="top">
+       <tr>
+               <td valign="top">
+               <table border="0" width="100%" cellspacing="0" cellpadding="0" id="Content">
+                       <tr>
+                               <td class="Right" valign="top" style="padding-right: 60px">
+                                       <table width="100%">
+                                               <tr>
+                                                       <td valign="top">
                                                                
 <script>
 var tgs = new Array( 'div','td','tr','a');
@@ -78,9 +89,11 @@ function ChangeSize( trgt,sz ) {
                for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = sz; //szs[ sz ];
        }
 }
-</script><table width="100%" id="NewsDetail">
-<tr>
-<td valign="top">
+</script>
+
+<table width="100%" id="NewsDetail">
+       <tr>
+               <td valign="top">
                <div class="News_Info">
                        تاريخ درج: <font color="#000000">چهارشنبه، 29 اسفند 1386 
                        - Wednesday, March 19, 2008</font>      
@@ -88,32 +101,42 @@ function ChangeSize( trgt,sz ) {
                        دفعات مشاهده: <font color="#000000">2688</font> 
                        بار      كد: <font color="#000000">341</font>
                </div>
-               <br><!--
+               <br>
+               <!--
                <div>&#1575;&#1606;&#1583;&#1575;&#1586;&#1607; &#1601;&#1608;&#1606;&#1578;:&nbsp;
                <a href="javascript:ChangeSize('NewsBody','7pt')"><font size="1">&#1705;&#1608;&#1670;&#1705;</font></a>&nbsp;
                <a href="javascript:ChangeSize('NewsBody','10pt')"><font size="2">&#1605;&#1593;&#1605;&#1608;&#1604;&#1740;</font></a>&nbsp;
                <a href="javascript:ChangeSize('NewsBody','13pt')"><font size="3">&#1576;&#1586;&#1585;&#1711;</font></a>&nbsp;
-               </div>--><div class="Titr1">
+               </div>-->
+               
+
+               <div class="Titr1">
                         </div>
-               <br><div id="NewsBody">
+               <br>
+               <div id="NewsBody">
                        
                        <div class="Image">
                                
                                <a href="showimage.aspx?path=Files_Upload%5C302.JPG&amp;Width=" rel="lightbox" title="شهير بلاگ">
-                               <img src="showimage.aspx?path=Files_Upload%5C302.JPG&amp;Width=220" align="left" border="1"></a>
+                               <img src="showimage.aspx?path=Files_Upload%5C302.JPG&amp;Width=220" align="left" border="1">
+                               </a>
 </div>
-                       <strong><font size="4"><font color="#0000ff">عکس</font> <font color="#0000ff">محصول هنر یکی از همکاران است. روی آن کلیک کند.</font></font></strong><s1></s1>
+                       <strong><font size="4"><font color="#0000ff">عکس</font> <font color="#0000ff">محصول هنر یکی از همکاران است. روی آن کلیک کند.</font></font></strong><s1>  </s1>
 </div>
-               <br><div align="left">
+               <br>
+               <div align="left">
                        <a href="printfriendly.asp?id=341">
                        <img src="shell/PrintFriendly.png" border="0"></a>
                        <a href="#" onclick="window.open('SendNews.asp?PageID=341','myWin','toolbar=no,directories=no,location=no,status=no,menubar=no,resizable=yes,scrollbars=no,width=500, height=200'); return false">
-                       <img border="0" src="Shell/SendToFriends.jpg" width="140" height="30"></a>
+                       <img border="0" src="Shell/SendToFriends.jpg" width="140" height="30">
+                       </a>
                </div>
                <br>
-</td>
+               </td>
        </tr>
-<tr><td> <br><hr>
+       <tr>
+               <td> <br>
+               <hr>
 <div id="Comments"><ul>
 <b>نظرات
                کاربران:</b><br><li>
@@ -153,15 +176,18 @@ function ChangeSize( trgt,sz ) {
                دیشلمه....شما تشریف نمی آورید؟</li>
 <br><br><li>
 <font color="blue">سیاوش:</font><br><font size="1">4/3/2008 - 9:28:00 PM</font><br>مرد هزار چهره مرد هزار چهره کیست؟شخصیتی ساخته و پرداخته مهران مدیری، پیمان قاسم خانی و دیگر نویسندگان؟ تنها هدفش آنست که چند روز تعطیلات، مارا سرگم کند و دیگر هیچ؟ مرد هزار چهره یک طنز است یک طنز تلخ، برداشتی واقعی از جامعه ایرانی. من جوانم پس دردآشنای جوانانم و خود را با خود و دیگر جوانان طرف می کنم بسیار اند جوانانی که مصداق مرد هزار چهره هستند جوانانی سودا زده یا به قول خود مسعود "جو گیر" که هر با محصولی کهنه را با تعریفی جدید به آنها ارائه کنند چنان با تمام و جود می پذیرند که گویی راه فائق آمدن بر تمام مشکلاتشان را یافته اند و می خرند، خواه این تحفه تئوری بر گرفته از تفکرات خشک و فسیلی گروهی باشد یا مدل ملیجک وار لباسی در پشت ویترین فروشگاه. مهم نیست چه باشد! مهم نیست دلیل انتخابش چه باشد! مهم نیست نتیجه این انتخاب چیست! تنها مهم است که می گویند از این طرف بفرمائید!حال این بفرمائید چه معنایی دارد باز هم مهم نیست!!! وای بر ما که نه خود را می شناسیم و نه در جهت شناخت خویش قدم می گذاریم. وای بر ما که دیگر حتی ندای درون خویش را نمی توانیم بشنویم. وای بر ما که نمی دانیم چه می خواهیم و هر بار که چیزی می خواهیم و در مسیر وصال پا می گذاریم به میانه راه نرسیده چنان مجذوب زرق و برق راههای دیگر می شویم که مبدا و مقصد را یکجا فراموش می کنیم. وای بر ما که نمی توانیم در برابر هر آنچه در مقابل انسانیت ما ایستاده "نه"بگوییم. درست است که ما جوانان به تنهایی مقصر نیستیم اما چون شروع تقصیریم پس می توانیم از ابتدا مانع مشکل هم باشیم. با احترام سیاوش<br>
- <br><font color="#800000">بسیار زیبا سیاوش جان. درود بر تو. شهیر</font>
+ <br>
+<font color="#800000">بسیار زیبا سیاوش جان. درود بر تو. شهیر</font>
 </li>
 <br><br><li>
 <font color="blue">احسان __ خط سوم:</font><br><font size="1">4/3/2008 - 8:21:00 PM</font><br>با سلام و ادای احترام وکسب اجازه از شهیر عزیز . از عماد جان عزیزم بخاطر زحمتی که کشیدند و اطلاعات خوبی که دادند ، به سهم خودم تشکر می کنم . با کمال شرمندگی از اینکه "بدون هماهنگی" و " اجازه ای قبلی شما" و "بسرعت" ، معدود اشتباهات تایپی را که با توجه به حجم مطلب ، امری کاملا اجتناب ناپذیر است ، سعی کردم که اصلاح کنم ، از شما پوزش می خواهم . البته عماد جان عزیزم ، بد نیست بدانید که در میزان اشتباه در تایپ هرگز به پای بنده نخواهید رسید ! شاهد ادعای حقیر، شهیر و حسین جان عزیزم هستند که خبردارند که چگونه بنده در یک فقره عملیات تایپ ، دو صفحه ای کامل را جا انداختم !!! کافی است بپرسید ، در نهایت صداقت ، بر این رکورد بی نظیر و تاریخی شهادت خواهند داد ! باز هم از زحمات عماد جان و نیز سوالات خوب حسین جان تشکر می کنم که ان وعده ای مقاله ای عیدانه ای مفصل شهیر را در باره ای زنده یاد مرحوم مصدق ، در وسع خود بجای اوردند . ضمن انکه هیچکدام از دوستان، این زحمت ارزشمند عماد جان را دلیل ان نخواهند دانست که شهیرعزیز بعد از بازگشت از مسافرت ، سر فرصت وعده ای خود را عمل نکنند . مشتاقانه اما نه عجولانه ، منتظر مقاله ای شهیر هم خواهیم ماند. با احترام : احسان<br>
- <br><font color="#800000">احسان جان، من فکر کردم قضیه شامل مرور زمان شده است. تا امروز که نرسیده ام دست به این پروژه بزنم. اگر عشق به حفظ ارتباط با شما ها نبود تا روز 25 اپریل به خودم مرخصی می دادم. در این سفر خدا می داند چند هزار مایل در 3 قاره را پیموده ام. از پوست کلفت خودم در عجبم که چطوری تونستم اخبار را دنبال کنم و چند مقاله کوتاه بنویسم. گرفتاری زیاد بود. شهیر</font>
+ <br>
+<font color="#800000">احسان جان، من فکر کردم قضیه شامل مرور زمان شده است. تا امروز که نرسیده ام دست به این پروژه بزنم. اگر عشق به حفظ ارتباط با شما ها نبود تا روز 25 اپریل به خودم مرخصی می دادم. در این سفر خدا می داند چند هزار مایل در 3 قاره را پیموده ام. از پوست کلفت خودم در عجبم که چطوری تونستم اخبار را دنبال کنم و چند مقاله کوتاه بنویسم. گرفتاری زیاد بود. شهیر</font>
 </li>
 <br><br><li>
 <font color="blue">عماد ۲۴ ساله از اصفهان:</font><br><font size="1">4/3/2008 - 7:14:00 PM</font><br>شهير جان اگر طولانی شد ببخشيد چاره ای نبود احسان جان از کمک شما نيز در ويرايش اين مطلب متشکرم اميدوارم حسين عزیز نيز راضی باشد<br>
- <br><font color="#800000">ممنون از زحمتی که کشیدی عماد جان. شهیر</font>
+ <br>
+<font color="#800000">ممنون از زحمتی که کشیدی عماد جان. شهیر</font>
 </li>
 <br><br><li>
 <font color="blue">حسین:</font><br><font size="1">4/3/2008 - 7:04:00 PM</font><br>سلام آقا شهیر با اجازه شما خواستم از عماد عزیز وهمچنین سرور بزرگوار آقااحسان تشکر کنم وبه آقا عمادبگویم دستت درد نکنه بابت زحمتت وفوق العاده عالی بود.قسمتی که نوشتید" خود دکتر مصدق در تقریراتشان به اشتباه بودن تصمیمشان مبنی بر استعفاء اقرار می کنند"واقعا جالب وحاکی از روح بلند دکتر مصدق هست .بااینکه سوالات خرد وریز زیاد هست اما از اینکه به سوالات عمده من با توجه به کتاب دکتر مصدق پاسخ دادید بازهم تشکر میکنم .میخواستم این پاسخ را برای نویسنده مقاله رجانیوز copy&amp;paste <br>
@@ -173,11 +199,17 @@ function ChangeSize( trgt,sz ) {
 <font color="blue">حاجی جفرسون:</font><br><font size="1">4/3/2008 - 6:06:00 PM FOO!</font><br>با درود از قدیم گفته اند که یک کلمه هم از مادر عروس بشنوید. بنابراین به افاضات اخیر کشور دوست و برادر و سوسیالیست چین عزیز و جان جانان کمونیست عنایت بفرمایید: رادیو فردا: ديپلمات ها در وين گفته اند: که چين، از مخالفان تشديد تحريم های ايران در شورای امينت، اطلاعات خود درباره ارتباط برنامه هسته ای تهران با تلاش برای دستيابی سلاح اتمی را در اختيار آژانس بين المللی انرژی اتمی قرار داده است. العجب!!!!!! انتخاب :با وجود اینکه چین به شدت با تحریمهای شورای امنیت سازمان ملل علیه ایران مخالفت می کرد، اطلاعاتی در رابطه با فعالیتهای هسته ای ایران در اختیار مقامات آژانس بین المللی انرژی اتمی قرار داده که بر اساس آن ایران در تلاش برای دست یابی به سلاح های اتمی است. به گزارش خبرنگار سرویس بین الملل خبرگزاری انتخاب به نقل از فاکس نیوز؛جان بولتون ،نمایندۀ پیشین ایالات متحدۀ امریکا در سازمان ملل،در این باره گفت: اقدام اینچنینی از سوی چین به دلیل روابط نظامی که میان دو کشور [ایران و چین] برقرار است، بسیار قابل توجه است. خبرنگار انتخاب می افزاید؛ در حالی چین به این اقدام دست زده است که همکاری های تجاری و نظامی ایران با این کشور بطور بی سابقه ای افزایش یافته است. یا باب الحوائج!!!!! رادیو زمانه: چین با وجود مخالفت با تحریم‌های شدید شورای امنیت علیه تهران، اطلاعاتی درباره تلاش‌های تهران برای ساخت تسلیحات هسته‌ای به آژانس بین‌المللی انرژی اتمی ارائه کرده است. آسوشیتدپرس با اعلام این خبر به نقل از چند دیپلمات آشنا با پرونده هسته‌ای ایران نوشت، پکن به همراه مسکو همواره بر سر راه شورای امنیت و امریکا برای اعمال مجازات های سخت تر علیه تهران به دلیل مقاومت هسته ای این کشور به صورت یک مانع عمل کرده‌اند. این گزارش می افزاید، تصمیم چین برای ارائه اطلاعاتی جهت استفاده در تحقیقات آژانس انرژی اتمی درباره برنامه تسلیحات هسته‌ای ایران، گویای افزایش نارضایتی بین‌المللی درباره برنامه هسته‌ای جمهوری اسلامی است که حتی تلاش برای ساخت چنین تسلیحاتی را نیز تکذیب می‌کند. بر اساس این گزارش، دو دیپلمات بلندپایه که ارتباط نزدیکی با آژانس بین‌المللی انرژی اتمی دارند این اقدام چین را برملا کرده‌اند. آژانس بین‌المللی انرژی اتمی از اظهار نظر در این باره خودداری کرده است. العجب. من مامور و معذور..حالا از پدر عروس چند کلمه بشنوید: سخنگوی آژانس بین المللی انرژی اتمی ادعای برخی از رسانه های غربی را درباره این که چین اطلاعاتی را درباره برنامه هسته ای ایران در اختیار آژانس قرار داده است ، تکذیب کرد . ملیسا فلمینگ در گفت و گو با خبرنگار واحد مرکزی خبر تاکید کرد : آژانس بین المللی انرژی اتمی هرگز درباره اطلاعات محرمانه دریافتی از کشورها اظهار نظر نمی کند . وی گفت: هم
 </li>
 </ul></div>
-</td></tr>
+</td>
+</tr>
 </table>
-</td></tr></table>
-</td></tr></table>
-</td></tr>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</td>
+</tr>
 </table>
 </body>
 </html>
index f7123e8..74d366e 100644 (file)
@@ -3,81 +3,91 @@
 <head><title>Top Stories News from Wired News</title></head>
 <body bgcolor="#FFFFFF" text="#000000" link="#333399" vlink="#660066" alink="#666699">
 
-<table border="0" width="600" cellspacing="0" cellpadding="0"><tr>
-<td valign="top" align="LEFT"><table border="0" cellpadding="0" cellspacing="0" width="468" height="60" bgcolor="#FFFFFF">
+<table border="0" width="600" cellspacing="0" cellpadding="0">
+  <tr>
+    <td valign="top" align="LEFT"><table border="0" cellpadding="0" cellspacing="0" width="468" height="60" bgcolor="#FFFFFF">
 <form method="GET" action="http://nsads.hotwired.com/event.ng/Type=click&amp;ProfileID=9688&amp;RunID=14074&amp;AdID=22584&amp;GroupID=1&amp;FamilyID=2684&amp;TagValues=8.25.156.159.166.171.172.174.179.180.181.182.183.196.197.199.208.389.412.436.2041.6750.78456.79630.81880&amp;Redirect=http://www.springstreet.com/aa/citysearch.htm" id="form1" name="form1">\r
 <tr>
 <td bgcolor="#330099"><input name="city" type="text" size="7" maxlength="20" value="Seattle"></td>\r
 <td rowspan="2" align="LEFT" bgcolor="FFFFFF"><input type="IMAGE" src="http://static.wired.com/advertising/blipverts/allapartments/990625jpa_ssthome.gif" width="375" height="60" border="0" value="search" hspace="0" alt="Search over 6,000,000 Apts with SpringStreet"></td>
-</tr>
+</tr>\r
 <tr><td bgcolor="#330099">\r
-<select name="state"><option value="WA" selected>WA\r
+<select name="state">\r
+<option value="WA" selected>WA\r
 </option>
 <option value="AL">AL</option>
-<option value="AK">AK</option>
-<option value="AZ">AZ</option>
-<option value="AR">AR</option>
-<option value="CA">CA</option>
-<option value="CO">CO</option>
-<option value="CT">CT</option>
-<option value="DE">DE</option>
-<option value="DC">DC</option>
-<option value="FL">FL</option>
+<option value="AK">AK</option>\r
+<option value="AZ">AZ</option>\r
+<option value="AR">AR</option>\r
+<option value="CA">CA</option>\r
+<option value="CO">CO</option>\r
+<option value="CT">CT</option>\r
+<option value="DE">DE</option>\r
+<option value="DC">DC</option>\r
+<option value="FL">FL</option>\r
 <option value="GA">GA</option>
-<option value="HI">HI</option>
-<option value="ID">ID</option>
-<option value="IL">IL</option>
+<option value="HI">HI</option>\r
+<option value="ID">ID</option>\r
+<option value="IL">IL</option>\r
 <option value="IN">IN</option>
 <option value="IA">IA</option>
 <option value="KS">KS</option>
-<option value="KY">KY</option>
-<option value="LA">LA</option>
+<option value="KY">KY</option>\r
+<option value="LA">LA</option>\r
 <option value="ME">ME</option>
-<option value="MD">MD</option>
-<option value="MA">MA</option>
+<option value="MD">MD</option>\r
+<option value="MA">MA</option>\r
 <option value="MI">MI</option>
 <option value="MN">MN</option>
-<option value="MS">MS</option>
-<option value="MO">MO</option>
+<option value="MS">MS</option>\r
+<option value="MO">MO</option>\r
 <option value="MT">MT</option>
-<option value="NE">NE</option>
+<option value="NE">NE</option>\r
 <option value="NV">NV</option>
-<option value="NH">NH</option>
-<option value="NJ">NJ</option>
+<option value="NH">NH</option>\r
+<option value="NJ">NJ</option>\r
 <option value="NM">NM</option>
-<option value="NY">NY</option>
-<option value="NC">NC</option>
-<option value="ND">ND</option>
+<option value="NY">NY</option>\r
+<option value="NC">NC</option>\r
+<option value="ND">ND</option>\r
 <option value="OH">OH</option>
-<option value="OK">OK</option>
-<option value="OR">OR</option>
-<option value="PA">PA</option>
+<option value="OK">OK</option>\r
+<option value="OR">OR</option>\r
+<option value="PA">PA</option>\r
 <option value="PR">PR</option>
-<option value="RI">RI</option>
-<option value="SC">SC</option>
+<option value="RI">RI</option>\r
+<option value="SC">SC</option> \r
 <option value="SD">SD</option>
 <option value="TN">TN</option>
-<option value="TX">TX</option>
-<option value="UT">UT</option>
-<option value="VT">VT</option>
-<option value="VA">VA</option>
-<option value="WA">WA</option>
-<option value="WV">WV</option>
-<option value="WI">WI</option>
-<option value="WY">WY</option></select><input type="hidden" name="source" value="2hb8bhc059">
+<option value="TX">TX</option>\r
+<option value="UT">UT</option>\r
+<option value="VT">VT</option>\r
+<option value="VA">VA</option>\r
+<option value="WA">WA</option>\r
+<option value="WV">WV</option>\r
+<option value="WI">WI</option>\r
+<option value="WY">WY</option>\r
+</select><input type="hidden" name="source" value="2hb8bhc059">\r
 </td></tr>
 </form>\r
 </table></td>
     <td valign="top" align="RIGHT"><a href="http://nsads.hotwired.com/event.ng/Type=click&amp;ProfileID=5597&amp;RunID=17167&amp;AdID=22588&amp;GroupID=1&amp;FamilyID=3228&amp;TagValues=8.25.159.171.172.174.179.180.181.182.183.196.197.199.208.241.389.412.436.2035.6749.6750.70367.78456.79630.81880&amp;Redirect=http:%2F%2Fwww.hp.com%2Fgo%2Foriginal%20" target="_top"><img src="http://static.wired.com/advertising/blipverts/hp_colorinkjet/hp_970c_120x60_6.gif" border="1" height="60" width="120" alt="True to the Original"></a></td>
-  </tr></table>
-<!-- WIRED NEWS header --><!-- CMD_HOST = scoop.hotwired.com --><a name="#"></a>
+  </tr>
+</table>
+
+<!-- WIRED NEWS header -->
+<!-- CMD_HOST = scoop.hotwired.com -->
+
+<a name="#"></a>
 <table border="0" width="600" cellspacing="0" cellpadding="0">
-<tr>
+
+  <tr>
 <td></td>
 <td colspan="2"><img src="http://static.wired.com/news/images/spacer.gif" height="5" width="447" alt=""></td>
-</tr>
-<tr>
-<td valign="BOTTOM" align="RIGHT" class="wired" bgcolor="#FFFFFF"><a href="/news/0,1287,,00.html"><img src="http://static.wired.com/news/images/wired_000000.gif" width="153" height="30" border="0"></a></td>
+</tr> 
+
+ <tr> 
+      <td valign="BOTTOM" align="RIGHT" class="wired" bgcolor="#FFFFFF"><a href="/news/0,1287,,00.html"><img src="http://static.wired.com/news/images/wired_000000.gif" width="153" height="30" border="0"></a></td>
       <td bgcolor="#FF0000" valign="BOTTOM" align="LEFT" width="97"><a href="/news/0,1287,,00.html"><img src="http://static.wired.com/news/images/news_ffffff.gif" width="103" height="30" border="0"></a></td>
 
 
 
 
         </tr>
-<tr>
-<td valign="MIDDLE" align="RIGHT" bgcolor="#FFFFFF"><img src="http://static.wired.com/news/images/spacer.gif" width="1" height="30"></td>
+    <tr> 
+      <td valign="MIDDLE" align="RIGHT" bgcolor="#FFFFFF"><img src="http://static.wired.com/news/images/spacer.gif" width="1" height="30"></td>
       
       <td colspan="2" bgcolor="#999999">
 
        <table border="0" cellspacing="0" cellpadding="5">
 <form name="RedirectSearch" action="http://redirect.wired.com/search">
-                <tr>
-<td> 
+                <tr>  
+            <td> 
 <font face="courier" size="1"><input type="TEXT" name="query" size="20" value=""></font>
             </td>
 
             <td>
-<select name="url"><option value="http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&amp;Filter=docs_filter.hts&amp;ResultTemplate=vignette.hts&amp;Collection=vignette&amp;QueryMode=Internet&amp;Query=" selected>Wired News</option>
-<option value="http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&amp;Filter=docs_filter.hts&amp;ResultTemplate=webmonkey.hts&amp;Collection=webmonkey&amp;QueryMode=Internet&amp;Query=">Webmonkey</option>
-<option value="http://search.hotwired.com/search97/s97.vts?collection=webmonkey_guides&amp;Action=FilterSearch&amp;filter=docs_filter.hts&amp;ResultTemplate=webmonkey_guides.hts&amp;QueryMode=Internet&amp;Query=">Webmonkey Guides</option>
-<option value="http://search.hotwired.com/search97/s97.vts?collection=hotwired&amp;Action=FilterSearch&amp;filter=docs_filter.hts&amp;ResultTemplate=hotwired_archive.hts&amp;QueryMode=Internet&amp;Query=">HotWired Archives</option>
-<option value="http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&amp;Filter=docs_filter.hts&amp;ResultTemplate=magazine.hts&amp;Collection=magazine&amp;QueryMode=Internet&amp;Query=">Wired Magazine</option>
-<option value="http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&amp;Filter=docs_filter.hts&amp;ResultTemplate=animation.hts&amp;Collection=animation&amp;QueryMode=Internet&amp;Query=">Animation Express</option>
-<option value="http://search.hotwired.com/search97/s97.vts?collection=suck&amp;Action=FilterSearch&amp;filter=docs_filter.hts&amp;ResultTemplate=suck.hts&amp;QueryMode=Internet&amp;Query=">Suck.com</option>
-<option value="http://search.hotwired.com/search97/s97.vts?collection=uber_hotwired&amp;Action=FilterSearch&amp;filter=docs_filter.hts&amp;ResultTemplate=uber_hotwired.hts&amp;QueryMode=Internet&amp;Query=">All of HotWired</option>
-<option value="http://www.hotbot.com/?SM=MC&amp;DV=0&amp;LG=any&amp;RD=RG&amp;DC=10&amp;DE=2&amp;_v=2&amp;OPs=MDRTP&amp;MT=">The Web -&gt; HotBot</option></select>
-</td>
+<select name="url">
+
+  <option value="http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&amp;Filter=docs_filter.hts&amp;ResultTemplate=vignette.hts&amp;Collection=vignette&amp;QueryMode=Internet&amp;Query=" selected>Wired News</option>
+  <option value="http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&amp;Filter=docs_filter.hts&amp;ResultTemplate=webmonkey.hts&amp;Collection=webmonkey&amp;QueryMode=Internet&amp;Query=">Webmonkey</option>
+ <option value="http://search.hotwired.com/search97/s97.vts?collection=webmonkey_guides&amp;Action=FilterSearch&amp;filter=docs_filter.hts&amp;ResultTemplate=webmonkey_guides.hts&amp;QueryMode=Internet&amp;Query=">Webmonkey Guides</option>
+ <option value="http://search.hotwired.com/search97/s97.vts?collection=hotwired&amp;Action=FilterSearch&amp;filter=docs_filter.hts&amp;ResultTemplate=hotwired_archive.hts&amp;QueryMode=Internet&amp;Query=">HotWired Archives</option>
+  <option value="http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&amp;Filter=docs_filter.hts&amp;ResultTemplate=magazine.hts&amp;Collection=magazine&amp;QueryMode=Internet&amp;Query=">Wired Magazine</option>
+  <option value="http://search.hotwired.com/search97/s97.vts?Action=FilterSearch&amp;Filter=docs_filter.hts&amp;ResultTemplate=animation.hts&amp;Collection=animation&amp;QueryMode=Internet&amp;Query=">Animation Express</option> 
+ <option value="http://search.hotwired.com/search97/s97.vts?collection=suck&amp;Action=FilterSearch&amp;filter=docs_filter.hts&amp;ResultTemplate=suck.hts&amp;QueryMode=Internet&amp;Query=">Suck.com</option>
+ <option value="http://search.hotwired.com/search97/s97.vts?collection=uber_hotwired&amp;Action=FilterSearch&amp;filter=docs_filter.hts&amp;ResultTemplate=uber_hotwired.hts&amp;QueryMode=Internet&amp;Query=">All of HotWired</option>
+ <option value="http://www.hotbot.com/?SM=MC&amp;DV=0&amp;LG=any&amp;RD=RG&amp;DC=10&amp;DE=2&amp;_v=2&amp;OPs=MDRTP&amp;MT=">The Web -&gt; HotBot</option>
+</select>
+
+
+
+            </td>
             <td> 
               <input type="SUBMIT" name="SUBMIT" value="SEARCH">
-</td>
+            </td>
           </tr>
-</form>        
+  </form>        
        </table>
-</td>
+          </td>
         </tr>
 <!-- 
 <TR>
 </TR>
 -->
 </table>
-<!-- end WIRED NEWS header --><!-- begin upper left side Navigation --><table border="0" cellpadding="3" cellspacing="0" align="LEFT" bgcolor="#FFFFFF">
-<tr>
-<td bgcolor="#FF0000"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> 
+<!-- end WIRED NEWS header -->
+
+<!-- begin upper left side Navigation -->
+
+<table border="0" cellpadding="3" cellspacing="0" align="LEFT" bgcolor="#FFFFFF">
+  <tr> 
+    <td bgcolor="#FF0000"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> 
       <img src="http://static.wired.com/news/images/spacer.gif" width="147" height="1" border="0"><br><b>SECTIONS</b></font></td>
   </tr>
+
 <tr><td bgcolor="#CCFFCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="/news/business/0,1367,,00.html">Business</a></font></td></tr>
 <tr><td bgcolor="#99FF99"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="/news/culture/0,1284,,00.html">Culture</a></font></td></tr>
 <tr><td bgcolor="#CCFFCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="/news/technology/0,1282,,00.html">Technology</a></font></td></tr>
 <td bgcolor="#FF0000"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF">
 <b>WIRE SERVICE NEWS</b></font></td>
 </tr>
+
 <tr>
 <td bgcolor="#99FF99"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="/news/news/reuters/">Top Headlines</a></font></td>
 </tr>
+
 <tr>
 <td bgcolor="#CCFFCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="/news/news/reuters/sports/">Sports</a></font></td>
 </tr>
+
 <tr>
 <td bgcolor="#99FF99"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="/news/news/reuters/business/">Finance</a></font></td>
 </tr>
-<!-- End upper left nav --><!-- Begin lower Left Nav --><tr>
-<td bgcolor="#FF0000"><font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> 
+<!-- End upper left nav --><!-- Begin lower Left Nav -->
+    <tr> 
+    <td bgcolor="#FF0000"><font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> 
       <b><font size="1">FREE DELIVERY</font></b></font></td>
     </tr>
-<tr>
-<td bgcolor="#99FF99">
-<table cellspacing="0" cellpadding="0" border="0"><tr>
+    <tr> 
+    <td bgcolor="#99FF99">
+<table cellspacing="0" cellpadding="0" border="0">
+               <tr>
 <td bgcolor="#99FF99">
                 <form action="http://r.hotwired.com/r/hw_wm_r_nav_nwsltr/http://perl.hotwired.com/massmail/cgiParser.cgi" method="get" target="_top">
 
- <input type="hidden" name="success_page" value="http://www.hotwired.com/email/signup/wirednews-ascii.html"><input type="hidden" name="failure_page" value="http://www.hotwired.com/email/signup/wirednews-ascii.html"><input type="hidden" name="LIST" value="wn_ascii"><input type="hidden" name="SOURCE" value="other"><input type="hidden" name="ACTION" value="subscribe"><input type="TEXT" name="from" size="10" value="enter email">&nbsp;
+ <input type="hidden" name="success_page" value="http://www.hotwired.com/email/signup/wirednews-ascii.html">
+<input type="hidden" name="failure_page" value="http://www.hotwired.com/email/signup/wirednews-ascii.html">
+<input type="hidden" name="LIST" value="wn_ascii">
+<input type="hidden" name="SOURCE" value="other">
+ <input type="hidden" name="ACTION" value="subscribe">
+<input type="TEXT" name="from" size="10" value="enter email">&nbsp;
 </form>
 </td> 
                <td valign="top" bgcolor="#99FF99">
-               <input type="SUBMIT" name="SUBMIT" value="GO">
-</td>
-       </tr></table>
+               <input type="SUBMIT" name="SUBMIT" value="GO"> 
+
+  </td>
+       </tr>    
+</table>
 </td>
   </tr>
-<tr>
-<td bgcolor="#FF0000"><font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> 
+  <tr> 
+    <td bgcolor="#FF0000"><font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> 
       <b><font size="1">STOCKS</font></b></font></td>
   </tr>
-<tr>
-<td bgcolor="#99FF99"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Get Quote:</font></td>
+  <tr> 
+    <td bgcolor="#99FF99"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Get Quote:</font></td>
   </tr>
-<tr>
-<td bgcolor="#99FF99" marginwidth="0" marginheight="0"><form method="get" action="http://r.wired.com/r/10020/http://stocks.wired.com/stocks_quotes.asp">
+  <tr>
+    <td bgcolor="#99FF99" marginwidth="0" marginheight="0"><form method="get" action="http://r.wired.com/r/10020/http://stocks.wired.com/stocks_quotes.asp">
 <input type="TEXT" name="Symbol" size="12">&nbsp;<input type="SUBMIT" name="submit" value="GO">
 </form></td>
   </tr>
-<!-- BEGIN BUTTON ADS --><tr>
+<!-- BEGIN BUTTON ADS -->
+  
+ <tr>
 <td bgcolor="#CCFFCC">
-<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000">Financial Services</font><br><center>
+<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000">Financial Services</font><br>
+<center>
 <img src="http://static.wired.com/news/images/spacer.gif" height="3" width="5" alt=""><br><img src="http://static.wired.com/news/images/button_ads_news10.gif" width="143" height="56" border="0" alt="" usemap="#buttons" hspace="0" vspace="0">
 </center>
 
-<map name="buttons"><area shape="RECT" alt="Datek" coords="0,0,69,24" href="http://r.wired.com/r/1649/http://ads16.focalink.com/SmartBanner/page/1266.631">
-<area shape="RECT" alt="Wired Index Fund" coords="73,0,142,24" href="http://r.wired.com/r/227/http://www.gffunds.com/wired">
-<area shape="RECT" alt="internet.com Index Fund" coords="73,31,142,55" href="http://r.wired.com/r/298/http://www.gffunds.com/isdex/">
-<area shape="RECT" alt="GetSmart's MortgageFinder" coords="0,31,69,55" href="http://r.wired.com/r/294/http://www.getsmartinc.com/mortgage/HomeBanner?BANNERNAME=www.getsmartinc.com/mwired001m6075x25"></map>
-</td>
-  </tr>
-<!-- END BUTTON ADS --><tr>
-<td bgcolor="#99FF99"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="http://redirect.wired.com/redir/51/http://stocks.wired.com/">Today's Summary</a></font></td>
+<map name="buttons">
+        <area shape="RECT" alt="Datek" coords="0,0,69,24" href="http://r.wired.com/r/1649/http://ads16.focalink.com/SmartBanner/page/1266.631">
+        <area shape="RECT" alt="Wired Index Fund" coords="73,0,142,24" href="http://r.wired.com/r/227/http://www.gffunds.com/wired">
+        <area shape="RECT" alt="internet.com Index Fund" coords="73,31,142,55" href="http://r.wired.com/r/298/http://www.gffunds.com/isdex/">
+        <area shape="RECT" alt="GetSmart's MortgageFinder" coords="0,31,69,55" href="http://r.wired.com/r/294/http://www.getsmartinc.com/mortgage/HomeBanner?BANNERNAME=www.getsmartinc.com/mwired001m6075x25"></map>
+        </td>
+  </tr> <!-- END BUTTON ADS -->
+  
+  <tr> 
+    <td bgcolor="#99FF99"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="http://redirect.wired.com/redir/51/http://stocks.wired.com/">Today's Summary</a></font></td>
   </tr>
-<tr>
-<td bgcolor="#CCFFCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="http://r.wired.com/r/hb_fin_r_wn_top/http://stocks.wired.com/stocks_indexes_detail.asp?Symbol=%24WIRED">Wired Index</a> | <a href="http://redirect.wired.com/redir/52/http://stocks.wired.com/stocks_indexes.asp%20">All Indexes</a></font></td>
+  <tr> 
+    <td bgcolor="#CCFFCC"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="http://r.wired.com/r/hb_fin_r_wn_top/http://stocks.wired.com/stocks_indexes_detail.asp?Symbol=%24WIRED">Wired Index</a> | <a href="http://redirect.wired.com/redir/52/http://stocks.wired.com/stocks_indexes.asp%20">All Indexes</a></font></td>
   </tr>
-<tr>
-<td bgcolor="#99FF99"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="http://redirect.wired.com/redir/53/http://stocks.wired.com/stocks_portfolios.asp">Portfolios</a></font></td>
+  <tr> 
+    <td bgcolor="#99FF99"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000"><a href="http://redirect.wired.com/redir/53/http://stocks.wired.com/stocks_portfolios.asp">Portfolios</a></font></td>
   </tr>
-<!-- BEGIN B&N spot --><tr>
-<td bgcolor="#FF0000"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"><b>FIND A BOOK</b></font></td>
+
+<!-- BEGIN B&N spot -->
+
+<tr> 
+ <td bgcolor="#FF0000"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"><b>FIND A BOOK</b></font></td>
 </tr>
 <tr><td bgcolor="#CCFFCC">
 <table cellspacing="0" cellpadding="0" border="0" width="145">
-<tr><td bgcolor="#CCFFCC">
+                <tr><td bgcolor="#CCFFCC">
                 <form action="http://r.wired.com/r/wn_nav_c_bn/http://barnesandnoble.bfast.com/booklink/click">
-<input type="hidden" name="sourceid" value="383471"><input type="hidden" name="categoryid" value="categorydropdown"><font size="2">
-                <select name="Subjects" size="4"><option value="301">Business Top 20
+<input type="hidden" name="sourceid" value="383471">
+<input type="hidden" name="categoryid" value="categorydropdown">
+                <font size="2">
+                <select name="Subjects" size="4">
+<option value="301">Business Top 20
 </option>
 <option value="500">Computers
 </option>
  </option></select></font>
 </form>
 </td></tr>
-<tr align="left" valign="top">
-<td valign="top" bgcolor="#CCFFCC"> <input type="submit" value="GO"><img src="http://barnesandnoble.bfast.com/booklink/serve?sourceid=383471&amp;is_search=Y" border="0" align="top"><!--
+ <tr align="left" valign="top">
+                <td valign="top" bgcolor="#CCFFCC"> <input type="submit" value="GO">
+
+<img src="http://barnesandnoble.bfast.com/booklink/serve?sourceid=383471&amp;is_search=Y" border="0" align="top">
+<!--
 <IMG SRC="http://www.wired.com/partner/bn/trackingimg/ot_wn_nav_c_bn.gif" border=0 width=1 height=1 align=top>
 -->
 </td>
                  
                 </tr>
-<tr align="left" valign="top">
-<td align="left" valign="top" colspan="2" rowspan="1" bgcolor="#CCFFCC">
+                <tr align="left" valign="top">
+        <td align="left" valign="top" colspan="2" rowspan="1" bgcolor="#CCFFCC">
 <p>
         <font size="1" face="Verdana, Arial, Helvetica, " color="#000000">Powered by <a href="http://r.wired.com/r/wn_nav_c_bn/http://barnesandnoble.bfast.com/booklink/click?sourceid=383471">barnesandnoble.com</a>
  </font>
-<br clear="all"></p>
+<br clear="all">
+
+
+</p>
 </td>
-        </tr>
-</table>
+        </tr>  
+        </table>
+
 </td></tr>
-<!-- END B&N spot --><!-- BEGIN MAGAZINE SPOT --><tr>
-<td bgcolor="#000000"><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>WIRED 
+ <!-- END B&N spot -->   
+  
+<!-- BEGIN MAGAZINE SPOT -->
+
+ <tr> 
+    <td bgcolor="#000000"><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>WIRED 
       MAGAZINE </b></font></td>
   </tr>
-<tr>
+<tr> 
 <td bgcolor="#FFFF99" align="CENTER">
 <font face="verdana, arial, helvetica, sans-serif" size="1">
 <b>
-<br><a href="http://www.wired.com/wired/"><img src="http://static.wired.com/news/images/wiredcover.gif" width="91" height="109" border="0" alt="Wired Magazine"></a><br></b>
+<br>
+
+<a href="http://www.wired.com/wired/"><img src="http://static.wired.com/news/images/wiredcover.gif" width="91" height="109" border="0" alt="Wired Magazine"></a><br></b>
 
 Issue 7.11
 </font>
 </td>
 </tr>
-<tr>
+
+<tr> 
 <td bgcolor="#FFFF99" align="center">
 <font face="verdana, arial, helvetica, sans-serif" size="1"> 
 
@@ -285,96 +347,201 @@ Issue 7.11
 </font>
 </td>
 </tr>
-<!-- END MAGAZINE SPOT --><tr>
-<td bgcolor="#000000"> 
+<!-- END MAGAZINE SPOT -->
+
+  <tr>
+    <td bgcolor="#000000"> 
     <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"><b>HOTWIRED</b></font>
 </td>
   </tr>
-<tr>
-<td bgcolor="#FFFF99"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000">
-<a href="http://www.hotwired.com/">Frontdoor</a><br><a href="http://www.hotwired.com/webmonkey/">Webmonkey</a><br><a href="http://www.hotwired.com/webmonkey/guides/index.html">Webmonkey Guides</a><br><a href="http://www.hotwired.com/rgb/">RGB Gallery</a><br><a href="http://www.hotwired.com/animation/">Animation Express</a><br><a href="http://go.suck.com/su_wnfd">Suck.com</a><br></font>
+  <tr> 
+    <td bgcolor="#FFFF99"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000">
+<a href="http://www.hotwired.com/">Frontdoor</a><br>
+<a href="http://www.hotwired.com/webmonkey/">Webmonkey</a><br>
+<a href="http://www.hotwired.com/webmonkey/guides/index.html">Webmonkey Guides</a><br>
+<a href="http://www.hotwired.com/rgb/">RGB Gallery</a><br>
+<a href="http://www.hotwired.com/animation/">Animation Express</a><br>
+<a href="http://go.suck.com/su_wnfd">Suck.com</a><br>
+</font>
 </td>
   </tr>
-<tr>
-<td bgcolor="#000000"> 
+  
+    <tr>
+    <td bgcolor="#000000"> 
     <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"><b>HOTBOT</b></font>
 </td>
   </tr>
-<tr>
-<td bgcolor="#FFFF99"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000">
-<a href="http://redirect.wired.com/redir/54/http://www.hotbot.com/">Search</a><br><a href="http://shop.hotbot.com/">Shopping</a><br></font>
+  <tr> 
+    <td bgcolor="#FFFF99"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#000000">
+<a href="http://redirect.wired.com/redir/54/http://www.hotbot.com/">Search</a><br>
+<a href="http://shop.hotbot.com/">Shopping</a><br>
+</font>
 </td>
   </tr>
-<tr>
+  
+  <tr>
 <td>
-  <br><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
+  <br>
+  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">
   <font face="Verdana, Arial, Helvetica, sans-serif" size="1">
-  Wired News <a href="/news/who/0,1362,,00.html">staff</a><br><br><!-- Wired News is <a href="http://www.wired.com/news/jobs.html">hiring</a><br><br> --><b><a href="/news/feedback/0,1364,,00.html">Contact us</a></b></font>
+  Wired News <a href="/news/who/0,1362,,00.html">staff</a><br><br>
+
+  <!-- Wired News is <a href="http://www.wired.com/news/jobs.html">hiring</a><br><br> -->
+
+  <b><a href="/news/feedback/0,1364,,00.html">Contact us</a></b></font>
 
   
-  <br><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Wired News  delivered<br>by <a href="/news/palmpilot/0,1365,,00.html">PalmPilot</a>,<br><a href="http://www.hotwired.com/email/signup/wn_outlook.html">Outlook  Express</a>,<br><a href="http://redirect.wired.com/redir/55/http://form.netscape.com/ibd/html/ibd_frameset.html">In-Box Direct</a>,<br>
-or <a href="/news/pointcast/0,1366,,00.html">PointCast</a></font><br><!-- TRACKING --><img src="http://www.wired.com/special/modx/news.gif" height="1" width="1" alt=""></font>
+  <br><br>
+  
+  <font face="Verdana, Arial, Helvetica, sans-serif" size="1">Wired News  delivered<br>by <a href="/news/palmpilot/0,1365,,00.html">PalmPilot</a>,<br><a href="http://www.hotwired.com/email/signup/wn_outlook.html">Outlook  Express</a>,<br><a href="http://redirect.wired.com/redir/55/http://form.netscape.com/ibd/html/ibd_frameset.html">In-Box Direct</a>,<br>
+or <a href="/news/pointcast/0,1366,,00.html">PointCast</a></font><br>
+
+<!-- TRACKING -->
+<img src="http://www.wired.com/special/modx/news.gif" height="1" width="1" alt="">
+</font>
 </td>
   </tr>
+
 </table>
-<!-- end lower left side Navigation --><!-- CONTENT TABLE --><table border="0" width="447" cellspacing="0" cellpadding="0" bordercolor="#66FF00">
-<tr>
-<td valign="TOP" align="LEFT" rowspan="2">
+
+<!-- end lower left side Navigation -->
+<!-- CONTENT TABLE -->
+
+<table border="0" width="447" cellspacing="0" cellpadding="0" bordercolor="#66FF00">
+ <tr>
+  <td valign="TOP" align="LEFT" rowspan="2">
    <img src="http://static.wired.com/news/images/spacer.gif" height="1" width="15" alt=""><br>
-</td>
+  </td>
   <td colspan="3" valign="TOP" align="LEFT">
-<img src="http://static.wired.com/news/images/spacer.gif" height="7" width="432" alt=""><br><!-- SQL query for Package here --><font face="Verdana, Arial, Geneva, sans-serif" size="2"><b><i>Nomad's Land</i></b></font><br><img src="http://static.wired.com/news/images/pix155.gif" height="10" width="155" alt=""><br><!-- IBD_SUBJECT: Homeless, but ID'd, in Seattle --><font face="Arial, Helvetica, sans-serif" size="5"><b><a href="/news/politics/0,1283,31911,00.html">Homeless, but ID'd, in Seattle</a></b></font><br><font size="1" face="Verdana, Arial, Geneva, sans-serif" color="#FF0000">8:15 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The city council approves a plan to track the homeless by a numbering system, saying it'll improve services. The implications worry privacy advocates, naturally. By Craig Bicknell.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/politics/0,1283,,00.html">in&nbsp;Politics</a></i></font><br><table bgcolor="#F0F0F0" cellpadding="0" cellspacing="0" border="0" width="147" align="RIGHT">
-<!-- Commentary Frag Begin --><tr>
-<td bgcolor="#000000">&nbsp;</td>
+<img src="http://static.wired.com/news/images/spacer.gif" height="7" width="432" alt=""><br>
+
+
+<!-- SQL query for Package here -->
+
+<font face="Verdana, Arial, Geneva, sans-serif" size="2"><b><i>Nomad's Land</i></b></font><br><img src="http://static.wired.com/news/images/pix155.gif" height="10" width="155" alt=""><br><!-- IBD_SUBJECT: Homeless, but ID'd, in Seattle --><font face="Arial, Helvetica, sans-serif" size="5"><b><a href="/news/politics/0,1283,31911,00.html">Homeless, but ID'd, in Seattle</a></b></font><br><font size="1" face="Verdana, Arial, Geneva, sans-serif" color="#FF0000">8:15 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The city council approves a plan to track the homeless by a numbering system, saying it'll improve services. The implications worry privacy advocates, naturally. By Craig Bicknell.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/politics/0,1283,,00.html">in&nbsp;Politics</a></i></font><br><table bgcolor="#F0F0F0" cellpadding="0" cellspacing="0" border="0" width="147" align="RIGHT">
+ <!-- Commentary Frag Begin -->
+        <tr>
+          <td bgcolor="#000000">&nbsp;</td>
           <td bgcolor="#000000"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"><b>HITS &amp; MISC.</b></font></td>
         </tr>
-<tr>
-<td>&nbsp;</td>
+        <tr>
+          <td>&nbsp;</td>
           <td>
-<img src="http://static.wired.com/news/images/spacer.gif" height="5" width="5" alt=""><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/commentarySection/0,1292,31664,00.html">Calendar of E-Vents</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Ongoing goings-on. </font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/commentarySection/0,1292,31926,00.html">Rants &amp; Raves</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Readers on Apple's G4 ... AOL's passwords ... MS vs. Linux.</font><br><br></font></font>
+<img src="http://static.wired.com/news/images/spacer.gif" height="5" width="5" alt=""><br>
+
+               <font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/commentarySection/0,1292,31664,00.html">Calendar of E-Vents</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Ongoing goings-on. </font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/commentarySection/0,1292,31926,00.html">Rants &amp; Raves</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Readers on Apple's G4 ... AOL's passwords ... MS vs. Linux.</font><br><br>  </font></font>
 </td>
         </tr>
-<!-- Commentary Frag End --><tr>
+<!-- Commentary Frag End -->
+<tr> 
 <td align="left" bgcolor="#000000">&nbsp;</td> 
 <td bgcolor="#000000"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"><b>CURRENT HOO-HA</b></font></td>
 </tr>
-<tr>
+
+<tr> 
 <td>&nbsp;</td>
 <td>
-<img src="http://static.wired.com/news/images/spacer.gif" height="5" width="5" alt=""><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/mp3/0,1285,,00.html">MP3 Rocks the Web</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Download the sound.  <br><i>Sponsored by <a href="http://r.hotwired.com/r/wn_fd_mp3_r_mscm_txt/http://webfarm.mediaplex.com/click_thru_request/164-1361b-1052" style="text-decoration:none"><font color="#000000">Musicmaker</font></a></i></font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/wireless/0,1382,,00.html">The Wireless World</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Networking gets unplugged.  <br><i>Sponsored by <a href="http://www.ericsson.se/get/internet/default.shtml" style="text-decoration:none"><font color="#000000">Ericsson</font></a></i></font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/digiwood/0,1412,,00.html">Digital Hollywood</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">The buzz of tech.</font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/ipo/0,1350,,00.html">IPO Outlook</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Deals in the pipeline.  <br><i>Sponsored by <a href="http://r.hotwired.com/r/wn_ipo_r_sun_txt/http://sun.com/ads/smi/brand/hotwired.html" style="text-decoration:none"><font color="#000000">Sun</font></a></i></font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/ebiz/0,1272,,00.html">E-Biz</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Business unusual.  <br><i>Sponsored by <a href="http://r.wired.com/r/wn_fd_r_ebiz_ibm_txt/http://www.ibm.com" style="text-decoration:none"><font color="#000000">IBM</font></a></i></font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/medtech/0,1286,,00.html">Med-Tech Center</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">From the bleeding edge.<br><i>Sponsored by WebMD</i></font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/linux/0,1411,,00.html">The Linux Effect</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Not just for geeks.</font><br><br><img src="http://static.wired.com/news/images/spacer.gif" height="7" width="5" alt=""><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/exec/0,1370,,00.html">Executive Summary</a></b></font><br><font size="1" face="Arial, Helvetica, sans-serif" color="#000000">CEOs, COOs, CIOs unite.  <br><i>Sponsored by <a href="http://r.wired.com/r/wn_exec_r_vign/http://www.vignette.com/" style="text-decoration:none"><font color="#000000">Vignette</font></a></i></font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/school/0,1383,,00.html">Making the Grade</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Reading, writing, and ROM.  <br><i>Sponsored by <a href="http://r.hotwired.com/r/wn_sch_r_nav_uop/http://ads25.focalink.com/SmartBanner/page?12630.53" style="text-decoration:none"><font color="#000000">U of Phoenix</font></a></i></font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/infostructure/0,1377,,00.html">Infostructure</a></b></font><br><font size="1" face="Arial, Helvetica, sans-serif" color="#000000">An IS/IT resource <br><i>Sponsored by <a href="http://r.wired.com/r/wn_is_r_ssec/http://ad.doubleclick.net/clk;653163;3599571;s?http://www.sprintbiz.com/s%0Aervlet/appservlet?from=/wired/sprint/&amp;template=/security/security.html&amp;SITE=%0Awired.com&amp;BANNER=Sprint" style="text-decoration:none"><font color="#000000">Sprint</font></a></i></font></font><br><br><font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/y2k/0,1360,,00.html">Y2K Watch</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Tick... Tick... Tick...</font><br><br><font face="Arial, Helvetica, sans-serif" size="2"><b><i><a href="/news/special_reports/1,1293,,00.html">More Hoo-Ha</a></i></b></font><br>&nbsp;<br></font></font></font></font></font></font></font></font>
+<img src="http://static.wired.com/news/images/spacer.gif" height="5" width="5" alt="">
+<br>
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/mp3/0,1285,,00.html">MP3 Rocks the Web</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Download the sound.  <br><i>Sponsored by <a href="http://r.hotwired.com/r/wn_fd_mp3_r_mscm_txt/http://webfarm.mediaplex.com/click_thru_request/164-1361b-1052" style="text-decoration:none"><font color="#000000">Musicmaker</font></a></i></font><br><br> 
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/wireless/0,1382,,00.html">The Wireless World</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Networking gets unplugged.  <br><i>Sponsored by <a href="http://www.ericsson.se/get/internet/default.shtml" style="text-decoration:none"><font color="#000000">Ericsson</font></a></i></font><br><br> 
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/digiwood/0,1412,,00.html">Digital Hollywood</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">The buzz of tech.</font><br><br> 
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/ipo/0,1350,,00.html">IPO Outlook</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Deals in the pipeline.  <br><i>Sponsored by <a href="http://r.hotwired.com/r/wn_ipo_r_sun_txt/http://sun.com/ads/smi/brand/hotwired.html" style="text-decoration:none"><font color="#000000">Sun</font></a></i></font><br><br> 
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/ebiz/0,1272,,00.html">E-Biz</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Business unusual.  <br><i>Sponsored by <a href="http://r.wired.com/r/wn_fd_r_ebiz_ibm_txt/http://www.ibm.com" style="text-decoration:none"><font color="#000000">IBM</font></a></i></font><br><br> 
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/medtech/0,1286,,00.html">Med-Tech Center</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">From the bleeding edge.<br><i>Sponsored by WebMD</i></font><br><br> 
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/linux/0,1411,,00.html">The Linux Effect</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Not just for geeks.</font><br><br> <img src="http://static.wired.com/news/images/spacer.gif" height="7" width="5" alt=""><br>
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/exec/0,1370,,00.html">Executive Summary</a></b></font><br><font size="1" face="Arial, Helvetica, sans-serif" color="#000000">CEOs, COOs, CIOs unite.  <br><i>Sponsored by <a href="http://r.wired.com/r/wn_exec_r_vign/http://www.vignette.com/" style="text-decoration:none"><font color="#000000">Vignette</font></a></i></font><br><br> 
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/school/0,1383,,00.html">Making the Grade</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Reading, writing, and ROM.  <br><i>Sponsored by <a href="http://r.hotwired.com/r/wn_sch_r_nav_uop/http://ads25.focalink.com/SmartBanner/page?12630.53" style="text-decoration:none"><font color="#000000">U of Phoenix</font></a></i></font><br><br> 
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/infostructure/0,1377,,00.html">Infostructure</a></b></font><br><font size="1" face="Arial, Helvetica, sans-serif" color="#000000">An IS/IT resource <br><i>Sponsored by <a href="http://r.wired.com/r/wn_is_r_ssec/http://ad.doubleclick.net/clk;653163;3599571;s?http://www.sprintbiz.com/s%0Aervlet/appservlet?from=/wired/sprint/&amp;template=/security/security.html&amp;SITE=%0Awired.com&amp;BANNER=Sprint" style="text-decoration:none"><font color="#000000">Sprint</font></a></i></font></font><br><br> 
+
+<font size="2" face="Arial,Helvetica, sans-serif"><b><a href="/news/y2k/0,1360,,00.html">Y2K Watch</a></b></font><br><font size="2" face="Arial, Helvetica, sans-serif"><font size="1" face="Arial, Geneva, sans-serif" color="#000000">Tick... Tick... Tick...</font><br><br> 
+
+<font face="Arial, Helvetica, sans-serif" size="2"><b><i><a href="/news/special_reports/1,1293,,00.html">More Hoo-Ha</a></i></b></font><br>&nbsp;<br>
+
+</font></font></font></font></font></font></font></font>
 </td>
 </tr>
-<!-- start of Gen News --><tr>
-<td bgcolor="#000000">&nbsp;</td>
+<!-- start of Gen News -->
+                <tr> 
+                  <td bgcolor="#000000">&nbsp;</td>
           <td bgcolor="#000000"><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"><b>MEANWHILE...</b></font></td>
         </tr>
-<tr>
-<td>&nbsp;</td>
+
+        <tr> 
+          <td>&nbsp;</td>
           <td align="left" valign="top">
-          <img src="http://static.wired.com/news/images/spacer.gif" height="5" width="5" alt=""><br><!-- 31942 --><font size="2" face="Arial, Helvetica, sans-serif" color="#000000"><b>F&uuml;hrer Furor</b></font><br><font size="1" face="Arial, Geneva, sans-serif" color="#000000"><p>\r
+          <img src="http://static.wired.com/news/images/spacer.gif" height="5" width="5" alt=""><br>
+
+
+<!-- 31942 -->
+<font size="2" face="Arial, Helvetica, sans-serif" color="#000000"><b>F&uuml;hrer Furor</b></font><br><font size="1" face="Arial, Geneva, sans-serif" color="#000000"><p>\r
 Contruction workers in Berlin opened an old wound in the German psyche this week when they accidentally stumbled across Adolf Hitler's bunker while excavating near the Brandenburg Gate. The bunker, just south of the Gate, was where Hitler and his closest associates barricaded themselves as the Red Army approached Berlin in the waning days of World War II. It is also where the F&uuml;hrer and his bride, Eva Braun, committed suicide rather than fall into the hands of the Russians. Although the bunker's location has never been a mystery, it has been sealed off since the end of the war to keep neo-Nazis from turning it into a shrine.\r
 <br></p>
 <li>More from <a href="http://www.lycos.com/news/flash/hitlerbunker.html?v=wn1015&amp;lpv=1">Lycos</a>
 </li></font><br><br>
-</td>
+ </td>
         </tr>
 <!-- end of Gen News -->
 </table>
+
+
 <font size="1">&nbsp;<br></font>
 
-<br><font face="Verdana, Arial, Geneva, sans-serif" size="2"><b><i>Other Top Stories</i></b></font><br><img src="http://static.wired.com/news/images/pix155.gif" height="10" width="155" alt=""><br><!-- SQL query here --><!-- IBD_SUBJECT:Wall Street Keeps Reeling --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/reuters/0,1349,31934,00.html">Wall Street Keeps Reeling</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">10:15 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The Dow and Nasdaq suffer sizeable losses during the first half of Friday trading. Why? Wholesale prices are the highest this decade, and Greenspan is concerned about stock prices.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/reuters/0,1349,,00.html">in&nbsp;Reuters</a></i></font><br><br><!-- IBD_SUBJECT:The Market's Madness --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/reuters/0,1349,31935,00.html">The Market's Madness</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">9:10 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The bulls and the bears are in the midst of a Battle Royale, and all this turbulence is not a healthy thing. So say the experts.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/reuters/0,1349,,00.html">in&nbsp;Reuters</a></i></font><br><br><!-- IBD_SUBJECT:'Want a Loan? What's Your Race?' --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/politics/0,1283,31533,00.html">'Want a Loan? What's Your Race?'</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The Federal Reserve is in the middle of changing banking regulations to let banks collect data on the race, sex, religion, and national origin of their customers. By Declan McCullagh. </font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/politics/0,1283,,00.html">in&nbsp;Politics</a></i></font><br><br><!-- IBD_SUBJECT:Music Regs: A Bagful of Noise --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/business/0,1367,31832,00.html">Music Regs: A Bagful of Noise</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The struggle to come up with a digital music standard that would minimize download piracy is pushing right up against the holiday gift-giving season. By Jennifer Sullivan.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/business/0,1367,,00.html">in&nbsp;Business</a></i></font><br><br><!-- IBD_SUBJECT:Can't Beat 'Em? Green 'Em --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/technology/0,1282,31927,00.html">Can't Beat 'Em? Green 'Em</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">High-tech companies are notoriously environmentally unfriendly, and a growing number of "Greenies" are trying to change things from the inside ... with varying results. By Chris Gaither.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/technology/0,1282,,00.html">in&nbsp;Technology</a></i></font><br><br><!-- IBD_SUBJECT:Y2K Cloud Over MS Office --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/business/0,1367,31932,00.html">Y2K Cloud Over MS Office</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">Windows NT sales remain strong, but corporate clients are wary of upgrading to MS Office 2000. Analysts say that means strong, but not stunning, Microsoft earnings. </font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/business/0,1367,,00.html">in&nbsp;Business</a></i></font><br><br><font color="#FF0000" face="Verdana, Arial, Geneva, sans-serif" size="1">Med-Tech</font><br><!-- IBD_SUBJECT:Biochips for Custom Chemo --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/technology/0,1282,31914,00.html">Biochips for Custom Chemo</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">Different cancer patients need different medicine, but doctors can rarely determine the best match. New biochip technology promises chemotherapy tailored to a tumor's genetic make-up. By Kristen Philipkoski.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/technology/0,1282,,00.html">in&nbsp;Technology</a></i></font><br><br><!-- IBD_SUBJECT:High Stakes in Priceline Suit --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/business/0,1367,31916,00.html">High Stakes in Priceline Suit</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">It's not just another round of Redmond-bashing. A Priceline.com lawsuit against Microsoft's Expedia.com may have a big impact on how Net companies protect their business models. By Joanna Glasner.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/business/0,1367,,00.html">in&nbsp;Business</a></i></font><br><br><!-- IBD_SUBJECT:Biodiversity Merges Online --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/technology/0,1282,31918,00.html">Biodiversity Merges Online</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The far-flung databases on global biodiversity get together to form one monster database. Soon the red-eyed tree frog will be eyeing those Swedish lingonberries. From the Environment News Service.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/technology/0,1282,,00.html">in&nbsp;Technology</a></i></font><br><br><!-- SQL above --><!------TRADES---------><br><font face="Verdana, Arial, Geneva, sans-serif" size="2"><b><i>Elsewhere Today</i></b></font><br><img src="http://static.wired.com/news/images/pix155.gif" height="10" width="155" alt=""><br><!-- SQL query here --><font face="helvetica, arial" size="3"><b><a href="http://www.thestandard.com/articles/display/0,1449,6975,00.html?home.tf">FCC: Hands-Off on Broadband</a></b></font><br><font face="geneva, arial" size="2"><cite>The Industry Standard</cite></font><br><br><font face="helvetica, arial" size="3"><b><a href="http://news.lycos.com/stories/TopNews/19991014RTNEWS-ARMS-TREATY.asp">White House Lashes Out on Treaty</a></b></font><br><font face="geneva, arial" size="2">Lycos</font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.pathfinder.com/time/magazine/articles/0,3266,32207,00.html">Steve Jobs at 44</a></b></font><br><font face="geneva, arial" size="2"><cite>Time</cite></font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.zdnet.com/zdnn/stories/news/0,4586,2353608,00.html">Computers May Run on Gas</a></b></font><br><font face="geneva, arial" size="2">ZDNN</font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.nytimes.com/library/tech/99/10/biztech/articles/14free.html">Much Is Free in the Wired World</a></b></font><br><font face="geneva, arial" size="2"><cite>The New York Times</cite> (Registration Required)</font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.usatoday.com/life/cyber/nb/nb4.htm">Melissa: I'm Baaaack</a></b></font><br><font face="geneva, arial" size="2"><cite>USA Today</cite></font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.msnbc.com/news/322926.asp">Domain Owners Surrender Privacy</a></b></font><br><font face="geneva, arial" size="2">MSNBC</font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.washingtonpost.com/wp-srv/business/longterm/tech/techthursday/download/download.htm">Dividing to Conquer in VC Game</a></b></font><br><font face="geneva, arial" size="2"><cite>The Washington Post</cite></font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.salon.com/tech/books/1999/10/14/redhat_book/index.html">The Red Hat Diaries</a></b></font><br><font face="geneva, arial" size="2">Salon</font><br><br><font face="helvetica, arial" size="3"><b><a href="http://news.bbc.co.uk/hi/english/sci/tech/newsid_473000/473856.stm">Screensaver to Predict Climate</a></b></font><br><font face="geneva, arial" size="2">BBC News</font><br><br><!-- SQL above --><!-- - - - - - - - - - - - - -->
-</td>
+<br>
+
+<font face="Verdana, Arial, Geneva, sans-serif" size="2"><b><i>Other Top Stories</i></b></font><br>
+<img src="http://static.wired.com/news/images/pix155.gif" height="10" width="155" alt=""><br>
+
+<!-- SQL query here -->
+<!-- IBD_SUBJECT:Wall Street Keeps Reeling --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/reuters/0,1349,31934,00.html">Wall Street Keeps Reeling</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">10:15 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The Dow and Nasdaq suffer sizeable losses during the first half of Friday trading. Why? Wholesale prices are the highest this decade, and Greenspan is concerned about stock prices.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/reuters/0,1349,,00.html">in&nbsp;Reuters</a></i></font><br><br><!-- IBD_SUBJECT:The Market's Madness --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/reuters/0,1349,31935,00.html">The Market's Madness</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">9:10 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The bulls and the bears are in the midst of a Battle Royale, and all this turbulence is not a healthy thing. So say the experts.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/reuters/0,1349,,00.html">in&nbsp;Reuters</a></i></font><br><br><!-- IBD_SUBJECT:'Want a Loan? What's Your Race?' --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/politics/0,1283,31533,00.html">'Want a Loan? What's Your Race?'</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The Federal Reserve is in the middle of changing banking regulations to let banks collect data on the race, sex, religion, and national origin of their customers. By Declan McCullagh. </font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/politics/0,1283,,00.html">in&nbsp;Politics</a></i></font><br><br><!-- IBD_SUBJECT:Music Regs: A Bagful of Noise --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/business/0,1367,31832,00.html">Music Regs: A Bagful of Noise</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The struggle to come up with a digital music standard that would minimize download piracy is pushing right up against the holiday gift-giving season. By Jennifer Sullivan.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/business/0,1367,,00.html">in&nbsp;Business</a></i></font><br><br><!-- IBD_SUBJECT:Can't Beat 'Em? Green 'Em --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/technology/0,1282,31927,00.html">Can't Beat 'Em? Green 'Em</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">High-tech companies are notoriously environmentally unfriendly, and a growing number of "Greenies" are trying to change things from the inside ... with varying results. By Chris Gaither.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/technology/0,1282,,00.html">in&nbsp;Technology</a></i></font><br><br><!-- IBD_SUBJECT:Y2K Cloud Over MS Office --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/business/0,1367,31932,00.html">Y2K Cloud Over MS Office</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">Windows NT sales remain strong, but corporate clients are wary of upgrading to MS Office 2000. Analysts say that means strong, but not stunning, Microsoft earnings. </font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/business/0,1367,,00.html">in&nbsp;Business</a></i></font><br><br><font color="#FF0000" face="Verdana, Arial, Geneva, sans-serif" size="1">Med-Tech</font><br><!-- IBD_SUBJECT:Biochips for Custom Chemo --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/technology/0,1282,31914,00.html">Biochips for Custom Chemo</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">Different cancer patients need different medicine, but doctors can rarely determine the best match. New biochip technology promises chemotherapy tailored to a tumor's genetic make-up. By Kristen Philipkoski.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/technology/0,1282,,00.html">in&nbsp;Technology</a></i></font><br><br><!-- IBD_SUBJECT:High Stakes in Priceline Suit --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/business/0,1367,31916,00.html">High Stakes in Priceline Suit</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">It's not just another round of Redmond-bashing. A Priceline.com lawsuit against Microsoft's Expedia.com may have a big impact on how Net companies protect their business models. By Joanna Glasner.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/business/0,1367,,00.html">in&nbsp;Business</a></i></font><br><br><!-- IBD_SUBJECT:Biodiversity Merges Online --><font face="Arial, Helvetica, sans-serif" size="3"><b><a href="/news/technology/0,1282,31918,00.html">Biodiversity Merges Online</a></b></font><br><font color="#ff0000" face="Verdana, Arial, Geneva, sans-serif" size="1">3:00 a.m.</font>&nbsp;<font face="Verdana, Arial, Geneva, sans-serif" size="2">The far-flung databases on global biodiversity get together to form one monster database. Soon the red-eyed tree frog will be eyeing those Swedish lingonberries. From the Environment News Service.</font><br><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><i><a href="/news/technology/0,1282,,00.html">in&nbsp;Technology</a></i></font><br><br><!-- SQL above -->
+
+
+        
+<!------TRADES--------->
+<br>
+<font face="Verdana, Arial, Geneva, sans-serif" size="2"><b><i>Elsewhere Today</i></b></font><br>
+<img src="http://static.wired.com/news/images/pix155.gif" height="10" width="155" alt=""><br>
+
+<!-- SQL query here -->
+<font face="helvetica, arial" size="3"><b><a href="http://www.thestandard.com/articles/display/0,1449,6975,00.html?home.tf">FCC: Hands-Off on Broadband</a></b></font><br><font face="geneva, arial" size="2"><cite>The Industry Standard</cite></font><br><br><font face="helvetica, arial" size="3"><b><a href="http://news.lycos.com/stories/TopNews/19991014RTNEWS-ARMS-TREATY.asp">White House Lashes Out on Treaty</a></b></font><br><font face="geneva, arial" size="2">Lycos</font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.pathfinder.com/time/magazine/articles/0,3266,32207,00.html">Steve Jobs at 44</a></b></font><br><font face="geneva, arial" size="2"><cite>Time</cite></font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.zdnet.com/zdnn/stories/news/0,4586,2353608,00.html">Computers May Run on Gas</a></b></font><br><font face="geneva, arial" size="2">ZDNN</font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.nytimes.com/library/tech/99/10/biztech/articles/14free.html">Much Is Free in the Wired World</a></b></font><br><font face="geneva, arial" size="2"><cite>The New York Times</cite> (Registration Required)</font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.usatoday.com/life/cyber/nb/nb4.htm">Melissa: I'm Baaaack</a></b></font><br><font face="geneva, arial" size="2"><cite>USA Today</cite></font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.msnbc.com/news/322926.asp">Domain Owners Surrender Privacy</a></b></font><br><font face="geneva, arial" size="2">MSNBC</font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.washingtonpost.com/wp-srv/business/longterm/tech/techthursday/download/download.htm">Dividing to Conquer in VC Game</a></b></font><br><font face="geneva, arial" size="2"><cite>The Washington Post</cite></font><br><br><font face="helvetica, arial" size="3"><b><a href="http://www.salon.com/tech/books/1999/10/14/redhat_book/index.html">The Red Hat Diaries</a></b></font><br><font face="geneva, arial" size="2">Salon</font><br><br><font face="helvetica, arial" size="3"><b><a href="http://news.bbc.co.uk/hi/english/sci/tech/newsid_473000/473856.stm">Screensaver to Predict Climate</a></b></font><br><font face="geneva, arial" size="2">BBC News</font><br><br><!-- SQL above -->
+
+
+
+<!-- - - - - - - - - - - - - -->
+   </td>
   </tr>
-<tr>
-<td valign="TOP" align="LEFT">
 
-    <img src="http://static.wired.com/news/images/spacer.gif" height="1" width="280" alt=""><br><!-- FOOTER --><br><img src="http://static.wired.com/news/images/pix155.gif" height="10" width="155" border="0" usemap="#navstrip.map" alt=""><br><img src="http://static.wired.com/news/images/navstrip_off.gif" height="17" width="126" usemap="#navstrip.map" border="0" alt=""><br><br><p><font face="Verdana, Arial, Geneva, sans-serif" size="1">
+  <tr>
+   <td valign="TOP" align="LEFT">
+
+    <img src="http://static.wired.com/news/images/spacer.gif" height="1" width="280" alt=""><br>
+       
+    <!-- FOOTER -->
+
+<br><img src="http://static.wired.com/news/images/pix155.gif" height="10" width="155" border="0" usemap="#navstrip.map" alt="">
+<br>
+
+<img src="http://static.wired.com/news/images/navstrip_off.gif" height="17" width="126" usemap="#navstrip.map" border="0" alt=""><br><br>
+
+<p><font face="Verdana, Arial, Geneva, sans-serif" size="1">
 <a href="http://www.wired.com/news/feedback.html">Send us feedback</a>
 &nbsp;|&nbsp;
 <a href="http://www.hotwired.com/jobs/">Work at Wired Digital</a>
 &nbsp;|&nbsp;
 <a href="http://home.wired.com/advertising/">Advertise with us</a>
-<br><a href="http://home.wired.com/">About Wired Digital</a>
+<br>
+<a href="http://home.wired.com/">About Wired Digital</a>
 &nbsp;|&nbsp;
 <a href="http://www.wired.com/home/digital/privacy/">Our Privacy Policy</a></font>
 
@@ -382,19 +549,28 @@ Contruction workers in Berlin opened an old wound in the German psyche this week
 </p>
 <p><font face="Verdana, Arial, Geneva" size="1"><a href="http://www.wired.com/home/copyright.html">Copyright</a> &copy; 1994-99 Wired Digital Inc. All rights reserved.</font>
 
-<br><!-- TRACKING --><img src="http://www.wired.com/special/modx/news.gif" height="1" width="1" alt=""><map name="navstrip.map"><area shape="rect" coords="0,0,14,16" href="/news">
+<br>
+<!-- TRACKING -->
+<img src="http://www.wired.com/special/modx/news.gif" height="1" width="1" alt="">
+
+<map name="navstrip.map">
+<area shape="rect" coords="0,0,14,16" href="/news">
 <area shape="rect" coords="15,0 31,16" href="/news/business/">
 <area shape="rect" coords="32,0,48,16" href="/news/culture/">
 <area shape="rect" coords="49,0,65,16" href="/news/technology/">
-<area shape="rect" coords="66,0,83,16" href="/news/politics/"></map></p>
+<area shape="rect" coords="66,0,83,16" href="/news/politics/">
+</map>
+ </p>
 </td>
    <td valign="TOP" align="LEFT">
     <img src="http://static.wired.com/news/images/spacer.gif" height="1" width="5" alt="">
-</td>
+   </td>
    <td valign="TOP" align="LEFT">
    </td>
   </tr>
 </table>
+
+
 <br>
 </body>
 </html>
diff --git a/result/VC/AttributeDefaultLegal.rdr b/result/VC/AttributeDefaultLegal.rdr
new file mode 100644 (file)
index 0000000..6b61686
--- /dev/null
@@ -0,0 +1,12 @@
+./test/VC/AttributeDefaultLegal:4: validity error : Attribute doc of At: invalid default value
+<!ATTLIST doc At NMTOKEN "$$$">
+                              ^
+./test/VC/AttributeDefaultLegal:6: validity error : Attribute doc of bad: invalid default value
+<!ATTLIST doc bad IDREF "1abc_2">
+                                ^
+./test/VC/AttributeDefaultLegal:8: validity error : Attribute doc of bad2: invalid default value
+<!ATTLIST doc bad2 IDREFS "abc:1 1abc_2">
+                                        ^
+./test/VC/AttributeDefaultLegal:11: element doc: validity error : No declaration for attribute val of element doc
+<doc val="v1"/>
+             ^
diff --git a/result/VC/AttributeNmtokens.rdr b/result/VC/AttributeNmtokens.rdr
new file mode 100644 (file)
index 0000000..4c19285
--- /dev/null
@@ -0,0 +1,3 @@
+./test/VC/AttributeNmtokens:6: element test: validity error : Syntax of value for attribute attr1 of test is not valid
+<test attr1=" a&#x9;b "/>
+                       ^
diff --git a/result/VC/DuplicateType.rdr b/result/VC/DuplicateType.rdr
new file mode 100644 (file)
index 0000000..34e2c20
--- /dev/null
@@ -0,0 +1,3 @@
+./test/VC/DuplicateType:3: validity error : Definition of a has duplicate references of c
+<!ELEMENT a (#PCDATA | b | c | d | c)*>
+                                       ^
diff --git a/result/VC/ElementValid.rdr b/result/VC/ElementValid.rdr
new file mode 100644 (file)
index 0000000..d6b50a7
--- /dev/null
@@ -0,0 +1,3 @@
+./test/VC/ElementValid:3: validity error : Validation failed: no DTD found !
+<doc/>
+    ^
diff --git a/result/VC/ElementValid2.rdr b/result/VC/ElementValid2.rdr
new file mode 100644 (file)
index 0000000..cae331b
--- /dev/null
@@ -0,0 +1,6 @@
+./test/VC/ElementValid2:4: element p: validity error : No declaration for element p
+<doc><p/></doc>
+         ^
+./test/VC/ElementValid2:5: element p: validity error : No declaration for element p
+
+^
diff --git a/result/VC/ElementValid3.rdr b/result/VC/ElementValid3.rdr
new file mode 100644 (file)
index 0000000..5f4e03e
--- /dev/null
@@ -0,0 +1,6 @@
+./test/VC/ElementValid3:4: element doc: validity error : Element doc was declared EMPTY this one has content
+<doc>Oops, this element was declared EMPTY</doc>
+                                                ^
+./test/VC/ElementValid3:5: element doc: validity error : Element doc was declared EMPTY this one has content
+
+^
diff --git a/result/VC/ElementValid4.rdr b/result/VC/ElementValid4.rdr
new file mode 100644 (file)
index 0000000..289a527
--- /dev/null
@@ -0,0 +1,6 @@
+./test/VC/ElementValid4:7: element doc: validity error : Element c is not declared in doc list of possible children
+<doc> This <b>seems</b> Ok <a/> but this <c>was not declared</c></doc>
+                                                                      ^
+./test/VC/ElementValid4:8: element doc: validity error : Element c is not declared in doc list of possible children
+
+^
diff --git a/result/VC/ElementValid5.rdr b/result/VC/ElementValid5.rdr
new file mode 100644 (file)
index 0000000..899d759
--- /dev/null
@@ -0,0 +1,6 @@
+./test/VC/ElementValid5:7: element doc: validity error : Element doc content does not follow the DTD, expecting (a , b* , c+), got (a b c b)
+<doc><a/><b> but this</b><c>was not declared</c><b>seems</b></doc>
+                                                                  ^
+./test/VC/ElementValid5:8: element doc: validity error : Element doc content does not follow the DTD, Misplaced b
+
+^
diff --git a/result/VC/ElementValid6.rdr b/result/VC/ElementValid6.rdr
new file mode 100644 (file)
index 0000000..aeafd6b
--- /dev/null
@@ -0,0 +1,6 @@
+./test/VC/ElementValid6:7: element doc: validity error : Element doc content does not follow the DTD, expecting (a , b? , c+)?, got (a b)
+<doc><a/><b>lacks c</b></doc>
+                             ^
+./test/VC/ElementValid6:8: element doc: validity error : Element doc content does not follow the DTD, Expecting more child
+
+^
diff --git a/result/VC/ElementValid7.rdr b/result/VC/ElementValid7.rdr
new file mode 100644 (file)
index 0000000..f001fd2
--- /dev/null
@@ -0,0 +1,6 @@
+./test/VC/ElementValid7:7: element doc: validity error : Element doc content does not follow the DTD, expecting ((a | b)* , c+ , a , b? , c , a?), got (a b a c c a)
+<doc><a/><b/><a/><c/><c/><a/></doc>
+                                   ^
+./test/VC/ElementValid7:8: element doc: validity error : Element doc content does not follow the DTD, Expecting more child
+
+^
diff --git a/result/VC/ElementValid8.rdr b/result/VC/ElementValid8.rdr
new file mode 100644 (file)
index 0000000..f1b0dad
--- /dev/null
@@ -0,0 +1,3 @@
+./test/VC/ElementValid8:7: validity error : Content model of doc is not determinist: ((a , b) | (a , c))
+<doc><a/><c> doc is non-deterministic </c></doc>
+                                                ^
diff --git a/result/VC/Enumeration.rdr b/result/VC/Enumeration.rdr
new file mode 100644 (file)
index 0000000..30896fc
--- /dev/null
@@ -0,0 +1,3 @@
+./test/VC/Enumeration:5: element doc: validity error : Value "v4" for attribute val of doc is not among the enumerated set
+<doc val="v4"></doc>
+             ^
diff --git a/result/VC/NS1.rdr b/result/VC/NS1.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/VC/NS2.rdr b/result/VC/NS2.rdr
new file mode 100644 (file)
index 0000000..abd1f88
--- /dev/null
@@ -0,0 +1,3 @@
+./test/VC/NS2:9: element doc: validity error : No declaration for attribute attr of element doc
+<ns:doc ns:attr="val" xmlns:ns="http://www.example.org/test/">
+                                                             ^
diff --git a/result/VC/NS3.rdr b/result/VC/NS3.rdr
new file mode 100644 (file)
index 0000000..72c0117
--- /dev/null
@@ -0,0 +1,9 @@
+./test/VC/NS3:9: element foo: validity error : Value for attribute xmlns of foo is different from default "http://example.com/fooo"
+xmlns="http://example.com/foo" xmlns:foo="http://example.com/fo" foo:info="toto"
+                                                                               ^
+./test/VC/NS3:9: element foo: validity error : Value for attribute xmlns of foo must be "http://example.com/fooo"
+xmlns="http://example.com/foo" xmlns:foo="http://example.com/fo" foo:info="toto"
+                                                                               ^
+./test/VC/NS3:9: element foo: validity error : Element foo namespace name for default namespace does not match the DTD
+mlns="http://example.com/foo" xmlns:foo="http://example.com/fo" foo:info="toto"/
+                                                                               ^
diff --git a/result/VC/OneID.rdr b/result/VC/OneID.rdr
new file mode 100644 (file)
index 0000000..a2c894f
--- /dev/null
@@ -0,0 +1,6 @@
+./test/VC/OneID:4: validity error : Element doc has too may ID attributes defined : id
+<!ATTLIST doc id ID #IMPLIED>
+                            ^
+./test/VC/OneID:4: validity error : Element doc has 2 ID attribute defined in the internal subset : id
+<!ATTLIST doc id ID #IMPLIED>
+                            ^
diff --git a/result/VC/OneID2.rdr b/result/VC/OneID2.rdr
new file mode 100644 (file)
index 0000000..2af04f1
--- /dev/null
@@ -0,0 +1,6 @@
+./test/VC/OneID2:3: validity error : Element doc has too may ID attributes defined : id
+<!ATTLIST doc id ID #IMPLIED>
+                            ^
+./test/VC/OneID2:3: validity error : Element doc has 2 ID attribute defined in the internal subset : id
+<!ATTLIST doc id ID #IMPLIED>
+                            ^
diff --git a/result/VC/OneID3.rdr b/result/VC/OneID3.rdr
new file mode 100644 (file)
index 0000000..9accece
--- /dev/null
@@ -0,0 +1,6 @@
+test/VC/dtds/doc.dtd:2: validity error : Element doc has too may ID attributes defined : val
+<!ATTLIST doc val ID #IMPLIED>
+                             ^
+test/VC/dtds/doc.dtd:2: validity error : Element doc has 2 ID attribute defined in the external subset : val
+<!ATTLIST doc val ID #IMPLIED>
+                             ^
diff --git a/result/VC/PENesting.rdr b/result/VC/PENesting.rdr
new file mode 100644 (file)
index 0000000..7f82e13
--- /dev/null
@@ -0,0 +1,4 @@
+./test/VC/PENesting:1: parser error : StartTag: invalid element name
+<!ENTITY % pe1 "EMPTY> <!ELEMENT e2 EMPTY>"> 
+ ^
+./test/VC/PENesting : failed to parse
diff --git a/result/VC/PENesting2.rdr b/result/VC/PENesting2.rdr
new file mode 100644 (file)
index 0000000..71cb053
--- /dev/null
@@ -0,0 +1,4 @@
+./test/VC/PENesting2:1: parser error : StartTag: invalid element name
+<!ENTITY % p1 "(A|B">
+ ^
+./test/VC/PENesting2 : failed to parse
diff --git a/result/VC/UniqueElementTypeDeclaration.rdr b/result/VC/UniqueElementTypeDeclaration.rdr
new file mode 100644 (file)
index 0000000..8537041
--- /dev/null
@@ -0,0 +1,3 @@
+test/VC/dtds/a.dtd:1: validity error : Redefinition of element a
+<!ELEMENT a (#PCDATA | b | c)*>
+                               ^
diff --git a/result/VC/UniqueElementTypeDeclaration2.rdr b/result/VC/UniqueElementTypeDeclaration2.rdr
new file mode 100644 (file)
index 0000000..c328d92
--- /dev/null
@@ -0,0 +1,3 @@
+./test/VC/UniqueElementTypeDeclaration2:6: validity error : Redefinition of element a
+<!ELEMENT a (#PCDATA | b | c)*>
+                               ^
index 67dcf22..52d2861 100644 (file)
@@ -12,9 +12,7 @@ SAX.externalSubset(attributes, , )
 SAX.getEntity(ent)
 SAX.getEntity(recursive)
 SAX.getEntity(ent)
-SAX.getEntity(recursive)
 SAX.getEntity(ent)
-SAX.getEntity(recursive)
 SAX.startElement(attributes, nmtoken=' &ent;   &ent; &ent; ', nmtokens=' Test\r
      this  normalization ')
 SAX.endElement(attributes)
index 859a970..3e8cfd9 100644 (file)
@@ -12,9 +12,7 @@ SAX.externalSubset(attributes, , )
 SAX.getEntity(ent)
 SAX.getEntity(recursive)
 SAX.getEntity(ent)
-SAX.getEntity(recursive)
 SAX.getEntity(ent)
-SAX.getEntity(recursive)
 SAX.startElementNs(attributes, NULL, NULL, 0, 2, 0, nmtoken='&ent...', 17, nmtokens='Test...', 25)
 SAX.endElementNs(attributes, NULL, NULL)
 SAX.endDocument()
index e86c7f9..425be39 100644 (file)
@@ -4,7 +4,8 @@
 ./test/errors/content1.xml:7: parser error : expected '>'
 <!ELEMENT aElement (a |b * >
                          ^
-./test/errors/content1.xml:7: parser error : internal error
+./test/errors/content1.xml:7: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
+
 <!ELEMENT aElement (a |b * >
                          ^
 ./test/errors/content1.xml:7: parser error : DOCTYPE improperly terminated
index da346f8..d806a63 100644 (file)
@@ -4,7 +4,8 @@
 ./test/errors/content1.xml:7: parser error : expected '>'
 <!ELEMENT aElement (a |b * >
                          ^
-./test/errors/content1.xml:7: parser error : internal error
+./test/errors/content1.xml:7: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
+
 <!ELEMENT aElement (a |b * >
                          ^
 ./test/errors/content1.xml:7: parser error : DOCTYPE improperly terminated
diff --git a/result/errors/extparsedent.xml b/result/errors/extparsedent.xml
new file mode 100644 (file)
index 0000000..07e4c54
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE foo [
+<!ENTITY c PUBLIC "bar" "/etc/doesnotexist">
+]>
+<root>&c;</root>
diff --git a/result/errors/extparsedent.xml.err b/result/errors/extparsedent.xml.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/errors/extparsedent.xml.str b/result/errors/extparsedent.xml.str
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/127772.xml.err.rdr b/result/valid/127772.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/694228.xml b/result/valid/694228.xml
new file mode 100644 (file)
index 0000000..057c926
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE root SYSTEM "dtds/694228.dtd">
+<root>
+  &entity;
+</root>
diff --git a/result/valid/694228.xml.err b/result/valid/694228.xml.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/694228.xml.err.rdr b/result/valid/694228.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/REC-xml-19980210.xml.err.rdr b/result/valid/REC-xml-19980210.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/UTF16Entity.xml.err.rdr b/result/valid/UTF16Entity.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/dia.xml.err.rdr b/result/valid/dia.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/id1.xml.err.rdr b/result/valid/id1.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/id2.xml.err.rdr b/result/valid/id2.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/id3.xml.err.rdr b/result/valid/id3.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/index.xml.err.rdr b/result/valid/index.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/mixed_ns.xml.err.rdr b/result/valid/mixed_ns.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/notes.xml.err.rdr b/result/valid/notes.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/ns.xml.err.rdr b/result/valid/ns.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/ns2.xml.err.rdr b/result/valid/ns2.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/objednavka.xml.err.rdr b/result/valid/objednavka.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/rss.xml.err.rdr b/result/valid/rss.xml.err.rdr
new file mode 100644 (file)
index 0000000..2ec7c9e
--- /dev/null
@@ -0,0 +1,3 @@
+./test/valid/rss.xml:177: element rss: validity error : Element rss does not carry attribute version
+</rss>
+      ^
diff --git a/result/valid/t10.xml.err.rdr b/result/valid/t10.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/t11.xml.err.rdr b/result/valid/t11.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/t4.dtd.err.rdr b/result/valid/t4.dtd.err.rdr
new file mode 100644 (file)
index 0000000..23a3258
--- /dev/null
@@ -0,0 +1,6 @@
+./test/valid/t4.dtd:1: parser error : StartTag: invalid element name
+<!ENTITY % percent "&#x25;">
+ ^
+./test/valid/t4.dtd:1: parser error : Extra content at the end of the document
+<!ENTITY % percent "&#x25;">
+ ^
diff --git a/result/valid/t4.xml.err.rdr b/result/valid/t4.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/t4a.dtd.err.rdr b/result/valid/t4a.dtd.err.rdr
new file mode 100644 (file)
index 0000000..48cdd5f
--- /dev/null
@@ -0,0 +1,6 @@
+./test/valid/t4a.dtd:1: parser error : StartTag: invalid element name
+<!ENTITY % percent "&#x25;">
+ ^
+./test/valid/t4a.dtd:1: parser error : Extra content at the end of the document
+<!ENTITY % percent "&#x25;">
+ ^
diff --git a/result/valid/t4a.xml.err.rdr b/result/valid/t4a.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/t6.dtd.err.rdr b/result/valid/t6.dtd.err.rdr
new file mode 100644 (file)
index 0000000..6e84d68
--- /dev/null
@@ -0,0 +1,6 @@
+./test/valid/t6.dtd:1: parser error : StartTag: invalid element name
+<!ENTITY % xdef "def">
+ ^
+./test/valid/t6.dtd:1: parser error : Extra content at the end of the document
+<!ENTITY % xdef "def">
+ ^
diff --git a/result/valid/t6.xml.err.rdr b/result/valid/t6.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
index 7ae7bb4..d795788 100644 (file)
@@ -1,4 +1,5 @@
-Entity: line 1: parser error : internal error
+Entity: line 1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
+
  %defroot; 
           ^
 Entity: line 1: 
diff --git a/result/valid/t8.xml.err.rdr b/result/valid/t8.xml.err.rdr
new file mode 100644 (file)
index 0000000..c198a16
--- /dev/null
@@ -0,0 +1,14 @@
+Entity: line 1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
+
+ %defroot; 
+          ^
+Entity: line 1: 
+&lt;!ELEMENT root (middle) >
+^
+Entity: line 1: parser error : DOCTYPE improperly terminated
+ %defroot; 
+          ^
+Entity: line 1: 
+&lt;!ELEMENT root (middle) >
+^
+./test/valid/t8.xml : failed to parse
index 7ae7bb4..d795788 100644 (file)
@@ -1,4 +1,5 @@
-Entity: line 1: parser error : internal error
+Entity: line 1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
+
  %defroot; 
           ^
 Entity: line 1: 
diff --git a/result/valid/t8a.xml.err.rdr b/result/valid/t8a.xml.err.rdr
new file mode 100644 (file)
index 0000000..b6bdcbe
--- /dev/null
@@ -0,0 +1,14 @@
+Entity: line 1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
+
+ %defroot; 
+          ^
+Entity: line 1: 
+&lt;!ELEMENT root (middle) >
+^
+Entity: line 1: parser error : DOCTYPE improperly terminated
+ %defroot; 
+          ^
+Entity: line 1: 
+&lt;!ELEMENT root (middle) >
+^
+./test/valid/t8a.xml : failed to parse
diff --git a/result/valid/t9.xml.err.rdr b/result/valid/t9.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/t9a.xml.err.rdr b/result/valid/t9a.xml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/xhtml1.xhtml.err.rdr b/result/valid/xhtml1.xhtml.err.rdr
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/result/valid/xlink.xml.err.rdr b/result/valid/xlink.xml.err.rdr
new file mode 100644 (file)
index 0000000..38594f4
--- /dev/null
@@ -0,0 +1,4 @@
+./test/valid/xlink.xml:450: element termdef: validity error : ID dt-arc already defined
+       <p><termdef id="dt-arc" term="Arc">An <ter
+                                         ^
+validity error : attribute def line 199 references an unknown ID "dt-xlg"
index d1dc2ca..aaab13e 100644 (file)
@@ -1,16 +1,13 @@
 /*
- * runsuite.c: C program to run libxml2 againts published testsuites 
+ * runsuite.c: C program to run libxml2 againts published testsuites
  *
  * See Copyright for the status of this software.
  *
  * daniel@veillard.com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #if !defined(_WIN32) || defined(__CYGWIN__)
 #include <unistd.h>
 static FILE *logfile = NULL;
 static int verbose = 0;
 
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
-#endif
 
 /************************************************************************
  *                                                                     *
@@ -130,7 +123,7 @@ static int addEntity(char *name, char *content) {
  * which is shared to the current running test. We also don't want to have
  * network downloads modifying tests.
  */
-static xmlParserInputPtr 
+static xmlParserInputPtr
 testExternalEntityLoader(const char *URL, const char *ID,
                         xmlParserCtxtPtr ctxt) {
     xmlParserInputPtr ret;
@@ -159,7 +152,7 @@ testExternalEntityLoader(const char *URL, const char *ID,
         fprintf(stderr, "Failed to find resource %s\n", URL);
     }
 #endif
-      
+
     return(ret);
 }
 
@@ -422,7 +415,7 @@ installDirs(xmlNodePtr tst, const xmlChar *base) {
     xmlFree(res);
 }
 
-static int 
+static int
 xsdTestCase(xmlNodePtr tst) {
     xmlNodePtr test, tmp, cur;
     xmlBufferPtr buf;
@@ -449,7 +442,7 @@ xsdTestCase(xmlNodePtr tst) {
     if (cur == NULL) {
         return(xsdIncorectTestCase(tst));
     }
-    
+
     test = getNext(cur, "./*");
     if (test == NULL) {
         fprintf(stderr, "Failed to find test in correct line %ld\n",
@@ -495,7 +488,7 @@ xsdTestCase(xmlNodePtr tst) {
        if (test == NULL) {
            fprintf(stderr, "Failed to find test in <valid> line %ld\n",
                    xmlGetLineNo(tmp));
-           
+
        } else {
            xmlBufferEmpty(buf);
            if (dtd != NULL)
@@ -554,7 +547,7 @@ xsdTestCase(xmlNodePtr tst) {
        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);
@@ -615,7 +608,7 @@ done:
     return(ret);
 }
 
-static int 
+static int
 xsdTestSuite(xmlNodePtr cur) {
     if (verbose) {
        xmlChar *doc = getString(cur, "string(documentation)");
@@ -630,11 +623,11 @@ xsdTestSuite(xmlNodePtr cur) {
         xsdTestCase(cur);
        cur = getNext(cur, "following-sibling::testCase[1]");
     }
-        
+
     return(0);
 }
 
-static int 
+static int
 xsdTest(void) {
     xmlDocPtr doc;
     xmlNodePtr cur;
@@ -672,7 +665,7 @@ done:
     return(ret);
 }
 
-static int 
+static int
 rngTestSuite(xmlNodePtr cur) {
     if (verbose) {
        xmlChar *doc = getString(cur, "string(documentation)");
@@ -693,11 +686,11 @@ rngTestSuite(xmlNodePtr cur) {
         xsdTestSuite(cur);
        cur = getNext(cur, "following-sibling::testSuite[1]");
     }
-        
+
     return(0);
 }
 
-static int 
+static int
 rngTest1(void) {
     xmlDocPtr doc;
     xmlNodePtr cur;
@@ -735,7 +728,7 @@ done:
     return(ret);
 }
 
-static int 
+static int
 rngTest2(void) {
     xmlDocPtr doc;
     xmlNodePtr cur;
@@ -945,7 +938,7 @@ xstcTestGroup(xmlNodePtr cur, const char *base) {
        instance = getNext(cur, "./ts:instanceTest[1]");
        while (instance != NULL) {
            if (schemas != NULL) {
-               xstcTestInstance(instance, schemas, path, base);                
+               xstcTestInstance(instance, schemas, path, base);
            } else {
                /*
                * We'll automatically mark the instances as failed
index dd74c88..ccdd49b 100644 (file)
--- a/runtest.c
+++ b/runtest.c
  * daniel@veillard.com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #if !defined(_WIN32) || defined(__CYGWIN__)
 #include <unistd.h>
@@ -195,10 +192,6 @@ static void globfree(glob_t *pglob) {
     }
 }
 
-#if !defined(__MINGW32__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
-#endif
 #else
 #include <glob.h>
 #endif
@@ -2100,7 +2093,7 @@ static void processNode(FILE *out, xmlTextReaderPtr reader) {
 }
 static int
 streamProcessTest(const char *filename, const char *result, const char *err,
-                  xmlTextReaderPtr reader, const char *rng) {
+                  xmlTextReaderPtr reader, const char *rng, int options) {
     int ret;
     char *temp = NULL;
     FILE *t = NULL;
@@ -2196,7 +2189,7 @@ streamParseTest(const char *filename, const char *result, const char *err,
     int ret;
 
     reader = xmlReaderForFile(filename, NULL, options);
-    ret = streamProcessTest(filename, result, err, reader, NULL);
+    ret = streamProcessTest(filename, result, err, reader, NULL, options);
     xmlFreeTextReader(reader);
     return(ret);
 }
@@ -2224,7 +2217,7 @@ walkerParseTest(const char *filename, const char *result, const char *err,
        return(-1);
     }
     reader = xmlReaderWalker(doc);
-    ret = streamProcessTest(filename, result, err, reader, NULL);
+    ret = streamProcessTest(filename, result, err, reader, NULL, options);
     xmlFreeTextReader(reader);
     xmlFreeDoc(doc);
     return(ret);
@@ -2256,7 +2249,7 @@ streamMemParseTest(const char *filename, const char *result, const char *err,
        return(-1);
     }
     reader = xmlReaderForMemory(base, size, filename, NULL, options);
-    ret = streamProcessTest(filename, result, err, reader, NULL);
+    ret = streamProcessTest(filename, result, err, reader, NULL, options);
     free((char *)base);
     xmlFreeTextReader(reader);
     return(ret);
@@ -2731,7 +2724,7 @@ static const char *urip_testURLs[] = {
     "file:///path/to/a%20b.html",
     "/path/to/a b.html",
     "/path/to/a%20b.html",
-    "urip://example.com/résumé.html",
+    "urip://example.com/r" "\xe9" "sum" "\xe9" ".html",
     "urip://example.com/test?a=1&b=2%263&c=4#foo",
     NULL
 };
@@ -3315,9 +3308,11 @@ rngStreamTest(const char *filename,
            fprintf(stderr, "Failed to build reder for %s\n", instance);
        }
        if (disable_err == 1)
-           ret = streamProcessTest(instance, result, NULL, reader, filename);
+           ret = streamProcessTest(instance, result, NULL, reader, filename,
+                                   options);
        else
-           ret = streamProcessTest(instance, result, err, reader, filename);
+           ret = streamProcessTest(instance, result, err, reader, filename,
+                                   options);
        xmlFreeTextReader(reader);
        if (ret != 0) {
            fprintf(stderr, "instance %s failed\n", instance);
@@ -3939,60 +3934,7 @@ thread_specific_data(void *private_data)
     return ((void *) Okay);
 }
 
-#if defined(linux) || defined(__sun) || defined(__APPLE_CC__)
-
-#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);
-}
-
-#elif defined WIN32
+#if defined WIN32
 #include <windows.h>
 #include <string.h>
 
@@ -4118,6 +4060,59 @@ testThread(void)
         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)
@@ -4210,6 +4205,14 @@ testDesc testDescriptions[] = {
     { "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 },
index 52d50d7..cef20f4 100644 (file)
@@ -6,11 +6,8 @@
  * daniel@veillard.com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #ifdef LIBXML_XPATH_ENABLED
 
@@ -37,10 +34,6 @@ static int verbose = 0;
 
 #define NB_EXPECTED_ERRORS 15
 
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
-#endif
 
 const char *skipped_tests[] = {
 /* http://lists.w3.org/Archives/Public/public-xml-testsuite/2008Jul/0000.html */
@@ -390,7 +383,7 @@ xmlconfTestItem(xmlDocPtr doc, xmlNodePtr cur) {
     if (xmlStrEqual(type, BAD_CAST "not-wf")) {
         if (nstest == 0)
            xmlconfTestNotWF((char *) id, (char *) filename, options);
-        else 
+        else
            xmlconfTestNotNSWF((char *) id, (char *) filename, options);
     } else if (xmlStrEqual(type, BAD_CAST "valid")) {
         options |= XML_PARSE_DTDVALID;
diff --git a/save.h b/save.h
new file mode 100644 (file)
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__ */
+
index 07709e2..537b868 100644 (file)
@@ -53,7 +53,7 @@ static const xmlChar *xmlOldSchematronNs = SCT_OLD_NS;
 
 #define NEXT_SCHEMATRON(node)                                          \
    while (node != NULL) {                                              \
-       if ((node->type == XML_ELEMENT_NODE ) && (node->ns != NULL) &&  \
+       if ((node->type == XML_ELEMENT_NODE ) && (node->ns != NULL) &&  \
            ((xmlStrEqual(node->ns->href, xmlSchematronNs)) ||          \
            (xmlStrEqual(node->ns->href, xmlOldSchematronNs))))         \
           break;                                                       \
@@ -65,7 +65,7 @@ static const xmlChar *xmlOldSchematronNs = SCT_OLD_NS;
  *
  * macro to flag unimplemented blocks
  */
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
@@ -240,7 +240,7 @@ xmlSchematronPErrMemory(xmlSchematronParserCtxtPtr ctxt,
  * @msg: the error message
  * @str1: extra data
  * @str2: extra data
- * 
+ *
  * Handle a parser error
  */
 static void
@@ -568,7 +568,7 @@ xmlSchematronFree(xmlSchematronPtr schema)
 
     if (schema->namespaces != NULL)
         xmlFree((char **) schema->namespaces);
-    
+
     xmlSchematronFreeRules(schema->rules);
     xmlSchematronFreePatterns(schema->patterns);
     xmlDictFree(schema->dict);
@@ -826,9 +826,9 @@ xmlSchematronAddNamespace(xmlSchematronParserCtxtPtr ctxt,
         ctxt->namespaces = tmp;
        ctxt->maxNamespaces *= 2;
     }
-    ctxt->namespaces[2 * ctxt->nbNamespaces] = 
+    ctxt->namespaces[2 * ctxt->nbNamespaces] =
         xmlDictLookup(ctxt->dict, ns, -1);
-    ctxt->namespaces[2 * ctxt->nbNamespaces + 1] = 
+    ctxt->namespaces[2 * ctxt->nbNamespaces + 1] =
         xmlDictLookup(ctxt->dict, prefix, -1);
     ctxt->nbNamespaces++;
     ctxt->namespaces[2 * ctxt->nbNamespaces] = NULL;
@@ -1288,7 +1288,7 @@ xmlSchematronReportOutput(xmlSchematronValidCtxtPtr ctxt ATTRIBUTE_UNUSED,
  *         to be deallocated by teh caller
  */
 static xmlChar *
-xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt, 
+xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
                          xmlNodePtr test, xmlNodePtr cur) {
     xmlChar *ret = NULL;
     xmlNodePtr child, node;
@@ -1314,7 +1314,7 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
                xmlFree(path);
            }
 
-           if ((node->ns == NULL) || (node->ns->prefix == NULL)) 
+           if ((node->ns == NULL) || (node->ns->prefix == NULL))
                ret = xmlStrcat(ret, node->name);
            else {
                ret = xmlStrcat(ret, node->ns->prefix);
@@ -1365,7 +1365,7 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
  * been done.
  */
 static void
-xmlSchematronReportSuccess(xmlSchematronValidCtxtPtr ctxt, 
+xmlSchematronReportSuccess(xmlSchematronValidCtxtPtr ctxt,
                   xmlSchematronTestPtr test, xmlNodePtr cur, xmlSchematronPatternPtr pattern, int success) {
     if ((ctxt == NULL) || (cur == NULL) || (test == NULL))
         return;
@@ -1445,7 +1445,7 @@ xmlSchematronReportSuccess(xmlSchematronValidCtxtPtr ctxt,
  * called from the validation engine when starting to check a pattern
  */
 static void
-xmlSchematronReportPattern(xmlSchematronValidCtxtPtr ctxt, 
+xmlSchematronReportPattern(xmlSchematronValidCtxtPtr ctxt,
                           xmlSchematronPatternPtr pattern) {
     if ((ctxt == NULL) || (pattern == NULL))
         return;
@@ -1572,7 +1572,7 @@ xmlSchematronNextNode(xmlNodePtr cur) {
            (cur->type != XML_DTD_NODE))
            return(cur);
     }
-    
+
     do {
        cur = cur->parent;
        if (cur == NULL) break;
@@ -1589,7 +1589,7 @@ xmlSchematronNextNode(xmlNodePtr cur) {
  * xmlSchematronRunTest:
  * @ctxt:  the schema validation context
  * @test:  the current test
- * @instance:  the document instace tree 
+ * @instance:  the document instace tree
  * @cur:  the current node in the instance
  *
  * Validate a rule against a tree instance at a given position
@@ -1653,7 +1653,7 @@ xmlSchematronRunTest(xmlSchematronValidCtxtPtr ctxt,
 /**
  * xmlSchematronValidateDoc:
  * @ctxt:  the schema validation context
- * @instance:  the document instace tree 
+ * @instance:  the document instace tree
  *
  * Validate a tree instance against the schematron
  *
@@ -1697,7 +1697,7 @@ xmlSchematronValidateDoc(xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance)
                }
                rule = rule->next;
            }
-           
+
            cur = xmlSchematronNextNode(cur);
        }
     } else {
@@ -1705,14 +1705,14 @@ xmlSchematronValidateDoc(xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance)
         * 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... 
+            * over the full document...
             * Check the exact semantic
             */
            cur = root;
@@ -1728,7 +1728,7 @@ xmlSchematronValidateDoc(xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance)
                    }
                    rule = rule->patnext;
                }
-               
+
                cur = xmlSchematronNextNode(cur);
            }
            pattern = pattern->next;
diff --git a/test/errors/extparsedent.xml b/test/errors/extparsedent.xml
new file mode 100644 (file)
index 0000000..07e4c54
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE foo [
+<!ENTITY c PUBLIC "bar" "/etc/doesnotexist">
+]>
+<root>&c;</root>
diff --git a/test/valid/694228.xml b/test/valid/694228.xml
new file mode 100644 (file)
index 0000000..057c926
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE root SYSTEM "dtds/694228.dtd">
+<root>
+  &entity;
+</root>
diff --git a/test/valid/dtds/694228.dtd b/test/valid/dtds/694228.dtd
new file mode 100644 (file)
index 0000000..7abc19f
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!ENTITY entity "This is an external entity that uses non-ASCII characters… 日本">
+<!ELEMENT root (#PCDATA)>
index 2f575ce..6c4de90 100644 (file)
@@ -70,10 +70,10 @@ testRegexpFile(const char *filename) {
            continue;
        len = strlen(expr);
        len--;
-       while ((len >= 0) && 
+       while ((len >= 0) &&
               ((expr[len] == '\n') || (expr[len] == '\t') ||
                (expr[len] == '\r') || (expr[len] == ' '))) len--;
-       expr[len + 1] = 0;      
+       expr[len + 1] = 0;
        if (len >= 0) {
            if ((am != NULL) && (expr[0] == 't') && (expr[1] == ' ')) {
                char *ptr = &expr[2];
index f735a29..86e58f2 100644 (file)
@@ -3,7 +3,7 @@
  * (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"
 
 #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
@@ -54,11 +56,11 @@ static xmlChar **parse_list(xmlChar *str);
 
 /* static void print_xpath_nodes(xmlNodeSetPtr nodes); */
 
-static int 
+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; 
+    xmlXPathObjectPtr xpath = NULL;
     xmlChar *result = NULL;
     int ret;
 
@@ -74,34 +76,34 @@ test_c14n(const char* xml_filename, int with_comments, int mode,
        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 
+    /*
+     * 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); 
+           xmlFreeDoc(doc);
            return(-1);
        }
     }
 
     /*
      * Canonical form
-     */      
+     */
     /* fprintf(stderr,"File \"%s\" loaded: start canonization\n", xml_filename); */
-    ret = xmlC14NDocDumpMemory(doc, 
-           (xpath) ? xpath->nodesetval : NULL, 
+    ret = xmlC14NDocDumpMemory(doc,
+           (xpath) ? xpath->nodesetval : NULL,
            mode, inclusive_namespaces,
            with_comments, &result);
     if(ret >= 0) {
@@ -114,25 +116,25 @@ test_c14n(const char* xml_filename, int with_comments, int mode,
     } else {
        fprintf(stderr,"Error: failed to canonicalize XML file \"%s\" (ret=%d)\n", xml_filename, ret);
        if(result != NULL) xmlFree(result);
-       xmlFreeDoc(doc); 
+       xmlFreeDoc(doc);
        return(-1);
     }
-        
+
     /*
      * Cleanup
-     */ 
+     */
     if(xpath != NULL) xmlXPathFreeObject(xpath);
-    xmlFreeDoc(doc);    
+    xmlFreeDoc(doc);
 
     return(ret);
 }
 
 int main(int argc, char **argv) {
     int ret = -1;
-    
+
     /*
      * Init libxml
-     */     
+     */
     xmlInitParser();
     LIBXML_TEST_VERSION
 
@@ -152,14 +154,14 @@ int main(int argc, char **argv) {
        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);
@@ -169,7 +171,7 @@ int main(int argc, char **argv) {
        usage(argv[0]);
     }
 
-    /* 
+    /*
      * Shutdown libxml
      */
     xmlCleanupParser();
@@ -235,13 +237,13 @@ parse_list(xmlChar *str) {
 
 static xmlXPathObjectPtr
 load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
-    xmlXPathObjectPtr xpath; 
+    xmlXPathObjectPtr xpath;
     xmlDocPtr doc;
     xmlChar *expr;
-    xmlXPathContextPtr ctx; 
+    xmlXPathContextPtr ctx;
     xmlNodePtr node;
     xmlNsPtr ns;
-    
+
     /*
      * load XPath expr as a file
      */
@@ -253,10 +255,10 @@ load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
        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);
@@ -267,8 +269,8 @@ load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
     while(node != NULL && !xmlStrEqual(node->name, (const xmlChar *)"XPath")) {
        node = node->next;
     }
-    
-    if(node == NULL) {   
+
+    if(node == NULL) {
         fprintf(stderr,"Error: XPath element expected in the file  \"%s\"\n", filename);
        xmlFreeDoc(doc);
        return(NULL);
@@ -284,8 +286,8 @@ load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
     ctx = xmlXPathNewContext(parent_doc);
     if(ctx == NULL) {
         fprintf(stderr,"Error: unable to create new context\n");
-        xmlFree(expr); 
-        xmlFreeDoc(doc); 
+        xmlFree(expr);
+        xmlFreeDoc(doc);
         return(NULL);
     }
 
@@ -296,31 +298,31 @@ load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
     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); 
+           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); 
+       xmlFree(expr);
+        xmlXPathFreeContext(ctx);
+        xmlFreeDoc(doc);
         return(NULL);
     }
 
     /* print_xpath_nodes(xpath->nodesetval); */
 
-    xmlFree(expr); 
-    xmlXPathFreeContext(ctx); 
-    xmlFreeDoc(doc); 
+    xmlFree(expr);
+    xmlXPathFreeContext(ctx);
+    xmlFreeDoc(doc);
     return(xpath);
 }
 
@@ -329,28 +331,28 @@ static void
 print_xpath_nodes(xmlNodeSetPtr nodes) {
     xmlNodePtr cur;
     int i;
-    
-    if(nodes == NULL ){ 
+
+    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", 
+           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 = nodes->nodeTab[i];
+           fprintf(stderr, "element node \"%s:%s\"\n",
                    (cur->ns) ? cur->ns->prefix : BAD_CAST "", cur->name);
        } else {
-           cur = nodes->nodeTab[i];    
+           cur = nodes->nodeTab[i];
            fprintf(stderr, "node \"%s\": type %d\n", cur->name, cur->type);
        }
     }
index f350342..9b42778 100644 (file)
@@ -179,7 +179,7 @@ resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xm
 {
     /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
 
-    
+
     fprintf(stdout, "SAX.resolveEntity(");
     if (publicId != NULL)
        fprintf(stdout, "%s", (char *)publicId);
@@ -233,8 +233,8 @@ getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
 /**
  * entityDeclDebug:
  * @ctxt:  An XML parser context
- * @name:  the entity name 
- * @type:  the entity type 
+ * @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).
@@ -252,8 +252,8 @@ entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
 /**
  * attributeDeclDebug:
  * @ctxt:  An XML parser context
- * @name:  the attribute name 
- * @type:  the attribute type 
+ * @name:  the attribute name
+ * @type:  the attribute type
  *
  * An attribute definition has been parsed
  */
@@ -269,8 +269,8 @@ attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *elem, const xmlCha
 /**
  * elementDeclDebug:
  * @ctxt:  An XML parser context
- * @name:  the element name 
- * @type:  the element type 
+ * @name:  the element name
+ * @type:  the element type
  * @content: the element value (without processing).
  *
  * An element definition has been parsed
@@ -453,7 +453,7 @@ cdataDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
  * @ctxt:  An XML parser context
  * @name:  The entity name
  *
- * called when an entity reference is detected. 
+ * called when an entity reference is detected.
  */
 static void
 referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
@@ -687,7 +687,7 @@ parseSAXFile(char *filename) {
                fclose(f);
            }
        }
-    } else {   
+    } else {
 #endif /* LIBXML_PUSH_ENABLED */
        doc = htmlSAXParseFile(filename, NULL, emptySAXHandler, NULL);
        if (doc != NULL) {
@@ -746,7 +746,7 @@ parseAndPrintFile(char *filename) {
            }
            fclose(f);
        }
-    } else {   
+    } else {
        doc = htmlReadFile(filename, NULL, options);
     }
 #else
@@ -774,7 +774,7 @@ parseAndPrintFile(char *filename) {
     /*
      * print it.
      */
-    if (!noout) { 
+    if (!noout) {
 #ifdef LIBXML_DEBUG_ENABLED
        if (!debug) {
            if (encoding)
@@ -789,7 +789,7 @@ parseAndPrintFile(char *filename) {
        else
            htmlDocDump(stdout, doc);
 #endif
-    }  
+    }
 #endif /* LIBXML_OUTPUT_ENABLED */
 
     /*
@@ -838,13 +838,13 @@ int main(int argc, char **argv) {
                for (count = 0;count < 100 * repeat;count++) {
                    if (sax)
                        parseSAXFile(argv[i]);
-                   else   
+                   else
                        parseAndPrintFile(argv[i]);
-               }    
+               }
            } else {
                if (sax)
                    parseSAXFile(argv[i]);
-               else   
+               else
                    parseAndPrintFile(argv[i]);
            }
            files ++;
index 8293c45..e399f5c 100644 (file)
@@ -39,7 +39,7 @@
 #endif
 
 typedef int (*hello_world_t)(void);
+
 int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
     xmlChar filename[PATH_MAX];
     xmlModulePtr module = NULL;
@@ -62,7 +62,7 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
            fprintf(stderr, "Lookup returned NULL\n");
            return(1);
        }
-       
+
         (*hello_world)();
 
         xmlModuleClose(module);
index 626536e..21dac94 100644 (file)
@@ -49,10 +49,10 @@ testRegexpFile(const char *filename) {
     while (fgets(expression, 4500, input) != NULL) {
        len = strlen(expression);
        len--;
-       while ((len >= 0) && 
+       while ((len >= 0) &&
               ((expression[len] == '\n') || (expression[len] == '\t') ||
                (expression[len] == '\r') || (expression[len] == ' '))) len--;
-       expression[len + 1] = 0;      
+       expression[len + 1] = 0;
        if (len >= 0) {
            if (expression[0] == '#')
                continue;
@@ -103,10 +103,10 @@ runFileTest(xmlExpCtxtPtr ctxt, const char *filename) {
     while (fgets(expression, 4500, input) != NULL) {
        len = strlen(expression);
        len--;
-       while ((len >= 0) && 
+       while ((len >= 0) &&
               ((expression[len] == '\n') || (expression[len] == '\t') ||
                (expression[len] == '\r') || (expression[len] == ' '))) len--;
-       expression[len + 1] = 0;      
+       expression[len + 1] = 0;
        if (len >= 0) {
            if (expression[0] == '#')
                continue;
@@ -115,7 +115,7 @@ runFileTest(xmlExpCtxtPtr ctxt, const char *filename) {
 
                if (expr != NULL) {
                    xmlExpFree(ctxt, expr);
-                   if (xmlExpCtxtNbNodes(ctxt) != 0) 
+                   if (xmlExpCtxtNbNodes(ctxt) != 0)
                        printf(" Parse/free of Expression leaked %d\n",
                               xmlExpCtxtNbNodes(ctxt));
                    expr = NULL;
@@ -142,7 +142,7 @@ runFileTest(xmlExpCtxtPtr ctxt, const char *filename) {
                    break;
                } else {
                    int ret;
-                   
+
                    nodes2 = xmlExpCtxtNbNodes(ctxt);
                    ret = xmlExpSubsume(ctxt, expr, sub);
 
@@ -174,14 +174,14 @@ runFileTest(xmlExpCtxtPtr ctxt, const char *filename) {
     }
     if (expr != NULL) {
        xmlExpFree(ctxt, expr);
-       if (xmlExpCtxtNbNodes(ctxt) != 0) 
+       if (xmlExpCtxtNbNodes(ctxt) != 0)
            printf(" Parse/free of Expression leaked %d\n",
                   xmlExpCtxtNbNodes(ctxt));
     }
     fclose(input);
 }
 
-static void 
+static void
 testReduce(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, const char *tst) {
     xmlBufferPtr xmlExpBuf;
     xmlExpNodePtr sub, deriv;
@@ -213,7 +213,7 @@ testReduce(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, const char *tst) {
     xmlExpFree(ctxt, sub);
 }
 
-static void 
+static void
 exprDebug(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr) {
     xmlBufferPtr xmlExpBuf;
     xmlExpNodePtr deriv;
index e18b3c2..8e94a7a 100644 (file)
@@ -49,7 +49,7 @@ static int debug = 0;
 #endif
 static int noout = 0;
 static int tree = 0;
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
 static int memory = 0;
 #endif
 
@@ -65,7 +65,7 @@ int main(int argc, char **argv) {
            debug++;
        else
 #endif
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
        if ((!strcmp(argv[i], "-memory")) || (!strcmp(argv[i], "--memory"))) {
            memory++;
         } else
@@ -84,12 +84,12 @@ int main(int argc, char **argv) {
            if (schema == NULL) {
                xmlRelaxNGParserCtxtPtr ctxt;
 
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
                if (memory) {
                    int fd;
                    struct stat info;
                    const char *base;
-                   if (stat(argv[i], &info) < 0) 
+                   if (stat(argv[i], &info) < 0)
                        break;
                    if ((fd = open(argv[i], O_RDONLY)) < 0)
                        break;
@@ -174,7 +174,7 @@ int main(int argc, char **argv) {
 #endif
        printf("\t--noout : do not print the result\n");
        printf("\t--tree : print the intermediate Relax-NG document tree\n");
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
        printf("\t--memory : test the schemas in memory parsing\n");
 #endif
     }
index cd16268..81c4b93 100644 (file)
--- a/testSAX.c
+++ b/testSAX.c
@@ -71,7 +71,7 @@ static int timing = 0;
  * function calls
  */
 
-#ifndef HAVE_GETTIMEOFDAY 
+#ifndef HAVE_GETTIMEOFDAY
 #ifdef HAVE_SYS_TIMEB_H
 #ifdef HAVE_SYS_TIME_H
 #ifdef HAVE_FTIME
@@ -368,7 +368,7 @@ resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xm
        return(NULL);
     /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
 
-    
+
     fprintf(stdout, "SAX.resolveEntity(");
     if (publicId != NULL)
        fprintf(stdout, "%s", (char *)publicId);
@@ -428,8 +428,8 @@ getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
 /**
  * entityDeclDebug:
  * @ctxt:  An XML parser context
- * @name:  the entity name 
- * @type:  the entity type 
+ * @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).
@@ -458,8 +458,8 @@ const xmlChar *nullstr = BAD_CAST "(null)";
 /**
  * attributeDeclDebug:
  * @ctxt:  An XML parser context
- * @name:  the attribute name 
- * @type:  the attribute type 
+ * @name:  the attribute name
+ * @type:  the attribute type
  *
  * An attribute definition has been parsed
  */
@@ -483,8 +483,8 @@ attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar * elem,
 /**
  * elementDeclDebug:
  * @ctxt:  An XML parser context
- * @name:  the element name 
- * @type:  the element type 
+ * @name:  the element name
+ * @type:  the element type
  * @content: the element value (without processing).
  *
  * An element definition has been parsed
@@ -670,7 +670,7 @@ charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
  * @ctxt:  An XML parser context
  * @name:  The entity name
  *
- * called when an entity reference is detected. 
+ * called when an entity reference is detected.
  */
 static void
 referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
@@ -906,7 +906,7 @@ startElementNsDebug(void *ctx ATTRIBUTE_UNUSED,
     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");
@@ -1131,7 +1131,7 @@ int main(int argc, char **argv) {
     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++;
index 47f8b39..b98e631 100644 (file)
@@ -49,7 +49,7 @@
 static int debug = 0;
 #endif
 static int noout = 0;
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
 static int memory = 0;
 #endif
 
@@ -65,7 +65,7 @@ int main(int argc, char **argv) {
            debug++;
        else
 #endif
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
        if ((!strcmp(argv[i], "-memory")) || (!strcmp(argv[i], "--memory"))) {
            memory++;
         } else
@@ -80,12 +80,12 @@ int main(int argc, char **argv) {
            if (schema == NULL) {
                xmlSchemaParserCtxtPtr ctxt;
 
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
                if (memory) {
                    int fd;
                    struct stat info;
                    const char *base;
-                   if (stat(argv[i], &info) < 0) 
+                   if (stat(argv[i], &info) < 0)
                        break;
                    if ((fd = open(argv[i], O_RDONLY)) < 0)
                        break;
@@ -164,7 +164,7 @@ int main(int argc, char **argv) {
        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_SYS_MMAN_H
+#ifdef HAVE_MMAP
        printf("\t--memory : test the schemas in memory parsing\n");
 #endif
     }
index 6ed702e..3d1a5ba 100644 (file)
@@ -104,7 +104,7 @@ main()
                for (i = 0; i < num_threads; i++)
                {
                        DWORD useless;
-                       tid[i] = CreateThread(NULL, 0, 
+                       tid[i] = CreateThread(NULL, 0,
                                thread_specific_data, testfiles[i], 0, &useless);
                        if (tid[i] == NULL)
                        {
@@ -113,7 +113,7 @@ main()
                        }
                }
 
-               if (WaitForMultipleObjects (num_threads, tid, TRUE, INFINITE) == WAIT_FAILED) 
+               if (WaitForMultipleObjects (num_threads, tid, TRUE, INFINITE) == WAIT_FAILED)
                        perror ("WaitForMultipleObjects failed");
 
                for (i = 0; i < num_threads; i++)
@@ -129,7 +129,7 @@ main()
 
                xmlCatalogCleanup();
                for (i = 0; i < num_threads; i++) {
-                   if (results[i] != (DWORD) Okay) 
+                   if (results[i] != (DWORD) Okay)
                        printf("Thread %d handling %s failed\n", i, testfiles[i]);
                }
        }
index 677419a..ebb9ff7 100644 (file)
@@ -51,7 +51,7 @@ static xmlDocPtr document = NULL;
 /*
  * Default document
  */
-static xmlChar buffer[] = 
+static xmlChar buffer[] =
 "<?xml version=\"1.0\"?>\n\
 <EXAMPLE prop1=\"gnome is great\" prop2=\"&amp; linux too\">\n\
   <head>\n\
@@ -79,7 +79,7 @@ static void
 testXPath(const char *str) {
     xmlXPathObjectPtr res;
     xmlXPathContextPtr ctxt;
-    
+
 #if defined(LIBXML_XPTR_ENABLED)
     if (xptr) {
        ctxt = xmlXPtrNewContext(document, NULL, NULL);
@@ -96,7 +96,7 @@ testXPath(const char *str) {
 
            comp = xmlXPathCompile(BAD_CAST str);
            if (comp != NULL) {
-               if (tree) 
+               if (tree)
                    xmlXPathDebugDumpCompExpr(stdout, comp, 0);
 
                res = xmlXPathCompiledEval(comp, ctxt);
@@ -127,10 +127,10 @@ testXPathFile(const char *filename) {
     while (fgets(expression, 4500, input) != NULL) {
        len = strlen(expression);
        len--;
-       while ((len >= 0) && 
+       while ((len >= 0) &&
               ((expression[len] == '\n') || (expression[len] == '\t') ||
                (expression[len] == '\r') || (expression[len] == ' '))) len--;
-       expression[len + 1] = 0;      
+       expression[len + 1] = 0;
        if (len >= 0) {
            printf("\n========================\nExpression: %s\n", expression) ;
            testXPath(expression);
@@ -150,7 +150,7 @@ int main(int argc, char **argv) {
 #if defined(LIBXML_XPTR_ENABLED)
        if ((!strcmp(argv[i], "-xptr")) || (!strcmp(argv[i], "--xptr")))
            xptr++;
-       else 
+       else
 #endif
        if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
            debug++;
@@ -172,10 +172,12 @@ int main(int argc, char **argv) {
     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);
@@ -211,7 +213,7 @@ int main(int argc, char **argv) {
        printf("\t--file : or\n");
        printf("\t-f     : read queries from files, args\n");
     }
-    if (document != NULL) 
+    if (document != NULL)
        xmlFreeDoc(document);
     xmlCleanupParser();
     xmlMemoryDump();
index 4f4b39b..c745ec3 100644 (file)
--- a/testapi.c
+++ b/testapi.c
@@ -8,20 +8,14 @@
  * daniel@veillard.com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #include <stdlib.h> /* for putenv() */
 #include <string.h>
 #include <libxml/xmlerror.h>
 #include <libxml/relaxng.h>
 
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-#define snprintf _snprintf
-#endif
 
 static int testlibxml2(void);
 static int test_module(const char *module);
@@ -107,7 +101,7 @@ get_api_attr(void) {
     if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {
         get_api_root();
     }
-    if (api_root == NULL) 
+    if (api_root == NULL)
         return(NULL);
     if (api_root->properties != NULL) {
         api_attr = api_root->properties;
@@ -127,8 +121,10 @@ 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);
@@ -201,7 +197,7 @@ int main(int argc, char **argv) {
 #include <libxml/xpointer.h>
 #include <libxml/debugXML.h>
 
-/* 
+/*
   We manually define xmlErrMemory because it's normal declaration
   is "hidden" by #ifdef IN_LIBXML
 */
@@ -291,7 +287,7 @@ static void des_long(int no ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED, int nr
 static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
     if (no == 0) return('a');
     if (no == 1) return(' ');
-    if (no == 2) return((xmlChar) 'ø');
+    if (no == 2) return((xmlChar) '\xf8');
     return(0);
 }
 
@@ -399,7 +395,7 @@ static void des_debug_FILE_ptr(int no ATTRIBUTE_UNUSED, FILE *val, int nr ATTRIB
 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øne");
+    if (no == 2) return((xmlChar *) "n" "\xf8" "ne");
     if (no == 3) return((xmlChar *) " 2ab ");
     return(NULL);
 }
@@ -543,7 +539,7 @@ static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {
 
 #define gen_nb_xmlDtdPtr 3
 static xmlDtdPtr gen_xmlDtdPtr(int no, int nr ATTRIBUTE_UNUSED) {
-    if (no == 0) 
+    if (no == 0)
         return(xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar"));
     if (no == 1) return(get_api_dtd());
     return(NULL);
@@ -740,7 +736,7 @@ static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtx
 #endif /* LIBXML_SCHEMAS_ENABLED */
 
 #define gen_nb_xmlHashDeallocator 2
-static void 
+static void
 test_xmlHashDeallocator(void *payload ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED) {
 }
 
@@ -8252,6 +8248,16 @@ test_xmlDictExists(void) {
 
 
 static int
+test_xmlDictGetUsage(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
+static int
 test_xmlDictLookup(void) {
     int test_ret = 0;
 
@@ -8416,6 +8422,16 @@ test_xmlDictReference(void) {
 
 
 static int
+test_xmlDictSetLimit(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
+static int
 test_xmlDictSize(void) {
     int test_ret = 0;
 
@@ -8475,15 +8491,17 @@ static int
 test_dict(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing dict : 10 of 11 functions ...\n");
+    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();
 
@@ -17814,7 +17832,7 @@ test_xmlRelaxNGValidatePushCData(void) {
     int n_ctxt;
     xmlChar * data; /* some character data read */
     int n_data;
-    int len; /* the lenght of the data */
+    int len; /* the length of the data */
     int n_len;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
@@ -18385,6 +18403,153 @@ test_xmlAttrSerializeTxtContent(void) {
 }
 
 
+#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_xmlBufContent(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_const_xmlBufPtr;n_buf++) {
+        mem_base = xmlMemBlocks();
+        buf = gen_const_xmlBufPtr(n_buf, 0);
+
+        ret_val = xmlBufContent((const xmlBufPtr)buf);
+        desret_xmlChar_ptr(ret_val);
+        call_tests++;
+        des_const_xmlBufPtr(n_buf, (const xmlBufPtr)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);
+}
+
+
+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_const_xmlBufPtr;n_buf++) {
+        mem_base = xmlMemBlocks();
+        buf = gen_const_xmlBufPtr(n_buf, 0);
+
+        ret_val = xmlBufEnd((const xmlBufPtr)buf);
+        desret_xmlChar_ptr(ret_val);
+        call_tests++;
+        des_const_xmlBufPtr(n_buf, (const xmlBufPtr)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_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_xmlBufGetNodeContent(void) {
+    int test_ret = 0;
+
+    int mem_base;
+    int ret_val;
+    xmlBufPtr buf; /* a buffer xmlBufPtr */
+    int n_buf;
+    xmlNodePtr 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_xmlNodePtr;n_cur++) {
+        mem_base = xmlMemBlocks();
+        buf = gen_xmlBufPtr(n_buf, 0);
+        cur = gen_xmlNodePtr(n_cur, 1);
+
+        ret_val = xmlBufGetNodeContent(buf, cur);
+        desret_int(ret_val);
+        call_tests++;
+        des_xmlBufPtr(n_buf, buf, 0);
+        des_xmlNodePtr(n_cur, 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);
+}
+
+
+static int
+test_xmlBufUse(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
 static int
 test_xmlBufferAdd(void) {
     int test_ret = 0;
@@ -24015,13 +24180,19 @@ static int
 test_tree(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing tree : 139 of 158 functions ...\n");
+    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();
@@ -26923,7 +27094,7 @@ test_xmlValidatePushCData(void) {
     int n_ctxt;
     xmlChar * data; /* some character data read */
     int n_data;
-    int len; /* the lenght of the data */
+    int len; /* the length of the data */
     int n_len;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
@@ -28405,6 +28576,50 @@ test_xmlOutputBufferFlush(void) {
 
 
 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;
 
@@ -28948,7 +29163,7 @@ static int
 test_xmlIO(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlIO : 39 of 48 functions ...\n");
+    if (quiet == 0) printf("Testing xmlIO : 40 of 50 functions ...\n");
     test_ret += test_xmlAllocOutputBuffer();
     test_ret += test_xmlAllocParserInputBuffer();
     test_ret += test_xmlCheckFilename();
@@ -28974,6 +29189,8 @@ test_xmlIO(void) {
     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();
@@ -32950,7 +33167,7 @@ test_xmlExpGetLanguage(void) {
     int n_exp;
     xmlChar ** langList; /* where to store the tokens */
     int n_langList;
-    int len; /* the allocated lenght of @list */
+    int len; /* the allocated length of @list */
     int n_len;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
@@ -33005,7 +33222,7 @@ test_xmlExpGetStart(void) {
     int n_exp;
     xmlChar ** tokList; /* where to store the tokens */
     int n_tokList;
-    int len; /* the allocated lenght of @list */
+    int len; /* the allocated length of @list */
     int n_len;
 
     for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
@@ -34604,6 +34821,55 @@ test_xmlSchemaValidateOneElement(void) {
 
 
 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;
 
@@ -34668,7 +34934,7 @@ static int
 test_xmlschemas(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlschemas : 15 of 25 functions ...\n");
+    if (quiet == 0) printf("Testing xmlschemas : 16 of 27 functions ...\n");
     test_ret += test_xmlSchemaDump();
     test_ret += test_xmlSchemaGetParserErrors();
     test_ret += test_xmlSchemaGetValidErrors();
@@ -34690,6 +34956,8 @@ test_xmlschemas(void) {
     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)
@@ -43571,6 +43839,47 @@ test_xmlTextWriterSetIndentString(void) {
 
 
 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;
 
@@ -45432,7 +45741,7 @@ static int
 test_xmlwriter(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlwriter : 51 of 79 functions ...\n");
+    if (quiet == 0) printf("Testing xmlwriter : 52 of 80 functions ...\n");
     test_ret += test_xmlNewTextWriter();
     test_ret += test_xmlNewTextWriterFilename();
     test_ret += test_xmlNewTextWriterMemory();
@@ -45452,6 +45761,7 @@ test_xmlwriter(void) {
     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();
@@ -46542,6 +46852,54 @@ test_xmlXPathNewContext(void) {
 
 
 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;
 
@@ -46642,11 +47000,52 @@ test_xmlXPathOrderDocElems(void) {
     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 : 30 of 38 functions ...\n");
+    if (quiet == 0) printf("Testing xpath : 32 of 40 functions ...\n");
     test_ret += test_xmlXPathCastBooleanToNumber();
     test_ret += test_xmlXPathCastBooleanToString();
     test_ret += test_xmlXPathCastNodeSetToBoolean();
@@ -46677,9 +47076,11 @@ test_xpath(void) {
     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);
@@ -48815,6 +49216,7 @@ test_xmlXPathNodeSetAdd(void) {
 
 #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 */
@@ -48826,7 +49228,8 @@ test_xmlXPathNodeSetAdd(void) {
         cur = gen_xmlNodeSetPtr(n_cur, 0);
         val = gen_xmlNodePtr(n_val, 1);
 
-        xmlXPathNodeSetAdd(cur, val);
+        ret_val = xmlXPathNodeSetAdd(cur, val);
+        desret_int(ret_val);
         call_tests++;
         des_xmlNodeSetPtr(n_cur, cur, 0);
         des_xmlNodePtr(n_val, val, 1);
@@ -48854,6 +49257,7 @@ test_xmlXPathNodeSetAddNs(void) {
 
 #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 */
@@ -48869,7 +49273,8 @@ test_xmlXPathNodeSetAddNs(void) {
         node = gen_xmlNodePtr(n_node, 1);
         ns = gen_xmlNsPtr(n_ns, 2);
 
-        xmlXPathNodeSetAddNs(cur, node, ns);
+        ret_val = xmlXPathNodeSetAddNs(cur, node, ns);
+        desret_int(ret_val);
         call_tests++;
         des_xmlNodeSetPtr(n_cur, cur, 0);
         des_xmlNodePtr(n_node, node, 1);
@@ -48900,6 +49305,7 @@ test_xmlXPathNodeSetAddUnique(void) {
 
 #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 */
@@ -48911,7 +49317,8 @@ test_xmlXPathNodeSetAddUnique(void) {
         cur = gen_xmlNodeSetPtr(n_cur, 0);
         val = gen_xmlNodePtr(n_val, 1);
 
-        xmlXPathNodeSetAddUnique(cur, val);
+        ret_val = xmlXPathNodeSetAddUnique(cur, val);
+        desret_int(ret_val);
         call_tests++;
         des_xmlNodeSetPtr(n_cur, cur, 0);
         des_xmlNodePtr(n_val, val, 1);
index 3bfd9c0..0d08792 100644 (file)
@@ -10,6 +10,8 @@
 #include <libxml/parser.h>
 #include <libxml/parserInternals.h>
 
+#include "buf.h"
+
 int lastError;
 
 static void errorHandler(void *unused, xmlErrorPtr err) {
@@ -121,7 +123,7 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
         * We should see no error in remaning cases
         */
        else if ((lastError != 0) || (res == NULL)) {
-           fprintf(stderr, 
+           fprintf(stderr,
                "Failed to parse document for Bytes 0x%02X 0x%02X\n", i, j);
        }
        if (res != NULL)
@@ -409,7 +411,7 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
         * We should see no error in remaining cases
         */
        else if ((lastError != 0) || (len != 3)) {
-           fprintf(stderr, 
+           fprintf(stderr,
                "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
                    i, j, K);
        }
@@ -418,7 +420,7 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
         * Finally check the value is right
         */
        else if (c != value) {
-           fprintf(stderr, 
+           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);
        }
@@ -489,7 +491,7 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
         * 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 > 0xFFFD) && (value <0x10000)) ||
                 (value > 0x10FFFF)) {
            if (lastError != XML_ERR_INVALID_CHAR)
                fprintf(stderr,
@@ -501,7 +503,7 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
         * We should see no error in remaining cases
         */
        else if ((lastError != 0) || (len != 4)) {
-           fprintf(stderr, 
+           fprintf(stderr,
                "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
                    i, j, K);
        }
@@ -510,7 +512,7 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
         * Finally check the value is right
         */
        else if (c != value) {
-           fprintf(stderr, 
+           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);
        }
@@ -558,9 +560,9 @@ static void testCharRanges(void) {
     }
     input->filename = NULL;
     input->buf = buf;
-    input->base = input->buf->buffer->content;
-    input->cur = input->buf->buffer->content;
-    input->end = &input->buf->buffer->content[4];
+    input->cur =
+    input->base = xmlBufContent(input->buf->buffer);
+    input->end = input->base + 4;
     inputPush(ctxt, input);
 
     printf("testing char range: 1");
diff --git a/testlimits.c b/testlimits.c
new file mode 100644 (file)
index 0000000..41994c4
--- /dev/null
@@ -0,0 +1,1634 @@
+/*
+ * 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
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "libxml.h"
+#else
+#include <stdio.h>
+#endif
+
+#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);
+}
+
+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);
+}
+
+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;
+    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++;
+    }
+    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);
+}
index bdc7c30..e5d5d1b 100644 (file)
  * daniel@veillard.com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #if !defined(_WIN32) || defined(__CYGWIN__)
 #include <unistd.h>
@@ -149,10 +146,6 @@ static void globfree(glob_t *pglob) {
     }
 }
 
-#if !defined(__MINGW32__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
-#endif
 #else
 #include <glob.h>
 #endif
@@ -687,12 +680,10 @@ recursiveDetectTest(const char *filename,
     xmlDocPtr doc;
     xmlParserCtxtPtr ctxt;
     int res = 0;
-    int mem;
 
     nb_tests++;
 
     ctxt = xmlNewParserCtxt();
-    mem = xmlMemUsed();
     /*
      * base of the test, parse with the old API
      */
@@ -728,12 +719,10 @@ notRecursiveDetectTest(const char *filename,
     xmlDocPtr doc;
     xmlParserCtxtPtr ctxt;
     int res = 0;
-    int mem;
 
     nb_tests++;
 
     ctxt = xmlNewParserCtxt();
-    mem = xmlMemUsed();
     /*
      * base of the test, parse with the old API
      */
index 1eeac0e..f2f2703 100644 (file)
--- a/threads.c
+++ b/threads.c
@@ -146,6 +146,7 @@ struct _xmlRMutex {
 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)
@@ -251,7 +252,6 @@ xmlMutexLock(xmlMutexPtr tok)
 #ifdef DEBUG_THREADS
         xmlGenericError(xmlGenericErrorContext,
                         "xmlMutexLock():BeOS:Couldn't aquire semaphore\n");
-        exit();
 #endif
     }
     tok->tid = find_thread(NULL);
@@ -439,7 +439,7 @@ __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)
+    if (pthread_mutex_lock != NULL)
         pthread_mutex_lock(&global_init_lock);
 #elif defined HAVE_WIN32_THREADS
     LPCRITICAL_SECTION cs;
@@ -499,7 +499,6 @@ __xmlGlobalInitMutexLock(void)
 #ifdef DEBUG_THREADS
         xmlGenericError(xmlGenericErrorContext,
                         "xmlGlobalInitMutexLock():BeOS:Couldn't acquire semaphore\n");
-        exit();
 #endif
     }
 #endif
@@ -509,7 +508,7 @@ void
 __xmlGlobalInitMutexUnlock(void)
 {
 #ifdef HAVE_PTHREAD_H
-    if (pthread_mutex_unlock)
+    if (pthread_mutex_unlock != NULL)
         pthread_mutex_unlock(&global_init_lock);
 #elif defined HAVE_WIN32_THREADS
     if (global_init_lock != NULL) {
@@ -915,6 +914,7 @@ xmlCleanupThreads(void)
 #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;
@@ -954,6 +954,7 @@ 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) {
@@ -961,6 +962,7 @@ xmlOnceInit(void)
             globalkey = TlsAlloc();
 #endif
             mainthread = GetCurrentThreadId();
+           __xmlInitializeDict();
             run_once.done = 1;
         } else {
             /* Another thread is working; give up our slice and
@@ -974,6 +976,7 @@ xmlOnceInit(void)
         globalkey = tls_allocate();
         tls_set(globalkey, NULL);
         mainthread = find_thread(NULL);
+       __xmlInitializeDict();
     } else
         atomic_add(&run_once_init, -1);
 #endif
diff --git a/timsort.h b/timsort.h
new file mode 100644 (file)
index 0000000..99697a0
--- /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 <= 0x00000000FFFFFFFFL) {n = n + 32; x = x << 32;}
+  if (x <= 0x0000FFFFFFFFFFFFL) {n = n + 16; x = x << 16;}
+  if (x <= 0x00FFFFFFFFFFFFFFL) {n = n + 8; x = x << 8;}
+  if (x <= 0x0FFFFFFFFFFFFFFFL) {n = n + 4; x = x << 4;}
+  if (x <= 0x3FFFFFFFFFFFFFFFL) {n = n + 2; x = x << 2;}
+  if (x <= 0x7FFFFFFFFFFFFFFFL) {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
index 8baae3d..7e5af26 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -41,6 +41,9 @@
 #include <libxml/debugXML.h>
 #endif
 
+#include "buf.h"
+#include "save.h"
+
 int __xmlRegisterCallbacks = 0;
 
 /************************************************************************
@@ -311,7 +314,7 @@ xmlSplitQName2(const xmlChar *name, xmlChar **prefix) {
  * parse an XML qualified name string,i
  *
  * returns NULL if it is not a Qualified Name, otherwise, update len
- *         with the lenght in byte of the prefix and return a pointer
+ *         with the length in byte of the prefix and return a pointer
  *         to the start of the name without the prefix
  */
 
@@ -1265,13 +1268,13 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) {
     const xmlChar *cur = value, *end = cur + len;
     const xmlChar *q;
     xmlEntityPtr ent;
-    xmlBufferPtr buffer;
+    xmlBufPtr buf;
 
     if (value == NULL) return(NULL);
 
-    buffer = xmlBufferCreateSize(0);
-    if (buffer == NULL) return(NULL);
-    xmlBufferSetAllocationScheme(buffer, XML_BUFFER_ALLOC_HYBRID);
+    buf = xmlBufCreateSize(0);
+    if (buf == NULL) return(NULL);
+    xmlBufSetAllocationScheme(buf, XML_BUFFER_ALLOC_HYBRID);
 
     q = cur;
     while ((cur < end) && (*cur != 0)) {
@@ -1283,7 +1286,7 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) {
             * Save the current text.
             */
             if (cur != q) {
-               if (xmlBufferAdd(buffer, q, cur - q))
+               if (xmlBufAdd(buf, q, cur - q))
                    goto out;
            }
            q = cur;
@@ -1360,20 +1363,20 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) {
                    if ((ent != NULL) &&
                        (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
 
-                       if (xmlBufferCat(buffer, ent->content))
+                       if (xmlBufCat(buf, ent->content))
                            goto out;
 
                    } else {
                        /*
                         * Flush buffer so far
                         */
-                       if (buffer->use) {
+                       if (!xmlBufIsEmpty(buf)) {
                            node = xmlNewDocText(doc, NULL);
                            if (node == NULL) {
                                if (val != NULL) xmlFree(val);
                                goto out;
                            }
-                           node->content = xmlBufferDetach(buffer);
+                           node->content = xmlBufDetach(buf);
 
                            if (last == NULL) {
                                last = ret = node;
@@ -1415,13 +1418,13 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) {
                q = cur;
            }
            if (charval != 0) {
-               xmlChar buf[10];
+               xmlChar buffer[10];
                int l;
 
-               l = xmlCopyCharMultiByte(buf, charval);
-               buf[l] = 0;
+               l = xmlCopyCharMultiByte(buffer, charval);
+               buffer[l] = 0;
 
-               if (xmlBufferCat(buffer, buf))
+               if (xmlBufCat(buf, buffer))
                    goto out;
                charval = 0;
            }
@@ -1433,14 +1436,14 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) {
         /*
         * Handle the last piece of text.
         */
-       if (xmlBufferAdd(buffer, q, cur - q))
+       if (xmlBufAdd(buf, q, cur - q))
            goto out;
     }
 
-    if (buffer->use) {
+    if (!xmlBufIsEmpty(buf)) {
        node = xmlNewDocText(doc, NULL);
        if (node == NULL) goto out;
-       node->content = xmlBufferDetach(buffer);
+       node->content = xmlBufDetach(buf);
 
        if (last == NULL) {
            last = ret = node;
@@ -1452,7 +1455,7 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) {
     }
 
 out:
-    xmlBufferFree(buffer);
+    xmlBufFree(buf);
     return(ret);
 }
 
@@ -1473,13 +1476,13 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) {
     const xmlChar *cur = value;
     const xmlChar *q;
     xmlEntityPtr ent;
-    xmlBufferPtr buffer;
+    xmlBufPtr buf;
 
     if (value == NULL) return(NULL);
 
-    buffer = xmlBufferCreateSize(0);
-    if (buffer == NULL) return(NULL);
-    xmlBufferSetAllocationScheme(buffer, XML_BUFFER_ALLOC_HYBRID);
+    buf = xmlBufCreateSize(0);
+    if (buf == NULL) return(NULL);
+    xmlBufSetAllocationScheme(buf, XML_BUFFER_ALLOC_HYBRID);
 
     q = cur;
     while (*cur != 0) {
@@ -1491,7 +1494,7 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) {
             * Save the current text.
             */
             if (cur != q) {
-               if (xmlBufferAdd(buffer, q, cur - q))
+               if (xmlBufAdd(buf, q, cur - q))
                    goto out;
            }
            q = cur;
@@ -1556,16 +1559,16 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) {
                    if ((ent != NULL) &&
                        (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
 
-                       if (xmlBufferCat(buffer, ent->content))
+                       if (xmlBufCat(buf, ent->content))
                            goto out;
 
                    } else {
                        /*
                         * Flush buffer so far
                         */
-                       if (buffer->use) {
+                       if (!xmlBufIsEmpty(buf)) {
                            node = xmlNewDocText(doc, NULL);
-                           node->content = xmlBufferDetach(buffer);
+                           node->content = xmlBufDetach(buf);
 
                            if (last == NULL) {
                                last = ret = node;
@@ -1606,13 +1609,13 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) {
                q = cur;
            }
            if (charval != 0) {
-               xmlChar buf[10];
+               xmlChar buffer[10];
                int len;
 
-               len = xmlCopyCharMultiByte(buf, charval);
-               buf[len] = 0;
+               len = xmlCopyCharMultiByte(buffer, charval);
+               buffer[len] = 0;
 
-               if (xmlBufferCat(buffer, buf))
+               if (xmlBufCat(buf, buffer))
                    goto out;
                charval = 0;
            }
@@ -1623,12 +1626,12 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) {
         /*
         * Handle the last piece of text.
         */
-       xmlBufferAdd(buffer, q, cur - q);
+       xmlBufAdd(buf, q, cur - q);
     }
 
-    if (buffer->use) {
+    if (!xmlBufIsEmpty(buf)) {
        node = xmlNewDocText(doc, NULL);
-       node->content = xmlBufferDetach(buffer);
+       node->content = xmlBufDetach(buf);
 
        if (last == NULL) {
            last = ret = node;
@@ -1638,7 +1641,7 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) {
     }
 
 out:
-    xmlBufferFree(buffer);
+    xmlBufFree(buf);
     return(ret);
 }
 
@@ -1659,9 +1662,14 @@ xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine)
     xmlNodePtr 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) ||
@@ -1671,7 +1679,10 @@ xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine)
             } else {
                 xmlChar *buffer;
 
-                buffer = xmlEncodeEntitiesReentrant(doc, node->content);
+               if (attr)
+                   buffer = xmlEncodeAttributeEntities(doc, node->content);
+               else
+                   buffer = xmlEncodeEntitiesReentrant(doc, node->content);
                 if (buffer != NULL) {
                     ret = xmlStrcat(ret, buffer);
                     xmlFree(buffer);
@@ -2777,7 +2788,7 @@ void
 xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) {
     xmlAttrPtr prop;
 
-    if (tree == NULL)
+    if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL))
        return;
     if (tree->doc != doc) {
        if(tree->type == XML_ELEMENT_NODE) {
@@ -2805,7 +2816,7 @@ void
 xmlSetListDoc(xmlNodePtr list, xmlDocPtr doc) {
     xmlNodePtr cur;
 
-    if (list == NULL)
+    if ((list == NULL) || (list->type == XML_NAMESPACE_DECL))
        return;
     cur = list;
     while (cur != NULL) {
@@ -2912,7 +2923,9 @@ static xmlNodePtr
 xmlAddPropSibling(xmlNodePtr prev, xmlNodePtr cur, xmlNodePtr prop) {
        xmlAttrPtr attr;
 
-       if (cur->type != XML_ATTRIBUTE_NODE)
+       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 */
@@ -2960,14 +2973,14 @@ xmlAddPropSibling(xmlNodePtr prev, xmlNodePtr cur, xmlNodePtr prop) {
  */
 xmlNodePtr
 xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) {
-    if (cur == NULL) {
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlAddNextSibling : cur == NULL\n");
 #endif
        return(NULL);
     }
-    if (elem == NULL) {
+    if ((elem == NULL) || (elem->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlAddNextSibling : elem == NULL\n");
@@ -3038,14 +3051,14 @@ xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) {
  */
 xmlNodePtr
 xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) {
-    if (cur == NULL) {
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlAddPrevSibling : cur == NULL\n");
 #endif
        return(NULL);
     }
-    if (elem == NULL) {
+    if ((elem == NULL) || (elem->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlAddPrevSibling : elem == NULL\n");
@@ -3116,7 +3129,7 @@ xmlNodePtr
 xmlAddSibling(xmlNodePtr cur, xmlNodePtr elem) {
     xmlNodePtr parent;
 
-    if (cur == NULL) {
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlAddSibling : cur == NULL\n");
@@ -3124,7 +3137,7 @@ xmlAddSibling(xmlNodePtr cur, xmlNodePtr elem) {
        return(NULL);
     }
 
-    if (elem == NULL) {
+    if ((elem == NULL) || (elem->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlAddSibling : elem == NULL\n");
@@ -3192,7 +3205,7 @@ xmlNodePtr
 xmlAddChildList(xmlNodePtr parent, xmlNodePtr cur) {
     xmlNodePtr prev;
 
-    if (parent == NULL) {
+    if ((parent == NULL) || (parent->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlAddChildList : parent == NULL\n");
@@ -3200,7 +3213,7 @@ xmlAddChildList(xmlNodePtr parent, xmlNodePtr cur) {
        return(NULL);
     }
 
-    if (cur == NULL) {
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlAddChildList : child == NULL\n");
@@ -3278,7 +3291,7 @@ xmlNodePtr
 xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) {
     xmlNodePtr prev;
 
-    if (parent == NULL) {
+    if ((parent == NULL) || (parent->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlAddChild : parent == NULL\n");
@@ -3286,7 +3299,7 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) {
        return(NULL);
     }
 
-    if (cur == NULL) {
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlAddChild : child == NULL\n");
@@ -3400,7 +3413,7 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) {
  */
 xmlNodePtr
 xmlGetLastChild(xmlNodePtr parent) {
-    if (parent == NULL) {
+    if ((parent == NULL) || (parent->type == XML_NAMESPACE_DECL)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlGetLastChild : parent == NULL\n");
@@ -3752,6 +3765,8 @@ xmlFreeNode(xmlNodePtr cur) {
  * 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) {
@@ -3762,6 +3777,8 @@ xmlUnlinkNode(xmlNodePtr cur) {
 #endif
        return;
     }
+    if (cur->type == XML_NAMESPACE_DECL)
+        return;
     if (cur->type == XML_DTD_NODE) {
        xmlDocPtr doc;
        doc = cur->doc;
@@ -3830,14 +3847,15 @@ xmlUnlinkNode(xmlNodePtr cur) {
 xmlNodePtr
 xmlReplaceNode(xmlNodePtr old, xmlNodePtr cur) {
     if (old == cur) return(NULL);
-    if ((old == NULL) || (old->parent == 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) {
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
        xmlUnlinkNode(old);
        return(old);
     }
@@ -3951,6 +3969,8 @@ 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)
@@ -4070,6 +4090,8 @@ 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)
@@ -4515,39 +4537,71 @@ xmlCopyDoc(xmlDocPtr doc, int recursive) {
  ************************************************************************/
 
 /**
- * xmlGetLineNo:
+ * xmlGetLineNoInternal:
  * @node: valid node
+ * @depth: used to limit any risk of recursion
  *
- * Get line number of @node. This requires activation of this option
- * before invoking the parser by calling xmlLineNumbersDefault(1)
+ * 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
  */
-long
-xmlGetLineNo(xmlNodePtr node)
+static long
+xmlGetLineNoInternal(xmlNodePtr 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))
-        result = (long) node->line;
-    else if ((node->prev != NULL) &&
+       (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 = xmlGetLineNo(node->prev);
+        result = xmlGetLineNoInternal(node->prev, depth + 1);
     else if ((node->parent != NULL) &&
              (node->parent->type == XML_ELEMENT_NODE))
-        result = xmlGetLineNo(node->parent);
+        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(xmlNodePtr node)
+{
+    return(xmlGetLineNoInternal(node, 0));
+}
+
 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
 /**
  * xmlGetNodePath:
@@ -4570,7 +4624,7 @@ xmlGetNodePath(xmlNodePtr node)
     char nametemp[100];
     int occur = 0, generic;
 
-    if (node == NULL)
+    if ((node == NULL) || (node->type == XML_NAMESPACE_DECL))
         return (NULL);
 
     buf_len = 500;
@@ -4835,7 +4889,7 @@ xmlDocSetRootElement(xmlDocPtr doc, xmlNodePtr root) {
     xmlNodePtr old = NULL;
 
     if (doc == NULL) return(NULL);
-    if (root == NULL)
+    if ((root == NULL) || (root->type == XML_NAMESPACE_DECL))
        return(NULL);
     xmlUnlinkNode(root);
     xmlSetTreeDoc(root, doc);
@@ -4922,6 +4976,8 @@ xmlChar *
 xmlNodeGetLang(xmlNodePtr 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)
@@ -5001,6 +5057,8 @@ int
 xmlNodeGetSpacePreserve(xmlNodePtr 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) {
@@ -5167,6 +5225,8 @@ xmlNodeGetBase(xmlDocPtr doc, xmlNodePtr cur) {
 
     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;
@@ -5246,11 +5306,39 @@ xmlNodeGetBase(xmlDocPtr doc, xmlNodePtr cur) {
 int
 xmlNodeBufGetContent(xmlBufferPtr buffer, xmlNodePtr 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 @buffer with this value
+ *
+ * Returns 0 in case of success and -1 in case of error.
+ */
+int
+xmlBufGetNodeContent(xmlBufPtr buf, xmlNodePtr cur)
+{
+    if ((cur == NULL) || (buf == NULL)) return(-1);
     switch (cur->type) {
         case XML_CDATA_SECTION_NODE:
         case XML_TEXT_NODE:
-           xmlBufferCat(buffer, cur->content);
+           xmlBufCat(buf, cur->content);
             break;
         case XML_DOCUMENT_FRAG_NODE:
         case XML_ELEMENT_NODE:{
@@ -5261,10 +5349,10 @@ xmlNodeBufGetContent(xmlBufferPtr buffer, xmlNodePtr cur)
                         case XML_CDATA_SECTION_NODE:
                         case XML_TEXT_NODE:
                             if (tmp->content != NULL)
-                                xmlBufferCat(buffer, tmp->content);
+                                xmlBufCat(buf, tmp->content);
                             break;
                         case XML_ENTITY_REF_NODE:
-                            xmlNodeBufGetContent(buffer, tmp);
+                            xmlBufGetNodeContent(buf, tmp);
                             break;
                         default:
                             break;
@@ -5308,16 +5396,16 @@ xmlNodeBufGetContent(xmlBufferPtr buffer, xmlNodePtr cur)
 
                while (tmp != NULL) {
                    if (tmp->type == XML_TEXT_NODE)
-                       xmlBufferCat(buffer, tmp->content);
+                       xmlBufCat(buf, tmp->content);
                    else
-                       xmlNodeBufGetContent(buffer, tmp);
+                       xmlBufGetNodeContent(buf, tmp);
                    tmp = tmp->next;
                }
                 break;
             }
         case XML_COMMENT_NODE:
         case XML_PI_NODE:
-           xmlBufferCat(buffer, cur->content);
+           xmlBufCat(buf, cur->content);
             break;
         case XML_ENTITY_REF_NODE:{
                 xmlEntityPtr ent;
@@ -5335,7 +5423,7 @@ xmlNodeBufGetContent(xmlBufferPtr buffer, xmlNodePtr cur)
                  * xmlNodeGetContent() which handles all possible node types */
                 tmp = ent->children;
                 while (tmp) {
-                   xmlNodeBufGetContent(buffer, tmp);
+                   xmlBufGetNodeContent(buf, tmp);
                     tmp = tmp->next;
                 }
                break;
@@ -5357,13 +5445,13 @@ xmlNodeBufGetContent(xmlBufferPtr buffer, xmlNodePtr cur)
                if ((cur->type == XML_ELEMENT_NODE) ||
                    (cur->type == XML_TEXT_NODE) ||
                    (cur->type == XML_CDATA_SECTION_NODE)) {
-                   xmlNodeBufGetContent(buffer, cur);
+                   xmlBufGetNodeContent(buf, cur);
                }
                cur = cur->next;
            }
            break;
         case XML_NAMESPACE_DECL:
-           xmlBufferCat(buffer, ((xmlNsPtr) cur)->href);
+           xmlBufCat(buf, ((xmlNsPtr) cur)->href);
            break;
         case XML_ELEMENT_DECL:
         case XML_ATTRIBUTE_DECL:
@@ -5372,6 +5460,7 @@ xmlNodeBufGetContent(xmlBufferPtr buffer, xmlNodePtr cur)
     }
     return(0);
 }
+
 /**
  * xmlNodeGetContent:
  * @cur:  the node being read
@@ -5391,16 +5480,15 @@ xmlNodeGetContent(xmlNodePtr cur)
     switch (cur->type) {
         case XML_DOCUMENT_FRAG_NODE:
         case XML_ELEMENT_NODE:{
-                xmlBufferPtr buffer;
+                xmlBufPtr buf;
                 xmlChar *ret;
 
-                buffer = xmlBufferCreateSize(64);
-                if (buffer == NULL)
+                buf = xmlBufCreateSize(64);
+                if (buf == NULL)
                     return (NULL);
-               xmlNodeBufGetContent(buffer, cur);
-                ret = buffer->content;
-                buffer->content = NULL;
-                xmlBufferFree(buffer);
+               xmlBufGetNodeContent(buf, cur);
+                ret = xmlBufDetach(buf);
+                xmlBufFree(buf);
                 return (ret);
             }
         case XML_ATTRIBUTE_NODE:
@@ -5412,7 +5500,7 @@ xmlNodeGetContent(xmlNodePtr cur)
             return (NULL);
         case XML_ENTITY_REF_NODE:{
                 xmlEntityPtr ent;
-                xmlBufferPtr buffer;
+                xmlBufPtr buf;
                 xmlChar *ret;
 
                 /* lookup entity declaration */
@@ -5420,15 +5508,14 @@ xmlNodeGetContent(xmlNodePtr cur)
                 if (ent == NULL)
                     return (NULL);
 
-                buffer = xmlBufferCreate();
-                if (buffer == NULL)
+                buf = xmlBufCreate();
+                if (buf == NULL)
                     return (NULL);
 
-                xmlNodeBufGetContent(buffer, cur);
+                xmlBufGetNodeContent(buf, cur);
 
-                ret = buffer->content;
-                buffer->content = NULL;
-                xmlBufferFree(buffer);
+                ret = xmlBufDetach(buf);
+                xmlBufFree(buf);
                 return (ret);
             }
         case XML_ENTITY_NODE:
@@ -5443,18 +5530,17 @@ xmlNodeGetContent(xmlNodePtr cur)
         case XML_DOCB_DOCUMENT_NODE:
 #endif
         case XML_HTML_DOCUMENT_NODE: {
-           xmlBufferPtr buffer;
+           xmlBufPtr buf;
            xmlChar *ret;
 
-           buffer = xmlBufferCreate();
-           if (buffer == NULL)
+           buf = xmlBufCreate();
+           if (buf == NULL)
                return (NULL);
 
-           xmlNodeBufGetContent(buffer, (xmlNodePtr) cur);
+           xmlBufGetNodeContent(buf, (xmlNodePtr) cur);
 
-           ret = buffer->content;
-           buffer->content = NULL;
-           xmlBufferFree(buffer);
+           ret = xmlBufDetach(buf);
+           xmlBufFree(buf);
            return (ret);
        }
         case XML_NAMESPACE_DECL: {
@@ -5775,6 +5861,9 @@ xmlGetNsList(xmlDocPtr doc ATTRIBUTE_UNUSED, xmlNodePtr node)
     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;
@@ -5873,7 +5962,7 @@ xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace) {
     xmlNsPtr cur;
     xmlNodePtr orig = node;
 
-    if (node == NULL) return(NULL);
+    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)) {
@@ -6003,7 +6092,7 @@ xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href)
     xmlNodePtr orig = node;
     int is_attr;
 
-    if ((node == NULL) || (href == NULL))
+    if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) || (href == NULL))
         return (NULL);
     if (xmlStrEqual(href, XML_XML_NAMESPACE)) {
         /*
@@ -6094,7 +6183,7 @@ xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) {
     xmlChar prefix[50];
     int counter = 1;
 
-    if (tree == NULL) {
+    if ((tree == NULL) || (tree->type != XML_ELEMENT_NODE)) {
 #ifdef DEBUG_TREE
         xmlGenericError(xmlGenericErrorContext,
                "xmlNewReconciliedNs : tree == NULL\n");
@@ -7951,6 +8040,8 @@ xmlDOMWrapNSNormGatherInScopeNs(xmlNsMapPtr *map,
 
     if ((map == NULL) || (*map != NULL))
        return (-1);
+    if ((node == NULL) || (node->type == XML_NAMESPACE_DECL))
+        return (-1);
     /*
     * Get in-scope ns-decls of @parent.
     */
@@ -8218,6 +8309,8 @@ xmlSearchNsByNamespaceStrict(xmlDocPtr doc, xmlNodePtr node,
 
     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)) {
@@ -8316,8 +8409,8 @@ xmlSearchNsByPrefixStrict(xmlDocPtr doc, xmlNodePtr node,
     xmlNodePtr cur;
     xmlNsPtr ns;
 
-    if ((doc == NULL) || (node == NULL))
-       return (-1);
+    if ((doc == NULL) || (node == NULL) || (node->type == XML_NAMESPACE_DECL))
+        return(-1);
 
     if (retNs)
        *retNs = NULL;
@@ -8385,6 +8478,9 @@ xmlDOMWrapNSNormDeclareNsForced(xmlDocPtr doc,
     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.
     */
@@ -8901,6 +8997,9 @@ xmlDOMWrapAdoptBranch(xmlDOMWrapCtxtPtr ctxt,
        parnsdone = 0;
 
     cur = node;
+    if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL))
+       goto internal_error;
+
     while (cur != NULL) {
        /*
        * Paranoid source-doc sanity check.
@@ -9280,6 +9379,9 @@ xmlDOMWrapCloneNode(xmlDOMWrapCtxtPtr ctxt,
     *resNode = NULL;
 
     cur = node;
+    if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL))
+        return(-1);
+
     while (cur != NULL) {
        if (cur->doc != sourceDoc) {
            /*
@@ -9797,6 +9899,8 @@ xmlDOMWrapAdoptAttr(xmlDOMWrapCtxtPtr ctxt,
     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) {
@@ -9881,7 +9985,8 @@ xmlDOMWrapAdoptNode(xmlDOMWrapCtxtPtr ctxt,
                    xmlNodePtr destParent,
                    int options)
 {
-    if ((node == NULL) || (destDoc == NULL) ||
+    if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) ||
+        (destDoc == NULL) ||
        ((destParent != NULL) && (destParent->doc != destDoc)))
        return(-1);
     /*
diff --git a/trio.c b/trio.c
index b116ccc..d885db9 100644 (file)
--- a/trio.c
+++ b/trio.c
@@ -307,6 +307,10 @@ typedef trio_longlong_t trio_int64_t;
 #define NAN_LOWER "nan"
 #define NAN_UPPER "NAN"
 
+#if !defined(HAVE_ISASCII) && !defined(isascii)
+#  define isascii(x) ((unsigned int)(x) < 128)
+#endif
+
 /* Various constants */
 enum {
   TYPE_PRINT = 1,
@@ -376,7 +380,7 @@ enum {
   /* 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 */
@@ -1020,23 +1024,23 @@ TRIO_ARGS2((name, prev),
           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
@@ -1200,7 +1204,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
 
   /* 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.
@@ -1213,7 +1217,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
 #if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
   (void)mblen(NULL, 0);
 #endif
-  
+
   while (format[index])
     {
 #if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
@@ -1291,7 +1295,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
                      /* 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])
@@ -1336,7 +1340,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
                  else if (dots == 1) /* Base */
                    {
                      dots++;
-                     
+
                      /* After the second dot we have the base */
                      flags |= FLAGS_BASE;
                      if ((QUALIFIER_STAR == format[index])
@@ -1535,7 +1539,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
                    }
                  else
                    return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
-                 
+
                  flags |= FLAGS_FIXED_SIZE;
                  break;
 #endif
@@ -1563,7 +1567,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
                  gotSticky = TRUE;
                  break;
 #endif
-                 
+
 #if defined(QUALIFIER_VARSIZE)
                case QUALIFIER_VARSIZE:
                  flags |= FLAGS_VARSIZE_PARAMETER;
@@ -1628,9 +1632,9 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
              indices[varsize] = pos;
              varsize = pos++;
            }
-         
+
          indices[currentParam] = pos;
-         
+
          switch (format[index++])
            {
 #if defined(SPECIFIER_CHAR_UPPER)
@@ -1689,11 +1693,11 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
                    }
                }
              break;
-             
+
            case SPECIFIER_INTEGER:
              parameters[pos].type = FORMAT_INT;
              break;
-             
+
            case SPECIFIER_UNSIGNED:
              flags |= FLAGS_UNSIGNED;
              parameters[pos].type = FORMAT_INT;
@@ -1793,11 +1797,11 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
              {
                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++;
@@ -1845,7 +1849,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
              }
              break;
 #endif /* defined(SPECIFIER_USER_DEFINED_BEGIN) */
-             
+
            default:
              /* Bail out completely to make the error more obvious */
               return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
@@ -1853,7 +1857,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
 
          /*  Count the number of times this entry has been used */
          usedEntries[currentParam] += 1;
-         
+
          /* Find last sticky parameters */
          if (gotSticky && !(flags & FLAGS_STICKY))
            {
@@ -1876,7 +1880,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
                    }
                }
            }
-         
+
          parameters[pos].indexAfterSpecifier = index;
          parameters[pos].flags = flags;
          parameters[pos].width = width;
@@ -1884,12 +1888,12 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
          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++)
@@ -1901,7 +1905,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
          else /* double references detected */
            return TRIO_ERROR_RETURN(TRIO_EDBLREF, num);
        }
-      
+
       i = indices[num];
 
       /*
@@ -1969,7 +1973,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
          if (TYPE_SCAN == type)
            {
               if (argarray == NULL)
-                parameters[i].data.pointer = 
+                parameters[i].data.pointer =
                   (trio_pointer_t)va_arg(*arglist, trio_pointer_t);
               else
                 {
@@ -2009,7 +2013,7 @@ TRIO_ARGS5((type, format, parameters, arglist, argarray),
                      varsize = parameters[i].varsize;
                    }
                  parameters[i].flags &= ~FLAGS_ALL_VARSIZES;
-                 
+
                  if (varsize <= (int)sizeof(int))
                    ;
                  else if (varsize <= (int)sizeof(long))
@@ -2213,7 +2217,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
     number &= (unsigned long)-1;
   else
     number &= (unsigned int)-1;
-  
+
   /* Build number */
   pointer = bufferend = &buffer[sizeof(buffer) - 1];
   *pointer-- = NIL;
@@ -2260,7 +2264,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
   count = (! ((flags & FLAGS_LEFTADJUST) || (precision == NO_PRECISION)))
     ? precision
     : 0;
-  
+
   /* Adjust width further */
   if (isNegative || (flags & FLAGS_SHOWSIGN) || (flags & FLAGS_SPACE))
     width--;
@@ -2495,7 +2499,7 @@ TRIO_ARGS4((self, wch, flags, width),
 
   if (width == NO_WIDTH)
     width = sizeof(buffer);
-  
+
   size = wctomb(buffer, wch);
   if ((size <= 0) || (size > width) || (buffer[0] == NIL))
     return 0;
@@ -2537,13 +2541,13 @@ TRIO_ARGS5((self, wstring, flags, width, precision),
 #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;
@@ -2638,7 +2642,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
   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));
@@ -2653,7 +2657,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
                      : NAN_LOWER,
                      flags, width, precision);
       return;
-      
+
     case TRIO_FP_INFINITE:
       if (isNegative)
        {
@@ -2680,7 +2684,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
       /* Finitude */
       break;
     }
-  
+
   /* Normal numbers */
   if (flags & FLAGS_LONGDOUBLE)
     {
@@ -2728,13 +2732,13 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
          precision = FLT_DIG;
        }
     }
-  
+
   if (isNegative)
     number = -number;
 
   if (isHex)
     flags |= FLAGS_FLOAT_E;
-  
+
   if (flags & FLAGS_FLOAT_G)
     {
       if (precision == 0)
@@ -2787,7 +2791,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
 
   integerNumber = floorl(number);
   fractionNumber = number - integerNumber;
-  
+
   /*
    * Truncated number.
    *
@@ -2802,7 +2806,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
     : zeroes + precision;
 
   dblFractionBase = TrioPower(base, fractionDigits);
-  
+
   workNumber = number + 0.5 / dblFractionBase;
   if (floorl(number) != floorl(workNumber))
     {
@@ -2855,7 +2859,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
       integerThreshold = INT_MAX;
       fractionThreshold = INT_MAX;
     }
-  
+
   /*
    * Calculate expected width.
    *  sign + integer part + thousands separators + decimal point
@@ -2891,7 +2895,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
       ((requireTwoDigitExponent ? sizeof("E+0") : sizeof("E+")) - 1);
   if (isHex)
     expectedWidth += sizeof("0X") - 1;
-  
+
   /* Output prefixing */
   if (flags & FLAGS_NILPADDING)
     {
@@ -2937,7 +2941,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
          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++)
@@ -2953,7 +2957,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
          self->OutStream(self, digits[(int)fmodl(workNumber, dblBase)]);
        }
       dblIntegerBase *= dblBase;
-      
+
       if (((flags & (FLAGS_FLOAT_E | FLAGS_QUOTE)) == FLAGS_QUOTE)
          && TrioFollowedBySeparator(integerDigits - i))
        {
@@ -2965,7 +2969,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
            }
        }
     }
-  
+
   /* Insert decimal point and build the fraction part */
   trailingZeroes = 0;
 
@@ -3014,7 +3018,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
            }
        }
     }
-  
+
   if (keepTrailingZeroes)
     {
       while (trailingZeroes > 0)
@@ -3023,7 +3027,7 @@ TRIO_ARGS6((self, number, flags, width, precision, base),
          trailingZeroes--;
        }
     }
-  
+
   /* Output exponent */
   if (exponentDigits > 0)
     {
@@ -3080,13 +3084,13 @@ TRIO_ARGS3((data, format, parameters),
   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)
@@ -3120,7 +3124,7 @@ TRIO_ARGS3((data, format, parameters),
              /* Skip the parameter entries */
              while (parameters[i].type == FORMAT_PARAMETER)
                i++;
-             
+
              flags = parameters[i].flags;
 
              /* Find width */
@@ -3140,7 +3144,7 @@ TRIO_ARGS3((data, format, parameters),
                      width = -width;
                    }
                }
-             
+
              /* Find precision */
              if (flags & FLAGS_PRECISION)
                {
@@ -3171,7 +3175,7 @@ TRIO_ARGS3((data, format, parameters),
                  /* Get base from parameter list */
                  base = (int)parameters[base].data.number.as_signed;
                }
-             
+
              switch (parameters[i].type)
                {
                case FORMAT_CHAR:
@@ -3251,7 +3255,7 @@ TRIO_ARGS3((data, format, parameters),
                case FORMAT_POINTER:
                  {
                    trio_reference_t reference;
-                   
+
                    reference.data = data;
                    reference.parameter = &parameters[i];
                    trio_print_pointer(&reference, parameters[i].data.pointer);
@@ -3354,7 +3358,7 @@ TRIO_ARGS3((data, format, parameters),
                  }
                  break;
 #endif /* defined(FORMAT_USER_DEFINED) */
-                 
+
                default:
                  break;
                } /* switch parameter type */
@@ -3564,7 +3568,7 @@ TRIO_ARGS2((self, output),
 
   assert(VALID(self));
   assert(VALID(self->location));
-  
+
   buffer = (char **)self->location;
 
   if (self->processed < self->max)
@@ -3632,7 +3636,7 @@ TRIO_VARGS2((format, va_alist),
   va_list args;
 
   assert(VALID(format));
-  
+
   TRIO_VA_START(args, format);
   status = TrioFormat(stdout, 0, TrioOutStreamFile, format, &args, NULL);
   TRIO_VA_END(args);
@@ -3699,7 +3703,7 @@ TRIO_VARGS3((file, format, va_alist),
 
   assert(VALID(file));
   assert(VALID(format));
-  
+
   TRIO_VA_START(args, format);
   status = TrioFormat(file, 0, TrioOutStreamFile, format, &args, NULL);
   TRIO_VA_END(args);
@@ -3723,7 +3727,7 @@ TRIO_ARGS3((file, format, args),
 {
   assert(VALID(file));
   assert(VALID(format));
-  
+
   return TrioFormat(file, 0, TrioOutStreamFile, format, &args, NULL);
 }
 
@@ -3744,7 +3748,7 @@ TRIO_ARGS3((file, format, args),
 {
   assert(VALID(file));
   assert(VALID(format));
-  
+
   return TrioFormat(file, 0, TrioOutStreamFile, format, NULL, args);
 }
 
@@ -3771,7 +3775,7 @@ TRIO_VARGS3((fd, format, va_alist),
   va_list args;
 
   assert(VALID(format));
-  
+
   TRIO_VA_START(args, format);
   status = TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, &args, NULL);
   TRIO_VA_END(args);
@@ -3794,7 +3798,7 @@ TRIO_ARGS3((fd, format, args),
           va_list args)
 {
   assert(VALID(format));
-  
+
   return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, &args, NULL);
 }
 
@@ -3814,7 +3818,7 @@ TRIO_ARGS3((fd, format, args),
           trio_pointer_t *args)
 {
   assert(VALID(format));
-  
+
   return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, NULL, args);
 }
 
@@ -3904,7 +3908,7 @@ TRIO_VARGS3((buffer, format, va_alist),
 
   assert(VALID(buffer));
   assert(VALID(format));
-  
+
   TRIO_VA_START(args, format);
   status = TrioFormat(&buffer, 0, TrioOutStreamString, format, &args, NULL);
   *buffer = NIL; /* Terminate with NIL character */
@@ -4098,7 +4102,7 @@ TRIO_ARGS4((buffer, max, format, args),
 {
   int status;
   size_t buf_len;
-  
+
   assert(VALID(buffer));
   assert(VALID(format));
 
@@ -4126,7 +4130,7 @@ TRIO_VARGS2((format, va_alist),
   char *result = NULL;
 
   assert(VALID(format));
-  
+
   info = trio_xstring_duplicate("");
   if (info)
     {
@@ -4151,9 +4155,9 @@ TRIO_ARGS2((format, args),
 {
   trio_string_t *info;
   char *result = NULL;
-  
+
   assert(VALID(format));
-  
+
   info = trio_xstring_duplicate("");
   if (info)
     {
@@ -4180,7 +4184,7 @@ TRIO_VARGS3((result, format, va_alist),
   assert(VALID(format));
 
   *result = NULL;
-  
+
   info = trio_xstring_duplicate("");
   if (info == NULL)
     {
@@ -4211,11 +4215,11 @@ TRIO_ARGS3((result, format, args),
 {
   int status;
   trio_string_t *info;
-  
+
   assert(VALID(format));
 
   *result = NULL;
-  
+
   info = trio_xstring_duplicate("");
   if (info == NULL)
     {
@@ -4264,7 +4268,7 @@ TRIO_ARGS3((result, format, args),
    @param name
    @return Handle.
  */
-TRIO_PUBLIC trio_pointer_t 
+TRIO_PUBLIC trio_pointer_t
 trio_register
 TRIO_ARGS2((callback, name),
           trio_callback_t callback,
@@ -4291,23 +4295,23 @@ TRIO_ARGS2((callback, name),
            }
          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 */
@@ -4352,12 +4356,12 @@ TRIO_ARGS1((handle),
        {
          if (internalEnterCriticalRegion)
            (void)internalEnterCriticalRegion(NULL);
-         
+
          if (prev == NULL)
            internalUserDef = NULL;
          else
            prev->next = def->next;
-         
+
          if (internalLeaveCriticalRegion)
            (void)internalLeaveCriticalRegion(NULL);
        }
@@ -4377,14 +4381,14 @@ TRIO_ARGS1((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_pointer_t
 trio_get_argument
 TRIO_ARGS1((ref),
           trio_pointer_t ref)
@@ -4392,7 +4396,7 @@ TRIO_ARGS1((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;
 }
 
@@ -4924,7 +4928,7 @@ TRIO_VARGS3((ref, format, va_alist),
   va_list arglist;
 
   assert(VALID(format));
-  
+
   TRIO_VA_START(arglist, format);
   status = TrioFormatRef((trio_reference_t *)ref, format, &arglist, NULL);
   TRIO_VA_END(arglist);
@@ -4942,7 +4946,7 @@ TRIO_ARGS3((ref, format, arglist),
           va_list arglist)
 {
   assert(VALID(format));
-  
+
   return TrioFormatRef((trio_reference_t *)ref, format, &arglist, NULL);
 }
 
@@ -4957,7 +4961,7 @@ TRIO_ARGS3((ref, format, argarray),
           trio_pointer_t *argarray)
 {
   assert(VALID(format));
-  
+
   return TrioFormatRef((trio_reference_t *)ref, format, NULL, argarray);
 }
 
@@ -5206,7 +5210,7 @@ TRIO_ARGS4((format, indexPointer, flagsPointer, characterclass),
       switch (ch)
        {
        case QUALIFIER_MINUS: /* Scanlist ranges */
-         
+
          /*
           * Both C99 and UNIX98 describes ranges as implementation-
           * defined.
@@ -5233,17 +5237,17 @@ TRIO_ARGS4((format, indexPointer, flagsPointer, characterclass),
            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 */
@@ -5262,15 +5266,15 @@ TRIO_ARGS4((format, indexPointer, flagsPointer, characterclass),
                }
              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 */
@@ -5294,13 +5298,13 @@ TRIO_ARGS4((format, indexPointer, flagsPointer, characterclass),
                  }
                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]))
                {
@@ -5400,9 +5404,9 @@ TRIO_ARGS4((format, indexPointer, flagsPointer, characterclass),
              break;
            }
          break;
-         
+
 #endif /* TRIO_EXTENSION */
-         
+
        default:
          characterclass[(int)ch]++;
          break;
@@ -5448,9 +5452,9 @@ TRIO_ARGS5((self, target, flags, width, base),
        }
       internalDigitsUnconverted = FALSE;
     }
-  
+
   TrioSkipWhitespaces(self);
-  
+
   if (!(flags & FLAGS_UNSIGNED))
     {
       /* Leading sign */
@@ -5464,9 +5468,9 @@ TRIO_ARGS5((self, target, flags, width, base),
          isNegative = TRUE;
        }
     }
-  
+
   count = self->processed;
-  
+
   if (flags & FLAGS_ALTERNATIVE)
     {
       switch (base)
@@ -5527,7 +5531,7 @@ TRIO_ARGS5((self, target, flags, width, base),
        }
       else
        break;
-            
+
       number *= base;
       number += digit;
       gotNumber = TRUE; /* we need at least one digit */
@@ -5538,7 +5542,7 @@ TRIO_ARGS5((self, target, flags, width, base),
   /* Was anything read at all? */
   if (!gotNumber)
     return FALSE;
-  
+
   if (target)
     *target = (isNegative) ? -((trio_intmax_t)number) : number;
   return TRUE;
@@ -5558,7 +5562,7 @@ TRIO_ARGS4((self, target, flags, width),
   int i;
   char ch;
   trio_uintmax_t number;
-  
+
   assert(VALID(self));
   assert(VALID(self->InStream));
 
@@ -5603,7 +5607,7 @@ TRIO_ARGS4((self, target, flags, width),
              break;
            }
        }
-      
+
       if (target)
        target[i] = ch;
     }
@@ -5622,12 +5626,12 @@ TRIO_ARGS4((self, target, flags, width),
           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
@@ -5663,7 +5667,7 @@ TRIO_ARGS4((self, target, flags, width),
   int amount = 0;
   trio_wchar_t wch;
   char buffer[MB_LEN_MAX + 1];
-  
+
   assert(VALID(self));
   assert(VALID(self->InStream));
 
@@ -5720,7 +5724,7 @@ TRIO_ARGS4((self, target, flags, width),
 {
   int i;
   int size;
-  
+
   assert(VALID(self));
   assert(VALID(self->InStream));
 
@@ -5729,7 +5733,7 @@ TRIO_ARGS4((self, target, flags, width),
 #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
@@ -5767,7 +5771,7 @@ TRIO_ARGS5((self, target, characterclass, flags, width),
 {
   int ch;
   int i;
-  
+
   assert(VALID(self));
   assert(VALID(self->InStream));
 
@@ -5782,7 +5786,7 @@ TRIO_ARGS5((self, target, characterclass, flags, width),
        target[i] = (char)ch;
       self->InStream(self, &ch);
     }
-  
+
   if (target)
     target[i] = NIL;
   return TRUE;
@@ -5811,12 +5815,12 @@ TRIO_ARGS4((self, target, flags, width),
   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
@@ -5902,11 +5906,11 @@ TRIO_ARGS4((self, target, flags, width),
          self->InStream(self, &ch);
        }
       break;
-      
+
     default:
       break;
     }
-  
+
   while ((ch != EOF) && (index - start < width))
     {
       /* Integer part */
@@ -5966,7 +5970,7 @@ TRIO_ARGS4((self, target, flags, width),
     return FALSE;
 
   doubleString[index] = 0;
-  
+
   if (flags & FLAGS_LONGDOUBLE)
     {
       *((trio_long_double_t *)target) = trio_to_long_double(doubleString, NULL);
@@ -5992,7 +5996,7 @@ TRIO_ARGS3((self, target, flags),
   char buffer[sizeof(internalNullString)];
 
   flags |= (FLAGS_UNSIGNED | FLAGS_ALTERNATIVE | FLAGS_NILPADDING);
-  
+
   if (TrioReadNumber(self,
                     &number,
                     flags,
@@ -6013,7 +6017,7 @@ TRIO_ARGS3((self, target, flags),
                          : buffer,
                          0,
                          sizeof(internalNullString) - 1))
-    {  
+    {
       if (trio_equal_case(buffer, internalNullString))
        {
          if (target)
@@ -6077,12 +6081,12 @@ TRIO_ARGS3((data, format, parameters),
            }
        }
 #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])
@@ -6101,7 +6105,7 @@ TRIO_ARGS3((data, format, parameters),
          /* Skip the parameter entries */
          while (parameters[i].type == FORMAT_PARAMETER)
            i++;
-         
+
          flags = parameters[i].flags;
          /* Find width */
          width = parameters[i].width;
@@ -6117,7 +6121,7 @@ TRIO_ARGS3((data, format, parameters),
              /* Get base from parameter list */
              base = (int)parameters[base].data.number.as_signed;
            }
-         
+
          switch (parameters[i].type)
            {
            case FORMAT_INT:
@@ -6165,7 +6169,7 @@ TRIO_ARGS3((data, format, parameters),
                  }
              }
              break; /* FORMAT_INT */
-             
+
            case FORMAT_STRING:
 #if TRIO_WIDECHAR
              if (flags & FLAGS_WIDECHAR)
@@ -6229,7 +6233,7 @@ TRIO_ARGS3((data, format, parameters),
                  }
                /* Skip over group specifier */
                index++;
-               
+
                memset(characterclass, 0, sizeof(characterclass));
                rc = TrioGetCharacterClass(format,
                                           &index,
@@ -6291,7 +6295,7 @@ TRIO_ARGS3((data, format, parameters),
                    }
                }
              break; /* FORMAT_COUNT */
-             
+
            case FORMAT_CHAR:
 #if TRIO_WIDECHAR
              if (flags & FLAGS_WIDECHAR)
@@ -6353,7 +6357,7 @@ TRIO_ARGS3((data, format, parameters),
            }
          else
            return assignment;
-         
+
          index++;
        }
     }
@@ -6392,7 +6396,7 @@ TRIO_ARGS6((source, sourceSize, InStream, format, arglist, argarray),
       TrioSetLocale();
     }
 #endif
-  
+
   status = TrioParse(TYPE_SCAN, format, parameters, arglist, argarray);
   if (status < 0)
     return status;
@@ -6431,7 +6435,7 @@ TRIO_ARGS2((self, intPointer),
       self->processed++;
       self->committed++;
     }
-  
+
   if (VALID(intPointer))
     {
       *intPointer = self->current;
@@ -6468,7 +6472,7 @@ TRIO_ARGS2((self, intPointer),
       self->committed++;
       self->processed++;
     }
-  
+
   if (VALID(intPointer))
     {
       *intPointer = self->current;
@@ -6485,7 +6489,7 @@ TRIO_ARGS2((self, intPointer),
           int *intPointer)
 {
   trio_custom_t *data;
-  
+
   assert(VALID(self));
   assert(VALID(self->location));
 
@@ -6494,7 +6498,7 @@ TRIO_ARGS2((self, intPointer),
   self->current = (data->stream.in == NULL)
     ? NIL
     : (data->stream.in)(data->closure);
-  
+
   if (self->current == NIL)
     {
       self->current = EOF;
@@ -6504,7 +6508,7 @@ TRIO_ARGS2((self, intPointer),
       self->processed++;
       self->committed++;
     }
-  
+
   if (VALID(intPointer))
     {
       *intPointer = self->current;
@@ -6537,7 +6541,7 @@ TRIO_ARGS2((self, intPointer),
       self->processed++;
       self->committed++;
     }
-  
+
   if (VALID(intPointer))
     {
       *intPointer = self->current;
@@ -6578,7 +6582,7 @@ TRIO_VARGS2((format, va_alist),
   va_list args;
 
   assert(VALID(format));
-  
+
   TRIO_VA_START(args, format);
   status = TrioScan((trio_pointer_t)stdin, 0,
                    TrioInStreamFile,
@@ -6594,7 +6598,7 @@ TRIO_ARGS2((format, args),
           va_list args)
 {
   assert(VALID(format));
-  
+
   return TrioScan((trio_pointer_t)stdin, 0,
                  TrioInStreamFile,
                  format, &args, NULL);
@@ -6607,7 +6611,7 @@ TRIO_ARGS2((format, args),
           trio_pointer_t *args)
 {
   assert(VALID(format));
-  
+
   return TrioScan((trio_pointer_t)stdin, 0,
                  TrioInStreamFile,
                  format, NULL, args);
@@ -6628,7 +6632,7 @@ TRIO_VARGS3((file, format, va_alist),
 
   assert(VALID(file));
   assert(VALID(format));
-  
+
   TRIO_VA_START(args, format);
   status = TrioScan((trio_pointer_t)file, 0,
                    TrioInStreamFile,
@@ -6646,7 +6650,7 @@ TRIO_ARGS3((file, format, args),
 {
   assert(VALID(file));
   assert(VALID(format));
-  
+
   return TrioScan((trio_pointer_t)file, 0,
                  TrioInStreamFile,
                  format, &args, NULL);
@@ -6661,7 +6665,7 @@ TRIO_ARGS3((file, format, args),
 {
   assert(VALID(file));
   assert(VALID(format));
-  
+
   return TrioScan((trio_pointer_t)file, 0,
                  TrioInStreamFile,
                  format, NULL, args);
@@ -6681,7 +6685,7 @@ TRIO_VARGS3((fd, format, va_alist),
   va_list args;
 
   assert(VALID(format));
-  
+
   TRIO_VA_START(args, format);
   status = TrioScan((trio_pointer_t)&fd, 0,
                    TrioInStreamFileDescriptor,
@@ -6698,7 +6702,7 @@ TRIO_ARGS3((fd, format, args),
           va_list args)
 {
   assert(VALID(format));
-  
+
   return TrioScan((trio_pointer_t)&fd, 0,
                  TrioInStreamFileDescriptor,
                  format, &args, NULL);
@@ -6712,7 +6716,7 @@ TRIO_ARGS3((fd, format, args),
           trio_pointer_t *args)
 {
   assert(VALID(format));
-  
+
   return TrioScan((trio_pointer_t)&fd, 0,
                  TrioInStreamFileDescriptor,
                  format, NULL, args);
@@ -6735,7 +6739,7 @@ TRIO_VARGS4((stream, closure, format, va_alist),
 
   assert(VALID(stream));
   assert(VALID(format));
-  
+
   TRIO_VA_START(args, format);
   data.stream.in = stream;
   data.closure = closure;
@@ -6753,7 +6757,7 @@ TRIO_ARGS4((stream, closure, format, args),
           va_list args)
 {
   trio_custom_t data;
-  
+
   assert(VALID(stream));
   assert(VALID(format));
 
@@ -6771,7 +6775,7 @@ TRIO_ARGS4((stream, closure, format, args),
           trio_pointer_t *args)
 {
   trio_custom_t data;
-  
+
   assert(VALID(stream));
   assert(VALID(format));
 
@@ -6795,7 +6799,7 @@ TRIO_VARGS3((buffer, format, va_alist),
 
   assert(VALID(buffer));
   assert(VALID(format));
-  
+
   TRIO_VA_START(args, format);
   status = TrioScan((trio_pointer_t)&buffer, 0,
                    TrioInStreamString,
@@ -6813,7 +6817,7 @@ TRIO_ARGS3((buffer, format, args),
 {
   assert(VALID(buffer));
   assert(VALID(format));
-  
+
   return TrioScan((trio_pointer_t)&buffer, 0,
                  TrioInStreamString,
                  format, &args, NULL);
@@ -6828,7 +6832,7 @@ TRIO_ARGS3((buffer, format, args),
 {
   assert(VALID(buffer));
   assert(VALID(format));
-  
+
   return TrioScan((trio_pointer_t)&buffer, 0,
                  TrioInStreamString,
                  format, NULL, args);
diff --git a/trio.h b/trio.h
index eab1b6d..108a709 100644 (file)
--- a/trio.h
+++ b/trio.h
@@ -28,7 +28,7 @@
  * Use autoconf defines if present. Packages using trio must define
  * HAVE_CONFIG_H as a compiler option themselves.
  */
-#if defined(HAVE_CONFIG_H)
+#if defined(TRIO_HAVE_CONFIG_H)
 # include "config.h"
 #endif
 
index 95baae1..6fbabb5 100644 (file)
--- a/trionan.c
+++ b/trionan.c
@@ -261,7 +261,7 @@ trio_pinf(TRIO_NOARGS)
   static double result = 0.0;
 
   if (result == 0.0) {
-    
+
 #if defined(INFINITY) && defined(__STDC_IEC_559__)
     result = (double)INFINITY;
 
@@ -283,7 +283,7 @@ trio_pinf(TRIO_NOARGS)
       /* Force overflow */
       result += HUGE_VAL;
     }
-    
+
 # if defined(TRIO_PLATFORM_UNIX)
     signal(SIGFPE, signal_handler);
 # endif
@@ -326,13 +326,13 @@ trio_nan(TRIO_NOARGS)
   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);
 
@@ -349,13 +349,13 @@ trio_nan(TRIO_NOARGS)
 # 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;
@@ -381,7 +381,7 @@ TRIO_ARGS1((number),
    * 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()
@@ -398,20 +398,20 @@ TRIO_ARGS1((number),
   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
             */
@@ -422,13 +422,13 @@ TRIO_ARGS1((number),
            ((number != 0.0) &&
             (fraction = modf(number, &integral),
              integral == fraction)));
-  
+
 # if defined(TRIO_PLATFORM_UNIX)
   signal(SIGFPE, signal_handler);
 # endif
-  
+
   return status;
-  
+
 #endif
 }
 
@@ -459,7 +459,7 @@ TRIO_ARGS1((number),
   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()
@@ -478,7 +478,7 @@ TRIO_ARGS1((number),
   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;
@@ -488,23 +488,23 @@ TRIO_ARGS1((number),
    * 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
 }
 
@@ -526,7 +526,7 @@ TRIO_ARGS1((number),
    * 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().
@@ -547,7 +547,7 @@ TRIO_ARGS1((number),
    * Fallback solution.
    */
   return ((trio_isinf(number) == 0) && (trio_isnan(number) == 0));
-  
+
 #endif
 }
 
@@ -596,7 +596,7 @@ TRIO_ARGS2((number, is_negative),
 #  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()
@@ -613,7 +613,7 @@ TRIO_ARGS2((number, is_negative),
 #  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
@@ -678,13 +678,13 @@ TRIO_ARGS2((number, is_negative),
     *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
@@ -716,7 +716,7 @@ TRIO_ARGS2((number, is_negative),
   }
   *is_negative = (number < 0.0);
   return TRIO_FP_NORMAL;
-  
+
 # endif
 #endif
 }
@@ -734,7 +734,7 @@ TRIO_ARGS1((number),
           double number)
 {
   int is_negative;
-  
+
   (void)trio_fpclassify_and_signbit(number, &is_negative);
   return is_negative;
 }
@@ -753,7 +753,7 @@ TRIO_ARGS1((number),
           double number)
 {
   int dummy;
-  
+
   return trio_fpclassify_and_signbit(number, &dummy);
 }
 
@@ -828,7 +828,7 @@ int main(TRIO_NOARGS)
   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],
@@ -862,11 +862,11 @@ int main(TRIO_NOARGS)
         ((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;
@@ -874,7 +874,7 @@ int main(TRIO_NOARGS)
 # 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],
@@ -908,7 +908,7 @@ int main(TRIO_NOARGS)
         ((unsigned char *)&my_ninf)[6],
         ((unsigned char *)&my_ninf)[7],
         trio_isnan(my_ninf), trio_isinf(my_ninf));
-  
+
   return 0;
 }
 #endif
index c5de32b..be6e718 100644 (file)
--- a/trionan.h
+++ b/trionan.h
@@ -46,7 +46,7 @@ TRIO_PUBLIC double trio_pinf TRIO_PROTO((void));
  * Return negative infinity.
  */
 TRIO_PUBLIC double trio_ninf TRIO_PROTO((void));
-  
+
 /*
  * Return negative zero.
  */
index 30d13ac..e507645 100644 (file)
--- a/triostr.c
+++ b/triostr.c
@@ -165,11 +165,11 @@ TRIO_ARGS1((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
@@ -184,7 +184,7 @@ TRIO_ARGS2((target, source),
 {
   assert(target);
   assert(source);
-  
+
   return (strcat(target, source) != NULL);
 }
 #endif /* !defined(TRIO_MINIMAL) */
@@ -192,12 +192,12 @@ TRIO_ARGS2((target, source),
 #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).
@@ -213,12 +213,12 @@ TRIO_ARGS3((target, max, source),
           TRIO_CONST char *source)
 {
   size_t length;
-  
+
   assert(target);
   assert(source);
 
   length = trio_length(target);
-  
+
   if (max > length)
     {
       strncat(target, source, max - length - 1);
@@ -244,7 +244,7 @@ TRIO_ARGS2((string, substring),
 {
   assert(string);
   assert(substring);
-  
+
   return (0 != strstr(string, substring));
 }
 #endif /* !defined(TRIO_MINIMAL) */
@@ -253,11 +253,11 @@ TRIO_ARGS2((string, substring),
 #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
@@ -272,7 +272,7 @@ TRIO_ARGS2((target, source),
 {
   assert(target);
   assert(source);
-     
+
   (void)strcpy(target, source);
   return TRUE;
 }
@@ -281,12 +281,12 @@ TRIO_ARGS2((target, source),
 
 /**
    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
@@ -336,10 +336,10 @@ TRIO_ARGS2((source, size),
 
 /**
    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 *
@@ -354,11 +354,11 @@ TRIO_ARGS1((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 *
@@ -383,11 +383,11 @@ trio_duplicate_max TRIO_ARGS2((source, max),
 
 /**
    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
@@ -422,11 +422,11 @@ TRIO_ARGS2((first, second),
 
 /**
    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
@@ -449,12 +449,12 @@ TRIO_ARGS2((first, second),
 #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
@@ -478,7 +478,7 @@ TRIO_ARGS3((first, max, second),
 
 /**
    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.
@@ -504,12 +504,12 @@ TRIO_ARGS2((first, second),
 
 /**
    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
@@ -558,7 +558,7 @@ TRIO_ARGS1((error_number),
           int error_number)
 {
 #if defined(USE_STRERROR)
-  
+
   return strerror(error_number);
 
 #elif defined(USE_SYS_ERRLIST)
@@ -569,11 +569,11 @@ TRIO_ARGS1((error_number),
   return ((error_number < 0) || (error_number >= sys_nerr))
     ? "unknown"
     : sys_errlist[error_number];
+
 #else
-  
+
   return "unknown";
-  
+
 #endif
 }
 
@@ -603,7 +603,7 @@ TRIO_ARGS4((target, max, format, datetime),
   assert(format);
   assert(datetime);
   assert(max > 0);
-  
+
   return strftime(target, max, format, datetime);
 }
 #endif /* !defined(TRIO_MINIMAL) */
@@ -630,7 +630,7 @@ TRIO_ARGS2((string, type),
   char ch;
 
   assert(string);
-  
+
   switch (type)
     {
     case TRIO_HASH_PLAIN:
@@ -719,7 +719,7 @@ TRIO_ARGS1((target),
    @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.
@@ -732,7 +732,7 @@ TRIO_ARGS2((string, pattern),
 {
   assert(string);
   assert(pattern);
-  
+
   for (; ('*' != *pattern); ++pattern, ++string)
     {
       if (NIL == *string)
@@ -757,7 +757,7 @@ TRIO_ARGS2((string, pattern),
        }
     }
   while (*string++);
-  
+
   return FALSE;
 }
 #endif /* !defined(TRIO_MINIMAL) */
@@ -772,7 +772,7 @@ TRIO_ARGS2((string, pattern),
    @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.
@@ -785,7 +785,7 @@ TRIO_ARGS2((string, pattern),
 {
   assert(string);
   assert(pattern);
-  
+
   for (; ('*' != *pattern); ++pattern, ++string)
     {
       if (NIL == *string)
@@ -810,7 +810,7 @@ TRIO_ARGS2((string, pattern),
        }
     }
   while (*string++);
-  
+
   return FALSE;
 }
 #endif /* !defined(TRIO_MINIMAL) */
@@ -837,7 +837,7 @@ TRIO_ARGS3((target, source, Function),
   assert(target);
   assert(source);
   assert(Function);
-  
+
   while (*source != NIL)
     {
       *target++ = Function(*source++);
@@ -894,7 +894,7 @@ TRIO_ARGS3((string, max, substring),
 
   assert(string);
   assert(substring);
-  
+
   size = trio_length(substring);
   if (size <= max)
     {
@@ -929,7 +929,7 @@ TRIO_ARGS2((string, delimiters),
           TRIO_CONST char *delimiters)
 {
   assert(delimiters);
-  
+
   return strtok(string, delimiters);
 }
 #endif /* !defined(TRIO_MINIMAL) */
@@ -1064,7 +1064,7 @@ TRIO_ARGS2((source, endp),
            }
        }
     }
-  
+
   value = integer + fraction;
   if (exponent != 0)
     {
@@ -1146,7 +1146,7 @@ TRIO_ARGS3((string, endp, base),
 {
   assert(string);
   assert((base >= 2) && (base <= 36));
-  
+
   return strtol(string, endp, base);
 }
 
@@ -1164,16 +1164,16 @@ 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) */
@@ -1195,7 +1195,7 @@ TRIO_ARGS3((string, endp, base),
 {
   assert(string);
   assert((base >= 2) && (base <= 36));
-  
+
   return strtoul(string, endp, base);
 }
 #endif /* !defined(TRIO_MINIMAL) */
@@ -1213,16 +1213,16 @@ 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
 }
 
@@ -1266,7 +1266,7 @@ 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)
     {
@@ -1297,7 +1297,7 @@ TRIO_ARGS2((self, delta),
   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)
     {
@@ -1334,7 +1334,7 @@ TRIO_ARGS2((self, length),
 #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.
 */
@@ -1367,7 +1367,7 @@ TRIO_ARGS1((initial_size),
 
 /**
    Deallocate the dynamic string and its contents.
-   
+
    @param self Dynamic string
 */
 TRIO_STRING_PUBLIC void
@@ -1376,7 +1376,7 @@ TRIO_ARGS1((self),
           trio_string_t *self)
 {
   assert(self);
-  
+
   if (self)
     {
       trio_destroy(self->content);
@@ -1388,11 +1388,11 @@ TRIO_ARGS1((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
@@ -1407,7 +1407,7 @@ TRIO_ARGS2((self, offset),
           int offset)
 {
   char *result = NULL;
-  
+
   assert(self);
 
   if (self->content != NULL)
@@ -1440,10 +1440,10 @@ TRIO_ARGS2((self, offset),
 
 /**
    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.
 */
@@ -1453,7 +1453,7 @@ TRIO_ARGS1((self),
           trio_string_t *self)
 {
   char *result;
-  
+
   assert(self);
 
   result = self->content;
@@ -1467,13 +1467,13 @@ TRIO_ARGS1((self),
 #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.
@@ -1521,7 +1521,7 @@ TRIO_ARGS1((self),
 #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.
@@ -1533,7 +1533,7 @@ TRIO_ARGS2((self, other),
           trio_string_t *other)
 {
   size_t length;
-  
+
   assert(self);
   assert(other);
 
@@ -1543,7 +1543,7 @@ TRIO_ARGS2((self, other),
   trio_copy(&self->content[self->length], other->content);
   self->length = length;
   return TRUE;
-  
+
  error:
   return FALSE;
 }
@@ -1561,7 +1561,7 @@ TRIO_ARGS2((self, other),
           TRIO_CONST char *other)
 {
   size_t length;
-  
+
   assert(self);
   assert(other);
 
@@ -1571,7 +1571,7 @@ TRIO_ARGS2((self, other),
   trio_copy(&self->content[self->length], other);
   self->length = length;
   return TRUE;
-  
+
  error:
   return FALSE;
 }
@@ -1597,7 +1597,7 @@ TRIO_ARGS2((self, character),
   self->content[self->length] = character;
   self->length++;
   return TRUE;
-  
+
  error:
   return FALSE;
 }
@@ -1606,7 +1606,7 @@ TRIO_ARGS2((self, character),
 #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.
@@ -1691,7 +1691,7 @@ TRIO_ARGS1((other),
           trio_string_t *other)
 {
   trio_string_t *self;
-  
+
   assert(other);
 
   self = TrioStringAlloc();
@@ -1722,7 +1722,7 @@ TRIO_ARGS1((other),
           TRIO_CONST char *other)
 {
   trio_string_t *self;
-  
+
   assert(other);
 
   self = TrioStringAlloc();
diff --git a/uri.c b/uri.c
index 7e2f525..4ab0ce2 100644 (file)
--- a/uri.c
+++ b/uri.c
@@ -1,12 +1,10 @@
 /**
- * uri.c: set of generic URI related routines 
+ * uri.c: set of generic URI related routines
  *
  * Reference: RFCs 3986, 2732 and 2373
  *
  * See Copyright for the status of this software.
  *
- * TODO: that module behaves really badly on OOM situation
- *
  * daniel@veillard.com
  */
 
 #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);
 
 /*
@@ -982,8 +1011,7 @@ xmlCreateURI(void) {
 
     ret = (xmlURIPtr) xmlMalloc(sizeof(xmlURI));
     if (ret == NULL) {
-       xmlGenericError(xmlGenericErrorContext,
-               "xmlCreateURI: out of memory\n");
+        xmlURIErrMemory("creating URI structure\n");
        return(NULL);
     }
     memset(ret, 0, sizeof(xmlURI));
@@ -991,6 +1019,31 @@ xmlCreateURI(void) {
 }
 
 /**
+ * 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
  *
@@ -1012,8 +1065,7 @@ xmlSaveUri(xmlURIPtr uri) {
     max = 80;
     ret = (xmlChar *) xmlMallocAtomic((max + 1) * sizeof(xmlChar));
     if (ret == NULL) {
-       xmlGenericError(xmlGenericErrorContext,
-               "xmlSaveUri: out of memory\n");
+        xmlURIErrMemory("saving URI\n");
        return(NULL);
     }
     len = 0;
@@ -1022,28 +1074,16 @@ xmlSaveUri(xmlURIPtr uri) {
        p = uri->scheme;
        while (*p != 0) {
            if (len >= max) {
-               max *= 2;
-               temp = (xmlChar *) xmlRealloc(ret, (max + 1) * sizeof(xmlChar));
-               if (temp == NULL) {
-                   xmlGenericError(xmlGenericErrorContext,
-                           "xmlSaveUri: out of memory\n");
-                   xmlFree(ret);
-                   return(NULL);
-               }
+                temp = xmlSaveUriRealloc(ret, &max);
+                if (temp == NULL) goto mem_error;
                ret = temp;
            }
            ret[len++] = *p++;
        }
        if (len >= max) {
-           max *= 2;
-           temp = (xmlChar *) xmlRealloc(ret, (max + 1) * sizeof(xmlChar));
-           if (temp == NULL) {
-               xmlGenericError(xmlGenericErrorContext,
-                       "xmlSaveUri: out of memory\n");
-               xmlFree(ret);
-               return(NULL);
-           }
-           ret = temp;
+            temp = xmlSaveUriRealloc(ret, &max);
+            if (temp == NULL) goto mem_error;
+            ret = temp;
        }
        ret[len++] = ':';
     }
@@ -1051,15 +1091,9 @@ xmlSaveUri(xmlURIPtr uri) {
        p = uri->opaque;
        while (*p != 0) {
            if (len + 3 >= max) {
-               max *= 2;
-               temp = (xmlChar *) xmlRealloc(ret, (max + 1) * sizeof(xmlChar));
-               if (temp == NULL) {
-                   xmlGenericError(xmlGenericErrorContext,
-                           "xmlSaveUri: out of memory\n");
-                   xmlFree(ret);
-                   return(NULL);
-               }
-               ret = temp;
+                temp = xmlSaveUriRealloc(ret, &max);
+                if (temp == NULL) goto mem_error;
+                ret = temp;
            }
            if (IS_RESERVED(*(p)) || IS_UNRESERVED(*(p)))
                ret[len++] = *p++;
@@ -1074,15 +1108,9 @@ xmlSaveUri(xmlURIPtr uri) {
     } else {
        if (uri->server != NULL) {
            if (len + 3 >= max) {
-               max *= 2;
-               temp = (xmlChar *) xmlRealloc(ret, (max + 1) * sizeof(xmlChar));
-               if (temp == NULL) {
-                   xmlGenericError(xmlGenericErrorContext,
-                           "xmlSaveUri: out of memory\n");
-                  xmlFree(ret);  
-                   return(NULL);
-               }
-               ret = temp;
+                temp = xmlSaveUriRealloc(ret, &max);
+                if (temp == NULL) goto mem_error;
+                ret = temp;
            }
            ret[len++] = '/';
            ret[len++] = '/';
@@ -1090,16 +1118,9 @@ xmlSaveUri(xmlURIPtr uri) {
                p = uri->user;
                while (*p != 0) {
                    if (len + 3 >= max) {
-                       max *= 2;
-                       temp = (xmlChar *) xmlRealloc(ret,
-                               (max + 1) * sizeof(xmlChar));
-                       if (temp == NULL) {
-                           xmlGenericError(xmlGenericErrorContext,
-                                   "xmlSaveUri: out of memory\n");
-                           xmlFree(ret);
-                           return(NULL);
-                       }
-                       ret = temp;
+                        temp = xmlSaveUriRealloc(ret, &max);
+                        if (temp == NULL) goto mem_error;
+                        ret = temp;
                    }
                    if ((IS_UNRESERVED(*(p))) ||
                        ((*(p) == ';')) || ((*(p) == ':')) ||
@@ -1116,78 +1137,43 @@ xmlSaveUri(xmlURIPtr uri) {
                    }
                }
                if (len + 3 >= max) {
-                   max *= 2;
-                   temp = (xmlChar *) xmlRealloc(ret,
-                           (max + 1) * sizeof(xmlChar));
-                   if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                       xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                    temp = xmlSaveUriRealloc(ret, &max);
+                    if (temp == NULL) goto mem_error;
+                    ret = temp;
                }
                ret[len++] = '@';
            }
            p = uri->server;
            while (*p != 0) {
                if (len >= max) {
-                   max *= 2;
-                   temp = (xmlChar *) xmlRealloc(ret,
-                           (max + 1) * sizeof(xmlChar));
-                   if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                       xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                    temp = xmlSaveUriRealloc(ret, &max);
+                    if (temp == NULL) goto mem_error;
+                    ret = temp;
                }
                ret[len++] = *p++;
            }
            if (uri->port > 0) {
                if (len + 10 >= max) {
-                   max *= 2;
-                   temp = (xmlChar *) xmlRealloc(ret,
-                           (max + 1) * sizeof(xmlChar));
-                   if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                    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) {
-               max *= 2;
-               temp = (xmlChar *) xmlRealloc(ret,
-                       (max + 1) * sizeof(xmlChar));
-               if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                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) {
-                   max *= 2;
-                   temp = (xmlChar *) xmlRealloc(ret,
-                           (max + 1) * sizeof(xmlChar));
-                   if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                    temp = xmlSaveUriRealloc(ret, &max);
+                    if (temp == NULL) goto mem_error;
+                    ret = temp;
                }
                if ((IS_UNRESERVED(*(p))) ||
                     ((*(p) == '$')) || ((*(p) == ',')) || ((*(p) == ';')) ||
@@ -1204,16 +1190,9 @@ xmlSaveUri(xmlURIPtr uri) {
            }
        } else if (uri->scheme != NULL) {
            if (len + 3 >= max) {
-               max *= 2;
-               temp = (xmlChar *) xmlRealloc(ret,
-                       (max + 1) * sizeof(xmlChar));
-               if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                temp = xmlSaveUriRealloc(ret, &max);
+                if (temp == NULL) goto mem_error;
+                ret = temp;
            }
            ret[len++] = '/';
            ret[len++] = '/';
@@ -1231,14 +1210,9 @@ xmlSaveUri(xmlURIPtr uri) {
                (p[2] == ':') &&
                (xmlStrEqual(BAD_CAST uri->scheme, BAD_CAST "file"))) {
                if (len + 3 >= max) {
-                   max *= 2;
-                   ret = (xmlChar *) xmlRealloc(ret,
-                           (max + 1) * sizeof(xmlChar));
-                   if (ret == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                       return(NULL);
-                   }
+                    temp = xmlSaveUriRealloc(ret, &max);
+                    if (temp == NULL) goto mem_error;
+                    ret = temp;
                }
                ret[len++] = *p++;
                ret[len++] = *p++;
@@ -1246,16 +1220,9 @@ xmlSaveUri(xmlURIPtr uri) {
            }
            while (*p != 0) {
                if (len + 3 >= max) {
-                   max *= 2;
-                   temp = (xmlChar *) xmlRealloc(ret,
-                           (max + 1) * sizeof(xmlChar));
-                   if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                    temp = xmlSaveUriRealloc(ret, &max);
+                    if (temp == NULL) goto mem_error;
+                    ret = temp;
                }
                if ((IS_UNRESERVED(*(p))) || ((*(p) == '/')) ||
                     ((*(p) == ';')) || ((*(p) == '@')) || ((*(p) == '&')) ||
@@ -1273,63 +1240,35 @@ xmlSaveUri(xmlURIPtr uri) {
        }
        if (uri->query_raw != NULL) {
            if (len + 1 >= max) {
-               max *= 2;
-               temp = (xmlChar *) xmlRealloc(ret,
-                       (max + 1) * sizeof(xmlChar));
-               if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                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) {
-                   max *= 2;
-                   temp = (xmlChar *) xmlRealloc(ret,
-                           (max + 1) * sizeof(xmlChar));
-                   if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                    temp = xmlSaveUriRealloc(ret, &max);
+                    if (temp == NULL) goto mem_error;
+                    ret = temp;
                }
                ret[len++] = *p++;
            }
        } else if (uri->query != NULL) {
            if (len + 3 >= max) {
-               max *= 2;
-               temp = (xmlChar *) xmlRealloc(ret,
-                       (max + 1) * sizeof(xmlChar));
-               if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                temp = xmlSaveUriRealloc(ret, &max);
+                if (temp == NULL) goto mem_error;
+                ret = temp;
            }
            ret[len++] = '?';
            p = uri->query;
            while (*p != 0) {
                if (len + 3 >= max) {
-                   max *= 2;
-                   temp = (xmlChar *) xmlRealloc(ret,
-                           (max + 1) * sizeof(xmlChar));
-                   if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                    temp = xmlSaveUriRealloc(ret, &max);
+                    if (temp == NULL) goto mem_error;
+                    ret = temp;
                }
-               if ((IS_UNRESERVED(*(p))) || (IS_RESERVED(*(p)))) 
+               if ((IS_UNRESERVED(*(p))) || (IS_RESERVED(*(p))))
                    ret[len++] = *p++;
                else {
                    int val = *(unsigned char *)p++;
@@ -1343,33 +1282,19 @@ xmlSaveUri(xmlURIPtr uri) {
     }
     if (uri->fragment != NULL) {
        if (len + 3 >= max) {
-           max *= 2;
-           temp = (xmlChar *) xmlRealloc(ret,
-                   (max + 1) * sizeof(xmlChar));
-           if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+            temp = xmlSaveUriRealloc(ret, &max);
+            if (temp == NULL) goto mem_error;
+            ret = temp;
        }
        ret[len++] = '#';
        p = uri->fragment;
        while (*p != 0) {
            if (len + 3 >= max) {
-               max *= 2;
-               temp = (xmlChar *) xmlRealloc(ret,
-                       (max + 1) * sizeof(xmlChar));
-               if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+                temp = xmlSaveUriRealloc(ret, &max);
+                if (temp == NULL) goto mem_error;
+                ret = temp;
            }
-           if ((IS_UNRESERVED(*(p))) || (IS_RESERVED(*(p)))) 
+           if ((IS_UNRESERVED(*(p))) || (IS_RESERVED(*(p))))
                ret[len++] = *p++;
            else {
                int val = *(unsigned char *)p++;
@@ -1381,18 +1306,16 @@ xmlSaveUri(xmlURIPtr uri) {
        }
     }
     if (len >= max) {
-       max *= 2;
-       temp = (xmlChar *) xmlRealloc(ret, (max + 1) * sizeof(xmlChar));
-       if (temp == NULL) {
-                       xmlGenericError(xmlGenericErrorContext,
-                               "xmlSaveUri: out of memory\n");
-                     xmlFree(ret);
-                       return(NULL);
-                   }
-                   ret = temp;
+        temp = xmlSaveUriRealloc(ret, &max);
+        if (temp == NULL) goto mem_error;
+        ret = temp;
     }
     ret[len] = 0;
     return(ret);
+
+mem_error:
+    xmlFree(ret);
+    return(NULL);
 }
 
 /**
@@ -1695,8 +1618,7 @@ xmlURIUnescapeString(const char *str, int len, char *target) {
     if (target == NULL) {
        ret = (char *) xmlMallocAtomic(len + 1);
        if (ret == NULL) {
-           xmlGenericError(xmlGenericErrorContext,
-                   "xmlURIUnescapeString: out of memory\n");
+            xmlURIErrMemory("unescaping URI value\n");
            return(NULL);
        }
     } else
@@ -1706,14 +1628,14 @@ xmlURIUnescapeString(const char *str, int len, char *target) {
     while(len > 0) {
        if ((len > 2) && (*in == '%') && (is_hex(in[1])) && (is_hex(in[2]))) {
            in++;
-           if ((*in >= '0') && (*in <= '9')) 
+           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')) 
+           if ((*in >= '0') && (*in <= '9'))
                *out = *out * 16 + (*in - '0');
            else if ((*in >= 'a') && (*in <= 'f'))
                *out = *out * 16 + (*in - 'a') + 10;
@@ -1746,8 +1668,7 @@ xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) {
     xmlChar *ret, ch;
     xmlChar *temp;
     const xmlChar *in;
-
-    unsigned int len, out;
+    int len, out;
 
     if (str == NULL)
        return(NULL);
@@ -1759,19 +1680,16 @@ xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) {
     len += 20;
     ret = (xmlChar *) xmlMallocAtomic(len);
     if (ret == NULL) {
-       xmlGenericError(xmlGenericErrorContext,
-               "xmlURIEscapeStr: out of memory\n");
+        xmlURIErrMemory("escaping URI value\n");
        return(NULL);
     }
     in = (const xmlChar *) str;
     out = 0;
     while(*in != 0) {
        if (len - out <= 3) {
-           len += 20;
-           temp = (xmlChar *) xmlRealloc(ret, len);
+            temp = xmlSaveUriRealloc(ret, &len);
            if (temp == NULL) {
-               xmlGenericError(xmlGenericErrorContext,
-                       "xmlURIEscapeStr: out of memory\n");
+                xmlURIErrMemory("escaping URI value\n");
                xmlFree(ret);
                return(NULL);
            }
@@ -1826,10 +1744,9 @@ xmlURIEscape(const xmlChar * str)
     int ret2;
 
 #define NULLCHK(p) if(!p) { \
-                   xmlGenericError(xmlGenericErrorContext, \
-                        "xmlURIEscape: out of memory\n"); \
-                        xmlFreeURI(uri); \
-                        return NULL; } \
+         xmlURIErrMemory("escaping URI value\n"); \
+         xmlFreeURI(uri); \
+         return NULL; } \
 
     if (str == NULL)
         return (NULL);
@@ -1872,7 +1789,7 @@ xmlURIEscape(const xmlChar * str)
     if (uri->user) {
         segment = xmlURIEscapeStr(BAD_CAST uri->user, BAD_CAST ";:&=+$,");
         NULLCHK(segment)
-               ret = xmlStrcat(ret,BAD_CAST "//");     
+               ret = xmlStrcat(ret,BAD_CAST "//");
         ret = xmlStrcat(ret, segment);
         ret = xmlStrcat(ret, BAD_CAST "@");
         xmlFree(segment);
@@ -1950,7 +1867,7 @@ xmlURIEscape(const xmlChar * str)
  *
  * 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 
+ * base URI. This is processed according to section 5.2 of the
  * RFC 2396
  *
  * 5.2. Resolving Relative References to Absolute Form
@@ -1974,7 +1891,7 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
      *    as a reference to "." rather than as a synonym for the current
      *    URI.  Should we do that here?
      */
-    if (URI == NULL) 
+    if (URI == NULL)
        ret = -1;
     else {
        if (*URI) {
@@ -2045,7 +1962,7 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
            res->server = xmlMemStrdup(bas->server);
            if (bas->user != NULL)
                res->user = xmlMemStrdup(bas->user);
-           res->port = bas->port;              
+           res->port = bas->port;
        }
        if (bas->path != NULL)
            res->path = xmlMemStrdup(bas->path);
@@ -2074,7 +1991,7 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
     }
     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)
@@ -2096,7 +2013,7 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
            res->server = xmlMemStrdup(ref->server);
            if (ref->user != NULL)
                res->user = xmlMemStrdup(ref->user);
-            res->port = ref->port;             
+            res->port = ref->port;
        }
        if (ref->path != NULL)
            res->path = xmlMemStrdup(ref->path);
@@ -2108,7 +2025,7 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
        res->server = xmlMemStrdup(bas->server);
        if (bas->user != NULL)
            res->user = xmlMemStrdup(bas->user);
-       res->port = bas->port;          
+       res->port = bas->port;
     }
 
     /*
@@ -2136,8 +2053,7 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
        len += strlen(bas->path);
     res->path = (char *) xmlMallocAtomic(len);
     if (res->path == NULL) {
-       xmlGenericError(xmlGenericErrorContext,
-               "xmlBuildURI: out of memory\n");
+        xmlURIErrMemory("resolving URI against base\n");
        goto done;
     }
     res->path[0] = 0;
@@ -2383,7 +2299,7 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
        }
        len = xmlStrlen (uptr) + 1;
     }
-    
+
     if (nbslash == 0) {
        if (uptr != NULL)
            /* exception characters from xmlSaveUri */
@@ -2398,8 +2314,7 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
      */
     val = (xmlChar *) xmlMalloc (len + 3 * nbslash);
     if (val == NULL) {
-       xmlGenericError(xmlGenericErrorContext,
-               "xmlBuildRelativeURI: out of memory\n");
+        xmlURIErrMemory("building relative URI\n");
        goto done;
     }
     vptr = val;
@@ -2451,14 +2366,14 @@ done:
  * xmlCanonicPath:
  * @path:  the resource locator in a filesystem notation
  *
- * Constructs a canonic path from the specified path. 
+ * Constructs a canonic path from the specified path.
  *
- * Returns a new canonic path, or a duplicate of the path parameter if the 
+ * 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 
+ * by the returned string. If there is insufficient memory available, or the
  * argument is NULL, the function returns NULL.
  */
-#define IS_WINDOWS_PATH(p)                                     \
+#define IS_WINDOWS_PATH(p)                                     \
        ((p != NULL) &&                                         \
         (((p[0] >= 'a') && (p[0] <= 'z')) ||                   \
          ((p[0] >= 'A') && (p[0] <= 'Z'))) &&                  \
@@ -2470,7 +2385,7 @@ 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__)    
+#if defined(_WIN32) && !defined(__CYGWIN__)
     int len = 0;
     int i = 0;
     xmlChar *p = NULL;
@@ -2482,7 +2397,20 @@ xmlCanonicPath(const xmlChar *path)
     if (path == NULL)
        return(NULL);
 
-    /* sanitize filename starting with // so it can be used as URI */
+#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++;
 
@@ -2529,7 +2457,7 @@ xmlCanonicPath(const xmlChar *path)
 
 path_processing:
 /* For Windows implementations, replace backslashes with 'forward slashes' */
-#if defined(_WIN32) && !defined(__CYGWIN__)    
+#if defined(_WIN32) && !defined(__CYGWIN__)
     /*
      * Create a URI structure
      */
@@ -2586,7 +2514,7 @@ path_processing:
  *
  * Constructs an URI expressing the existing path
  *
- * Returns a new URI, or a duplicate of the path parameter if the 
+ * 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.
@@ -2609,7 +2537,7 @@ xmlPathToURI(const xmlChar *path)
     if (cal == NULL)
         return(NULL);
 #if defined(_WIN32) && !defined(__CYGWIN__)
-    /* xmlCanonicPath can return an URI on Windows (is that the intended behaviour?) 
+    /* 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) {
diff --git a/valid.c b/valid.c
index 5de491d..6e53a76 100644 (file)
--- a/valid.c
+++ b/valid.c
@@ -31,7 +31,7 @@ static xmlElementPtr xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name,
 /* #define DEBUG_VALID_ALGO */
 /* #define DEBUG_REGEXP_ALGO */
 
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
@@ -301,7 +301,7 @@ vstateVPush(xmlValidCtxtPtr ctxt, xmlElementPtr elemDecl, xmlNodePtr node) {
        if (elemDecl->contModel == NULL)
            xmlValidBuildContentModel(ctxt, elemDecl);
        if (elemDecl->contModel != NULL) {
-           ctxt->vstateTab[ctxt->vstateNr].exec = 
+           ctxt->vstateTab[ctxt->vstateNr].exec =
                xmlRegNewExecCtxt(elemDecl->contModel, NULL, NULL);
        } else {
            ctxt->vstateTab[ctxt->vstateNr].exec = NULL;
@@ -623,7 +623,7 @@ xmlValidStateDebug(xmlValidCtxtPtr ctxt) {
 #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)
@@ -676,7 +676,7 @@ xmlValidBuildAContentModel(xmlElementContentPtr content,
            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");
@@ -701,9 +701,9 @@ xmlValidBuildAContentModel(xmlElementContentPtr content,
                    break;
                case XML_ELEMENT_CONTENT_MULT:
                    ctxt->state = xmlAutomataNewEpsilon(ctxt->am,
-                                           ctxt->state, NULL);
+                                           ctxt->state, NULL);
                    xmlAutomataNewTransition(ctxt->am,
-                           ctxt->state, ctxt->state, fullname, NULL);
+                           ctxt->state, ctxt->state, fullname, NULL);
                    break;
            }
            if ((fullname != fn) && (fullname != content->name))
@@ -752,7 +752,7 @@ xmlValidBuildAContentModel(xmlElementContentPtr content,
            xmlElementContentOccur ocur;
 
            ocur = content->ocur;
-           if ((ocur == XML_ELEMENT_CONTENT_PLUS) || 
+           if ((ocur == XML_ELEMENT_CONTENT_PLUS) ||
                (ocur == XML_ELEMENT_CONTENT_MULT)) {
                ctxt->state = xmlAutomataNewEpsilon(ctxt->am,
                        ctxt->state, NULL);
@@ -944,7 +944,7 @@ xmlNewDocElementContent(xmlDocPtr doc, const xmlChar *name,
            }
            break;
        default:
-           xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR, 
+           xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
                    "Internal: ELEMENT content corrupted invalid type\n",
                    NULL);
            return(NULL);
@@ -1001,7 +1001,7 @@ xmlNewElementContent(const xmlChar *name, xmlElementContentType type) {
  * @cur:  An element content pointer.
  *
  * Build a copy of an element content description.
- * 
+ *
  * Returns the new xmlElementContentPtr or NULL in case of error.
  */
 xmlElementContentPtr
@@ -1028,7 +1028,7 @@ xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
        else
            ret->name = xmlStrdup(cur->name);
     }
-    
+
     if (cur->prefix != NULL) {
        if (dict)
            ret->prefix = xmlDictLookup(dict, cur->prefix, -1);
@@ -1058,7 +1058,7 @@ xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
                else
                    tmp->name = xmlStrdup(cur->name);
            }
-           
+
            if (cur->prefix != NULL) {
                if (dict)
                    tmp->prefix = xmlDictLookup(dict, cur->prefix, -1);
@@ -1082,7 +1082,7 @@ xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
  *
  * Build a copy of an element content description.
  * Deprecated, use xmlCopyDocElementContent instead
- * 
+ *
  * Returns the new xmlElementContentPtr or NULL in case of error.
  */
 xmlElementContentPtr
@@ -1114,7 +1114,7 @@ xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
            case XML_ELEMENT_CONTENT_OR:
                break;
            default:
-               xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR, 
+               xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
                        "Internal: ELEMENT content corrupted invalid type\n",
                        NULL);
                return;
@@ -1200,7 +1200,7 @@ xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob)
                xmlDumpElementContent(buf, content->c2, 0);
            break;
        default:
-           xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR, 
+           xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
                    "Internal: ELEMENT content corrupted invalid type\n",
                    NULL);
     }
@@ -1397,7 +1397,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
     switch (type) {
         case XML_ELEMENT_TYPE_EMPTY:
            if (content != NULL) {
-               xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR, 
+               xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
                        "xmlAddElementDecl: content != NULL for EMPTY\n",
                        NULL);
                return(NULL);
@@ -1405,7 +1405,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
            break;
        case XML_ELEMENT_TYPE_ANY:
            if (content != NULL) {
-               xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR, 
+               xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
                        "xmlAddElementDecl: content != NULL for ANY\n",
                        NULL);
                return(NULL);
@@ -1413,7 +1413,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
            break;
        case XML_ELEMENT_TYPE_MIXED:
            if (content == NULL) {
-               xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR, 
+               xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
                        "xmlAddElementDecl: content == NULL for MIXED\n",
                        NULL);
                return(NULL);
@@ -1421,14 +1421,14 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
            break;
        case XML_ELEMENT_TYPE_ELEMENT:
            if (content == NULL) {
-               xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR, 
+               xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
                        "xmlAddElementDecl: content == NULL for ELEMENT\n",
                        NULL);
                return(NULL);
            }
            break;
        default:
-           xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR, 
+           xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
                    "Internal: ELEMENT decl corrupted invalid type\n",
                    NULL);
            return(NULL);
@@ -1608,7 +1608,7 @@ xmlFreeElementTable(xmlElementTablePtr table) {
  * @elem:  An element
  *
  * Build a copy of an element.
- * 
+ *
  * Returns the new xmlElementPtr or NULL in case of error.
  */
 static xmlElementPtr
@@ -1642,7 +1642,7 @@ xmlCopyElement(xmlElementPtr elem) {
  * @table:  An element table
  *
  * Build a copy of an element table.
- * 
+ *
  * Returns the new xmlElementTablePtr or NULL in case of error.
  */
 xmlElementTablePtr
@@ -1707,7 +1707,7 @@ xmlDumpElementDecl(xmlBufferPtr buf, xmlElementPtr elem) {
            xmlBufferWriteChar(buf, ">\n");
            break;
        default:
-           xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR, 
+           xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
                    "Internal: ELEMENT struct corrupted invalid type\n",
                    NULL);
     }
@@ -1818,7 +1818,7 @@ static void
 xmlDumpEnumeration(xmlBufferPtr buf, xmlEnumerationPtr cur) {
     if ((buf == NULL) || (cur == NULL))
         return;
-    
+
     xmlBufferWriteCHAR(buf, cur->name);
     if (cur->next == NULL)
        xmlBufferWriteChar(buf, ")");
@@ -1973,13 +1973,13 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt,
         case XML_ATTRIBUTE_NOTATION:
            break;
        default:
-           xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR, 
+           xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
                    "Internal: ATTRIBUTE struct corrupted invalid type\n",
                    NULL);
            xmlFreeEnumeration(tree);
            return(NULL);
     }
-    if ((defaultValue != 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",
@@ -2153,7 +2153,7 @@ xmlFreeAttributeTable(xmlAttributeTablePtr table) {
  * @attr:  An attribute
  *
  * Build a copy of an attribute.
- * 
+ *
  * Returns the new xmlAttributePtr or NULL in case of error.
  */
 static xmlAttributePtr
@@ -2186,7 +2186,7 @@ xmlCopyAttribute(xmlAttributePtr attr) {
  * @table:  An attribute table
  *
  * Build a copy of an attribute table.
- * 
+ *
  * Returns the new xmlAttributeTablePtr or NULL in case of error.
  */
 xmlAttributeTablePtr
@@ -2251,7 +2251,7 @@ xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) {
            xmlDumpEnumeration(buf, attr->tree);
            break;
        default:
-           xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR, 
+           xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
                    "Internal: ATTRIBUTE struct corrupted invalid type\n",
                    NULL);
     }
@@ -2268,7 +2268,7 @@ xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) {
            xmlBufferWriteChar(buf, " #FIXED");
            break;
        default:
-           xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR, 
+           xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
                    "Internal: ATTRIBUTE struct corrupted invalid def\n",
                    NULL);
     }
@@ -2398,7 +2398,7 @@ xmlAddNotationDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd,
      */
     if (xmlHashAddEntry(table, name, ret)) {
 #ifdef LIBXML_VALID_ENABLED
-       xmlErrValid(NULL, XML_DTD_NOTATION_REDEFINED, 
+       xmlErrValid(NULL, XML_DTD_NOTATION_REDEFINED,
                    "xmlAddNotationDecl: %s already defined\n",
                    (const char *) name);
 #endif /* LIBXML_VALID_ENABLED */
@@ -2425,7 +2425,7 @@ xmlFreeNotationTable(xmlNotationTablePtr table) {
  * @nota:  A notation
  *
  * Build a copy of a notation.
- * 
+ *
  * Returns the new xmlNotationPtr or NULL in case of error.
  */
 static xmlNotationPtr
@@ -2457,7 +2457,7 @@ xmlCopyNotation(xmlNotationPtr nota) {
  * @table:  A notation table
  *
  * Build a copy of a notation table.
- * 
+ *
  * Returns the new xmlNotationTablePtr or NULL in case of error.
  */
 xmlNotationTablePtr
@@ -2535,7 +2535,7 @@ xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
  * current scope
  */
 #define DICT_FREE(str)                                         \
-       if ((str) && ((!dict) ||                                \
+       if ((str) && ((!dict) ||                                \
            (xmlDictOwns(dict, (const xmlChar *)(str)) == 0)))  \
            xmlFree((char *)(str));
 
@@ -2573,7 +2573,7 @@ xmlFreeID(xmlIDPtr id) {
  *
  * Returns NULL if not, otherwise the new xmlIDPtr
  */
-xmlIDPtr 
+xmlIDPtr
 xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
          xmlAttrPtr attr) {
     xmlIDPtr ret;
@@ -2687,7 +2687,7 @@ xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
            ((xmlStrEqual(BAD_CAST "name", attr->name)) &&
            ((elem == NULL) || (xmlStrEqual(elem->name, BAD_CAST "a")))))
            return(1);
-       return(0);    
+       return(0);
     } else if (elem == NULL) {
        return(0);
     } else {
@@ -2741,7 +2741,7 @@ xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr) {
     if (doc == NULL) return(-1);
     if (attr == NULL) return(-1);
     table = (xmlIDTablePtr) doc->ids;
-    if (table == NULL) 
+    if (table == NULL)
         return(-1);
 
     if (attr == NULL)
@@ -2769,7 +2769,7 @@ xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr) {
  *
  * Returns NULL if not found, otherwise the xmlAttrPtr defining the ID
  */
-xmlAttrPtr 
+xmlAttrPtr
 xmlGetID(xmlDocPtr doc, const xmlChar *ID) {
     xmlIDTablePtr table;
     xmlIDPtr id;
@@ -2783,7 +2783,7 @@ xmlGetID(xmlDocPtr doc, const xmlChar *ID) {
     }
 
     table = (xmlIDTablePtr) doc->ids;
-    if (table == NULL) 
+    if (table == NULL)
         return(NULL);
 
     id = xmlHashLookup(table, ID);
@@ -2804,7 +2804,7 @@ xmlGetID(xmlDocPtr doc, const xmlChar *ID) {
  *                             Refs                                    *
  *                                                                     *
  ************************************************************************/
-typedef struct xmlRemoveMemo_t 
+typedef struct xmlRemoveMemo_t
 {
        xmlListPtr l;
        xmlAttrPtr ap;
@@ -2812,7 +2812,7 @@ typedef struct xmlRemoveMemo_t
 
 typedef xmlRemoveMemo *xmlRemoveMemoPtr;
 
-typedef struct xmlValidateMemo_t 
+typedef struct xmlValidateMemo_t
 {
     xmlValidCtxtPtr ctxt;
     const xmlChar *name;
@@ -2895,7 +2895,7 @@ xmlDummyCompare(const void *data0 ATTRIBUTE_UNUSED,
  *
  * Returns NULL if not, otherwise the new xmlRefPtr
  */
-xmlRefPtr 
+xmlRefPtr
 xmlAddRef(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
     xmlAttrPtr attr) {
     xmlRefPtr ret;
@@ -3023,7 +3023,7 @@ xmlIsRef(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
         return(0);
     } else if (doc->type == XML_HTML_DOCUMENT_NODE) {
         /* TODO @@@ */
-        return(0);    
+        return(0);
     } else {
         xmlAttributePtr attrDecl;
 
@@ -3060,7 +3060,7 @@ xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr) {
     if (doc == NULL) return(-1);
     if (attr == NULL) return(-1);
     table = (xmlRefTablePtr) doc->refs;
-    if (table == NULL) 
+    if (table == NULL)
         return(-1);
 
     if (attr == NULL)
@@ -3086,7 +3086,7 @@ xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr) {
      */
     target.l = ref_list;
     target.ap = attr;
-    
+
     /* Remove the supplied attr from our list */
     xmlListWalk(ref_list, xmlWalkRemoveRef, &target);
 
@@ -3103,11 +3103,11 @@ xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr) {
  * @doc:  pointer to the document
  * @ID:  the ID value
  *
- * Find the set of references for the supplied ID. 
+ * Find the set of references for the supplied ID.
  *
  * Returns NULL if not found, otherwise node set for the ID.
  */
-xmlListPtr 
+xmlListPtr
 xmlGetRefs(xmlDocPtr doc, const xmlChar *ID) {
     xmlRefTablePtr table;
 
@@ -3120,7 +3120,7 @@ xmlGetRefs(xmlDocPtr doc, const xmlChar *ID) {
     }
 
     table = (xmlRefTablePtr) doc->refs;
-    if (table == NULL) 
+    if (table == NULL)
         return(NULL);
 
     return (xmlHashLookup(table, ID));
@@ -3185,7 +3185,7 @@ xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) {
        if (dtd->doc != NULL)
            dict = dtd->doc->dict;
 
-       if (!create) 
+       if (!create)
            return(NULL);
        /*
         * Create the Element table if needed.
@@ -3798,7 +3798,7 @@ xmlValidateAttributeValueInternal(xmlDocPtr doc, xmlAttributeType type,
  *
  * [ VC: Name Token ]
  * Values of type NMTOKEN must match the Nmtoken production; values
- * of type NMTOKENS must match Nmtokens. 
+ * of type NMTOKENS must match Nmtokens.
  *
  * returns 1 if valid or 0 otherwise
  */
@@ -3857,7 +3857,7 @@ xmlValidateAttributeValue2(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
            if ((ent == NULL) && (doc->standalone == 1)) {
                doc->standalone = 0;
                ent = xmlGetDocEntity(doc, value);
-           } 
+           }
            if (ent == NULL) {
                xmlErrValidNode(ctxt, (xmlNodePtr) doc,
                                XML_DTD_UNKNOWN_ENTITY,
@@ -3968,7 +3968,7 @@ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
     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);
@@ -4167,7 +4167,7 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
            }
        }
        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);
@@ -4230,7 +4230,7 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
     xmlElementPtr tst;
 
     CHECK_DTD;
-    
+
     if (elem == NULL) return(1);
 
 #if 0
@@ -4347,7 +4347,7 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
 
 int
 xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
-                        xmlNodePtr elem, xmlAttrPtr attr, const xmlChar *value) 
+                        xmlNodePtr elem, xmlAttrPtr attr, const xmlChar *value)
 {
     xmlAttributePtr attrDecl =  NULL;
     int val;
@@ -4360,7 +4360,7 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
     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);
@@ -4444,7 +4444,7 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
        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",
@@ -4537,7 +4537,7 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
     if (prefix != NULL) {
        xmlChar fn[50];
        xmlChar *fullname;
-       
+
        fullname = xmlBuildQName(elem->name, prefix, fn, 50);
        if (fullname == NULL) {
            xmlVErrMemory(ctxt, "Validating namespace");
@@ -4641,7 +4641,7 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
        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,
@@ -4777,7 +4777,7 @@ xmlValidateElementType(xmlValidCtxtPtr ctxt) {
     NODE = xmlValidateSkipIgnorable(NODE);
     if ((NODE == NULL) && (CONT == NULL))
        return(1);
-    if ((NODE == NULL) && 
+    if ((NODE == NULL) &&
        ((CONT->ocur == XML_ELEMENT_CONTENT_MULT) ||
         (CONT->ocur == XML_ELEMENT_CONTENT_OPT))) {
        return(1);
@@ -5236,7 +5236,7 @@ xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
     xmlElementContentPtr cont;
     const xmlChar *name;
 
-    if (elemDecl == NULL)
+    if ((elemDecl == NULL) || (parent == NULL))
        return(-1);
     cont = elemDecl->content;
     name = elemDecl->name;
@@ -5286,7 +5286,7 @@ xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
                        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) {
@@ -5400,7 +5400,7 @@ fail:
                        last = tmp;
                    }
                    if (cur->type == XML_CDATA_SECTION_NODE) {
-                       /* 
+                       /*
                         * E59 spaces in CDATA does not match the
                         * nonterminal S
                         */
@@ -5517,7 +5517,8 @@ xmlValidateOneCdataElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
     int ret = 1;
     xmlNodePtr cur, child;
 
-    if ((ctxt == NULL) || (doc == NULL) || (elem == NULL))
+    if ((ctxt == NULL) || (doc == NULL) || (elem == NULL) ||
+        (elem->type != XML_ELEMENT_NODE))
        return(0);
 
     child = elem->children;
@@ -5598,7 +5599,7 @@ xmlValidateCheckMixed(xmlValidCtxtPtr ctxt,
            } else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
                (cont->c1 == NULL) ||
                (cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)){
-               xmlErrValid(NULL, XML_DTD_MIXED_CORRUPT, 
+               xmlErrValid(NULL, XML_DTD_MIXED_CORRUPT,
                        "Internal: MIXED struct corrupted\n",
                        NULL);
                break;
@@ -5622,7 +5623,7 @@ xmlValidateCheckMixed(xmlValidCtxtPtr ctxt,
            } else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
                (cont->c1 == NULL) ||
                (cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)){
-               xmlErrValid(ctxt, XML_DTD_MIXED_CORRUPT, 
+               xmlErrValid(ctxt, XML_DTD_MIXED_CORRUPT,
                        "Internal: MIXED struct corrupted\n",
                        NULL);
                break;
@@ -5651,7 +5652,7 @@ xmlValidGetElemDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
     xmlElementPtr elemDecl = NULL;
     const xmlChar *prefix = NULL;
 
-    if ((ctxt == NULL) || (doc == NULL) || 
+    if ((ctxt == NULL) || (doc == NULL) ||
         (elem == NULL) || (elem->name == NULL))
         return(NULL);
     if (extsubset != NULL)
@@ -5795,7 +5796,7 @@ xmlValidatePushElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
  * xmlValidatePushCData:
  * @ctxt:  the validation context
  * @data:  some character data read
- * @len:  the lenght of the data
+ * @len:  the length of the data
  *
  * check the CData parsed for validation in the current stack
  *
@@ -6017,7 +6018,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
        return(0);
 
     /*
-     * If vstateNr is not zero that means continuous validation is 
+     * 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) {
@@ -6060,7 +6061,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
                    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)
@@ -6078,7 +6079,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
                            } else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
                                (cont->c1 == NULL) ||
                                (cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)){
-                               xmlErrValid(NULL, XML_DTD_MIXED_CORRUPT, 
+                               xmlErrValid(NULL, XML_DTD_MIXED_CORRUPT,
                                        "Internal: MIXED struct corrupted\n",
                                        NULL);
                                break;
@@ -6101,7 +6102,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
                        } else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
                            (cont->c1 == NULL) ||
                            (cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)) {
-                           xmlErrValid(ctxt, XML_DTD_MIXED_CORRUPT, 
+                           xmlErrValid(ctxt, XML_DTD_MIXED_CORRUPT,
                                    "Internal: MIXED struct corrupted\n",
                                    NULL);
                            break;
@@ -6181,7 +6182,7 @@ child_ok:
                }
            } else {
                xmlAttrPtr attrib;
-               
+
                attrib = elem->properties;
                while (attrib != NULL) {
                    if (xmlStrEqual(attrib->name, attr->name)) {
@@ -6196,18 +6197,18 @@ child_ok:
                             * allow to define the URI instead of the prefix :-(
                             */
                            if (nameSpace == NULL) {
-                               if (qualified < 0) 
+                               if (qualified < 0)
                                    qualified = 0;
                            } else if (!xmlStrEqual(nameSpace->prefix,
                                                    attr->prefix)) {
-                               if (qualified < 1) 
+                               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 
+                            * for their application even if the DTD doesn't
                             * carry one, otherwise, basically we would always
                             * break.
                             */
@@ -6280,7 +6281,7 @@ child_ok:
                }
            }
        }
-found:     
+found:
         attr = attr->nexth;
     }
     return(ret);
@@ -6327,7 +6328,7 @@ xmlValidateRoot(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
            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);
@@ -6338,7 +6339,7 @@ xmlValidateRoot(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
                    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;
@@ -6359,7 +6360,7 @@ name_ok:
  * @doc:  a document instance
  * @elem:  an element instance
  *
- * Try to validate the subtree under an element 
+ * Try to validate the subtree under an element
  *
  * returns 1 if valid or 0 otherwise
  */
@@ -6379,7 +6380,8 @@ xmlValidateElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem) {
      * they don't really mean anything validation wise.
      */
     if ((elem->type == XML_XINCLUDE_START) ||
-       (elem->type == XML_XINCLUDE_END))
+       (elem->type == XML_XINCLUDE_END) ||
+       (elem->type == XML_NAMESPACE_DECL))
        return(1);
 
     CHECK_DTD;
@@ -6538,7 +6540,7 @@ xmlValidateCheckRefCallback(xmlListPtr ref_list, xmlValidCtxtPtr ctxt,
     memo.name = name;
 
     xmlListWalk(ref_list, xmlWalkValidateList, &memo);
-    
+
 }
 
 /**
@@ -6550,7 +6552,7 @@ xmlValidateCheckRefCallback(xmlListPtr ref_list, xmlValidCtxtPtr ctxt,
  * 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
@@ -6564,7 +6566,7 @@ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
     if (ctxt == NULL)
         return(0);
     if (doc == NULL) {
-        xmlErrValid(ctxt, XML_DTD_NO_DOC, 
+        xmlErrValid(ctxt, XML_DTD_NO_DOC,
                "xmlValidateDocumentFinal: doc == NULL\n", NULL);
        return(0);
     }
@@ -6682,7 +6684,7 @@ xmlValidateAttributeCallback(xmlAttributePtr cur, xmlValidCtxtPtr ctxt,
        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))
@@ -6739,9 +6741,9 @@ xmlValidateAttributeCallback(xmlAttributePtr cur, xmlValidCtxtPtr ctxt,
  * subsets have been parsed
  *
  * basically it does the following checks described by the XML Rec
- * - check that ENTITY and ENTITIES type attributes default or 
+ * - check that ENTITY and ENTITIES type attributes default or
  *   possible values matches one of the defined entities.
- * - check that NOTATION type attributes default or 
+ * - 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
@@ -6812,7 +6814,7 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
        xmlChar *sysID;
        if (doc->intSubset->SystemID != NULL) {
            sysID = xmlBuildURI(doc->intSubset->SystemID,
-                       doc->URL);
+                       doc->URL);
            if (sysID == NULL) {
                xmlErrValid(ctxt, XML_DTD_LOAD_ERROR,
                        "Could not build URI for external subset \"%s\"\n",
@@ -6885,17 +6887,17 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree,
     if (*len >= max) return(*len);
 
     switch (ctree->type) {
-       case XML_ELEMENT_CONTENT_PCDATA: 
+       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: 
+       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: 
+       case XML_ELEMENT_CONTENT_SEQ:
            xmlValidGetPotentialChildren(ctree->c1, names, len, max);
            xmlValidGetPotentialChildren(ctree->c2, names, len, max);
            break;
@@ -6904,7 +6906,7 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree,
            xmlValidGetPotentialChildren(ctree->c2, names, len, max);
            break;
    }
-   
+
    return(*len);
 }
 
@@ -6949,16 +6951,16 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
     const xmlChar *elements[256];
     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)
@@ -6983,7 +6985,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
         element_desc = xmlGetDtdElementDesc(parent->doc->extSubset,
                                              parent->name);
     if (element_desc == NULL) return(-1);
-       
+
     /*
      * Do a backup of the current tree structure
      */
@@ -6994,16 +6996,16 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
 
     /*
      * Creates a dummy node and insert it into the tree
-     */    
+     */
     test_node = xmlNewDocNode (ref_node->doc, NULL, BAD_CAST "<!dummy?>", NULL);
     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;
 
@@ -7013,7 +7015,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
      */
     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)) {
diff --git a/win32/.cvsignore b/win32/.cvsignore
deleted file mode 100644 (file)
index 1f8e034..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-config.*
-depends.*
-int.*
-bin.*
-*.win32
-*.win32.zip
index d612e2d..7129c61 100644 (file)
@@ -68,6 +68,9 @@ CFLAGS = $(CFLAGS) -DHAVE_PTHREAD_H
 !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
@@ -92,6 +95,9 @@ LIBS = $(LIBS) iconvomf.lib
 !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
@@ -113,7 +119,8 @@ LDFLAGS = $(LDFLAGS)
 !endif
 
 # Libxml object files.
-XML_OBJS = $(XML_INTDIR)\c14n.obj\
+XML_OBJS = $(XML_INTDIR)\buf.obj\
+       $(XML_INTDIR)\c14n.obj\
        $(XML_INTDIR)\catalog.obj\
        $(XML_INTDIR)\chvalid.obj\
        $(XML_INTDIR)\debugXML.obj\
@@ -158,7 +165,8 @@ XML_OBJS = $(XML_INTDIR)\c14n.obj\
        $(XML_INTDIR)\xmlstring.obj
 
 # Static libxml object files.
-XML_OBJS_A = $(XML_INTDIR_A)\c14n.obj\
+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\
@@ -219,7 +227,8 @@ UTILS = $(BINDIR)\xmllint.exe\
        $(BINDIR)\testXPath.exe\
        $(BINDIR)\runtest.exe\
        $(BINDIR)\runsuite.exe\
-       $(BINDIR)\testapi.exe
+       $(BINDIR)\testapi.exe\
+       $(BINDIR)\testlimits.exe
 
 
 !if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native"
@@ -250,10 +259,11 @@ distclean : clean
 rebuild : clean all
 
 install-libs : all
-       if not exist "$(INCPREFIX)\libxml" mkdir "$(INCPREFIX)\libxml"
+       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)\libxml"
+       copy $(XML_SRCDIR)\include\libxml\*.h "$(INCPREFIX)\libxml2\libxml"
        copy $(BINDIR)\$(XML_SO) "$(SOPREFIX)"
        copy $(BINDIR)\$(XML_A) "$(LIBPREFIX)"
        copy $(BINDIR)\$(XML_IMP) "$(LIBPREFIX)"
index 0f8198b..1889376 100644 (file)
@@ -60,6 +60,9 @@ 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
@@ -83,6 +86,9 @@ ifeq ($(WITH_ZLIB),1)
 # LIBS += -lzdll
 LIBS += -lz
 endif
+ifeq ($(WITH_LZMA),1)
+LIBS += -llzma
+endif
 ifeq ($(WITH_THREADS),posix)
 LIBS += -lpthreadGC
 endif
@@ -107,7 +113,8 @@ endif
 
 
 # Libxml object files.
-XML_OBJS = $(XML_INTDIR)/c14n.o\
+XML_OBJS = $(XML_INTDIR)/buf.o\
+       $(XML_INTDIR)/c14n.o\
        $(XML_INTDIR)/catalog.o\
        $(XML_INTDIR)/chvalid.o\
        $(XML_INTDIR)/debugXML.o\
@@ -154,7 +161,8 @@ XML_OBJS = $(XML_INTDIR)/c14n.o\
 XML_SRCS = $(subst .o,.c,$(subst $(XML_INTDIR)/,$(XML_SRCDIR)/,$(XML_OBJS)))
 
 # Static libxml object files.
-XML_OBJS_A = $(XML_INTDIR_A)/c14n.o\
+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\
@@ -217,7 +225,8 @@ UTILS = $(BINDIR)/xmllint.exe\
        $(BINDIR)/testXPath.exe\
        $(BINDIR)/runtest.exe\
        $(BINDIR)/runsuite.exe\
-       $(BINDIR)/testapi.exe
+       $(BINDIR)/testapi.exe\
+       $(BINDIR)/testlimits.exe
 
 ifeq ($(WITH_THREADS),yes)
 UTILS += $(BINDIR)/testThreadsWin32.exe
@@ -254,10 +263,11 @@ distclean : clean
 rebuild : clean all
 
 install-libs : all
-       cmd.exe /C "if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml"
+       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)\libxml"
+       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)"
index cc93372..2b3d544 100644 (file)
@@ -43,7 +43,7 @@ CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT"
 
 # The compiler and its options.
 CC = cl.exe
-CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS"  /D "NOLIBTOOL" /W1 $(CRUNTIME)
+CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_CONFIG_H" /D "NOLIBTOOL" /W1 $(CRUNTIME)
 CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX)
 !if "$(WITH_THREADS)" != "no"
 CFLAGS = $(CFLAGS) /D "_REENTRANT"
@@ -108,7 +108,8 @@ LDFLAGS = $(LDFLAGS)
 !endif
 
 # Libxml object files.
-XML_OBJS = $(XML_INTDIR)\c14n.obj\
+XML_OBJS = $(XML_INTDIR)\buf.obj\
+       $(XML_INTDIR)\c14n.obj\
        $(XML_INTDIR)\catalog.obj\
        $(XML_INTDIR)\chvalid.obj\
        $(XML_INTDIR)\debugXML.obj\
@@ -153,7 +154,8 @@ XML_OBJS = $(XML_INTDIR)\c14n.obj\
        $(XML_INTDIR)\xmlstring.obj
 
 # Static libxml object files.
-XML_OBJS_A = $(XML_INTDIR_A)\c14n.obj\
+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\
@@ -198,7 +200,8 @@ XML_OBJS_A = $(XML_INTDIR_A)\c14n.obj\
        $(XML_INTDIR_A)\xmlstring.obj
 
 # Static libxml object files.
-XML_OBJS_A_DLL = $(XML_INTDIR_A_DLL)\c14n.obj\
+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\
@@ -259,7 +262,9 @@ UTILS = $(BINDIR)\xmllint.exe\
        $(BINDIR)\testXPath.exe\
        $(BINDIR)\runtest.exe\
        $(BINDIR)\runsuite.exe\
-       $(BINDIR)\testapi.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
@@ -299,11 +304,12 @@ distclean : clean
 rebuild : clean all
 
 install-libs : all
-       if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml
+       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)\libxml
+       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)
@@ -411,7 +417,15 @@ $(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla libxmladll
 
 # TESTS
 
-tests :  XPathtests
+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
index 0d5a1bc..0588fa6 100644 (file)
@@ -69,6 +69,7 @@
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
+    <ClCompile Include="..\..\buf.c" />\r
     <ClCompile Include="..\..\c14n.c" />\r
     <ClCompile Include="..\..\catalog.c" />\r
     <ClCompile Include="..\..\chvalid.c" />\r
index b4ccc37..83cc991 100644 (file)
@@ -46,7 +46,7 @@
       <Optimization>Disabled</Optimization>\r
       <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14.vc10\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <DisableSpecificWarnings>4996</DisableSpecificWarnings>\r
-      <PreprocessorDefinitions>HAVE_CONFIG_H;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>\r
       <MinimalRebuild>false</MinimalRebuild>\r
     </ClCompile>\r
index 11d2898..edd943a 100644 (file)
@@ -305,6 +305,8 @@ function configureLibxml()
                        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) {
index ce3f24a..4b85fc1 100644 (file)
@@ -553,6 +553,11 @@ xmlAutomataSetFinalState
 #ifdef LIBXML_DEBUG_ENABLED
 xmlBoolToText
 #endif
+xmlBufContent
+xmlBufEnd
+xmlBufGetNodeContent
+xmlBufNodeDump
+xmlBufUse
 xmlBufferAdd
 xmlBufferAddHead
 xmlBufferCCat
@@ -561,6 +566,7 @@ xmlBufferContent
 xmlBufferCreate
 xmlBufferCreateSize
 xmlBufferCreateStatic
+xmlBufferDetach
 xmlBufferDump
 xmlBufferEmpty
 xmlBufferFree
@@ -765,10 +771,12 @@ xmlDictCreate
 xmlDictCreateSub
 xmlDictExists
 xmlDictFree
+xmlDictGetUsage
 xmlDictLookup
 xmlDictOwns
 xmlDictQLookup
 xmlDictReference
+xmlDictSetLimit
 xmlDictSize
 xmlDllMain
 xmlDocCopyNode
@@ -992,6 +1000,7 @@ xmlInitThreads
 #ifdef LIBXML_CATALOG_ENABLED
 xmlInitializeCatalog
 #endif
+xmlInitializeDict
 xmlInitializeGlobalState
 xmlInitializePredefinedEntities
 xmlIsBaseChar
@@ -1292,6 +1301,8 @@ xmlOutputBufferCreateFilename
 xmlOutputBufferCreateFilenameDefault
 xmlOutputBufferCreateIO
 xmlOutputBufferFlush
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
 xmlOutputBufferWrite
 xmlOutputBufferWriteEscape
 xmlOutputBufferWriteString
@@ -1590,22 +1601,12 @@ 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
@@ -1960,6 +1961,7 @@ xmlTextReaderRelaxNGSetSchema
 #ifdef LIBXML_SCHEMAS_ENABLED
 xmlTextReaderRelaxNGValidate
 #endif
+xmlTextReaderRelaxNGValidateCtxt
 xmlTextReaderSchemaValidate
 xmlTextReaderSchemaValidateCtxt
 xmlTextReaderSetErrorHandler
index 1d8df87..bd49c57 100644 (file)
@@ -34,11 +34,10 @@ 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";
+               mode[0]='w';
        else if (oflag==O_RDONLY)
-               mode[0]="r";
-       return fopen(filename, mode);
-
+               mode[0]='r';
+       return (int) fopen(filename, mode);
 }
 
 int close(int handle)
index d01f978..ace005b 100644 (file)
@@ -26,6 +26,7 @@
 #ifdef LIBXML_XINCLUDE_ENABLED
 #include <libxml/xinclude.h>
 
+#include "buf.h"
 
 #define XINCLUDE_MAX_DEPTH 40
 
@@ -92,7 +93,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree);
 
 /************************************************************************
  *                                                                     *
- *                     XInclude error handler                          *
+ *                     XInclude error handler                          *
  *                                                                     *
  ************************************************************************/
 
@@ -412,7 +413,7 @@ xmlXIncludeFreeContext(xmlXIncludeCtxtPtr ctxt) {
  * xmlXIncludeParseFile:
  * @ctxt:  the XInclude context
  * @URL:  the URL or file path
- * 
+ *
  * parse a document for XInclude
  */
 static xmlDocPtr
@@ -433,7 +434,7 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
      * 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.
@@ -446,7 +447,7 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
     }
 
     xmlCtxtUseOptions(pctxt, ctxt->parseFlags | XML_PARSE_DTDLOAD);
-    
+
     inputStream = xmlLoadExternalEntity(URL, NULL, pctxt);
     if (inputStream == NULL) {
        xmlFreeParserCtxt(pctxt);
@@ -472,7 +473,7 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
         pctxt->myDoc = NULL;
     }
     xmlFreeParserCtxt(pctxt);
-    
+
     return(ret);
 }
 
@@ -480,7 +481,7 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
  * xmlXIncludeAddNode:
  * @ctxt:  the XInclude context
  * @cur:  the new node
- * 
+ *
  * Add a new node to process to an XInclude context
  */
 static int
@@ -511,7 +512,7 @@ xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) {
     href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
     if (href == NULL) {
        href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */
-       if (href == NULL) 
+       if (href == NULL)
            return(-1);
     }
     if ((href[0] == '#') || (href[0] == 0))
@@ -655,7 +656,7 @@ xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) {
  * @ctxt:  the XInclude context
  * @doc:  the new document
  * @url:  the associated URL
- * 
+ *
  * The XInclude recursive nature is handled at this point.
  */
 static void
@@ -684,7 +685,7 @@ xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
        /*
         * Copy the private user data
         */
-       newctxt->_private = ctxt->_private;     
+       newctxt->_private = ctxt->_private;
        /*
         * Copy the existing document set
         */
@@ -749,7 +750,7 @@ xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
  * @ctxt:  the XInclude context
  * @txt:  the new text node
  * @url:  the associated URL
- * 
+ *
  * Add a new txtument to the list
  */
 static void
@@ -808,7 +809,7 @@ xmlXIncludeCopyNodeList(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
  * @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
  */
@@ -835,7 +836,7 @@ xmlXIncludeCopyNode(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
  * @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
  */
@@ -874,11 +875,11 @@ xmlXIncludeCopyNodeList(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
 static xmlNodePtr
 xmlXIncludeGetNthChild(xmlNodePtr cur, int no) {
     int i;
-    if (cur == NULL) 
-       return(cur);
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
+        return(NULL);
     cur = cur->children;
     for (i = 0;i <= no;cur = cur->next) {
-       if (cur == NULL) 
+       if (cur == NULL)
            return(cur);
        if ((cur->type == XML_ELEMENT_NODE) ||
            (cur->type == XML_DOCUMENT_NODE) ||
@@ -922,11 +923,13 @@ xmlXIncludeCopyRange(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
        return(NULL);
     start = (xmlNodePtr) range->user;
 
-    if (start == NULL)
+    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;
@@ -985,7 +988,7 @@ xmlXIncludeCopyRange(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
                /* prune and return full set */
                if (level == lastLevel)
                    xmlAddNextSibling(last, tmp);
-               else 
+               else
                    xmlAddChild(last, tmp);
                return(list);
            } else {    /* ending node not a text node */
@@ -1289,7 +1292,7 @@ xmlXIncludeMergeEntity(xmlEntityPtr ent, xmlXIncludeMergeDataPtr data,
        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;
@@ -1389,7 +1392,7 @@ xmlXIncludeMergeEntities(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
  * @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
@@ -1413,7 +1416,7 @@ xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
      */
     uri = xmlParseURI((const char *)url);
     if (uri == NULL) {
-       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                       XML_XINCLUDE_HREF_URI,
                       "invalid value URI %s\n", url);
        return(-1);
@@ -1431,7 +1434,7 @@ xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
     xmlFreeURI(uri);
     if (URL == NULL) {
         if (ctxt->incTab != NULL)
-           xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+           xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                           XML_XINCLUDE_HREF_URI,
                           "invalid value URI %s\n", url);
        else
@@ -1550,7 +1553,7 @@ loaded:
            ctxt->incTab[nr]->inc = xmlXIncludeCopyNodeList(ctxt, ctxt->doc,
                                                       doc, doc->children);
        }
-    } 
+    }
 #ifdef LIBXML_XPTR_ENABLED
     else {
        /*
@@ -1568,7 +1571,7 @@ loaded:
            xptrctxt = xmlXPtrNewContext(doc, NULL, NULL);
        }
        if (xptrctxt == NULL) {
-           xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+           xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                           XML_XINCLUDE_XPTR_FAILED,
                           "could not create XPointer context\n", NULL);
            xmlFree(URL);
@@ -1594,7 +1597,7 @@ loaded:
            case XPATH_POINT:
            case XPATH_USERS:
            case XPATH_XSLT_TREE:
-               xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+               xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                               XML_XINCLUDE_XPTR_RESULT,
                               "XPointer is not a range: #%s\n",
                               fragment);
@@ -1636,14 +1639,14 @@ loaded:
                        continue;
 
                    case XML_ATTRIBUTE_NODE:
-                       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+                       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, 
+                       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                                       XML_XINCLUDE_XPTR_RESULT,
                                       "XPointer selects a namespace: #%s\n",
                                       fragment);
@@ -1658,7 +1661,7 @@ loaded:
                    case XML_ENTITY_DECL:
                    case XML_XINCLUDE_START:
                    case XML_XINCLUDE_END:
-                       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+                       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                                       XML_XINCLUDE_XPTR_RESULT,
                                   "XPointer selects unexpected nodes: #%s\n",
                                       fragment);
@@ -1704,7 +1707,7 @@ loaded:
             */
            curBase = xmlBuildRelativeURI(URL, ctxt->base);
            if (curBase == NULL) {      /* Error return */
-               xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+               xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                       XML_XINCLUDE_HREF_URI,
                       "trying to build relative URI from %s\n", URL);
            } else {
@@ -1745,7 +1748,7 @@ loaded:
                                xmlChar *relBase;
                                relBase = xmlBuildURI(xmlBase, base);
                                if (relBase == NULL) { /* error */
-                                   xmlXIncludeErr(ctxt, 
+                                   xmlXIncludeErr(ctxt,
                                                ctxt->incTab[nr]->ref,
                                                XML_XINCLUDE_HREF_URI,
                                        "trying to rebuild base from %s\n",
@@ -1782,7 +1785,7 @@ loaded:
  * @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
@@ -1798,6 +1801,7 @@ xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
     xmlCharEncoding enc = (xmlCharEncoding) 0;
     xmlParserCtxtPtr pctxt;
     xmlParserInputPtr inputStream;
+    int xinclude_multibyte_fallback_used = 0;
 
     /*
      * Check the URL and remove any fragment identifier
@@ -1828,7 +1832,7 @@ xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
      * directly through ctxt->doc.
      */
     if (URL[0] == 0) {
-       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                       XML_XINCLUDE_TEXT_DOCUMENT,
                       "text serialization of document not available\n", NULL);
        xmlFree(URL);
@@ -1894,30 +1898,39 @@ xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
     /*
      * 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 = xmlBufferContent(buf->buffer);
-       len = xmlBufferLength(buf->buffer);
+       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)) {
-               xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
-                              XML_XINCLUDE_INVALID_CHAR,
-                              "%s contains invalid char\n", URL);
-               xmlFreeParserInputBuffer(buf);
-               xmlFree(URL);
-               return(-1);
+               /* 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;
        }
-       xmlBufferShrink(buf->buffer, len);
+       xmlBufShrink(buf->buffer, len);
     }
     xmlFreeParserCtxt(pctxt);
     xmlXIncludeAddTxt(ctxt, node, URL);
@@ -1937,7 +1950,7 @@ loaded:
  * @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
  *
@@ -1947,8 +1960,9 @@ static int
 xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) {
     xmlXIncludeCtxtPtr newctxt;
     int ret = 0;
-    
-    if ((fallback == NULL) || (ctxt == NULL))
+
+    if ((fallback == NULL) || (fallback->type == XML_NAMESPACE_DECL) ||
+        (ctxt == NULL))
        return(-1);
     if (fallback->children != NULL) {
        /*
@@ -2033,7 +2047,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
     href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
     if (href == NULL) {
        href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */
-       if (href == NULL) 
+       if (href == NULL)
            return(-1);
     }
     parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE);
@@ -2078,7 +2092,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
            xmlFree(eschref);
     }
     if (URI == NULL) {
-       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                       XML_XINCLUDE_HREF_URI, "failed build URL\n", NULL);
        if (parse != NULL)
            xmlFree(parse);
@@ -2111,7 +2125,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
      * Restore the original base before checking for fallback
      */
     ctxt->base = oldBase;
-    
+
     if (ret < 0) {
        xmlNodePtr children;
 
@@ -2129,14 +2143,14 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
                ((xmlStrEqual(children->ns->href, XINCLUDE_NS)) ||
                 (xmlStrEqual(children->ns->href, XINCLUDE_OLD_NS)))) {
                ret = xmlXIncludeLoadFallback(ctxt, children, nr);
-               if (ret == 0) 
+               if (ret == 0)
                    break;
            }
            children = children->next;
        }
     }
     if (ret < 0) {
-       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+       xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                       XML_XINCLUDE_NO_FALLBACK,
                       "could not load %s, and no fallback was found\n",
                       URI);
@@ -2174,7 +2188,7 @@ xmlXIncludeIncludeNode(xmlXIncludeCtxtPtr ctxt, int nr) {
     if ((nr < 0) || (nr >= ctxt->incNr))
        return(-1);
     cur = ctxt->incTab[nr]->ref;
-    if (cur == NULL)
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
        return(-1);
 
     /*
@@ -2205,7 +2219,7 @@ xmlXIncludeIncludeNode(xmlXIncludeCtxtPtr ctxt, int nr) {
            tmp = tmp->next;
        }
        if (nb_elem > 1) {
-           xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, 
+           xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
                           XML_XINCLUDE_MULTIPLE_ROOT,
                       "XInclude error: would result in multiple root nodes\n",
                           NULL);
@@ -2252,7 +2266,7 @@ xmlXIncludeIncludeNode(xmlXIncludeCtxtPtr ctxt, int nr) {
        }
     }
 
-    
+
     return(0);
 }
 
@@ -2349,7 +2363,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
     int ret = 0;
     int i, start;
 
-    if ((doc == NULL) || (tree == NULL))
+    if ((doc == NULL) || (tree == NULL) || (tree->type == XML_NAMESPACE_DECL))
        return(-1);
     if (ctxt == NULL)
        return(-1);
@@ -2463,7 +2477,8 @@ xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree, int flags, void *data) {
     xmlXIncludeCtxtPtr ctxt;
     int ret = 0;
 
-    if ((tree == NULL) || (tree->doc == NULL))
+    if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL) ||
+        (tree->doc == NULL))
         return(-1);
 
     ctxt = xmlXIncludeNewContext(tree->doc);
@@ -2548,7 +2563,8 @@ xmlXIncludeProcessTreeFlags(xmlNodePtr tree, int flags) {
     xmlXIncludeCtxtPtr ctxt;
     int ret = 0;
 
-    if ((tree == NULL) || (tree->doc == NULL))
+    if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL) ||
+        (tree->doc == NULL))
        return(-1);
     ctxt = xmlXIncludeNewContext(tree->doc);
     if (ctxt == NULL)
@@ -2592,7 +2608,8 @@ int
 xmlXIncludeProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
     int ret = 0;
 
-    if ((node == NULL) || (node->doc == NULL) || (ctxt == NULL))
+    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))
diff --git a/xlink.c b/xlink.c
index 0d9be73..3566e06 100644 (file)
--- a/xlink.c
+++ b/xlink.c
@@ -47,7 +47,7 @@
  *           Default setting and related functions             *
  *                                                             *
  ****************************************************************/
+
 static xlinkHandlerPtr xlinkDefaultHandler = NULL;
 static xlinkNodeDetectFunc     xlinkDefaultDetect = NULL;
 
@@ -93,7 +93,7 @@ xlinkGetDefaultDetect (void) {
  *
  * Set the default xlink detection routine
  */
-void 
+void
 xlinkSetDefaultDetect  (xlinkNodeDetectFunc func) {
     xlinkDefaultDetect = func;
 }
@@ -104,7 +104,7 @@ xlinkSetDefaultDetect       (xlinkNodeDetectFunc func) {
  *                                                             *
  ****************************************************************/
 
+
 /**
  * xlinkIsLink:
  * @doc:  the document containing the node
@@ -119,7 +119,7 @@ xlinkSetDefaultDetect       (xlinkNodeDetectFunc func) {
  * Returns the xlinkType of the node (XLINK_TYPE_NONE if there is no
  *         link detected.
  */
-xlinkType 
+xlinkType
 xlinkIsLink    (xmlDocPtr doc, xmlNodePtr node) {
     xmlChar *type = NULL, *role = NULL;
     xlinkType ret = XLINK_TYPE_NONE;
@@ -157,7 +157,7 @@ xlinkIsLink (xmlDocPtr doc, xmlNodePtr node) {
                xlink = xmlSearchNs(doc, node, XLINK_NAMESPACE);
                if (xlink == NULL) {
                    /* Humm, fallback method */
-                   if (xmlStrEqual(role, BAD_CAST"xlink:external-linkset")) 
+                   if (xmlStrEqual(role, BAD_CAST"xlink:external-linkset"))
                        ret = XLINK_TYPE_EXTENDED_SET;
                } else {
                    xmlChar buf[200];
index 8a25962..8cf9858 100644 (file)
@@ -9,7 +9,6 @@ xml-config - script to get information about the installed version of GNOME-XML
 linker flags that should be used to compile and link programs that use
 \fIGNOME-XML\fP.
 .SH OPTIONS
-.l
 \fIxml-config\fP accepts the following options:
 .TP 8
 .B  \-\-version
index 2989325..1957486 100644 (file)
@@ -86,12 +86,12 @@ while test $# -gt 0; do
        then
            if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = "-L/usr/lib64" ]
            then
-               echo @XML_LIBS@ 
+               echo @XML_LIBS@ @MODULE_PLATFORM_LIBS@
            else
-               echo @XML_LIBDIR@ @XML_LIBS@ 
+               echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@
            fi
        else
-           echo @XML_LIBDIR@ @XML_LIBS@ @WIN32_EXTRA_LIBADD@
+           echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@ @WIN32_EXTRA_LIBADD@
        fi
                ;;
 
diff --git a/xmlIO.c b/xmlIO.c
index 73a995d..847cb7e 100644 (file)
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -96,6 +96,9 @@
 #endif
 #include <libxml/globals.h>
 
+#include "buf.h"
+#include "enc.h"
+
 /* #define VERBOSE_FAILURE */
 /* #define DEBUG_EXTERNAL_ENTITIES */
 /* #define DEBUG_INPUT */
@@ -768,13 +771,21 @@ int
 xmlCheckFilename (const char *path)
 {
 #ifdef HAVE_STAT
-       struct stat stat_buffer;
+    struct stat stat_buffer;
 #endif
-       if (path == NULL)
-               return(0);
+    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
@@ -789,7 +800,7 @@ xmlCheckFilename (const char *path)
     return 1;
 }
 
-static int
+int
 xmlNop(void) {
     return(0);
 }
@@ -990,7 +1001,7 @@ xmlFileOpenW (const char *filename) {
 #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
     fd = xmlWrapOpen(path, 1);
 #else
-          fd = fopen(path, "wb");
+          fd = fopen(path, "wb");
 #endif /* WIN32 */
 
         if (fd == NULL) xmlIOErr(0, path);
@@ -2036,8 +2047,8 @@ xmlIOHTTPCloseWrite( void * context, const char * http_mthd ) {
        /*  Pull the data out of the memory output buffer  */
 
        xmlOutputBufferPtr      dctxt = ctxt->doc_buff;
-       http_content = (char *)dctxt->buffer->content;
-       content_lgth = dctxt->buffer->use;
+       http_content = (char *) xmlBufContent(dctxt->buffer);
+       content_lgth = xmlBufUse(dctxt->buffer);
     }
 
     if ( http_content == NULL ) {
@@ -2404,15 +2415,15 @@ xmlAllocParserInputBuffer(xmlCharEncoding enc) {
        return(NULL);
     }
     memset(ret, 0, (size_t) sizeof(xmlParserInputBuffer));
-    ret->buffer = xmlBufferCreateSize(2 * xmlDefaultBufferSize);
+    ret->buffer = xmlBufCreateSize(2 * xmlDefaultBufferSize);
     if (ret->buffer == NULL) {
         xmlFree(ret);
        return(NULL);
     }
-    ret->buffer->alloc = XML_BUFFER_ALLOC_DOUBLEIT;
+    xmlBufSetAllocationScheme(ret->buffer, XML_BUFFER_ALLOC_DOUBLEIT);
     ret->encoder = xmlGetCharEncodingHandler(enc);
     if (ret->encoder != NULL)
-        ret->raw = xmlBufferCreateSize(2 * xmlDefaultBufferSize);
+        ret->raw = xmlBufCreateSize(2 * xmlDefaultBufferSize);
     else
         ret->raw = NULL;
     ret->readcallback = NULL;
@@ -2443,19 +2454,19 @@ xmlAllocOutputBuffer(xmlCharEncodingHandlerPtr encoder) {
        return(NULL);
     }
     memset(ret, 0, (size_t) sizeof(xmlOutputBuffer));
-    ret->buffer = xmlBufferCreate();
+    ret->buffer = xmlBufCreate();
     if (ret->buffer == NULL) {
         xmlFree(ret);
        return(NULL);
     }
 
     /* try to avoid a performance problem with Windows realloc() */
-    if (ret->buffer->alloc == XML_BUFFER_ALLOC_EXACT)
-        ret->buffer->alloc = XML_BUFFER_ALLOC_DOUBLEIT;
+    if (xmlBufGetAllocationScheme(ret->buffer) == XML_BUFFER_ALLOC_EXACT)
+        xmlBufSetAllocationScheme(ret->buffer, XML_BUFFER_ALLOC_DOUBLEIT);
 
     ret->encoder = encoder;
     if (encoder != NULL) {
-        ret->conv = xmlBufferCreateSize(4000);
+        ret->conv = xmlBufCreateSize(4000);
        if (ret->conv == NULL) {
            xmlFree(ret);
            return(NULL);
@@ -2464,7 +2475,7 @@ xmlAllocOutputBuffer(xmlCharEncodingHandlerPtr encoder) {
        /*
         * This call is designed to initiate the encoder state
         */
-       xmlCharEncOutFunc(encoder, ret->conv, NULL);
+       xmlCharEncOutput(ret, 1);
     } else
         ret->conv = NULL;
     ret->writecallback = NULL;
@@ -2493,7 +2504,7 @@ xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder) {
        return(NULL);
     }
     memset(ret, 0, (size_t) sizeof(xmlOutputBuffer));
-    ret->buffer = xmlBufferCreate();
+    ret->buffer = xmlBufCreate();
     if (ret->buffer == NULL) {
         xmlFree(ret);
        return(NULL);
@@ -2502,15 +2513,12 @@ xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder) {
 
     /*
      * For conversion buffers we use the special IO handling
-     * We don't do that from the exported API to avoid confusing
-     * user's code.
      */
-    ret->buffer->alloc = XML_BUFFER_ALLOC_IO;
-    ret->buffer->contentIO = ret->buffer->content;
+    xmlBufSetAllocationScheme(ret->buffer, XML_BUFFER_ALLOC_IO);
 
     ret->encoder = encoder;
     if (encoder != NULL) {
-        ret->conv = xmlBufferCreateSize(4000);
+        ret->conv = xmlBufCreateSize(4000);
        if (ret->conv == NULL) {
            xmlFree(ret);
            return(NULL);
@@ -2519,7 +2527,7 @@ xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder) {
        /*
         * This call is designed to initiate the encoder state
         */
-       xmlCharEncOutFunc(encoder, ret->conv, NULL);
+        xmlCharEncOutput(ret, 1);
     } else
         ret->conv = NULL;
     ret->writecallback = NULL;
@@ -2543,7 +2551,7 @@ xmlFreeParserInputBuffer(xmlParserInputBufferPtr in) {
     if (in == NULL) return;
 
     if (in->raw) {
-        xmlBufferFree(in->raw);
+        xmlBufFree(in->raw);
        in->raw = NULL;
     }
     if (in->encoder != NULL) {
@@ -2553,7 +2561,7 @@ xmlFreeParserInputBuffer(xmlParserInputBufferPtr in) {
        in->closecallback(in->context);
     }
     if (in->buffer != NULL) {
-        xmlBufferFree(in->buffer);
+        xmlBufFree(in->buffer);
        in->buffer = NULL;
     }
 
@@ -2585,14 +2593,14 @@ xmlOutputBufferClose(xmlOutputBufferPtr out)
     }
     written = out->written;
     if (out->conv) {
-        xmlBufferFree(out->conv);
+        xmlBufFree(out->conv);
         out->conv = NULL;
     }
     if (out->encoder != NULL) {
         xmlCharEncCloseFunc(out->encoder);
     }
     if (out->buffer != NULL) {
-        xmlBufferFree(out->buffer);
+        xmlBufFree(out->buffer);
         out->buffer = NULL;
     }
 
@@ -2922,6 +2930,39 @@ xmlOutputBufferCreateBuffer(xmlBufferPtr buffer,
     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 */
 
 /**
@@ -2974,7 +3015,7 @@ xmlParserInputBufferCreateMem(const char *mem, int size, xmlCharEncoding enc) {
         ret->context = (void *) mem;
        ret->readcallback = (xmlInputReadCallback) xmlNop;
        ret->closecallback = NULL;
-       errcode = xmlBufferAdd(ret->buffer, (const xmlChar *) mem, size);
+       errcode = xmlBufAdd(ret->buffer, (const xmlChar *) mem, size);
        if (errcode != 0) {
            xmlFree(ret);
            return(NULL);
@@ -3011,14 +3052,14 @@ xmlParserInputBufferCreateStatic(const char *mem, int size,
        return(NULL);
     }
     memset(ret, 0, (size_t) sizeof(xmlParserInputBuffer));
-    ret->buffer = xmlBufferCreateStatic((void *)mem, (size_t) size);
+    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 = xmlBufferCreateSize(2 * xmlDefaultBufferSize);
+        ret->raw = xmlBufCreateSize(2 * xmlDefaultBufferSize);
     else
         ret->raw = NULL;
     ret->compressed = -1;
@@ -3187,33 +3228,33 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in,
         * Store the data in the incoming raw buffer
         */
         if (in->raw == NULL) {
-           in->raw = xmlBufferCreate();
+           in->raw = xmlBufCreate();
        }
-       ret = xmlBufferAdd(in->raw, (const xmlChar *) buf, len);
+       ret = xmlBufAdd(in->raw, (const xmlChar *) buf, len);
        if (ret != 0)
            return(-1);
 
        /*
         * convert as much as possible to the parser reading buffer.
         */
-       use = in->raw->use;
-       nbchars = xmlCharEncInFunc(in->encoder, in->buffer, in->raw);
+       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 - in->raw->use);
+       in->rawconsumed += (use - xmlBufUse(in->raw));
     } else {
        nbchars = len;
-        ret = xmlBufferAdd(in->buffer, (xmlChar *) buf, nbchars);
+        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, in->buffer->use, in->buffer->size);
+            nbchars, xmlBufUse(in->buffer), xmlBufLength(in->buffer));
 #endif
     return(nbchars);
 }
@@ -3251,29 +3292,23 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
     char *buffer = NULL;
     int res = 0;
     int nbchars = 0;
-    int buffree;
-    unsigned int needSize;
 
     if ((in == NULL) || (in->error)) return(-1);
     if ((len <= MINLEN) && (len != 4))
         len = MINLEN;
 
-    buffree = in->buffer->size - in->buffer->use;
-    if (buffree <= 0) {
+    if (xmlBufAvail(in->buffer) <= 0) {
        xmlIOErr(XML_IO_BUFFER_FULL, NULL);
        in->error = XML_IO_BUFFER_FULL;
        return(-1);
     }
 
-    needSize = in->buffer->use + len + 1;
-    if (needSize > in->buffer->size){
-        if (!xmlBufferResize(in->buffer, needSize)){
-           xmlIOErrMemory("growing input buffer");
-           in->error = XML_ERR_NO_MEMORY;
-            return(-1);
-        }
+    if (xmlBufGrow(in->buffer, len + 1) < 0) {
+        xmlIOErrMemory("growing input buffer");
+        in->error = XML_ERR_NO_MEMORY;
+        return(-1);
     }
-    buffer = (char *)&in->buffer->content[in->buffer->use];
+    buffer = (char *)xmlBufEnd(in->buffer);
 
     /*
      * Call the read method for this I/O type.
@@ -3298,32 +3333,31 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
         * Store the data in the incoming raw buffer
         */
         if (in->raw == NULL) {
-           in->raw = xmlBufferCreate();
+           in->raw = xmlBufCreate();
        }
-       res = xmlBufferAdd(in->raw, (const xmlChar *) buffer, len);
+       res = xmlBufAdd(in->raw, (const xmlChar *) buffer, len);
        if (res != 0)
            return(-1);
 
        /*
         * convert as much as possible to the parser reading buffer.
         */
-       use = in->raw->use;
-       nbchars = xmlCharEncInFunc(in->encoder, in->buffer, in->raw);
+       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 - in->raw->use);
+       in->rawconsumed += (use - xmlBufUse(in->raw));
     } else {
        nbchars = len;
-       in->buffer->use += nbchars;
-       buffer[nbchars] = 0;
+        xmlBufAddLen(in->buffer, nbchars);
     }
 #ifdef DEBUG_INPUT
     xmlGenericError(xmlGenericErrorContext,
-           "I/O: read %d chars, buffer %d/%d\n",
-            nbchars, in->buffer->use, in->buffer->size);
+           "I/O: read %d chars, buffer %d\n",
+            nbchars, xmlBufUse(in->buffer));
 #endif
     return(nbchars);
 }
@@ -3345,8 +3379,7 @@ xmlParserInputBufferRead(xmlParserInputBufferPtr in, int len) {
     if ((in == NULL) || (in->error)) return(-1);
     if (in->readcallback != NULL)
        return(xmlParserInputBufferGrow(in, len));
-    else if ((in->buffer != NULL) &&
-             (in->buffer->alloc == XML_BUFFER_ALLOC_IMMUTABLE))
+    else if (xmlBufGetAllocationScheme(in->buffer) == XML_BUFFER_ALLOC_IMMUTABLE)
        return(0);
     else
         return(-1);
@@ -3391,30 +3424,30 @@ xmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *buf) {
             * Store the data in the incoming raw buffer
             */
            if (out->conv == NULL) {
-               out->conv = xmlBufferCreate();
+               out->conv = xmlBufCreate();
            }
-           ret = xmlBufferAdd(out->buffer, (const xmlChar *) buf, chunk);
+           ret = xmlBufAdd(out->buffer, (const xmlChar *) buf, chunk);
            if (ret != 0)
                return(-1);
 
-           if ((out->buffer->use < MINLEN) && (chunk == len))
+           if ((xmlBufUse(out->buffer) < MINLEN) && (chunk == len))
                goto done;
 
            /*
             * convert as much as possible to the parser reading buffer.
             */
-           ret = xmlCharEncOutFunc(out->encoder, out->conv, out->buffer);
+           ret = xmlCharEncOutput(out, 0);
            if ((ret < 0) && (ret != -3)) {
                xmlIOErr(XML_IO_ENCODER, NULL);
                out->error = XML_IO_ENCODER;
                return(-1);
            }
-           nbchars = out->conv->use;
+           nbchars = xmlBufUse(out->conv);
        } else {
-           ret = xmlBufferAdd(out->buffer, (const xmlChar *) buf, chunk);
+           ret = xmlBufAdd(out->buffer, (const xmlChar *) buf, chunk);
            if (ret != 0)
                return(-1);
-           nbchars = out->buffer->use;
+           nbchars = xmlBufUse(out->buffer);
        }
        buf += chunk;
        len -= chunk;
@@ -3428,14 +3461,14 @@ xmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *buf) {
             */
            if (out->encoder != NULL) {
                ret = out->writecallback(out->context,
-                                (const char *)out->conv->content, nbchars);
+                           (const char *)xmlBufContent(out->conv), nbchars);
                if (ret >= 0)
-                   xmlBufferShrink(out->conv, ret);
+                   xmlBufShrink(out->conv, ret);
            } else {
                ret = out->writecallback(out->context,
-                                (const char *)out->buffer->content, nbchars);
+                           (const char *)xmlBufContent(out->buffer), nbchars);
                if (ret >= 0)
-                   xmlBufferShrink(out->buffer, ret);
+                   xmlBufShrink(out->buffer, ret);
            }
            if (ret < 0) {
                xmlIOErr(XML_IO_WRITE, NULL);
@@ -3479,7 +3512,7 @@ xmlEscapeContent(unsigned char* out, int *outlen,
     inend = in + (*inlen);
 
     while ((in < inend) && (out < outend)) {
-       if (*in == '<') {
+       if (*in == '<') {
            if (outend - out < 4) break;
            *out++ = '&';
            *out++ = 'l';
@@ -3543,7 +3576,8 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
 
     if ((out == NULL) || (out->error) || (str == NULL) ||
         (out->buffer == NULL) ||
-       (out->buffer->alloc == XML_BUFFER_ALLOC_IMMUTABLE)) return(-1);
+       (xmlBufGetAllocationScheme(out->buffer) == XML_BUFFER_ALLOC_IMMUTABLE))
+        return(-1);
     len = strlen((const char *)str);
     if (len < 0) return(0);
     if (out->error) return(-1);
@@ -3556,14 +3590,14 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
         * how many bytes to consume and how many bytes to store.
         */
        cons = len;
-       chunk = (out->buffer->size - out->buffer->use) - 1;
+       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 (xmlBufferGrow(out->buffer, out->buffer->size + 100) < 0)
+           if (xmlBufGrow(out->buffer, 100) < 0)
                return(-1);
             oldwritten = -1;
            continue;
@@ -3577,36 +3611,33 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
             * Store the data in the incoming raw buffer
             */
            if (out->conv == NULL) {
-               out->conv = xmlBufferCreate();
+               out->conv = xmlBufCreate();
            }
-           ret = escaping(out->buffer->content + out->buffer->use ,
+           ret = escaping(xmlBufEnd(out->buffer) ,
                           &chunk, str, &cons);
            if ((ret < 0) || (chunk == 0)) /* chunk==0 => nothing done */
                return(-1);
-           out->buffer->use += chunk;
-           out->buffer->content[out->buffer->use] = 0;
+            xmlBufAddLen(out->buffer, chunk);
 
-           if ((out->buffer->use < MINLEN) && (cons == len))
+           if ((xmlBufUse(out->buffer) < MINLEN) && (cons == len))
                goto done;
 
            /*
             * convert as much as possible to the output buffer.
             */
-           ret = xmlCharEncOutFunc(out->encoder, out->conv, out->buffer);
+           ret = xmlCharEncOutput(out, 0);
            if ((ret < 0) && (ret != -3)) {
                xmlIOErr(XML_IO_ENCODER, NULL);
                out->error = XML_IO_ENCODER;
                return(-1);
            }
-           nbchars = out->conv->use;
+           nbchars = xmlBufUse(out->conv);
        } else {
-           ret = escaping(out->buffer->content + out->buffer->use ,
-                          &chunk, str, &cons);
+           ret = escaping(xmlBufEnd(out->buffer), &chunk, str, &cons);
            if ((ret < 0) || (chunk == 0)) /* chunk==0 => nothing done */
                return(-1);
-           out->buffer->use += chunk;
-           out->buffer->content[out->buffer->use] = 0;
-           nbchars = out->buffer->use;
+            xmlBufAddLen(out->buffer, chunk);
+           nbchars = xmlBufUse(out->buffer);
        }
        str += cons;
        len -= cons;
@@ -3620,14 +3651,14 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
             */
            if (out->encoder != NULL) {
                ret = out->writecallback(out->context,
-                                (const char *)out->conv->content, nbchars);
+                           (const char *)xmlBufContent(out->conv), nbchars);
                if (ret >= 0)
-                   xmlBufferShrink(out->conv, ret);
+                   xmlBufShrink(out->conv, ret);
            } else {
                ret = out->writecallback(out->context,
-                                (const char *)out->buffer->content, nbchars);
+                           (const char *)xmlBufContent(out->buffer), nbchars);
                if (ret >= 0)
-                   xmlBufferShrink(out->buffer, ret);
+                   xmlBufShrink(out->buffer, ret);
            }
            if (ret < 0) {
                xmlIOErr(XML_IO_WRITE, NULL);
@@ -3635,8 +3666,8 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
                return(ret);
            }
            out->written += ret;
-       } else if (out->buffer->size - out->buffer->use < MINLEN) {
-           xmlBufferResize(out->buffer, out->buffer->size + MINLEN);
+       } else if (xmlBufAvail(out->buffer) < MINLEN) {
+           xmlBufGrow(out->buffer, MINLEN);
        }
        written += nbchars;
     } while ((len > 0) && (oldwritten != written));
@@ -3694,14 +3725,16 @@ xmlOutputBufferFlush(xmlOutputBufferPtr out) {
      */
     if ((out->conv != NULL) && (out->encoder != NULL)) {
        /*
-        * convert as much as possible to the parser reading buffer.
+        * convert as much as possible to the parser output buffer.
         */
-       nbchars = xmlCharEncOutFunc(out->encoder, out->conv, out->buffer);
-       if (nbchars < 0) {
-           xmlIOErr(XML_IO_ENCODER, NULL);
-           out->error = XML_IO_ENCODER;
-           return(-1);
-       }
+       do {
+           nbchars = xmlCharEncOutput(out, 0);
+           if (nbchars < 0) {
+               xmlIOErr(XML_IO_ENCODER, NULL);
+               out->error = XML_IO_ENCODER;
+               return(-1);
+           }
+       } while (nbchars);
     }
 
     /*
@@ -3710,14 +3743,16 @@ xmlOutputBufferFlush(xmlOutputBufferPtr out) {
     if ((out->conv != NULL) && (out->encoder != NULL) &&
        (out->writecallback != NULL)) {
        ret = out->writecallback(out->context,
-                  (const char *)out->conv->content, out->conv->use);
+                                 (const char *)xmlBufContent(out->conv),
+                                 xmlBufUse(out->conv));
        if (ret >= 0)
-           xmlBufferShrink(out->conv, ret);
+           xmlBufShrink(out->conv, ret);
     } else if (out->writecallback != NULL) {
        ret = out->writecallback(out->context,
-                  (const char *)out->buffer->content, out->buffer->use);
+                                 (const char *)xmlBufContent(out->buffer),
+                                 xmlBufUse(out->buffer));
        if (ret >= 0)
-           xmlBufferShrink(out->buffer, ret);
+           xmlBufShrink(out->buffer, ret);
     }
     if (ret < 0) {
        xmlIOErr(XML_IO_FLUSH, NULL);
index 489509f..43f455a 100644 (file)
@@ -47,16 +47,16 @@ static char *filename = NULL;
 #endif
 
 /************************************************************************
- *                                                                     *
- *                     Shell Interface                                 *
- *                                                                     *
+ *                                                                     *
+ *                     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.
  */
@@ -157,7 +157,7 @@ static void usershell(void) {
                    i++;
                    cur++;
                }
-           } else if (*cur == '"') { 
+           } else if (*cur == '"') {
                cur++;
                argv[i] = cur;
                while ((*cur != 0) && (*cur != '"')) cur++;
@@ -296,15 +296,15 @@ static void usershell(void) {
            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                                            *
- *                                                                     *
+ *                                                                     *
+ *                     Main                                            *
+ *                                                                     *
  ************************************************************************/
 static void usage(const char *name) {
     /* split into 2 printf's to avoid overly long string (gcc warning) */
@@ -507,7 +507,7 @@ int main(int argc, char **argv) {
                                exit_value = 2;
                                noout = 0;
                            } else {
-                               
+
                                xmlACatalogDump(super, out);
                                fclose(out);
                            }
@@ -544,14 +544,14 @@ int main(int argc, char **argv) {
                }
            }
        }
-       
+
     } 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]);
index 40a2194..26d8db1 100644 (file)
--- a/xmllint.c
+++ b/xmllint.c
@@ -168,8 +168,9 @@ static int nodefdtd = 0;
 #endif
 #ifdef LIBXML_PUSH_ENABLED
 static int push = 0;
+static int pushsize = 4096;
 #endif /* LIBXML_PUSH_ENABLED */
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
 static int memory = 0;
 #endif
 static int testIO = 0;
@@ -209,7 +210,7 @@ static xmlStreamCtxtPtr patstream = NULL;
 #ifdef LIBXML_XPATH_ENABLED
 static const char *xpathquery = NULL;
 #endif
-static int options = XML_PARSE_COMPACT;
+static int options = XML_PARSE_COMPACT | XML_PARSE_BIG_LINES;
 static int sax = 0;
 static int oldxml10 = 0;
 
@@ -1669,6 +1670,7 @@ testSAX(const char *filename) {
                (xmlSchemaValidityErrorFunc) fprintf,
                (xmlSchemaValidityWarningFunc) fprintf,
                stderr);
+       xmlSchemaValidateSetFilename(vctxt, filename);
 
        ret = xmlSchemaValidateStream(vctxt, buf, 0, handler,
                                      (void *)user_data);
@@ -1823,7 +1825,7 @@ static void processNode(xmlTextReaderPtr reader) {
 static void streamFile(char *filename) {
     xmlTextReaderPtr reader;
     int ret;
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
     int fd = -1;
     struct stat info;
     const char *base = NULL;
@@ -1873,7 +1875,8 @@ static void streamFile(char *filename) {
            xmlTextReaderSetParserProp(reader, XML_PARSER_VALIDATE, 1);
        else
 #endif /* LIBXML_VALID_ENABLED */
-           xmlTextReaderSetParserProp(reader, XML_PARSER_LOADDTD, 1);
+           if (loaddtd)
+               xmlTextReaderSetParserProp(reader, XML_PARSER_LOADDTD, 1);
 #ifdef LIBXML_SCHEMAS_ENABLED
        if (relaxng != NULL) {
            if ((timing) && (!repeat)) {
@@ -1974,7 +1977,7 @@ static void streamFile(char *filename) {
        patstream = NULL;
     }
 #endif
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
     if (memory) {
         xmlFreeParserInputBuffer(input);
        munmap((char *) base, info.st_size);
@@ -2139,7 +2142,7 @@ static void doXPathQuery(xmlDocPtr doc, const char *query) {
         progresult = XMLLINT_ERR_MEM;
         return;
     }
-    ctxt->node = xmlDocGetRootElement(doc);
+    ctxt->node = (xmlNodePtr) doc;
     res = xmlXPathEval(BAD_CAST query, ctxt);
     xmlXPathFreeContext(ctxt);
 
@@ -2191,17 +2194,15 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
        f = fopen(filename, "r");
 #endif
         if (f != NULL) {
-            int res, size = 3;
+            int res;
             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) {
+                while ((res = fread(chars, 1, pushsize, f)) > 0) {
                     htmlParseChunk(ctxt, chars, res, 0);
                 }
                 htmlParseChunk(ctxt, chars, 0, 1);
@@ -2212,7 +2213,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
         }
     }
 #endif /* LIBXML_PUSH_ENABLED */
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
     else if ((html) && (memory)) {
        int fd;
        struct stat info;
@@ -2327,7 +2328,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
                if (rectxt == NULL)
                    xmlFreeParserCtxt(ctxt);
            }
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
        } else if (memory) {
            int fd;
            struct stat info;
@@ -2591,7 +2592,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
                }
            } else
 #endif
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
            if (memory) {
                xmlChar *result;
                int len;
@@ -2619,7 +2620,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
                }
 
            } else
-#endif /* HAVE_SYS_MMAN_H */
+#endif /* HAVE_MMAP */
            if (compress) {
                xmlSaveFile(output ? output : "-", doc);
            } else if (oldout) {
@@ -3016,8 +3017,9 @@ static void usage(const char *name) {
 #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_SYS_MMAN_H
+#ifdef HAVE_MMAP
     printf("\t--memory : parse from memory\n");
 #endif
     printf("\t--maxmem nbbytes : limits memory allocation to nbbytes bytes\n");
@@ -3075,7 +3077,7 @@ static void usage(const char *name) {
     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, inply --noout\n");
+    printf("\t--xpath expr: evaluate the XPath expression, imply --noout\n");
 #endif
 
     printf("\nLibxml project home page: http://xmlsoft.org/\n");
@@ -3246,8 +3248,13 @@ main(int argc, char **argv) {
        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_SYS_MMAN_H
+#ifdef HAVE_MMAP
        else if ((!strcmp(argv[i], "-memory")) ||
                 (!strcmp(argv[i], "--memory")))
            memory++;
@@ -3339,8 +3346,9 @@ main(int argc, char **argv) {
         }
        else if ((!strcmp(argv[i], "-noblanks")) ||
                 (!strcmp(argv[i], "--noblanks"))) {
-            noblanks++;
-            xmlKeepBlanksDefault(0);
+           noblanks++;
+           xmlKeepBlanksDefault(0);
+           options |= XML_PARSE_NOBLANKS;
         }
        else if ((!strcmp(argv[i], "-maxmem")) ||
                 (!strcmp(argv[i], "--maxmem"))) {
index a0ab953..25d9318 100644 (file)
@@ -58,7 +58,7 @@ void xmlMallocBreakpoint(void);
 
 /************************************************************************
  *                                                                     *
- *             Macros, variables and associated types                  *
+ *             Macros, variables and associated types                  *
  *                                                                     *
  ************************************************************************/
 
index 9ffd610..7fe5bc2 100644 (file)
@@ -30,7 +30,7 @@ static int xmlModulePlatformSymbol(void *handle, const char *name, void **result
 
 /************************************************************************
  *                                                                     *
- *             module memory error handler                             *
+ *             module memory error handler                             *
  *                                                                     *
  ************************************************************************/
 
@@ -61,6 +61,10 @@ xmlModuleErrMemory(xmlModulePtr module, const char *extra)
  * @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
@@ -99,6 +103,10 @@ xmlModuleOpen(const char *name, int options ATTRIBUTE_UNUSED)
  * @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
  */
@@ -106,7 +114,7 @@ int
 xmlModuleSymbol(xmlModulePtr module, const char *name, void **symbol)
 {
     int rc = -1;
-       
+
     if ((NULL == module) || (symbol == NULL)) {
         __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
                         XML_MODULE_OPEN, XML_ERR_FATAL, NULL, 0, 0,
@@ -300,7 +308,7 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
 static void *
 xmlModulePlatformOpen(const char *name)
 {
-    return LoadLibrary(name);
+    return LoadLibraryA(name);
 }
 
 /*
@@ -326,7 +334,14 @@ xmlModulePlatformClose(void *handle)
 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;
 }
 
index 77ac71b..00083d0 100644 (file)
@@ -44,6 +44,8 @@
 #include <libxml/pattern.h>
 #endif
 
+#include "buf.h"
+
 #define MAX_ERR_MSG_SIZE 64000
 
 /*
@@ -135,7 +137,7 @@ struct _xmlTextReader {
     int                                depth;  /* depth of the current node */
     xmlNodePtr                 faketext;/* fake xmlNs chld */
     int                                preserve;/* preserve the resulting document */
-    xmlBufferPtr               buffer; /* used to return const xmlChar * */
+    xmlBufPtr                  buffer; /* used to return const xmlChar * */
     xmlDictPtr                 dict;   /* the context dictionnary */
 
     /* entity stack when traversing entities content */
@@ -807,9 +809,10 @@ xmlTextReaderCDataBlock(void *ctx, const xmlChar *ch, int len)
  */
 static int
 xmlTextReaderPushData(xmlTextReaderPtr reader) {
-    xmlBufferPtr inbuf;
+    xmlBufPtr inbuf;
     int val, s;
     xmlTextReaderState oldstate;
+    int alloc;
 
     if ((reader->input == NULL) || (reader->input->buffer == NULL))
        return(-1);
@@ -817,17 +820,18 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
     oldstate = reader->state;
     reader->state = XML_TEXTREADER_NONE;
     inbuf = reader->input->buffer;
+    alloc = xmlBufGetAllocationScheme(inbuf);
 
     while (reader->state == XML_TEXTREADER_NONE) {
-       if (inbuf->use < reader->cur + CHUNK_SIZE) {
+       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) &&
-                   (inbuf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)) {
-                   if (inbuf->use == reader->cur) {
+                   (alloc == XML_BUFFER_ALLOC_IMMUTABLE)) {
+                   if (xmlBufUse(inbuf) == reader->cur) {
                        reader->mode = XML_TEXTREADER_MODE_EOF;
                        reader->state = oldstate;
                    }
@@ -850,20 +854,20 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
         * parse by block of CHUNK_SIZE bytes, various tests show that
         * it's the best tradeoff at least on a 1.2GH Duron
         */
-       if (inbuf->use >= reader->cur + CHUNK_SIZE) {
+       if (xmlBufUse(inbuf) >= reader->cur + CHUNK_SIZE) {
            val = xmlParseChunk(reader->ctxt,
-                         (const char *) &inbuf->content[reader->cur],
-                         CHUNK_SIZE, 0);
+                 (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 = inbuf->use - reader->cur;
+           s = xmlBufUse(inbuf) - reader->cur;
            val = xmlParseChunk(reader->ctxt,
-                         (const char *) &inbuf->content[reader->cur],
-                         s, 0);
+                (const char *) xmlBufContent(inbuf) + reader->cur,
+                               s, 0);
            reader->cur += s;
            if (val != 0)
                reader->ctxt->wellFormed = 0;
@@ -875,10 +879,10 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
      * Discard the consumed input when needed and possible
      */
     if (reader->mode == XML_TEXTREADER_MODE_INTERACTIVE) {
-        if (inbuf->alloc != XML_BUFFER_ALLOC_IMMUTABLE) {
+        if (alloc != XML_BUFFER_ALLOC_IMMUTABLE) {
            if ((reader->cur >= 4096) &&
-               (inbuf->use - reader->cur <= CHUNK_SIZE)) {
-               val = xmlBufferShrink(inbuf, reader->cur);
+               (xmlBufUse(inbuf) - reader->cur <= CHUNK_SIZE)) {
+               val = xmlBufShrink(inbuf, reader->cur);
                if (val >= 0) {
                    reader->cur -= val;
                }
@@ -892,11 +896,11 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
      */
     else if (reader->mode == XML_TEXTREADER_MODE_EOF) {
        if (reader->state != XML_TEXTREADER_DONE) {
-           s = inbuf->use - reader->cur;
+           s = xmlBufUse(inbuf) - reader->cur;
            val = xmlParseChunk(reader->ctxt,
-                   (const char *) &inbuf->content[reader->cur],
-                   s, 1);
-           reader->cur = inbuf->use;
+                (const char *) xmlBufContent(inbuf) + reader->cur,
+                               s, 1);
+           reader->cur = xmlBufUse(inbuf);
            reader->state  = XML_TEXTREADER_DONE;
            if (val != 0) {
                if (reader->ctxt->wellFormed)
@@ -907,8 +911,11 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
        }
     }
     reader->state = oldstate;
-    if (reader->ctxt->wellFormed == 0)
+    if (reader->ctxt->wellFormed == 0) {
        reader->mode = XML_TEXTREADER_MODE_EOF;
+        return(-1);
+    }
+
     return(0);
 }
 
@@ -977,7 +984,7 @@ printf("Expand failed !\n");
  * xmlTextReaderValidateCData:
  * @reader:  the xmlTextReaderPtr used
  * @data:  pointer to the CData
- * @len:  lenght of the CData block in bytes.
+ * @len:  length of the CData block in bytes.
  *
  * Push some CData for validation
  */
@@ -1221,6 +1228,9 @@ xmlTextReaderCollectSiblings(xmlNodePtr node)
     xmlBufferPtr buffer;
     xmlChar *ret;
 
+    if ((node == NULL) || (node->type == XML_NAMESPACE_DECL))
+        return(NULL);
+
     buffer = xmlBufferCreate();
     if (buffer == NULL)
        return NULL;
@@ -1399,8 +1409,7 @@ get_next_node:
 #endif
            (reader->entNr == 0) &&
            (reader->node->prev != NULL) &&
-            (reader->node->prev->type != XML_DTD_NODE) &&
-           (reader->entNr == 0)) {
+            (reader->node->prev->type != XML_DTD_NODE)) {
            xmlNodePtr tmp = reader->node->prev;
            if ((tmp->extra & NODE_IS_PRESERVED) == 0) {
                xmlUnlinkNode(tmp);
@@ -1449,8 +1458,7 @@ get_next_node:
 #endif
            (reader->entNr == 0) &&
            (oldnode->type != XML_DTD_NODE) &&
-           ((oldnode->extra & NODE_IS_PRESERVED) == 0) &&
-           (reader->entNr == 0)) {
+           ((oldnode->extra & NODE_IS_PRESERVED) == 0)) {
            xmlUnlinkNode(oldnode);
            xmlTextReaderFreeNode(reader, oldnode);
        }
@@ -1716,8 +1724,8 @@ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED)
  *
  * 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 
+ * 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 *
@@ -2062,7 +2070,7 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
     ret->entMax = 0;
     ret->entNr = 0;
     ret->input = input;
-    ret->buffer = xmlBufferCreateSize(100);
+    ret->buffer = xmlBufCreateSize(100);
     if (ret->buffer == NULL) {
         xmlFree(ret);
         xmlGenericError(xmlGenericErrorContext,
@@ -2071,7 +2079,7 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
     }
     ret->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
     if (ret->sax == NULL) {
-       xmlBufferFree(ret->buffer);
+       xmlBufFree(ret->buffer);
        xmlFree(ret);
         xmlGenericError(xmlGenericErrorContext,
                "xmlNewTextReader : malloc failed\n");
@@ -2104,12 +2112,13 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
     ret->mode = XML_TEXTREADER_MODE_INITIAL;
     ret->node = NULL;
     ret->curnode = NULL;
-    if (ret->input->buffer->use < 4) {
+    if (xmlBufUse(ret->input->buffer) < 4) {
        xmlParserInputBufferRead(input, 4);
     }
-    if (ret->input->buffer->use >= 4) {
+    if (xmlBufUse(ret->input->buffer) >= 4) {
        ret->ctxt = xmlCreatePushParserCtxt(ret->sax, NULL,
-                       (const char *) ret->input->buffer->content, 4, URI);
+                            (const char *) xmlBufContent(ret->input->buffer),
+                                            4, URI);
        ret->base = 0;
        ret->cur = 4;
     } else {
@@ -2121,7 +2130,7 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
     if (ret->ctxt == NULL) {
         xmlGenericError(xmlGenericErrorContext,
                "xmlNewTextReader : malloc failed\n");
-       xmlBufferFree(ret->buffer);
+       xmlBufFree(ret->buffer);
        xmlFree(ret->sax);
        xmlFree(ret);
        return(NULL);
@@ -2251,7 +2260,7 @@ xmlFreeTextReader(xmlTextReaderPtr reader) {
     if ((reader->input != NULL)  && (reader->allocs & XML_TEXTREADER_INPUT))
        xmlFreeParserInputBuffer(reader->input);
     if (reader->buffer != NULL)
-        xmlBufferFree(reader->buffer);
+        xmlBufFree(reader->buffer);
     if (reader->entTab != NULL)
        xmlFree(reader->entTab);
     if (reader->dict != NULL)
@@ -3599,16 +3608,17 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
                (attr->children->next == NULL))
                return(attr->children->content);
            else {
-               if (reader->buffer == NULL)
-                   reader->buffer = xmlBufferCreateSize(100);
                if (reader->buffer == NULL) {
-                   xmlGenericError(xmlGenericErrorContext,
-                                   "xmlTextReaderSetup : malloc failed\n");
-                   return (NULL);
-               }
-               reader->buffer->use = 0;
-               xmlNodeBufGetContent(reader->buffer, node);
-               return(reader->buffer->content);
+                   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;
        }
@@ -4143,6 +4153,60 @@ xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader, xmlRelaxNGPtr schema) {
 }
 
 /**
+ * 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
@@ -4209,6 +4273,10 @@ xmlTextReaderSetSchema(xmlTextReaderPtr reader, xmlSchemaPtr schema) {
        reader->xsdValidCtxt = NULL;
        return(-1);
     }
+    xmlSchemaValidateSetLocator(reader->xsdValidCtxt,
+                                xmlTextReaderLocator,
+                               (void *) reader);
+
     if (reader->errorFunc != NULL) {
        xmlSchemaSetValidErrors(reader->xsdValidCtxt,
                        xmlTextReaderValidityErrorRelay,
@@ -4423,6 +4491,9 @@ xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader,
            return(-1);
        }
     }
+    xmlSchemaValidateSetLocator(reader->xsdValidCtxt,
+                                xmlTextReaderLocator,
+                               (void *) reader);
     /*
     * Redirect the validation context's error channels to use
     * the reader channels.
@@ -5040,7 +5111,7 @@ xmlTextReaderSetup(xmlTextReaderPtr reader,
        reader->allocs |= XML_TEXTREADER_INPUT;
     }
     if (reader->buffer == NULL)
-        reader->buffer = xmlBufferCreateSize(100);
+        reader->buffer = xmlBufCreateSize(100);
     if (reader->buffer == NULL) {
         xmlGenericError(xmlGenericErrorContext,
                         "xmlTextReaderSetup : malloc failed\n");
@@ -5081,13 +5152,14 @@ xmlTextReaderSetup(xmlTextReaderPtr reader,
     reader->node = NULL;
     reader->curnode = NULL;
     if (input != NULL) {
-        if (reader->input->buffer->use < 4) {
+        if (xmlBufUse(reader->input->buffer) < 4) {
             xmlParserInputBufferRead(input, 4);
         }
         if (reader->ctxt == NULL) {
-            if (reader->input->buffer->use >= 4) {
+            if (xmlBufUse(reader->input->buffer) >= 4) {
                 reader->ctxt = xmlCreatePushParserCtxt(reader->sax, NULL,
-                      (const char *) reader->input->buffer->content, 4, URL);
+                      (const char *) xmlBufContent(reader->input->buffer),
+                                      4, URL);
                 reader->base = 0;
                 reader->cur = 4;
             } else {
@@ -5116,10 +5188,7 @@ xmlTextReaderSetup(xmlTextReaderPtr reader,
                inputStream->filename = (char *)
                    xmlCanonicPath((const xmlChar *) URL);
            inputStream->buf = buf;
-           inputStream->base = inputStream->buf->buffer->content;
-           inputStream->cur = inputStream->buf->buffer->content;
-           inputStream->end =
-            &inputStream->buf->buffer->content[inputStream->buf->buffer->use];
+            xmlBufResetInput(buf->buffer, inputStream);
 
            inputPush(reader->ctxt, inputStream);
            reader->cur = 0;
index 8a8be98..1f9911c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * regexp.c: generic and extensible Regular Expression engine
  *
- * Basically designed with the purpose of compiling regexps for 
+ * 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
  *
  * macro to flag unimplemented blocks
  */
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
 
 /************************************************************************
- *                                                                     *
- *                     Datatypes and structures                        *
- *                                                                     *
+ *                                                                     *
+ *                     Datatypes and structures                        *
+ *                                                                     *
  ************************************************************************/
 
 /*
@@ -222,6 +222,7 @@ struct _xmlRegTrans {
 struct _xmlAutomataState {
     xmlRegStateType type;
     xmlRegMarkedType mark;
+    xmlRegMarkedType markd;
     xmlRegMarkedType reached;
     int no;
     int maxTrans;
@@ -364,7 +365,7 @@ void xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
 
 /************************************************************************
  *                                                                     *
- *             Regexp memory error handler                             *
+ *             Regexp memory error handler                             *
  *                                                                     *
  ************************************************************************/
 /**
@@ -411,9 +412,9 @@ xmlRegexpErrCompile(xmlRegParserCtxtPtr ctxt, const char *extra)
 }
 
 /************************************************************************
- *                                                                     *
- *                     Allocation/Deallocation                         *
- *                                                                     *
+ *                                                                     *
+ *                     Allocation/Deallocation                         *
+ *                                                                     *
  ************************************************************************/
 
 static int xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt);
@@ -934,9 +935,9 @@ xmlRegFreeParserCtxt(xmlRegParserCtxtPtr ctxt) {
 }
 
 /************************************************************************
- *                                                                     *
- *                     Display of Data structures                      *
- *                                                                     *
+ *                                                                     *
+ *                     Display of Data structures                      *
+ *                                                                     *
  ************************************************************************/
 
 static void
@@ -1143,7 +1144,7 @@ xmlRegPrintTrans(FILE *output, xmlRegTransPtr trans) {
        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;
@@ -1157,7 +1158,7 @@ xmlRegPrintState(FILE *output, xmlRegStatePtr 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]));
@@ -1207,12 +1208,12 @@ xmlRegPrintCtxt(FILE *output, xmlRegParserCtxtPtr ctxt) {
 #endif
 
 /************************************************************************
- *                                                                     *
+ *                                                                     *
  *              Finite Automata structures manipulations               *
- *                                                                     *
+ *                                                                     *
  ************************************************************************/
 
-static void 
+static void
 xmlRegAtomAddRange(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom,
                   int neg, xmlRegAtomType type, int start, int end,
                   xmlChar *blockName) {
@@ -1252,7 +1253,7 @@ xmlRegAtomAddRange(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom,
        return;
     range->blockName = blockName;
     atom->ranges[atom->nbRanges++] = range;
-    
+
 }
 
 static int
@@ -1283,7 +1284,7 @@ xmlRegGetCounter(xmlRegParserCtxtPtr ctxt) {
     return(ctxt->nbCounters++);
 }
 
-static int 
+static int
 xmlRegAtomPush(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom) {
     if (atom == NULL) {
        ERROR("atom push: atom is NULL");
@@ -1315,7 +1316,7 @@ xmlRegAtomPush(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom) {
     return(0);
 }
 
-static void 
+static void
 xmlRegStateAddTransTo(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr target,
                       int from) {
     if (target->maxTransTo == 0) {
@@ -1343,7 +1344,7 @@ xmlRegStateAddTransTo(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr target,
     target->nbTransTo++;
 }
 
-static void 
+static void
 xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
                    xmlRegAtomPtr atom, xmlRegStatePtr target,
                    int counter, int count) {
@@ -1409,7 +1410,7 @@ xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
        printf("counted %d\n", counter);
     else if (atom == NULL)
        printf("epsilon transition\n");
-    else if (atom != NULL) 
+    else if (atom != NULL)
         xmlRegPrintAtom(stdout, atom);
 #endif
 
@@ -1563,7 +1564,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
             */
            xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to);
 #ifdef DV
-       } else if ((to == NULL) && (atom->quant != XML_REGEXP_QUANT_RANGE) && 
+       } else if ((to == NULL) && (atom->quant != XML_REGEXP_QUANT_RANGE) &&
                   (atom->quant != XML_REGEXP_QUANT_ONCE)) {
            to = xmlRegNewState(ctxt);
            xmlRegStatePush(ctxt, to);
@@ -1577,7 +1578,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
                /*
                 * 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. 
+                *      2. set transition from atom end to this state.
                 */
                 if (to == NULL) {
                     xmlFAGenerateEpsilonTransition(ctxt, atom->start, 0);
@@ -1621,7 +1622,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
                    /*
                     * 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 
+                    * directly because we need an epsilon transition to
                     * newstate.
                     */
                     /* ???? For some reason it seems we never reach that
@@ -1680,7 +1681,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
                break;
        }
        return(0);
-    } 
+    }
     if ((atom->min == 0) && (atom->max == 0) &&
                (atom->quant == XML_REGEXP_QUANT_RANGE)) {
         /*
@@ -1706,9 +1707,9 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
        else {
            return(-1);
        }
-    } 
+    }
     end = to;
-    if ((atom->quant == XML_REGEXP_QUANT_MULT) || 
+    if ((atom->quant == XML_REGEXP_QUANT_MULT) ||
         (atom->quant == XML_REGEXP_QUANT_PLUS)) {
        /*
         * Do not pollute the target state by adding transitions from
@@ -1716,7 +1717,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
         * So isolate with an epsilon transition.
         */
         xmlRegStatePtr tmp;
-       
+
        tmp = xmlRegNewState(ctxt);
        if (tmp != NULL)
            xmlRegStatePush(ctxt, tmp);
@@ -1745,7 +1746,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
            atom->quant = XML_REGEXP_QUANT_ONCE;
            xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
            break;
-       case XML_REGEXP_QUANT_RANGE: 
+       case XML_REGEXP_QUANT_RANGE:
 #if DV_test
            if (atom->min == 0) {
                xmlFAGenerateEpsilonTransition(ctxt, from, to);
@@ -1762,7 +1763,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
  * xmlFAReduceEpsilonTransitions:
  * @ctxt:  a regexp parser context
  * @fromnr:  the from state
- * @tonr:  the to state 
+ * @tonr:  the to state
  * @counter:  should that transition be associated to a counted
  *
  */
@@ -1806,7 +1807,7 @@ xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr,
                    int newto = to->trans[transnr].to;
 
                    xmlRegStateAddTrans(ctxt, from, NULL,
-                                       ctxt->states[newto], 
+                                       ctxt->states[newto],
                                        -1, to->trans[transnr].count);
                } else {
 #ifdef DEBUG_REGEXP_GRAPH
@@ -1828,11 +1829,11 @@ xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr,
            int newto = to->trans[transnr].to;
 
            if (to->trans[transnr].counter >= 0) {
-               xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom, 
-                                   ctxt->states[newto], 
+               xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
+                                   ctxt->states[newto],
                                    to->trans[transnr].counter, -1);
            } else {
-               xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom, 
+               xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
                                    ctxt->states[newto], counter, -1);
            }
        }
@@ -1844,7 +1845,7 @@ xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr,
  * xmlFAEliminateSimpleEpsilonTransitions:
  * @ctxt:  a regexp parser context
  *
- * Eliminating general epsilon transitions can get costly in the general 
+ * 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
@@ -1880,12 +1881,12 @@ xmlFAEliminateSimpleEpsilonTransitions(xmlRegParserCtxtPtr ctxt) {
 #ifdef DEBUG_REGEXP_GRAPH
                printf("Found simple epsilon trans from start %d to %d\n",
                       statenr, newto);
-#endif     
+#endif
             } else {
 #ifdef DEBUG_REGEXP_GRAPH
                printf("Found simple epsilon trans from %d to %d\n",
                       statenr, newto);
-#endif     
+#endif
                for (i = 0;i < state->nbTransTo;i++) {
                    tmp = ctxt->states[state->transTo[i]];
                    for (j = 0;j < tmp->nbTrans;j++) {
@@ -1893,10 +1894,10 @@ xmlFAEliminateSimpleEpsilonTransitions(xmlRegParserCtxtPtr ctxt) {
 #ifdef DEBUG_REGEXP_GRAPH
                            printf("Changed transition %d on %d to go to %d\n",
                                   j, tmp->no, newto);
-#endif     
+#endif
                            tmp->trans[j].to = -1;
                            xmlRegStateAddTrans(ctxt, tmp, tmp->trans[j].atom,
-                                               ctxt->states[newto],
+                                               ctxt->states[newto],
                                                tmp->trans[j].counter,
                                                tmp->trans[j].count);
                        }
@@ -1910,7 +1911,7 @@ xmlFAEliminateSimpleEpsilonTransitions(xmlRegParserCtxtPtr ctxt) {
                 state->type = XML_REGEXP_UNREACH_STATE;
 
            }
-            
+
        }
     }
 }
@@ -2112,7 +2113,7 @@ xmlFACompareRanges(xmlRegRangePtr range1, xmlRegRangePtr range2) {
        /*
         * 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 
+        * compilation than testing over and over at runtime or
         * pushing too many states when evaluating.
         */
        if (((range1->neg == 0) && (range2->neg != 0)) ||
@@ -2589,6 +2590,8 @@ xmlFARecurseDeterminism(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
 
     if (state == NULL)
        return(ret);
+    if (state->markd == XML_REGEXP_MARK_VISITED)
+       return(ret);
 
     if (ctxt->flags & AM_AUTOMATA_RNG)
         deep = 0;
@@ -2606,8 +2609,10 @@ xmlFARecurseDeterminism(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
        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; */
@@ -2776,9 +2781,9 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) {
 }
 
 /************************************************************************
- *                                                                     *
+ *                                                                     *
  *     Routines to check input against transition atoms                *
- *                                                                     *
+ *                                                                     *
  ************************************************************************/
 
 static int
@@ -2807,7 +2812,7 @@ xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint, int neg,
         case XML_REGEXP_NOTINITNAME:
            neg = !neg;
         case XML_REGEXP_INITNAME:
-           ret = (IS_LETTER(codepoint) || 
+           ret = (IS_LETTER(codepoint) ||
                   (codepoint == '_') || (codepoint == ':'));
            break;
         case XML_REGEXP_NOTNAMECHAR:
@@ -3055,9 +3060,9 @@ xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint) {
 }
 
 /************************************************************************
- *                                                                     *
+ *                                                                     *
  *     Saving and restoring state of an execution context              *
- *                                                                     *
+ *                                                                     *
  ************************************************************************/
 
 #ifdef DEBUG_REGEXP_EXEC
@@ -3168,9 +3173,9 @@ xmlFARegExecRollBack(xmlRegExecCtxtPtr exec) {
 }
 
 /************************************************************************
- *                                                                     *
+ *                                                                     *
  *     Verifier, running an input against a compiled regexp            *
- *                                                                     *
+ *                                                                     *
  ************************************************************************/
 
 static int
@@ -3202,7 +3207,7 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) {
         memset(exec->counts, 0, comp->nbCounters * sizeof(int));
     } else
        exec->counts = NULL;
-    while ((exec->status == 0) &&
+    while ((exec->status == 0) && (exec->state != NULL) &&
           ((exec->inputString[exec->index] != 0) ||
            ((exec->state != NULL) &&
             (exec->state->type != XML_REGEXP_FINAL_STATE)))) {
@@ -3456,6 +3461,8 @@ error:
        }
        xmlFree(exec->rollbacks);
     }
+    if (exec->state == NULL)
+        return(-1);
     if (exec->counts != NULL)
        xmlFree(exec->counts);
     if (exec->status == 0)
@@ -3469,9 +3476,9 @@ error:
 }
 
 /************************************************************************
- *                                                                     *
+ *                                                                     *
  *     Progressive interface to the verifier one atom at a time        *
- *                                                                     *
+ *                                                                     *
  ************************************************************************/
 #ifdef DEBUG_ERR
 static void testerr(xmlRegExecCtxtPtr exec);
@@ -3588,7 +3595,7 @@ xmlFARegExecSaveInputString(xmlRegExecCtxtPtr exec, const xmlChar *value,
 #endif
     if (exec->inputStackMax == 0) {
        exec->inputStackMax = 4;
-       exec->inputStack = (xmlRegInputTokenPtr) 
+       exec->inputStack = (xmlRegInputTokenPtr)
            xmlMalloc(exec->inputStackMax * sizeof(xmlRegInputToken));
        if (exec->inputStack == NULL) {
            xmlRegexpErrMemory(NULL, "pushing input string");
@@ -3617,11 +3624,11 @@ xmlFARegExecSaveInputString(xmlRegExecCtxtPtr exec, const xmlChar *value,
 
 /**
  * xmlRegStrEqualWildcard:
- * @expStr:  the string to be evaluated 
+ * @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 
+ * 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
@@ -3687,7 +3694,7 @@ xmlRegCompactPushString(xmlRegExecCtxtPtr exec,
 
     if ((comp == NULL) || (comp->compact == NULL) || (comp->stringMap == NULL))
        return(-1);
-    
+
     if (value == NULL) {
        /*
         * are we at a final state ?
@@ -3708,9 +3715,9 @@ xmlRegCompactPushString(xmlRegExecCtxtPtr exec,
     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 */    
+           target--; /* to avoid 0 */
            if (xmlRegStrEqualWildcard(comp->stringMap[i], value)) {
-               exec->index = target;           
+               exec->index = target;
                if ((exec->callback != NULL) && (comp->transdata != NULL)) {
                    exec->callback(exec->data, value,
                          comp->transdata[state * comp->nbstrings + i], data);
@@ -3844,7 +3851,7 @@ xmlRegExecPushStringInternal(xmlRegExecCtxtPtr exec, const xmlChar *value,
                            continue;
                        counter = &exec->comp->counters[t->counter];
                        count = exec->counts[t->counter];
-                       if ((count < counter->max) && 
+                       if ((count < counter->max) &&
                            (t->atom != NULL) &&
                            (xmlStrEqual(value, t->atom->valuep))) {
                            ret = 0;
@@ -4202,7 +4209,7 @@ xmlRegExecGetValues(xmlRegExecCtxtPtr exec, int err,
     int maxval;
     int nb = 0;
 
-    if ((exec == NULL) || (nbval == NULL) || (nbneg == NULL) || 
+    if ((exec == NULL) || (nbval == NULL) || (nbneg == NULL) ||
         (values == NULL) || (*nbval <= 0))
         return(-1);
 
@@ -4308,7 +4315,7 @@ xmlRegExecGetValues(xmlRegExecCtxtPtr exec, int err,
                        values[nb++] = (xmlChar *) atom->valuep;
                    (*nbval)++;
                }
-           } 
+           }
        }
        for (transno = 0;
             (transno < state->nbTrans) && (nb < maxval);
@@ -4335,7 +4342,7 @@ xmlRegExecGetValues(xmlRegExecCtxtPtr exec, int err,
                        values[nb++] = (xmlChar *) atom->valuep;
                    (*nbneg)++;
                }
-           } 
+           }
        }
     }
     return(0);
@@ -4566,10 +4573,10 @@ progress:
 }
 #endif
 /************************************************************************
- *                                                                     *
+ *                                                                     *
  *     Parser for the Schemas Datatype Regular Expressions             *
  *     http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#regexs      *
- *                                                                     *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -4598,7 +4605,7 @@ xmlFAIsChar(xmlRegParserCtxtPtr ctxt) {
  *
  * [27]   charProp   ::=   IsCategory | IsBlock
  * [28]   IsCategory ::= Letters | Marks | Numbers | Punctuation |
- *                       Separators | Symbols | Others 
+ *                       Separators | Symbols | Others
  * [29]   Letters   ::=   'L' [ultmo]?
  * [30]   Marks   ::=   'M' [nce]?
  * [31]   Numbers   ::=   'N' [dlo]?
@@ -4613,7 +4620,7 @@ xmlFAParseCharProp(xmlRegParserCtxtPtr ctxt) {
     int cur;
     xmlRegAtomType type = (xmlRegAtomType) 0;
     xmlChar *blockName = NULL;
-    
+
     cur = CUR;
     if (cur == 'L') {
        NEXT;
@@ -4785,15 +4792,15 @@ xmlFAParseCharProp(xmlRegParserCtxtPtr ctxt) {
        NEXT;
        start = ctxt->cur;
        cur = CUR;
-       if (((cur >= 'a') && (cur <= 'z')) || 
-           ((cur >= 'A') && (cur <= 'Z')) || 
-           ((cur >= '0') && (cur <= '9')) || 
+       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')) || 
+           while (((cur >= 'a') && (cur <= 'z')) ||
+               ((cur >= 'A') && (cur <= 'Z')) ||
+               ((cur >= '0') && (cur <= '9')) ||
                (cur == 0x2D)) {
                NEXT;
                cur = CUR;
@@ -4819,7 +4826,7 @@ xmlFAParseCharProp(xmlRegParserCtxtPtr ctxt) {
  * xmlFAParseCharClassEsc:
  * @ctxt:  a regexp parser context
  *
- * [23] charClassEsc ::= ( SingleCharEsc | MultiCharEsc | catEsc | complEsc ) 
+ * [23] charClassEsc ::= ( SingleCharEsc | MultiCharEsc | catEsc | complEsc )
  * [24] SingleCharEsc ::= '\' [nrt\|.?*+(){}#x2D#x5B#x5D#x5E]
  * [25] catEsc   ::=   '\p{' charProp '}'
  * [26] complEsc ::=   '\P{' charProp '}'
@@ -4916,34 +4923,34 @@ xmlFAParseCharClassEsc(xmlRegParserCtxtPtr ctxt) {
        xmlRegAtomType type = XML_REGEXP_ANYSPACE;
 
        switch (cur) {
-           case 's': 
+           case 's':
                type = XML_REGEXP_ANYSPACE;
                break;
-           case 'S': 
+           case 'S':
                type = XML_REGEXP_NOTSPACE;
                break;
-           case 'i': 
+           case 'i':
                type = XML_REGEXP_INITNAME;
                break;
-           case 'I': 
+           case 'I':
                type = XML_REGEXP_NOTINITNAME;
                break;
-           case 'c': 
+           case 'c':
                type = XML_REGEXP_NAMECHAR;
                break;
-           case 'C': 
+           case 'C':
                type = XML_REGEXP_NOTNAMECHAR;
                break;
-           case 'd': 
+           case 'd':
                type = XML_REGEXP_DECIMAL;
                break;
-           case 'D': 
+           case 'D':
                type = XML_REGEXP_NOTDECIMAL;
                break;
-           case 'w': 
+           case 'w':
                type = XML_REGEXP_REALCHAR;
                break;
-           case 'W': 
+           case 'W':
                type = XML_REGEXP_NOTREALCHAR;
                break;
        }
@@ -4963,7 +4970,7 @@ xmlFAParseCharClassEsc(xmlRegParserCtxtPtr ctxt) {
  * xmlFAParseCharRange:
  * @ctxt:  a regexp parser context
  *
- * [17]   charRange   ::=     seRange | XmlCharRef | XmlCharIncDash 
+ * [17]   charRange   ::=     seRange | XmlCharRef | XmlCharIncDash
  * [18]   seRange   ::=   charOrEsc '-' charOrEsc
  * [20]   charOrEsc   ::=   XmlChar | SingleCharEsc
  * [21]   XmlChar   ::=   [^\#x2D#x5B#x5D]
@@ -5078,7 +5085,7 @@ xmlFAParsePosCharGroup(xmlRegParserCtxtPtr ctxt) {
  *
  * [13]   charGroup    ::= posCharGroup | negCharGroup | charClassSub
  * [15]   negCharGroup ::= '^' posCharGroup
- * [16]   charClassSub ::= ( posCharGroup | negCharGroup ) '-' charClassExpr  
+ * [16]   charClassSub ::= ( posCharGroup | negCharGroup ) '-' charClassExpr
  * [12]   charClassExpr ::= '[' charGroup ']'
  */
 static void
@@ -5326,7 +5333,7 @@ xmlFAParseBranch(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr to) {
     previous = ctxt->state;
     ret = xmlFAParsePiece(ctxt);
     if (ret != 0) {
-       if (xmlFAGenerateTransitions(ctxt, previous, 
+       if (xmlFAGenerateTransitions(ctxt, previous,
                (CUR=='|' || CUR==')') ? to : NULL, ctxt->atom) < 0)
            return(-1);
        previous = ctxt->state;
@@ -5335,7 +5342,7 @@ xmlFAParseBranch(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr to) {
     while ((ret != 0) && (ctxt->error == 0)) {
        ret = xmlFAParsePiece(ctxt);
        if (ret != 0) {
-           if (xmlFAGenerateTransitions(ctxt, previous, 
+           if (xmlFAGenerateTransitions(ctxt, previous,
                    (CUR=='|' || CUR==')') ? to : NULL, ctxt->atom) < 0)
                    return(-1);
            previous = ctxt->state;
@@ -5373,6 +5380,10 @@ xmlFAParseRegExp(xmlRegParserCtxtPtr ctxt, int top) {
     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);
@@ -5384,9 +5395,9 @@ xmlFAParseRegExp(xmlRegParserCtxtPtr ctxt, int top) {
 }
 
 /************************************************************************
- *                                                                     *
- *                     The basic API                                   *
- *                                                                     *
+ *                                                                     *
+ *                     The basic API                                   *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -5573,9 +5584,9 @@ xmlRegFreeRegexp(xmlRegexpPtr regexp) {
 
 #ifdef LIBXML_AUTOMATA_ENABLED
 /************************************************************************
- *                                                                     *
- *                     The Automata interface                          *
- *                                                                     *
+ *                                                                     *
+ *                     The Automata interface                          *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -5846,7 +5857,7 @@ xmlAutomataNewNegTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
  *
  * 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 
+ * 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
@@ -6000,8 +6011,8 @@ xmlAutomataNewCountTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
  *
  * 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 
+ * 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
@@ -6043,7 +6054,7 @@ xmlAutomataNewOnceTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from,
        str[lenn + lenp + 1] = 0;
 
        atom->valuep = str;
-    }    
+    }
     atom->data = data;
     atom->quant = XML_REGEXP_QUANT_ONCEONLY;
     atom->min = min;
@@ -6066,7 +6077,7 @@ xmlAutomataNewOnceTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from,
     return(to);
 }
 
-    
+
 
 /**
  * xmlAutomataNewOnceTrans:
@@ -6135,7 +6146,7 @@ xmlAutomataNewOnceTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
  */
 xmlAutomataStatePtr
 xmlAutomataNewState(xmlAutomataPtr am) {
-    xmlAutomataStatePtr to; 
+    xmlAutomataStatePtr to;
 
     if (am == NULL)
        return(NULL);
@@ -6202,7 +6213,7 @@ xmlAutomataNewAllTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
  *
  * Returns the counter number or -1 in case of error
  */
-int            
+int
 xmlAutomataNewCounter(xmlAutomataPtr am, int min, int max) {
     int ret;
 
@@ -6274,7 +6285,7 @@ xmlAutomataNewCounterTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
  *
  * Returns the compiled regexp or NULL in case of error
  */
-xmlRegexpPtr          
+xmlRegexpPtr
 xmlAutomataCompile(xmlAutomataPtr am) {
     xmlRegexpPtr ret;
 
@@ -6294,7 +6305,7 @@ xmlAutomataCompile(xmlAutomataPtr am) {
  *
  * Returns 1 if true, 0 if not, and -1 in case of error
  */
-int          
+int
 xmlAutomataIsDeterminist(xmlAutomataPtr am) {
     int ret;
 
@@ -6347,7 +6358,7 @@ xmlExpNewCtxt(int maxNodes, xmlDictPtr dict) {
 
     if (maxNodes <= 4096)
         maxNodes = 4096;
-    
+
     ret = (xmlExpCtxtPtr) xmlMalloc(sizeof(xmlExpCtxt));
     if (ret == NULL)
         return(NULL);
@@ -6401,7 +6412,7 @@ xmlExpFreeCtxt(xmlExpCtxtPtr ctxt) {
 /* #define DEBUG_DERIV */
 
 /*
- * TODO: 
+ * TODO:
  * - Wildcards
  * - public API for creation
  *
@@ -6469,7 +6480,7 @@ static unsigned short
 xmlExpHashNameComputeKey(const xmlChar *name) {
     unsigned short value = 0L;
     char ch;
-    
+
     if (name != NULL) {
        value += 30 * (*name);
        while ((ch = *name++) != 0) {
@@ -6488,7 +6499,7 @@ xmlExpHashComputeKey(xmlExpNodeType type, xmlExpNodePtr left,
                      xmlExpNodePtr right) {
     unsigned long value;
     unsigned short ret;
-    
+
     switch (type) {
         case XML_EXP_SEQ:
            value = left->key;
@@ -6629,7 +6640,7 @@ xmlExpHashGetEntry(xmlExpCtxtPtr ctxt, xmlExpNodeType type,
            left->exp_left->ref++;
            tmp = xmlExpHashGetEntry(ctxt, XML_EXP_OR, left->exp_left, tmp,
                                     NULL, 0, 0);
-       
+
            xmlExpFree(ctxt, left);
            return(tmp);
        }
@@ -6686,7 +6697,7 @@ xmlExpHashGetEntry(xmlExpCtxtPtr ctxt, xmlExpNodeType type,
            return(right);
        }
        kbase = xmlExpHashComputeKey(type, left, right);
-    } else 
+    } else
         return(NULL);
 
     key = kbase % ctxt->size;
@@ -6827,7 +6838,7 @@ xmlExpRef(xmlExpNodePtr exp) {
  * xmlExpNewAtom:
  * @ctxt: the expression context
  * @name: the atom name
- * @len: the atom name lenght in byte (or -1);
+ * @len: the atom name length in byte (or -1);
  *
  * Get the atom associated to this name from that context
  *
@@ -6927,7 +6938,7 @@ xmlExpNewRange(xmlExpCtxtPtr ctxt, xmlExpNodePtr subset, int min, int max) {
  ************************************************************************/
 
 static int
-xmlExpGetLanguageInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, 
+xmlExpGetLanguageInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
                      const xmlChar**list, int len, int nb) {
     int tmp, tmp2;
 tail:
@@ -6964,7 +6975,7 @@ tail:
  * @ctxt: the expression context
  * @exp: the expression
  * @langList: where to store the tokens
- * @len: the allocated lenght of @list
+ * @len: the allocated length of @list
  *
  * Find all the strings used in @exp and store them in @list
  *
@@ -6972,7 +6983,7 @@ tail:
  *         -2 if there is more than @len strings
  */
 int
-xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, 
+xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
                   const xmlChar**langList, int len) {
     if ((ctxt == NULL) || (exp == NULL) || (langList == NULL) || (len <= 0))
         return(-1);
@@ -6980,7 +6991,7 @@ xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
 }
 
 static int
-xmlExpGetStartInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, 
+xmlExpGetStartInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
                   const xmlChar**list, int len, int nb) {
     int tmp, tmp2;
 tail:
@@ -7030,7 +7041,7 @@ tail:
  * @ctxt: the expression context
  * @exp: the expression
  * @tokList: where to store the tokens
- * @len: the allocated lenght of @list
+ * @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
@@ -7040,7 +7051,7 @@ tail:
  *         -2 if there is more than @len strings
  */
 int
-xmlExpGetStart(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, 
+xmlExpGetStart(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
                const xmlChar**tokList, int len) {
     if ((ctxt == NULL) || (exp == NULL) || (tokList == NULL) || (len <= 0))
         return(-1);
@@ -7737,7 +7748,7 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
     xmlFree((xmlChar **) tab);
     return(ret);
 }
-    
+
 /**
  * xmlExpExpDerive:
  * @ctxt: the expressions context
@@ -7789,7 +7800,7 @@ xmlExpExpDerive(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
 int
 xmlExpSubsume(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
     xmlExpNodePtr tmp;
-    
+
     if ((exp == NULL) || (ctxt == NULL) || (sub == NULL))
         return(-1);
 
@@ -7833,7 +7844,7 @@ xmlExpSubsume(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
 
 /************************************************************************
  *                                                                     *
- *                     Parsing expression                              *
+ *                     Parsing expression                              *
  *                                                                     *
  ************************************************************************/
 
@@ -7937,7 +7948,7 @@ parse_quantifier:
        ret = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT, ret, NULL, NULL,
                                 0, -1);
        SKIP_BLANKS
-    } 
+    }
     return(ret);
 }
 
@@ -8059,7 +8070,7 @@ xmlExpDumpInt(xmlBufferPtr buf, xmlExpNodePtr expr, int glob) {
             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);
index 23c3bcc..774404b 100644 (file)
--- a/xmlsave.c
+++ b/xmlsave.c
 
 #include <libxml/HTMLtree.h>
 
+#include "buf.h"
+#include "enc.h"
+#include "save.h"
+
 /************************************************************************
  *                                                                     *
  *                     XHTML detection                                 *
@@ -66,7 +70,7 @@ xmlIsXHTML(const xmlChar *systemID, const xmlChar *publicID) {
 
 #ifdef LIBXML_OUTPUT_ENABLED
 
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
@@ -92,7 +96,7 @@ struct _xmlSaveCtxt {
 
 /************************************************************************
  *                                                                     *
- *                     Output error handlers                           *
+ *                     Output error handlers                           *
  *                                                                     *
  ************************************************************************/
 /**
@@ -210,9 +214,9 @@ xmlEscapeEntities(unsigned char* out, int *outlen,
     int val;
 
     inend = in + (*inlen);
-    
+
     while ((in < inend) && (out < outend)) {
-       if (*in == '<') {
+       if (*in == '<') {
            if (outend - out < 4) break;
            *out++ = '&';
            *out++ = 'l';
@@ -416,7 +420,7 @@ xmlNewSaveCtxt(const char *encoding, int options)
 
 /************************************************************************
  *                                                                     *
- *             Dumping XML tree content to a simple buffer             *
+ *             Dumping XML tree content to a simple buffer             *
  *                                                                     *
  ************************************************************************/
 /**
@@ -436,14 +440,14 @@ xmlAttrSerializeContent(xmlOutputBufferPtr buf, xmlAttrPtr attr)
     while (children != NULL) {
         switch (children->type) {
             case XML_TEXT_NODE:
-               xmlAttrSerializeTxtContent(buf->buffer, attr->doc,
-                                          attr, children->content);
+               xmlBufAttrSerializeTxtContent(buf->buffer, attr->doc,
+                                             attr, children->content);
                break;
             case XML_ENTITY_REF_NODE:
-                xmlBufferAdd(buf->buffer, BAD_CAST "&", 1);
-                xmlBufferAdd(buf->buffer, children->name,
+                xmlBufAdd(buf->buffer, BAD_CAST "&", 1);
+                xmlBufAdd(buf->buffer, children->name,
                              xmlStrlen(children->name));
-                xmlBufferAdd(buf->buffer, BAD_CAST ";", 1);
+                xmlBufAdd(buf->buffer, BAD_CAST ";", 1);
                 break;
             default:
                 /* should not happen unless we have a badly built tree */
@@ -453,9 +457,99 @@ xmlAttrSerializeContent(xmlOutputBufferPtr buf, xmlAttrPtr attr)
     }
 }
 
+/**
+ * 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        *
+ *             Dumping XML tree content to an I/O output buffer        *
  *                                                                     *
  ************************************************************************/
 
@@ -469,7 +563,7 @@ static int xmlSaveSwitchEncoding(xmlSaveCtxtPtr ctxt, const char *encoding) {
                       (const char *)encoding);
            return(-1);
        }
-       buf->conv = xmlBufferCreate();
+       buf->conv = xmlBufCreate();
        if (buf->conv == NULL) {
            xmlCharEncCloseFunc(buf->encoder);
            xmlSaveErrMemory("creating encoding buffer");
@@ -478,7 +572,7 @@ static int xmlSaveSwitchEncoding(xmlSaveCtxtPtr ctxt, const char *encoding) {
        /*
         * initialize the state, e.g. if outputting a BOM
         */
-       xmlCharEncOutFunc(buf->encoder, buf->conv, NULL);
+        xmlCharEncOutput(buf, 1);
     }
     return(0);
 }
@@ -487,7 +581,7 @@ static int xmlSaveClearEncoding(xmlSaveCtxtPtr ctxt) {
     xmlOutputBufferPtr buf = ctxt->buf;
     xmlOutputBufferFlush(buf);
     xmlCharEncCloseFunc(buf->encoder);
-    xmlBufferFree(buf->conv);
+    xmlBufFree(buf->conv);
     buf->encoder = NULL;
     buf->conv = NULL;
     return(0);
@@ -553,7 +647,7 @@ xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur, xmlSaveCtxtPtr ctxt) {
        } else
            xmlOutputBufferWrite(buf, 5, "xmlns");
        xmlOutputBufferWrite(buf, 1, "=");
-       xmlBufferWriteQuotedString(buf->buffer, cur->href);
+       xmlBufWriteQuotedString(buf->buffer, cur->href);
     }
 }
 
@@ -606,7 +700,7 @@ xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) {
  * xmlDtdDumpOutput:
  * @buf:  the XML buffer output
  * @dtd:  the pointer to the DTD
- * 
+ *
  * Dump the XML document DTD, if any.
  */
 static void
@@ -623,12 +717,12 @@ xmlDtdDumpOutput(xmlSaveCtxtPtr ctxt, xmlDtdPtr dtd) {
     xmlOutputBufferWriteString(buf, (const char *)dtd->name);
     if (dtd->ExternalID != NULL) {
        xmlOutputBufferWrite(buf, 8, " PUBLIC ");
-       xmlBufferWriteQuotedString(buf->buffer, dtd->ExternalID);
+       xmlBufWriteQuotedString(buf->buffer, dtd->ExternalID);
        xmlOutputBufferWrite(buf, 1, " ");
-       xmlBufferWriteQuotedString(buf->buffer, dtd->SystemID);
+       xmlBufWriteQuotedString(buf->buffer, dtd->SystemID);
     }  else if (dtd->SystemID != NULL) {
        xmlOutputBufferWrite(buf, 8, " SYSTEM ");
-       xmlBufferWriteQuotedString(buf->buffer, dtd->SystemID);
+       xmlBufWriteQuotedString(buf->buffer, dtd->SystemID);
     }
     if ((dtd->entities == NULL) && (dtd->elements == NULL) &&
         (dtd->attributes == NULL) && (dtd->notations == NULL) &&
@@ -643,7 +737,8 @@ xmlDtdDumpOutput(xmlSaveCtxtPtr ctxt, xmlDtdPtr dtd) {
      */
     if ((dtd->notations != NULL) && ((dtd->doc == NULL) ||
         (dtd->doc->intSubset == dtd))) {
-        xmlDumpNotationTable(buf->buffer, (xmlNotationTablePtr) dtd->notations);
+        xmlBufDumpNotationTable(buf->buffer,
+                                (xmlNotationTablePtr) dtd->notations);
     }
     format = ctxt->format;
     level = ctxt->level;
@@ -724,7 +819,7 @@ xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
             (cur->type == XML_COMMENT_NODE) ||
             (cur->type == XML_PI_NODE)))
            xmlOutputBufferWrite(buf, ctxt->indent_size *
-                                (ctxt->level > ctxt->indent_nr ? 
+                                (ctxt->level > ctxt->indent_nr ?
                                  ctxt->indent_nr : ctxt->level),
                                 ctxt->indent);
         xmlNodeDumpOutputInternal(ctxt, cur);
@@ -841,15 +936,15 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
        return;
     }
     if (cur->type == XML_ELEMENT_DECL) {
-        xmlDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
+        xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
        return;
     }
     if (cur->type == XML_ATTRIBUTE_DECL) {
-        xmlDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur);
+        xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur);
        return;
     }
     if (cur->type == XML_ENTITY_DECL) {
-        xmlDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur);
+        xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur);
        return;
     }
     if (cur->type == XML_TEXT_NODE) {
@@ -980,7 +1075,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
        if (ctxt->level > 0) ctxt->level--;
        if ((xmlIndentTreeOutput) && (ctxt->format == 1))
            xmlOutputBufferWrite(buf, ctxt->indent_size *
-                                (ctxt->level > ctxt->indent_nr ? 
+                                (ctxt->level > ctxt->indent_nr ?
                                  ctxt->indent_nr : ctxt->level),
                                 ctxt->indent);
     }
@@ -1096,13 +1191,13 @@ xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) {
         */
        if ((ctxt->options & XML_SAVE_NO_DECL) == 0) {
            xmlOutputBufferWrite(buf, 14, "<?xml version=");
-           if (cur->version != NULL) 
-               xmlBufferWriteQuotedString(buf->buffer, cur->version);
+           if (cur->version != NULL)
+               xmlBufWriteQuotedString(buf->buffer, cur->version);
            else
                xmlOutputBufferWrite(buf, 5, "\"1.0\"");
            if (encoding != NULL) {
                xmlOutputBufferWrite(buf, 10, " encoding=");
-               xmlBufferWriteQuotedString(buf->buffer, (xmlChar *) encoding);
+               xmlBufWriteQuotedString(buf->buffer, (xmlChar *) encoding);
            }
            switch (cur->standalone) {
                case 0:
@@ -1260,7 +1355,7 @@ xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
        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) && 
+       else if ((cur->ns == NULL) &&
                 ((cur->children == NULL) ||
                  (cur->children->content == NULL) ||
                  (cur->children->content[0] == 0)) &&
@@ -1300,7 +1395,7 @@ xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
        xmlOutputBufferWrite(buf, 11, " xml:lang=\"");
        xmlAttrSerializeContent(buf, lang);
        xmlOutputBufferWrite(buf, 1, "\"");
-    } else 
+    } else
     if ((xml_lang != NULL) && (lang == NULL)) {
        xmlOutputBufferWrite(buf, 7, " lang=\"");
        xmlAttrSerializeContent(buf, xml_lang);
@@ -1331,7 +1426,7 @@ xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
        if ((ctxt->format == 1) && (xmlIndentTreeOutput) &&
            (cur->type == XML_ELEMENT_NODE))
            xmlOutputBufferWrite(buf, ctxt->indent_size *
-                                (ctxt->level > ctxt->indent_nr ? 
+                                (ctxt->level > ctxt->indent_nr ?
                                  ctxt->indent_nr : ctxt->level),
                                 ctxt->indent);
         xhtmlNodeDumpOutput(ctxt, cur);
@@ -1370,6 +1465,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
        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;
@@ -1380,15 +1479,15 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
     }
     buf = ctxt->buf;
     if (cur->type == XML_ELEMENT_DECL) {
-        xmlDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
+        xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
        return;
     }
     if (cur->type == XML_ATTRIBUTE_DECL) {
-        xmlDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur);
+        xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur);
        return;
     }
     if (cur->type == XML_ENTITY_DECL) {
-        xmlDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur);
+        xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur);
        return;
     }
     if (cur->type == XML_TEXT_NODE) {
@@ -1468,7 +1567,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
     if (format == 1) {
        tmp = cur->children;
        while (tmp != NULL) {
-           if ((tmp->type == XML_TEXT_NODE) || 
+           if ((tmp->type == XML_TEXT_NODE) ||
                (tmp->type == XML_ENTITY_REF_NODE)) {
                format = 0;
                break;
@@ -1496,10 +1595,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
     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") && 
+       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;
@@ -1536,7 +1635,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
                                xmlOutputBufferWrite(buf, 1, "\n");
                                if (xmlIndentTreeOutput)
                                        xmlOutputBufferWrite(buf, ctxt->indent_size *
-                                       (ctxt->level + 1 > ctxt->indent_nr ? 
+                                       (ctxt->level + 1 > ctxt->indent_nr ?
                                        ctxt->indent_nr : ctxt->level + 1), ctxt->indent);
                        }
                        xmlOutputBufferWriteString(buf,
@@ -1571,7 +1670,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
                        xmlOutputBufferWrite(buf, 1, "\n");
                        if (xmlIndentTreeOutput)
                                xmlOutputBufferWrite(buf, ctxt->indent_size *
-                               (ctxt->level + 1 > ctxt->indent_nr ? 
+                               (ctxt->level + 1 > ctxt->indent_nr ?
                                ctxt->indent_nr : ctxt->level + 1), ctxt->indent);
                }
                xmlOutputBufferWriteString(buf,
@@ -1661,7 +1760,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
 
     if (cur->children != NULL) {
        int indent = ctxt->format;
-       
+
        if (format == 1) xmlOutputBufferWrite(buf, 1, "\n");
        if (ctxt->level >= 0) ctxt->level++;
        ctxt->format = format;
@@ -1670,7 +1769,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
        ctxt->format = indent;
        if ((xmlIndentTreeOutput) && (format == 1))
            xmlOutputBufferWrite(buf, ctxt->indent_size *
-                                (ctxt->level > ctxt->indent_nr ? 
+                                (ctxt->level > ctxt->indent_nr ?
                                  ctxt->indent_nr : ctxt->level),
                                 ctxt->indent);
     }
@@ -1936,18 +2035,19 @@ xmlSaveSetAttrEscape(xmlSaveCtxtPtr ctxt, xmlCharEncodingOutputFunc escape)
  *             Public entry points based on buffers                    *
  *                                                                     *
  ************************************************************************/
+
 /**
- * xmlAttrSerializeTxtContent:
- * @buf:  the XML buffer output
+ * xmlBufAttrSerializeTxtContent:
+ * @buf:  and xmlBufPtr output
  * @doc:  the document
  * @attr: the attribute node
  * @string: the text content
  *
- * Serialize text attribute values to an xml simple buffer
+ * Serialize text attribute values to an xmlBufPtr
  */
 void
-xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
-                           xmlAttrPtr attr, const xmlChar * string)
+xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
+                              xmlAttrPtr attr, const xmlChar * string)
 {
     xmlChar *base, *cur;
 
@@ -1957,44 +2057,44 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
     while (*cur != 0) {
         if (*cur == '\n') {
             if (base != cur)
-                xmlBufferAdd(buf, base, cur - base);
-            xmlBufferAdd(buf, BAD_CAST "&#10;", 5);
+                xmlBufAdd(buf, base, cur - base);
+            xmlBufAdd(buf, BAD_CAST "&#10;", 5);
             cur++;
             base = cur;
         } else if (*cur == '\r') {
             if (base != cur)
-                xmlBufferAdd(buf, base, cur - base);
-            xmlBufferAdd(buf, BAD_CAST "&#13;", 5);
+                xmlBufAdd(buf, base, cur - base);
+            xmlBufAdd(buf, BAD_CAST "&#13;", 5);
             cur++;
             base = cur;
         } else if (*cur == '\t') {
             if (base != cur)
-                xmlBufferAdd(buf, base, cur - base);
-            xmlBufferAdd(buf, BAD_CAST "&#9;", 4);
+                xmlBufAdd(buf, base, cur - base);
+            xmlBufAdd(buf, BAD_CAST "&#9;", 4);
             cur++;
             base = cur;
         } else if (*cur == '"') {
             if (base != cur)
-                xmlBufferAdd(buf, base, cur - base);
-            xmlBufferAdd(buf, BAD_CAST "&quot;", 6);
+                xmlBufAdd(buf, base, cur - base);
+            xmlBufAdd(buf, BAD_CAST "&quot;", 6);
             cur++;
             base = cur;
         } else if (*cur == '<') {
             if (base != cur)
-                xmlBufferAdd(buf, base, cur - base);
-            xmlBufferAdd(buf, BAD_CAST "&lt;", 4);
+                xmlBufAdd(buf, base, cur - base);
+            xmlBufAdd(buf, BAD_CAST "&lt;", 4);
             cur++;
             base = cur;
         } else if (*cur == '>') {
             if (base != cur)
-                xmlBufferAdd(buf, base, cur - base);
-            xmlBufferAdd(buf, BAD_CAST "&gt;", 4);
+                xmlBufAdd(buf, base, cur - base);
+            xmlBufAdd(buf, BAD_CAST "&gt;", 4);
             cur++;
             base = cur;
         } else if (*cur == '&') {
             if (base != cur)
-                xmlBufferAdd(buf, base, cur - base);
-            xmlBufferAdd(buf, BAD_CAST "&amp;", 5);
+                xmlBufAdd(buf, base, cur - base);
+            xmlBufAdd(buf, BAD_CAST "&amp;", 5);
             cur++;
             base = cur;
         } else if ((*cur >= 0x80) && ((doc == NULL) ||
@@ -2006,13 +2106,13 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
             int val = 0, l = 1;
 
             if (base != cur)
-                xmlBufferAdd(buf, base, cur - base);
+                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);
-                xmlBufferAdd(buf, (xmlChar *) tmp, -1);
+                xmlBufAdd(buf, (xmlChar *) tmp, -1);
                 cur++;
                 base = cur;
                 continue;
@@ -2042,9 +2142,9 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
                 xmlSaveErr(XML_SAVE_CHAR_INVALID, (xmlNodePtr) attr, NULL);
                 if (doc != NULL)
                     doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
-               
+
                xmlSerializeHexCharRef(tmp, *cur);
-                xmlBufferAdd(buf, (xmlChar *) tmp, -1);
+                xmlBufAdd(buf, (xmlChar *) tmp, -1);
                 cur++;
                 base = cur;
                 continue;
@@ -2054,7 +2154,7 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
              * as a char ref
              */
            xmlSerializeHexCharRef(tmp, val);
-            xmlBufferAdd(buf, (xmlChar *) tmp, -1);
+            xmlBufAdd(buf, (xmlChar *) tmp, -1);
             cur += l;
             base = cur;
         } else {
@@ -2062,7 +2162,31 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
         }
     }
     if (base != cur)
-        xmlBufferAdd(buf, base, cur - base);
+        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);
 }
 
 /**
@@ -2076,6 +2200,8 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
  * 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
  */
@@ -2083,9 +2209,45 @@ int
 xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
             int format)
 {
-    unsigned int use;
+    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();
 
@@ -2116,10 +2278,13 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
     outbuf->context = NULL;
     outbuf->written = 0;
 
-    use = buf->use;
+    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 = buf->use - use;
+    ret = xmlBufUse(buf) - use;
     return (ret);
 }
 
@@ -2299,11 +2464,11 @@ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
     xmlDocContentDumpOutput(&ctxt, out_doc);
     xmlOutputBufferFlush(out_buff);
     if (out_buff->conv != NULL) {
-       *doc_txt_len = out_buff->conv->use;
-       *doc_txt_ptr = xmlStrndup(out_buff->conv->content, *doc_txt_len);
+       *doc_txt_len = xmlBufUse(out_buff->conv);
+       *doc_txt_ptr = xmlStrndup(xmlBufContent(out_buff->conv), *doc_txt_len);
     } else {
-       *doc_txt_len = out_buff->buffer->use;
-       *doc_txt_ptr = xmlStrndup(out_buff->buffer->content, *doc_txt_len);
+       *doc_txt_len = xmlBufUse(out_buff->buffer);
+       *doc_txt_ptr = xmlStrndup(xmlBufContent(out_buff->buffer),*doc_txt_len);
     }
     (void)xmlOutputBufferClose(out_buff);
 
@@ -2547,7 +2712,7 @@ xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
 #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);
index 2fb2151..121533f 100644 (file)
 #endif
 
 #define UNBOUNDED (1 << 30)
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
@@ -975,6 +975,7 @@ struct _xmlSchemaValidCtxt {
     xmlSAXHandlerPtr sax;
     xmlParserCtxtPtr parserCtxt;
     void *user_data; /* TODO: What is this for? */
+    char *filename;
 
     int err;
     int nberrors;
@@ -1028,6 +1029,10 @@ struct _xmlSchemaValidCtxt {
     int hasKeyrefs;
     int createIDCNodeTables;
     int psviExposeIDCNodeTables;
+
+    /* Locator for error reporting in streaming mode */
+    xmlSchemaValidityLocatorFunc locFunc;
+    void *locCtxt;
 };
 
 /**
@@ -1043,9 +1048,9 @@ struct _xmlSchemaSubstGroup {
 };
 
 /************************************************************************
- *                                                                     *
- *                     Some predeclarations                            *
- *                                                                     *
+ *                                                                     *
+ *                     Some predeclarations                            *
+ *                                                                     *
  ************************************************************************/
 
 static int xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt,
@@ -1098,7 +1103,7 @@ xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
 
 /************************************************************************
  *                                                                     *
- *                     Helper functions                                *
+ *                     Helper functions                                *
  *                                                                     *
  ************************************************************************/
 
@@ -1836,7 +1841,7 @@ xmlSchemaFormatFacetEnumSet(xmlSchemaAbstractCtxtPtr actxt,
 
 /************************************************************************
  *                                                                     *
- *                     Error functions                                 *
+ *                     Error functions                                 *
  *                                                                     *
  ************************************************************************/
 
@@ -1974,7 +1979,7 @@ xmlSchemaPErrExt(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error,
 
 /************************************************************************
  *                                                                     *
- *                     Allround error functions                        *
+ *                     Allround error functions                        *
  *                                                                     *
  ************************************************************************/
 
@@ -2078,6 +2083,20 @@ xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
                    (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,
@@ -3199,25 +3218,25 @@ xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt,
 }
 
 /************************************************************************
- *                                                                     *
- *                     Streamable error functions                      *
- *                                                                     *
+ *                                                                     *
+ *                     Streamable error functions                      *
+ *                                                                     *
  ************************************************************************/
 
 
 
 
 /************************************************************************
- *                                                                     *
- *                     Validation helper functions                     *
- *                                                                     *
+ *                                                                     *
+ *                     Validation helper functions                     *
+ *                                                                     *
  ************************************************************************/
 
 
 /************************************************************************
- *                                                                     *
- *                     Allocation functions                            *
- *                                                                     *
+ *                                                                     *
+ *                     Allocation functions                            *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -4135,9 +4154,9 @@ xmlSchemaFree(xmlSchemaPtr schema)
 }
 
 /************************************************************************
- *                                                                     *
- *                     Debug functions                                 *
- *                                                                     *
+ *                                                                     *
+ *                     Debug functions                                 *
+ *                                                                     *
  ************************************************************************/
 
 #ifdef LIBXML_OUTPUT_ENABLED
@@ -4587,7 +4606,7 @@ xmlSchemaDebugDumpIDCTable(FILE * output,
 
 /************************************************************************
  *                                                                     *
- *                     Utilities                                       *
+ *                     Utilities                                       *
  *                                                                     *
  ************************************************************************/
 
@@ -4692,9 +4711,9 @@ xmlSchemaGetProp(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
 }
 
 /************************************************************************
- *                                                                     *
- *                     Parsing functions                               *
- *                                                                     *
+ *                                                                     *
+ *                     Parsing functions                               *
+ *                                                                     *
  ************************************************************************/
 
 #define WXS_FIND_GLOBAL_ITEM(slot)                     \
@@ -4966,9 +4985,9 @@ xmlSchemaGetNamedComponent(xmlSchemaPtr schema,
 }
 
 /************************************************************************
- *                                                                     *
- *                     Parsing functions                               *
- *                                                                     *
+ *                                                                     *
+ *                     Parsing functions                               *
+ *                                                                     *
  ************************************************************************/
 
 #define IS_BLANK_NODE(n)                                               \
@@ -5743,9 +5762,9 @@ xmlSchemaAddElementSubstitutionMember(xmlSchemaParserCtxtPtr pctxt,
 }
 
 /************************************************************************
- *                                                                     *
+ *                                                                     *
  *             Utilities for parsing                                   *
- *                                                                     *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -5939,7 +5958,7 @@ xmlSchemaPValAttrNodeID(xmlSchemaParserCtxtPtr ctxt, xmlAttrPtr attr)
                xmlFree((xmlChar *) value);
                value = strip;
            }
-           res = xmlAddID(NULL, attr->doc, value, attr);
+           res = xmlAddID(NULL, attr->doc, value, attr);
            if (res == NULL) {
                ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE;
                xmlSchemaPSimpleTypeErr(ctxt,
@@ -6191,9 +6210,9 @@ xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt,
 }
 
 /************************************************************************
- *                                                                     *
+ *                                                                     *
  *             Shema extraction from an Infoset                        *
- *                                                                     *
+ *                                                                     *
  ************************************************************************/
 static xmlSchemaTypePtr xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr
                                                  ctxt, xmlSchemaPtr schema,
@@ -8227,7 +8246,7 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt,
     */
     attr = xmlSchemaGetPropNode(node, "xpath");
     if (attr == NULL) {
-       xmlSchemaPMissingAttrErr(ctxt,
+       xmlSchemaPMissingAttrErr(ctxt,
            XML_SCHEMAP_S4S_ATTR_MISSING,
            NULL, node,
            "name", NULL);
@@ -12353,15 +12372,15 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
 }
 
 /************************************************************************
- *                                                                     *
- *                     Validating using Schemas                        *
- *                                                                     *
+ *                                                                     *
+ *                     Validating using Schemas                        *
+ *                                                                     *
  ************************************************************************/
 
 /************************************************************************
- *                                                                     *
- *                     Reading/Writing Schemas                         *
- *                                                                     *
+ *                                                                     *
+ *                     Reading/Writing Schemas                         *
+ *                                                                     *
  ************************************************************************/
 
 #if 0 /* Will be enabled if it is clear what options are needed. */
@@ -12938,6 +12957,15 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt,
                         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);
@@ -20153,7 +20181,7 @@ xmlSchemaResolveAttrUseReferences(xmlSchemaAttributeUsePtr ause,
            ref->name, ref->targetNamespace);
         if (ause->attrDecl == NULL) {
            xmlSchemaPResCompAttrErr(ctxt,
-               XML_SCHEMAP_SRC_RESOLVE,
+               XML_SCHEMAP_SRC_RESOLVE,
                WXS_BASIC_CAST ause, ause->node,
                "ref", ref->name, ref->targetNamespace,
                XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
@@ -21533,16 +21561,16 @@ xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type)
 }
 
 /************************************************************************
- *                                                                     *
- *                     Simple type validation                          *
- *                                                                     *
+ *                                                                     *
+ *                     Simple type validation                          *
+ *                                                                     *
  ************************************************************************/
 
 
 /************************************************************************
- *                                                                     *
- *                     DOM Validation code                             *
- *                                                                     *
+ *                                                                     *
+ *                     DOM Validation code                             *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -21936,9 +21964,9 @@ xmlSchemaVAddNodeQName(xmlSchemaValidCtxtPtr vctxt,
 }
 
 /************************************************************************
- *                                                                     *
+ *                                                                     *
  *  Validation of identity-constraints (IDC)                            *
- *                                                                     *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -23866,9 +23894,9 @@ xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt)
 }
 
 /************************************************************************
- *                                                                     *
- *                     XML Reader validation code                      *
- *                                                                     *
+ *                                                                     *
+ *                     XML Reader validation code                      *
+ *                                                                     *
  ************************************************************************/
 
 static xmlSchemaAttrInfoPtr
@@ -24988,9 +25016,9 @@ xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt)
         return (vctxt->err);
     }
     if (actualType == NULL) {
-       VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
-           "The type definition is absent");
-       return (XML_SCHEMAV_CVC_TYPE_1);
+       VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
+           "The type definition is absent");
+       return (XML_SCHEMAV_CVC_TYPE_1);
     }
     if (vctxt->nbAttrInfos != 0) {
        int ret;
@@ -25080,9 +25108,9 @@ xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt)
     * 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);
+       VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
+           "The type definition is absent");
+       return (XML_SCHEMAV_CVC_TYPE_1);
     }
     /*
     * Remember the actual type definition.
@@ -26035,6 +26063,20 @@ xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt)
                    "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.
@@ -26072,6 +26114,9 @@ xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt)
 
        }
     }
+
+skip_nilled:
+
     if (inode->typeDef->contentType == XML_SCHEMA_CONTENT_ELEMENTS)
        goto end_elem;
 
@@ -26910,15 +26955,15 @@ 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");
+       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");
+           VERROR(ret, NULL,
+           "The type definition is abstract");
        goto exit;
     }
     /*
@@ -27165,9 +27210,9 @@ internal_error:
 #endif
 
 /************************************************************************
- *                                                                     *
- *                     SAX validation handlers                         *
- *                                                                     *
+ *                                                                     *
+ *                     SAX validation handlers                         *
+ *                                                                     *
  ************************************************************************/
 
 /*
@@ -27418,9 +27463,9 @@ internal_error:
 }
 
 /************************************************************************
- *                                                                     *
- *                     Validation interfaces                           *
- *                                                                     *
+ *                                                                     *
+ *                     Validation interfaces                           *
+ *                                                                     *
  ************************************************************************/
 
 /**
@@ -27450,8 +27495,28 @@ xmlSchemaNewValidCtxt(xmlSchemaPtr schema)
 }
 
 /**
+ * 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:
- * @ctxt: the schema validation context
+ * @vctxt: the schema validation context
  *
  * Free the resources associated to the schema validation context;
  * leaves some fields alive intended for reuse of the context.
@@ -27552,6 +27617,11 @@ xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt)
     * where the user provides the dict?
     */
     vctxt->dict = xmlDictCreate();
+
+    if (vctxt->filename != NULL) {
+        xmlFree(vctxt->filename);
+       vctxt->filename = NULL;
+    }
 }
 
 /**
@@ -27637,6 +27707,8 @@ xmlSchemaFreeValidCtxt(xmlSchemaValidCtxtPtr ctxt)
        xmlSchemaItemListFree(ctxt->nodeQNames);
     if (ctxt->dict != NULL)
        xmlDictFree(ctxt->dict);
+    if (ctxt->filename != NULL)
+       xmlFree(ctxt->filename);
     xmlFree(ctxt);
 }
 
@@ -27791,7 +27863,10 @@ xmlSchemaVDocWalk(xmlSchemaValidCtxtPtr vctxt)
     const xmlChar *nsName;
 
     /* DOC VAL TODO: Move this to the start function. */
-    valRoot = xmlDocGetRootElement(vctxt->doc);
+    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");
@@ -28112,9 +28187,9 @@ xmlSchemaValidateDoc(xmlSchemaValidCtxtPtr ctxt, xmlDocPtr doc)
 
 
 /************************************************************************
- *                                                                     *
- *             Function and data for SAX streaming API                 *
- *                                                                     *
+ *                                                                     *
+ *             Function and data for SAX streaming API                 *
+ *                                                                     *
  ************************************************************************/
 typedef struct _xmlSchemaSplitSAXData xmlSchemaSplitSAXData;
 typedef xmlSchemaSplitSAXData *xmlSchemaSplitSAXDataPtr;
@@ -28631,6 +28706,63 @@ xmlSchemaSAXUnplug(xmlSchemaSAXPlugPtr plug)
 }
 
 /**
+ * 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
@@ -28673,6 +28805,7 @@ xmlSchemaValidateStream(xmlSchemaValidCtxtPtr ctxt,
         xmlCtxtUseOptions(pctxt, options);
 #endif
     pctxt->linenumbers = 1;
+    xmlSchemaValidateSetLocator(ctxt, xmlSchemaValidateStreamLocator, pctxt);
 
     inputStream = xmlNewIOInputStream(pctxt, input, enc);;
     if (inputStream == NULL) {
index 4518499..a9edc03 100644 (file)
@@ -40,7 +40,7 @@ extern double xmlXPathPINF;
 extern double xmlXPathNINF;
 #endif
 
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
@@ -75,7 +75,7 @@ typedef struct _xmlSchemaValDuration xmlSchemaValDuration;
 typedef xmlSchemaValDuration *xmlSchemaValDurationPtr;
 struct _xmlSchemaValDuration {
     long               mon;            /* mon stores years also */
-    long               day;
+    long       day;
     double             sec;            /* sec stores min and hour also */
 };
 
@@ -189,7 +189,7 @@ static xmlSchemaTypePtr xmlSchemaTypeNmtokensDef = NULL;
 
 /************************************************************************
  *                                                                     *
- *                     Datatype error handlers                         *
+ *                     Datatype error handlers                         *
  *                                                                     *
  ************************************************************************/
 /**
@@ -206,7 +206,7 @@ xmlSchemaTypeErrMemory(xmlNodePtr node, const char *extra)
 
 /************************************************************************
  *                                                                     *
- *                     Base types support                              *
+ *                     Base types support                              *
  *                                                                     *
  ************************************************************************/
 
@@ -254,7 +254,7 @@ xmlSchemaNewMinLengthFacet(int value)
  * Initialize one primitive built-in type
  */
 static xmlSchemaTypePtr
-xmlSchemaInitBasicType(const char *name, xmlSchemaValType type, 
+xmlSchemaInitBasicType(const char *name, xmlSchemaValType type,
                       xmlSchemaTypePtr baseType) {
     xmlSchemaTypePtr ret;
 
@@ -267,31 +267,31 @@ xmlSchemaInitBasicType(const char *name, xmlSchemaValType type,
     ret->name = (const xmlChar *)name;
     ret->targetNamespace = XML_SCHEMAS_NAMESPACE_NAME;
     ret->type = XML_SCHEMA_TYPE_BASIC;
-    ret->baseType = baseType;  
+    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:      
+    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:
@@ -309,7 +309,7 @@ xmlSchemaInitBasicType(const char *name, xmlSchemaValType type,
        case XML_SCHEMAS_ENTITIES:
            ret->flags |= XML_SCHEMAS_TYPE_VARIETY_LIST;
            ret->facets = xmlSchemaNewMinLengthFacet(1);
-           ret->flags |= XML_SCHEMAS_TYPE_HAS_FACETS;      
+           ret->flags |= XML_SCHEMAS_TYPE_HAS_FACETS;
            break;
        default:
            ret->flags |= XML_SCHEMAS_TYPE_VARIETY_ATOMIC;
@@ -390,19 +390,19 @@ xmlSchemaInitTypes(void)
         return;
     xmlSchemaTypesBank = xmlHashCreate(40);
 
-    
+
     /*
     * 3.4.7 Built-in Complex Type Definition
     */
     xmlSchemaTypeAnyTypeDef = xmlSchemaInitBasicType("anyType",
-                                                     XML_SCHEMAS_ANYTYPE, 
+                                                     XML_SCHEMAS_ANYTYPE,
                                                     NULL);
     xmlSchemaTypeAnyTypeDef->baseType = xmlSchemaTypeAnyTypeDef;
     xmlSchemaTypeAnyTypeDef->contentType = XML_SCHEMA_CONTENT_MIXED;
     /*
     * Init the content type.
     */
-    xmlSchemaTypeAnyTypeDef->contentType = XML_SCHEMA_CONTENT_MIXED;    
+    xmlSchemaTypeAnyTypeDef->contentType = XML_SCHEMA_CONTENT_MIXED;
     {
        xmlSchemaParticlePtr particle;
        xmlSchemaModelGroupPtr sequence;
@@ -420,7 +420,7 @@ xmlSchemaInitTypes(void)
            return;
        }
        memset(sequence, 0, sizeof(xmlSchemaModelGroup));
-       sequence->type = XML_SCHEMA_TYPE_SEQUENCE;      
+       sequence->type = XML_SCHEMA_TYPE_SEQUENCE;
        particle->children = (xmlSchemaTreeItemPtr) sequence;
        /* Second particle. */
        particle = xmlSchemaAddParticle();
@@ -437,9 +437,9 @@ xmlSchemaInitTypes(void)
        }
        memset(wild, 0, sizeof(xmlSchemaWildcard));
        wild->type = XML_SCHEMA_TYPE_ANY;
-       wild->any = 1;  
-       wild->processContents = XML_SCHEMAS_ANY_LAX;    
-       particle->children = (xmlSchemaTreeItemPtr) wild;    
+       wild->any = 1;
+       wild->processContents = XML_SCHEMAS_ANY_LAX;
+       particle->children = (xmlSchemaTreeItemPtr) wild;
        /*
        * Create the attribute wildcard.
        */
@@ -451,10 +451,10 @@ xmlSchemaInitTypes(void)
        }
        memset(wild, 0, sizeof(xmlSchemaWildcard));
        wild->any = 1;
-       wild->processContents = XML_SCHEMAS_ANY_LAX;    
+       wild->processContents = XML_SCHEMAS_ANY_LAX;
        xmlSchemaTypeAnyTypeDef->attributeWildcard = wild;
     }
-    xmlSchemaTypeAnySimpleTypeDef = xmlSchemaInitBasicType("anySimpleType", 
+    xmlSchemaTypeAnySimpleTypeDef = xmlSchemaInitBasicType("anySimpleType",
                                                            XML_SCHEMAS_ANYSIMPLETYPE,
                                                           xmlSchemaTypeAnyTypeDef);
     /*
@@ -513,7 +513,7 @@ xmlSchemaInitTypes(void)
        xmlSchemaTypeAnySimpleTypeDef);
     xmlSchemaTypeNotationDef = xmlSchemaInitBasicType("NOTATION",
                                                     XML_SCHEMAS_NOTATION,
-                                                   xmlSchemaTypeAnySimpleTypeDef);    
+                                                   xmlSchemaTypeAnySimpleTypeDef);
     xmlSchemaTypeQNameDef = xmlSchemaInitBasicType("QName",
                                                    XML_SCHEMAS_QNAME,
                                                   xmlSchemaTypeAnySimpleTypeDef);
@@ -583,7 +583,7 @@ xmlSchemaInitTypes(void)
                                                    xmlSchemaTypeNCNameDef);
     xmlSchemaTypeIdrefDef = xmlSchemaInitBasicType("IDREF",
                                                    XML_SCHEMAS_IDREF,
-                                                  xmlSchemaTypeNCNameDef);        
+                                                  xmlSchemaTypeNCNameDef);
     xmlSchemaTypeEntityDef = xmlSchemaInitBasicType("ENTITY",
                                                     XML_SCHEMAS_ENTITY,
                                                    xmlSchemaTypeNCNameDef);
@@ -615,7 +615,7 @@ xmlSchemaInitTypes(void)
  *
  * Cleanup the default XML Schemas type library
  */
-void   
+void
 xmlSchemaCleanupTypes(void) {
     if (xmlSchemaTypesInitialized == 0)
        return;
@@ -629,13 +629,13 @@ xmlSchemaCleanupTypes(void) {
        /* Content type. */
        particle = (xmlSchemaParticlePtr) xmlSchemaTypeAnyTypeDef->subtypes;
        /* Wildcard. */
-       xmlSchemaFreeWildcard((xmlSchemaWildcardPtr) 
+       xmlSchemaFreeWildcard((xmlSchemaWildcardPtr)
            particle->children->children->children);
        xmlFree((xmlSchemaParticlePtr) particle->children->children);
        /* Sequence model group. */
        xmlFree((xmlSchemaModelGroupPtr) particle->children);
        xmlFree((xmlSchemaParticlePtr) particle);
-       xmlSchemaTypeAnyTypeDef->subtypes = NULL;       
+       xmlSchemaTypeAnyTypeDef->subtypes = NULL;
     }
     xmlHashFree(xmlSchemaTypesBank, (xmlHashDeallocator) xmlSchemaFreeType);
     xmlSchemaTypesInitialized = 0;
@@ -665,12 +665,12 @@ xmlSchemaIsBuiltInTypeFacet(xmlSchemaTypePtr type, int facetType)
                (facetType == XML_SCHEMA_FACET_WHITESPACE))
                return (1);
            else
-               return (0);     
+               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_ANYURI:
+       case XML_SCHEMAS_BASE64BINARY:
        case XML_SCHEMAS_HEXBINARY:
            if ((facetType == XML_SCHEMA_FACET_LENGTH) ||
                (facetType == XML_SCHEMA_FACET_MINLENGTH) ||
@@ -693,12 +693,12 @@ xmlSchemaIsBuiltInTypeFacet(xmlSchemaTypePtr type, int facetType)
                (facetType == XML_SCHEMA_FACET_MINEXCLUSIVE))
                return (1);
            else
-               return (0); 
+               return (0);
        case XML_SCHEMAS_TIME:
-       case XML_SCHEMAS_GDAY: 
+       case XML_SCHEMAS_GDAY:
        case XML_SCHEMAS_GMONTH:
-       case XML_SCHEMAS_GMONTHDAY: 
-       case XML_SCHEMAS_GYEAR: 
+       case XML_SCHEMAS_GMONTHDAY:
+       case XML_SCHEMAS_GYEAR:
        case XML_SCHEMAS_GYEARMONTH:
        case XML_SCHEMAS_DATE:
        case XML_SCHEMAS_DATETIME:
@@ -714,7 +714,7 @@ xmlSchemaIsBuiltInTypeFacet(xmlSchemaTypePtr type, int facetType)
                (facetType == XML_SCHEMA_FACET_MINEXCLUSIVE))
                return (1);
            else
-               return (0);                                      
+               return (0);
        default:
            break;
     }
@@ -736,7 +736,7 @@ xmlSchemaGetBuiltInType(xmlSchemaValType type)
     if (xmlSchemaTypesInitialized == 0)
        xmlSchemaInitTypes();
     switch (type) {
-       
+
        case XML_SCHEMAS_ANYSIMPLETYPE:
            return (xmlSchemaTypeAnySimpleTypeDef);
        case XML_SCHEMAS_STRING:
@@ -752,7 +752,7 @@ xmlSchemaGetBuiltInType(xmlSchemaValType type)
        case XML_SCHEMAS_GMONTH:
            return (xmlSchemaTypeGMonthDef);
        case XML_SCHEMAS_GMONTHDAY:
-           return (xmlSchemaTypeGMonthDayDef);
+           return (xmlSchemaTypeGMonthDayDef);
        case XML_SCHEMAS_GYEAR:
            return (xmlSchemaTypeGYearDef);
        case XML_SCHEMAS_GYEARMONTH:
@@ -828,7 +828,7 @@ xmlSchemaGetBuiltInType(xmlSchemaValType type)
        case XML_SCHEMAS_BASE64BINARY:
            return (xmlSchemaTypeBase64BinaryDef);
        case XML_SCHEMAS_ANYTYPE:
-           return (xmlSchemaTypeAnyTypeDef);       
+           return (xmlSchemaTypeAnyTypeDef);
        default:
            return (NULL);
     }
@@ -880,7 +880,7 @@ xmlSchemaValueGetNext(xmlSchemaValPtr cur) {
  */
 const xmlChar *
 xmlSchemaValueGetAsString(xmlSchemaValPtr val)
-{    
+{
     if (val == NULL)
        return (NULL);
     switch (val->type) {
@@ -913,7 +913,7 @@ xmlSchemaValueGetAsString(xmlSchemaValPtr val)
  */
 int
 xmlSchemaValueGetAsBoolean(xmlSchemaValPtr val)
-{    
+{
     if ((val == NULL) || (val->type != XML_SCHEMAS_BOOLEAN))
        return (0);
     return (val->value.b);
@@ -924,8 +924,8 @@ xmlSchemaValueGetAsBoolean(xmlSchemaValPtr val)
  * @type:  the value type
  * @value:  the value
  *
- * Allocate a new simple type value. The type can be 
- * of XML_SCHEMAS_STRING. 
+ * 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.
@@ -1007,11 +1007,11 @@ xmlSchemaNewQNameValue(const xmlChar *namespaceName,
  *
  * Cleanup the default XML Schemas type library
  */
-void   
+void
 xmlSchemaFreeValue(xmlSchemaValPtr value) {
     xmlSchemaValPtr prev;
 
-    while (value != NULL) {    
+    while (value != NULL) {
        switch (value->type) {
            case XML_SCHEMAS_STRING:
            case XML_SCHEMAS_NORMSTRING:
@@ -1025,7 +1025,7 @@ xmlSchemaFreeValue(xmlSchemaValPtr value) {
            case XML_SCHEMAS_IDREF:
            case XML_SCHEMAS_IDREFS:
            case XML_SCHEMAS_ENTITY:
-           case XML_SCHEMAS_ENTITIES:        
+           case XML_SCHEMAS_ENTITIES:
            case XML_SCHEMAS_ANYURI:
            case XML_SCHEMAS_ANYSIMPLETYPE:
                if (value->value.str != NULL)
@@ -1052,7 +1052,7 @@ xmlSchemaFreeValue(xmlSchemaValPtr value) {
        prev = value;
        value = value->next;
        xmlFree(prev);
-    }    
+    }
 }
 
 /**
@@ -1088,9 +1088,9 @@ xmlSchemaGetBuiltInListSimpleTypeItemType(xmlSchemaTypePtr type)
     if ((type == NULL) || (type->type != XML_SCHEMA_TYPE_BASIC))
        return (NULL);
     switch (type->builtInType) {
-       case XML_SCHEMAS_NMTOKENS: 
+       case XML_SCHEMAS_NMTOKENS:
            return (xmlSchemaTypeNmtokenDef );
-       case XML_SCHEMAS_IDREFS: 
+       case XML_SCHEMAS_IDREFS:
            return (xmlSchemaTypeIdrefDef);
        case XML_SCHEMAS_ENTITIES:
            return (xmlSchemaTypeEntityDef);
@@ -1342,13 +1342,13 @@ _xmlSchemaParseGDay (xmlSchemaValDatePtr dt, const xmlChar **str) {
  */
 static int
 _xmlSchemaParseTime (xmlSchemaValDatePtr dt, const xmlChar **str) {
-    const xmlChar *cur = *str;    
+    const xmlChar *cur = *str;
     int ret = 0;
     int value = 0;
 
     PARSE_2_DIGITS(value, cur, ret);
     if (ret != 0)
-       return ret;    
+       return ret;
     if (*cur != ':')
        return 1;
     if (!VALID_HOUR(value))
@@ -1614,7 +1614,7 @@ xmlSchemaValidateDates (xmlSchemaValType type,
             const xmlChar *rewnd = cur;
             cur++;
 
-           ret = _xmlSchemaParseGDay(&(dt->value.date), &cur);
+           ret = _xmlSchemaParseGDay(&(dt->value.date), &cur);
             if ((ret == 0) && ((*cur == 0) || (*cur != ':'))) {
 
                 /*
@@ -1852,7 +1852,7 @@ xmlSchemaValidateDuration (xmlSchemaTypePtr type ATTRIBUTE_UNUSED,
         }
        cur++;
        if (collapse)
-           while IS_WSP_BLANK_CH(*cur) cur++;        
+           while IS_WSP_BLANK_CH(*cur) cur++;
     }
 
     if (isneg) {
@@ -1908,13 +1908,13 @@ xmlSchemaStrip(const xmlChar *value) {
  */
 xmlChar *
 xmlSchemaWhiteSpaceReplace(const xmlChar *value) {
-    const xmlChar *cur = value;    
-    xmlChar *ret = NULL, *mcur; 
+    const xmlChar *cur = value;
+    xmlChar *ret = NULL, *mcur;
 
-    if (value == NULL) 
+    if (value == NULL)
        return(NULL);
-    
-    while ((*cur != 0) && 
+
+    while ((*cur != 0) &&
        (((*cur) != 0xd) && ((*cur) != 0x9) && ((*cur) != 0xa))) {
        cur++;
     }
@@ -1927,7 +1927,7 @@ xmlSchemaWhiteSpaceReplace(const xmlChar *value) {
        if ( ((*mcur) == 0xd) || ((*mcur) == 0x9) || ((*mcur) == 0xa) )
            *mcur = ' ';
        mcur++;
-    } while (*mcur != 0);          
+    } while (*mcur != 0);
     return(ret);
 }
 
@@ -2072,7 +2072,7 @@ xmlSchemaParseUInt(const xmlChar **str, unsigned long *llo,
     const xmlChar *tmp, *cur = *str;
     int ret = 0, i = 0;
 
-    if (!((*cur >= '0') && (*cur <= '9'))) 
+    if (!((*cur >= '0') && (*cur <= '9')))
         return(-2);
 
     while (*cur == '0') {        /* ignore leading zeroes */
@@ -2148,7 +2148,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
     if ((flags == 0) && (value != NULL)) {
 
         if ((type->builtInType != XML_SCHEMAS_STRING) &&
-         (type->builtInType != XML_SCHEMAS_ANYTYPE) && 
+         (type->builtInType != XML_SCHEMAS_ANYTYPE) &&
          (type->builtInType != XML_SCHEMAS_ANYSIMPLETYPE)) {
            if (type->builtInType == XML_SCHEMAS_NORMSTRING)
                norm = xmlSchemaWhiteSpaceReplace(value);
@@ -2160,7 +2160,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
     }
 
     switch (type->builtInType) {
-        case XML_SCHEMAS_UNKNOWN:            
+        case XML_SCHEMAS_UNKNOWN:
             goto error;
        case XML_SCHEMAS_ANYTYPE:
        case XML_SCHEMAS_ANYSIMPLETYPE:
@@ -2171,10 +2171,10 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
                    *val = v;
                } else {
                    goto error;
-               }               
+               }
            }
            goto return0;
-        case XML_SCHEMAS_STRING:               
+        case XML_SCHEMAS_STRING:
            if (! normOnTheFly) {
                const xmlChar *cur = value;
 
@@ -2253,7 +2253,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
                 const xmlChar *cur = value;
                 unsigned int len, neg, integ, hasLeadingZeroes;
                xmlChar cval[25];
-               xmlChar *cptr = cval;           
+               xmlChar *cptr = cval;
 
                 if ((cur == NULL) || (*cur == 0))
                     goto return1;
@@ -2327,10 +2327,10 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
                     v = xmlSchemaNewValue(XML_SCHEMAS_DECIMAL);
                     if (v != NULL) {
                        /*
-                       * Now evaluate the significant digits of the number
-                       */
+                       * Now evaluate the significant digits of the number
+                       */
                        if (len != 0) {
-                           
+
                            if (integ != ~0u) {
                                /*
                                * Get rid of trailing zeroes in the
@@ -2604,8 +2604,8 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
                        } else {
                            cur++;
                        }
-                   }               
-               }                
+                   }
+               }
                 if (val != NULL) {
                     v = xmlSchemaNewValue(XML_SCHEMAS_TOKEN);
                     if (v != NULL) {
@@ -2618,7 +2618,7 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
                 goto return0;
             }
         case XML_SCHEMAS_LANGUAGE:
-           if (normOnTheFly) {             
+           if (normOnTheFly) {
                norm = xmlSchemaCollapseString(value);
                if (norm != NULL)
                    value = norm;
@@ -2903,11 +2903,11 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
                 }
                 goto done;
             }
-        case XML_SCHEMAS_ANYURI:{              
+        case XML_SCHEMAS_ANYURI:{
                 if (*value != 0) {
                    xmlURIPtr uri;
                    xmlChar *tmpval, *cur;
-                   if (normOnTheFly) {             
+                   if (normOnTheFly) {
                        norm = xmlSchemaCollapseString(value);
                        if (norm != NULL)
                            value = norm;
@@ -2996,12 +2996,12 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
             }
         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
@@ -3412,7 +3412,7 @@ xmlSchemaCompareDecimals(xmlSchemaValPtr x, xmlSchemaValPtr y)
     /*
      * First test: If x is -ve and not zero
      */
-    if ((x->value.decimal.sign) && 
+    if ((x->value.decimal.sign) &&
        ((x->value.decimal.lo != 0) ||
         (x->value.decimal.mi != 0) ||
         (x->value.decimal.hi != 0))) {
@@ -3653,7 +3653,7 @@ xmlSchemaDupVal (xmlSchemaValPtr v)
     xmlSchemaValPtr ret = xmlSchemaNewValue(v->type);
     if (ret == NULL)
         return NULL;
-    
+
     memcpy(ret, v, sizeof(xmlSchemaVal));
     ret->next = NULL;
     return ret;
@@ -3699,7 +3699,7 @@ xmlSchemaCopyValue(xmlSchemaValPtr val)
                if (val->value.str != NULL)
                    cur->value.str = xmlStrdup(BAD_CAST val->value.str);
                break;
-           case XML_SCHEMAS_QNAME:        
+           case XML_SCHEMAS_QNAME:
            case XML_SCHEMAS_NOTATION:
                cur = xmlSchemaDupVal(val);
                if (val->value.qname.name != NULL)
@@ -3841,7 +3841,7 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur)
             if (tyr == 0)
                 tyr--;
            /*
-            * Coverity detected an overrun in daysInMonth 
+            * Coverity detected an overrun in daysInMonth
             * of size 12 at position 12 with index variable "((r)->mon - 1)"
             */
            if (tmon < 0)
@@ -3866,7 +3866,7 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur)
                 r->year++;
        }
     }
-    
+
     r->day = tempdays;
 
     /*
@@ -3931,7 +3931,7 @@ xmlSchemaDateNormalize (xmlSchemaValPtr dt, double offset)
  * _xmlSchemaDateCastYMToDays:
  * @dt: an #xmlSchemaValPtr
  *
- * Convert mon and year of @dt to total number of days. Take the 
+ * 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.
@@ -4111,7 +4111,7 @@ xmlSchemaCompareDates (xmlSchemaValPtr x, xmlSchemaValPtr y)
                 ret = -1;
             else if (sec > 0.0)
                 ret = 1;
-            
+
         }
        xmlSchemaFreeValue(p1);
        xmlSchemaFreeValue(q1);
@@ -4252,7 +4252,7 @@ xmlSchemaComparePreserveReplaceStrings(const xmlChar *x,
                                       int invert)
 {
     int tmp;
-    
+
     while ((*x != 0) && (*y != 0)) {
        if (IS_WSP_REPLACE_CH(*y)) {
            if (! IS_WSP_SPACE_CH(*x)) {
@@ -4267,7 +4267,7 @@ xmlSchemaComparePreserveReplaceStrings(const xmlChar *x,
                    else
                        return(1);
                }
-           }       
+           }
        } else {
            tmp = *x - *y;
            if (tmp < 0) {
@@ -4321,7 +4321,7 @@ xmlSchemaComparePreserveCollapseStrings(const xmlChar *x,
 {
     int tmp;
 
-    /* 
+    /*
     * Skip leading blank chars of the collapsed string.
     */
     while IS_WSP_BLANK_CH(*y)
@@ -4410,12 +4410,12 @@ xmlSchemaCompareReplaceCollapseStrings(const xmlChar *x,
 {
     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)) {
@@ -4435,8 +4435,8 @@ xmlSchemaCompareReplaceCollapseStrings(const xmlChar *x,
                }
            }
            x++;
-           y++;            
-           /* 
+           y++;
+           /*
            * Skip contiguous blank chars of the collapsed string.
            */
            while IS_WSP_BLANK_CH(*y)
@@ -4470,7 +4470,7 @@ xmlSchemaCompareReplaceCollapseStrings(const xmlChar *x,
             return(-1);
         else
             return(1);
-    }   
+    }
     if (*y != 0) {
        /*
        * Skip trailing blank chars of the collapsed string.
@@ -4503,27 +4503,27 @@ 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);
+                   return(-1);
                else
                    return(1);
-           }       
+           }
        } else {
            if IS_WSP_BLANK_CH(*x) {
                if ((0x20 - *y) < 0)
-                   return(-1);
+                   return(-1);
                else
                    return(1);
            }
            tmp = *x - *y;
            if (tmp < 0)
-               return(-1);
+               return(-1);
            if (tmp > 0)
-               return(1);
+               return(1);
        }
        x++;
        y++;
@@ -4549,7 +4549,7 @@ 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)) {
@@ -4742,13 +4742,13 @@ xmlSchemaCompareValuesInternal(xmlSchemaValType xtype,
                 (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_NORMSTRING:
         case XML_SCHEMAS_TOKEN:
         case XML_SCHEMAS_LANGUAGE:
         case XML_SCHEMAS_NMTOKEN:
@@ -4772,10 +4772,10 @@ xmlSchemaCompareValuesInternal(xmlSchemaValType xtype,
            /*
            * TODO: Compare those against QName.
            */
-           if (ytype == XML_SCHEMAS_QNAME) {           
+           if (ytype == XML_SCHEMAS_QNAME) {
                TODO
                if (y == NULL)
-                   return(-2);    
+                   return(-2);
                return (-2);
            }
             if ((ytype == XML_SCHEMAS_ANYSIMPLETYPE) ||
@@ -4797,7 +4797,7 @@ xmlSchemaCompareValuesInternal(xmlSchemaValType xtype,
                        /* TODO: What about x < y or x > y. */
                        if (xmlStrEqual(xv, yv))
                            return (0);
-                       else 
+                       else
                            return (2);
                    } else if (yws == XML_SCHEMA_WHITESPACE_REPLACE)
                        return (xmlSchemaComparePreserveReplaceStrings(xv, yv, 0));
@@ -4823,7 +4823,7 @@ xmlSchemaCompareValuesInternal(xmlSchemaValType xtype,
                        return (xmlSchemaCompareNormStrings(xv, yv));
                } else
                    return (-2);
-                
+
            }
             return (-2);
        }
@@ -4894,7 +4894,7 @@ xmlSchemaCompareValuesInternal(xmlSchemaValType xtype,
                 else
                     return(-1);
             }
-            return (-2);    
+            return (-2);
         case XML_SCHEMAS_IDREFS:
         case XML_SCHEMAS_ENTITIES:
         case XML_SCHEMAS_NMTOKENS:
@@ -5082,7 +5082,7 @@ xmlSchemaValidateListSimpleTypeFacet(xmlSchemaFacetPtr facet,
            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)
@@ -5096,12 +5096,12 @@ xmlSchemaValidateListSimpleTypeFacet(xmlSchemaFacetPtr facet,
            return (XML_SCHEMAV_CVC_MAXLENGTH_VALID);
        }
     } else
-       /* 
-       * NOTE: That we can pass NULL as xmlSchemaValPtr to 
+       /*
+       * NOTE: That we can pass NULL as xmlSchemaValPtr to
        * xmlSchemaValidateFacet, since the remaining facet types
-       * are: XML_SCHEMA_FACET_PATTERN, XML_SCHEMA_FACET_ENUMERATION. 
+       * are: XML_SCHEMA_FACET_PATTERN, XML_SCHEMA_FACET_ENUMERATION.
        */
-       return(xmlSchemaValidateFacet(NULL, facet, value, NULL));   
+       return(xmlSchemaValidateFacet(NULL, facet, value, NULL));
     return (0);
 }
 
@@ -5114,7 +5114,7 @@ xmlSchemaValidateListSimpleTypeFacet(xmlSchemaFacetPtr facet,
  * @ws: the whitespace type of the value
  * @length: the actual length of the value
  *
- * Checka a value against a "length", "minLength" and "maxLength" 
+ * 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
@@ -5126,7 +5126,7 @@ xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet,
                                     const xmlChar *value,
                                     xmlSchemaValPtr val,
                                     unsigned long *length,
-                                    xmlSchemaWhitespaceValueType ws)  
+                                    xmlSchemaWhitespaceValueType ws)
 {
     unsigned int len = 0;
 
@@ -5137,7 +5137,7 @@ xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet,
        (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.
@@ -5171,7 +5171,7 @@ xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet,
                    if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE)
                        len = xmlSchemaNormLen(value);
                    else
-                   /* 
+                   /*
                    * Should be OK for "preserve" as well.
                    */
                    len = xmlUTF8Strlen(value);
@@ -5183,7 +5183,7 @@ xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet,
            case XML_SCHEMAS_NMTOKEN:
            case XML_SCHEMAS_NAME:
            case XML_SCHEMAS_NCNAME:
-           case XML_SCHEMAS_ID:                
+           case XML_SCHEMAS_ID:
                /*
                * FIXME: What exactly to do with anyURI?
                */
@@ -5192,11 +5192,11 @@ xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet,
                    len = xmlSchemaNormLen(value);
                break;
            case XML_SCHEMAS_QNAME:
-           case XML_SCHEMAS_NOTATION:
-               /*
+           case XML_SCHEMAS_NOTATION:
+               /*
                * For QName and NOTATION, those facets are
                * deprecated and should be ignored.
-               */
+               */
                return (0);
            default:
                TODO
@@ -5216,7 +5216,7 @@ xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet,
        if (len > facet->val->value.decimal.lo)
            return(XML_SCHEMAV_CVC_MAXLENGTH_VALID);
     }
-    
+
     return (0);
 }
 
@@ -5228,18 +5228,18 @@ xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet,
  * @val:  the precomputed value
  * @length: the actual length of the value
  *
- * Checka a value against a "length", "minLength" and "maxLength" 
+ * 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, 
+xmlSchemaValidateLengthFacet(xmlSchemaTypePtr type,
                             xmlSchemaFacetPtr facet,
                             const xmlChar *value,
                             xmlSchemaValPtr val,
-                            unsigned long *length)  
+                            unsigned long *length)
 {
     if (type == NULL)
         return(-1);
@@ -5249,7 +5249,7 @@ xmlSchemaValidateLengthFacet(xmlSchemaTypePtr type,
 }
 
 /**
- * xmlSchemaValidateLengthFacetWhtsp: 
+ * xmlSchemaValidateLengthFacetWhtsp:
  * @facet:  the facet to check
  * @valType:  the built-in type
  * @value:  the lexical repr. of the value to be validated
@@ -5257,7 +5257,7 @@ xmlSchemaValidateLengthFacet(xmlSchemaTypePtr type,
  * @ws: the whitespace type of the value
  * @length: the actual length of the value
  *
- * Checka a value against a "length", "minLength" and "maxLength" 
+ * 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
@@ -5292,7 +5292,7 @@ xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
 static int
 xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
                               xmlSchemaWhitespaceValueType fws,
-                              xmlSchemaValType valType,                               
+                              xmlSchemaValType valType,
                               const xmlChar *value,
                               xmlSchemaValPtr val,
                               xmlSchemaWhitespaceValueType ws)
@@ -5304,7 +5304,7 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
 
     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.
            */
@@ -5405,7 +5405,7 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
            else {
                switch (valType) {
                    case XML_SCHEMAS_STRING:
-                   case XML_SCHEMAS_NORMSTRING:                        
+                   case XML_SCHEMAS_NORMSTRING:
                        if (ws == XML_SCHEMA_WHITESPACE_UNKNOWN) {
                            /*
                            * This is to ensure API compatibility with the old
@@ -5421,13 +5421,13 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
                            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_IDREF:
                    case XML_SCHEMAS_TOKEN:
                    case XML_SCHEMAS_LANGUAGE:
                    case XML_SCHEMAS_NMTOKEN:
@@ -5436,11 +5436,11 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
                    case XML_SCHEMAS_ID:
                    case XML_SCHEMAS_ANYURI:
                        if (value != NULL)
-                           len = xmlSchemaNormLen(value);
-                       break;             
+                           len = xmlSchemaNormLen(value);
+                       break;
                    default:
                        TODO
-               }
+               }
            }
            if (facet->type == XML_SCHEMA_FACET_LENGTH) {
                if (len != facet->val->value.decimal.lo)
@@ -5550,7 +5550,7 @@ xmlSchemaValidateFacet(xmlSchemaTypePtr base,
 int
 xmlSchemaValidateFacetWhtsp(xmlSchemaFacetPtr facet,
                            xmlSchemaWhitespaceValueType fws,
-                           xmlSchemaValType valType,                       
+                           xmlSchemaValType valType,
                            const xmlChar *value,
                            xmlSchemaValPtr val,
                            xmlSchemaWhitespaceValueType ws)
@@ -5611,13 +5611,13 @@ xmlSchemaFormatFloat(double number, char buffer[], int buffersize)
            /*
             * Result is in work, and after_fraction points
             * just past the fractional part.
-            * Use scientific notation 
+            * 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');           
+           after_fraction = strchr(work + DBL_DIG, 'e');
            /* Remove fractional trailing zeroes */
            ptr = after_fraction;
            while (*(--ptr) == '0')
@@ -5649,7 +5649,7 @@ xmlSchemaFormatFloat(double number, char buffer[], int buffersize)
  *
  * 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.
@@ -5669,7 +5669,7 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
            if (val->value.str == NULL)
                *retValue = BAD_CAST xmlStrdup(BAD_CAST "");
            else
-               *retValue = 
+               *retValue =
                    BAD_CAST xmlStrdup((const xmlChar *) val->value.str);
            break;
        case XML_SCHEMAS_NORMSTRING:
@@ -5686,7 +5686,7 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
        case XML_SCHEMAS_TOKEN:
        case XML_SCHEMAS_LANGUAGE:
        case XML_SCHEMAS_NMTOKEN:
-       case XML_SCHEMAS_NAME:  
+       case XML_SCHEMAS_NAME:
        case XML_SCHEMAS_NCNAME:
        case XML_SCHEMAS_ID:
        case XML_SCHEMAS_IDREF:
@@ -5695,10 +5695,10 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
        case XML_SCHEMAS_ANYURI:   /* Unclear */
            if (val->value.str == NULL)
                return (-1);
-           *retValue = 
+           *retValue =
                BAD_CAST xmlSchemaCollapseString(BAD_CAST val->value.str);
            if (*retValue == NULL)
-               *retValue = 
+               *retValue =
                    BAD_CAST xmlStrdup((const xmlChar *) val->value.str);
            break;
        case XML_SCHEMAS_QNAME:
@@ -5720,7 +5720,7 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
            /*
            * TODO: Lookout for a more simple implementation.
            */
-           if ((val->value.decimal.total == 1) && 
+           if ((val->value.decimal.total == 1) &&
                (val->value.decimal.lo == 0)) {
                *retValue = xmlStrdup(BAD_CAST "0.0");
            } else {
@@ -5754,7 +5754,7 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
                else
                    snprintf(offs, bufsize - (offs - buf),
                        "%lu", dec.lo);
-                       
+
                if (dec.frac != 0) {
                    if (dec.frac != dec.total) {
                        int diff = dec.total - dec.frac;
@@ -5767,7 +5767,7 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
                        unsigned int i = 0;
                        /*
                        * Insert missing zeroes behind the decimal point.
-                       */                      
+                       */
                        while (*(offs + i) != 0)
                            i++;
                        if (i < dec.total) {
@@ -5904,7 +5904,7 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
                snprintf((char *) *retValue, 6, "---%02u",
                    val->value.date.day);
            }
-           break;        
+           break;
         case XML_SCHEMAS_GMONTHDAY: {
                /* TODO: Unclear in XML Schema 1.0 */
                /* TODO: What to do with the timezone? */
@@ -5921,14 +5921,14 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
                /* TODO: What to do with the timezone? */
                if (val->value.date.year < 0)
                    snprintf(buf, 35, "-%04ld-%02u",
-                       labs(val->value.date.year), 
+                       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;              
+           break;
        case XML_SCHEMAS_TIME:
            {
                char buf[30];
@@ -5939,8 +5939,8 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
                    norm = xmlSchemaDateNormalize(val, 0);
                    if (norm == NULL)
                        return (-1);
-                   /* 
-                   * TODO: Check if "%.14g" is portable.                   
+                   /*
+                   * TODO: Check if "%.14g" is portable.
                    */
                    snprintf(buf, 30,
                        "%02u:%02u:%02.14gZ",
@@ -5956,7 +5956,7 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
                        val->value.date.sec);
                }
                *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
-           }       
+           }
            break;
         case XML_SCHEMAS_DATE:
            {
@@ -5984,7 +5984,7 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
                        val->value.date.day);
                }
                *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
-           }       
+           }
            break;
         case XML_SCHEMAS_DATETIME:
            {
@@ -6028,8 +6028,8 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
            *retValue = BAD_CAST xmlStrdup(BAD_CAST val->value.base64.str);
            break;
        case XML_SCHEMAS_FLOAT: {
-               char buf[30];           
-               /* 
+               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
@@ -6050,7 +6050,7 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
                snprintf(buf, 40, "%01.14e", val->value.d);
                *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
            }
-           break;      
+           break;
        default:
            *retValue = BAD_CAST xmlStrdup(BAD_CAST "???");
            return (1);
@@ -6109,7 +6109,7 @@ xmlSchemaGetCanonValueWhtsp(xmlSchemaValPtr val,
            break;
        default:
            return (xmlSchemaGetCanonValue(val, retValue));
-    }    
+    }
     return (0);
 }
 
index 910f244..a37220d 100644 (file)
@@ -3,7 +3,7 @@
  *
  * 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). 
+ * from the parser.c file (their original home).
  *
  * See Copyright for the status of this software.
  *
@@ -40,7 +40,7 @@
 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) {
@@ -85,7 +85,7 @@ 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) {
@@ -170,7 +170,7 @@ xmlStrEqual(const xmlChar *str1, const xmlChar *str2) {
  * @name:  the localname of the QName
  * @str:  the second xmlChar *
  *
- * Check if a QName is Equal to a given string 
+ * Check if a QName is Equal to a given string
  *
  * Returns 1 if they are equal, 0 if they are different
  */
@@ -340,7 +340,7 @@ xmlStrchr(const xmlChar *str, xmlChar val) {
 const xmlChar *
 xmlStrstr(const xmlChar *str, const xmlChar *val) {
     int n;
-    
+
     if (str == NULL) return(NULL);
     if (val == NULL) return(NULL);
     n = xmlStrlen(val);
@@ -368,7 +368,7 @@ xmlStrstr(const xmlChar *str, const xmlChar *val) {
 const xmlChar *
 xmlStrcasestr(const xmlChar *str, const xmlChar *val) {
     int n;
-    
+
     if (str == NULL) return(NULL);
     if (val == NULL) return(NULL);
     n = xmlStrlen(val);
@@ -396,7 +396,7 @@ xmlStrcasestr(const xmlChar *str, const xmlChar *val) {
 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);
@@ -519,7 +519,7 @@ xmlStrcat(xmlChar *cur, const xmlChar *add) {
     const xmlChar *p = add;
 
     if (add == NULL) return(cur);
-    if (cur == NULL) 
+    if (cur == NULL)
         return(xmlStrdup(add));
 
     while (*p != 0) p++; /* non input consuming */
@@ -537,20 +537,20 @@ xmlStrcat(xmlChar *cur, const xmlChar *add) {
  *
  * Returns the number of characters written to @buf or -1 if an error occurs.
  */
-int XMLCDECL 
+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);
 }
 
@@ -565,17 +565,17 @@ xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) {
  *
  * Returns the number of characters written to @buf or -1 if an error occurs.
  */
-int 
+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);
 }
 
@@ -858,7 +858,7 @@ 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));
index 450d0f0..ce6e9a4 100644 (file)
@@ -204,729 +204,729 @@ static xmlUnicodeRange xmlUnicodeCats[] = {
   {"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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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}, 
+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};
 
@@ -961,7 +961,7 @@ static xmlIntFunc
        else
            low = mid + 1;
     }
-    return (NULL);    
+    return (NULL);
 }
 
 /**
index 11b15e0..d3f29f8 100644 (file)
 
 #include <libxml/xmlwriter.h>
 
+#include "buf.h"
+#include "enc.h"
+#include "save.h"
+
 #define B64LINELEN 72
 #define B64CRLF "\r\n"
 
@@ -548,9 +552,9 @@ xmlTextWriterStartDocument(xmlTextWriterPtr writer, const char *version,
     writer->out->encoder = encoder;
     if (encoder != NULL) {
        if (writer->out->conv == NULL) {
-           writer->out->conv = xmlBufferCreateSize(4000);
+           writer->out->conv = xmlBufCreateSize(4000);
        }
-        xmlCharEncOutFunc(encoder, writer->out->conv, NULL);
+        xmlCharEncOutput(writer->out, 1);
         if ((writer->doc != NULL) && (writer->doc->encoding == NULL))
             writer->doc->encoding = xmlStrdup((xmlChar *)writer->out->encoder->name);
     } else
@@ -1074,10 +1078,10 @@ xmlTextWriterStartElementNS(xmlTextWriterPtr writer,
     sum += count;
 
     if (namespaceURI != 0) {
-        xmlTextWriterNsStackEntry *p = (xmlTextWriterNsStackEntry *) 
+        xmlTextWriterNsStackEntry *p = (xmlTextWriterNsStackEntry *)
         xmlMalloc(sizeof(xmlTextWriterNsStackEntry));
         if (p == 0) {
-            xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY, 
+            xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
                             "xmlTextWriterStartElementNS : out of memory!\n");
             return -1;
         }
@@ -1501,8 +1505,8 @@ xmlTextWriterWriteString(xmlTextWriterPtr writer, const xmlChar * content)
                     break;
                 case XML_TEXTWRITER_ATTRIBUTE:
                     buf = NULL;
-                    xmlAttrSerializeTxtContent(writer->out->buffer, writer->doc,
-                                               NULL, content);
+                    xmlBufAttrSerializeTxtContent(writer->out->buffer,
+                                                  writer->doc, NULL, content);
                     break;
                default:
                    break;
@@ -1663,7 +1667,7 @@ xmlTextWriterWriteBase64(xmlTextWriterPtr writer, const char *data,
  * Write hqx encoded data to an xmlOutputBuffer.
  * ::todo
  *
- * Returns the bytes written (may be 0 because of buffering) 
+ * Returns the bytes written (may be 0 because of buffering)
  * or -1 in case of error
  */
 static int
@@ -1672,8 +1676,8 @@ xmlOutputBufferWriteBinHex(xmlOutputBufferPtr out,
 {
     int count;
     int sum;
-    static char hex[16] = 
-       {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
+    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)) {
@@ -1849,7 +1853,7 @@ xmlTextWriterStartAttributeNS(xmlTextWriterPtr writer,
         nsentry.uri = (xmlChar *)namespaceURI;
         nsentry.elem = xmlListFront(writer->nodes);
 
-        curns = (xmlTextWriterNsStackEntry *)xmlListSearch(writer->nsstack, 
+        curns = (xmlTextWriterNsStackEntry *)xmlListSearch(writer->nsstack,
                                                            (void *)&nsentry);
         if ((curns != NULL)) {
             xmlFree(buf);
@@ -2496,8 +2500,8 @@ xmlTextWriterEndPI(xmlTextWriterPtr writer)
 
     if (writer->indent) {
         count = xmlOutputBufferWriteString(writer->out, "\n");
-       if (count < 0)
-               return -1;
+       if (count < 0)
+       return -1;
         sum += count;
     }
 
@@ -4606,6 +4610,26 @@ xmlTextWriterSetIndentString(xmlTextWriterPtr writer, const xmlChar * str)
 }
 
 /**
+ * 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
  *
diff --git a/xpath.c b/xpath.c
index d9d902c..97410e7 100644 (file)
--- a/xpath.c
+++ b/xpath.c
@@ -55,6 +55,8 @@
 #include <libxml/pattern.h>
 #endif
 
+#include "buf.h"
+
 #ifdef LIBXML_PATTERN_ENABLED
 #define XPATH_STREAMING
 #endif
            "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
 /* #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)
  */
 
+/*
+ * 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 xmlXPathCmpNodesExt(xmlNodePtr, xmlNodePtr);
+    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)
 
 /************************************************************************
@@ -253,6 +328,7 @@ static const char *xmlXPathErrorMessages[] = {
     "Char out of XML range\n",
     "Invalid or incomplete context\n",
     "Stack usage errror\n",
+    "Forbidden variable\n",
     "?? Unknown error ??\n"    /* Must be last in the list! */
 };
 #define MAXERRNO ((int)(sizeof(xmlXPathErrorMessages) /        \
@@ -420,8 +496,7 @@ xmlPointerListAddSize(xmlPointerListPtr list,
     if (list->items == NULL) {
        if (initialSize <= 0)
            initialSize = 1;
-       list->items = (void **) xmlMalloc(
-           initialSize * sizeof(void *));
+       list->items = (void **) xmlMalloc(initialSize * sizeof(void *));
        if (list->items == NULL) {
            xmlXPathErrMemory(NULL,
                "xmlPointerListCreate: allocating item\n");
@@ -430,12 +505,17 @@ xmlPointerListAddSize(xmlPointerListPtr list,
        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,
-               "xmlPointerListCreate: re-allocating item\n");
+               "xmlPointerListAddSize: re-allocating item\n");
            list->size = 0;
            return(-1);
        }
@@ -553,8 +633,6 @@ typedef enum {
     NODE_TYPE_PI = XML_PI_NODE
 } xmlXPathTypeVal;
 
-#define XP_REWRITE_DOS_CHILD_ELEM 1
-
 typedef struct _xmlXPathStepOp xmlXPathStepOp;
 typedef xmlXPathStepOp *xmlXPathStepOpPtr;
 struct _xmlXPathStepOp {
@@ -568,7 +646,6 @@ struct _xmlXPathStepOp {
     void *value5;
     void *cache;
     void *cacheURI;
-    int rewriteType;
 };
 
 struct _xmlXPathCompExpr {
@@ -723,6 +800,10 @@ xmlXPathCompExprAdd(xmlXPathCompExprPtr comp, int ch1, int ch2,
     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));
@@ -734,7 +815,6 @@ xmlXPathCompExprAdd(xmlXPathCompExprPtr comp, int ch1, int ch2,
        comp->steps = real;
     }
     comp->last = comp->nbStep;
-    comp->steps[comp->nbStep].rewriteType = 0;
     comp->steps[comp->nbStep].ch1 = ch1;
     comp->steps[comp->nbStep].ch2 = ch2;
     comp->steps[comp->nbStep].op = op;
@@ -2052,6 +2132,11 @@ xmlXPathCacheNewNodeSet(xmlXPathContextPtr ctxt, xmlNodePtr val)
            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
@@ -2480,11 +2565,16 @@ valuePush(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value)
     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) {
-            xmlGenericError(xmlGenericErrorContext, "realloc failed !\n");
+            xmlXPathErrMemory(NULL, "pushing value\n");
             ctxt->error = XPATH_MEMORY_ERROR;
             return (0);
         }
@@ -3320,13 +3410,19 @@ turtle_comparison:
  */
 void
 xmlXPathNodeSetSort(xmlNodeSetPtr set) {
+#ifndef WITH_TIM_SORT
     int i, j, incr, len;
     xmlNodePtr tmp;
+#endif
 
     if (set == NULL)
        return;
 
-    /* Use Shell's sort to sort the node-set */
+#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++) {
@@ -3349,6 +3445,9 @@ xmlXPathNodeSetSort(xmlNodeSetPtr set) {
            }
        }
     }
+#else /* WITH_TIM_SORT */
+    libxml_domnode_tim_sort(set->nodeTab, set->nodeNr);
+#endif /* WITH_TIM_SORT */
 }
 
 #define XML_NODESET_DEFAULT    10
@@ -3527,8 +3626,10 @@ xmlXPathNodeSetContains (xmlNodeSetPtr cur, xmlNodePtr val) {
  * @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
  */
-void
+int
 xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns) {
     int i;
 
@@ -3536,7 +3637,7 @@ xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns) {
     if ((cur == NULL) || (ns == NULL) || (node == NULL) ||
         (ns->type != XML_NAMESPACE_DECL) ||
        (node->type != XML_ELEMENT_NODE))
-       return;
+       return(-1);
 
     /* @@ with_ns to check whether namespace nodes should be looked at @@ */
     /*
@@ -3547,7 +3648,7 @@ xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns) {
            (cur->nodeTab[i]->type == XML_NAMESPACE_DECL) &&
            (((xmlNsPtr)cur->nodeTab[i])->next == (xmlNsPtr) node) &&
            (xmlStrEqual(ns->prefix, ((xmlNsPtr)cur->nodeTab[i])->prefix)))
-           return;
+           return(0);
     }
 
     /*
@@ -3558,7 +3659,7 @@ xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns) {
                                             sizeof(xmlNodePtr));
        if (cur->nodeTab == NULL) {
            xmlXPathErrMemory(NULL, "growing nodeset\n");
-           return;
+           return(-1);
        }
        memset(cur->nodeTab, 0 ,
               XML_NODESET_DEFAULT * (size_t) sizeof(xmlNodePtr));
@@ -3566,16 +3667,21 @@ xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns) {
     } 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;
+           return(-1);
        }
         cur->nodeMax *= 2;
        cur->nodeTab = temp;
     }
     cur->nodeTab[cur->nodeNr++] = xmlXPathNodeSetDupNs(node, ns);
+    return(0);
 }
 
 /**
@@ -3584,24 +3690,21 @@ xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns) {
  * @val:  a new xmlNodePtr
  *
  * add a new xmlNodePtr to an existing NodeSet
+ *
+ * Returns 0 in case of success, and -1 in case of error
  */
-void
+int
 xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
     int i;
 
-    if ((cur == NULL) || (val == NULL)) return;
-
-#if 0
-    if ((val->type == XML_ELEMENT_NODE) && (val->name[0] == ' '))
-       return; /* an XSLT fake node */
-#endif
+    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;
+        if (cur->nodeTab[i] == val) return(0);
 
     /*
      * grow the nodeTab if needed
@@ -3611,7 +3714,7 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
                                             sizeof(xmlNodePtr));
        if (cur->nodeTab == NULL) {
            xmlXPathErrMemory(NULL, "growing nodeset\n");
-           return;
+           return(-1);
        }
        memset(cur->nodeTab, 0 ,
               XML_NODESET_DEFAULT * (size_t) sizeof(xmlNodePtr));
@@ -3619,11 +3722,15 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
     } 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;
+           return(-1);
        }
         cur->nodeMax *= 2;
        cur->nodeTab = temp;
@@ -3635,6 +3742,7 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
            xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
     } else
        cur->nodeTab[cur->nodeNr++] = val;
+    return(0);
 }
 
 /**
@@ -3644,15 +3752,12 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
  *
  * 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
  */
-void
+int
 xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) {
-    if ((cur == NULL) || (val == NULL)) return;
-
-#if 0
-    if ((val->type == XML_ELEMENT_NODE) && (val->name[0] == ' '))
-       return; /* an XSLT fake node */
-#endif
+    if ((cur == NULL) || (val == NULL)) return(-1);
 
     /* @@ with_ns to check whether namespace nodes should be looked at @@ */
     /*
@@ -3663,7 +3768,7 @@ xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) {
                                             sizeof(xmlNodePtr));
        if (cur->nodeTab == NULL) {
            xmlXPathErrMemory(NULL, "growing nodeset\n");
-           return;
+           return(-1);
        }
        memset(cur->nodeTab, 0 ,
               XML_NODESET_DEFAULT * (size_t) sizeof(xmlNodePtr));
@@ -3671,11 +3776,15 @@ xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) {
     } 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;
+           return(-1);
        }
        cur->nodeTab = temp;
         cur->nodeMax *= 2;
@@ -3687,6 +3796,7 @@ xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) {
            xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
     } else
        cur->nodeTab[cur->nodeNr++] = val;
+    return(0);
 }
 
 /**
@@ -3782,6 +3892,10 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
        } 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) {
@@ -3803,68 +3917,6 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
     return(val1);
 }
 
-#if 0 /* xmlXPathNodeSetMergeUnique() is currently not used anymore */
-/**
- * xmlXPathNodeSetMergeUnique:
- * @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.
- */
-static xmlNodeSetPtr
-xmlXPathNodeSetMergeUnique(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
-    int i;
-
-    if (val2 == NULL) return(val1);
-    if (val1 == NULL) {
-       val1 = xmlXPathNodeSetCreate(NULL);
-    }
-    if (val1 == NULL)
-        return (NULL);
-
-    /* @@ with_ns to check whether namespace nodes should be looked at @@ */
-
-    for (i = 0;i < val2->nodeNr;i++) {
-       /*
-        * 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;
-
-           val1->nodeMax *= 2;
-           temp = (xmlNodePtr *) xmlRealloc(val1->nodeTab, val1->nodeMax *
-                                            sizeof(xmlNodePtr));
-           if (temp == NULL) {
-               xmlXPathErrMemory(NULL, "merging nodeset\n");
-               return(NULL);
-           }
-           val1->nodeTab = temp;
-       }
-       if (val2->nodeTab[i]->type == XML_NAMESPACE_DECL) {
-           xmlNsPtr ns = (xmlNsPtr) val2->nodeTab[i];
-
-           val1->nodeTab[val1->nodeNr++] =
-               xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
-       } else
-           val1->nodeTab[val1->nodeNr++] = val2->nodeTab[i];
-    }
-
-    return(val1);
-}
-#endif /* xmlXPathNodeSetMergeUnique() is currently not used anymore */
 
 /**
  * xmlXPathNodeSetMergeAndClear:
@@ -3951,6 +4003,10 @@ xmlXPathNodeSetMergeAndClear(xmlNodeSetPtr set1, xmlNodeSetPtr set2,
            } 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) {
@@ -4035,6 +4091,10 @@ xmlXPathNodeSetMergeAndClearNoDupls(xmlNodeSetPtr set1, xmlNodeSetPtr set2,
            } 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) {
@@ -4333,9 +4393,12 @@ xmlXPathNewNodeSetList(xmlNodeSetPtr val)
         ret = xmlXPathNewNodeSet(NULL);
     else {
         ret = xmlXPathNewNodeSet(val->nodeTab[0]);
-        if (ret)
-            for (i = 1; i < val->nodeNr; ++i)
-                xmlXPathNodeSetAddUnique(ret->nodesetval, val->nodeTab[i]);
+        if (ret) {
+            for (i = 1; i < val->nodeNr; ++i) {
+                if (xmlXPathNodeSetAddUnique(ret->nodesetval, val->nodeTab[i])
+                   < 0) break;
+           }
+       }
     }
 
     return (ret);
@@ -4411,8 +4474,10 @@ xmlXPathDifference (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
 
     for (i = 0; i < l1; i++) {
        cur = xmlXPathNodeSetItem(nodes1, i);
-       if (!xmlXPathNodeSetContains(nodes2, cur))
-           xmlXPathNodeSetAddUnique(ret, cur);
+       if (!xmlXPathNodeSetContains(nodes2, cur)) {
+           if (xmlXPathNodeSetAddUnique(ret, cur) < 0)
+               break;
+       }
     }
     return(ret);
 }
@@ -4445,8 +4510,10 @@ xmlXPathIntersection (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
 
     for (i = 0; i < l1; i++) {
        cur = xmlXPathNodeSetItem(nodes1, i);
-       if (xmlXPathNodeSetContains(nodes2, cur))
-           xmlXPathNodeSetAddUnique(ret, cur);
+       if (xmlXPathNodeSetContains(nodes2, cur)) {
+           if (xmlXPathNodeSetAddUnique(ret, cur) < 0)
+               break;
+       }
     }
     return(ret);
 }
@@ -4482,7 +4549,8 @@ xmlXPathDistinctSorted (xmlNodeSetPtr nodes) {
        strval = xmlXPathCastNodeToString(cur);
        if (xmlHashLookup(hash, strval) == NULL) {
            xmlHashAddEntry(hash, strval, strval);
-           xmlXPathNodeSetAddUnique(ret, cur);
+           if (xmlXPathNodeSetAddUnique(ret, cur) < 0)
+               break;
        } else {
            xmlFree(strval);
        }
@@ -4574,7 +4642,8 @@ xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes, xmlNodePtr node) {
        cur = xmlXPathNodeSetItem(nodes, i);
        if (cur == node)
            break;
-       xmlXPathNodeSetAddUnique(ret, cur);
+       if (xmlXPathNodeSetAddUnique(ret, cur) < 0)
+           break;
     }
     return(ret);
 }
@@ -4678,7 +4747,8 @@ xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes, xmlNodePtr node) {
        cur = xmlXPathNodeSetItem(nodes, i);
        if (cur == node)
            break;
-       xmlXPathNodeSetAddUnique(ret, cur);
+       if (xmlXPathNodeSetAddUnique(ret, cur) < 0)
+           break;
     }
     xmlXPathNodeSetSort(ret);  /* bug 413451 */
     return(ret);
@@ -7701,6 +7771,7 @@ xmlXPathNextChildElement(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
     return(NULL);
 }
 
+#if 0
 /**
  * xmlXPathNextDescendantOrSelfElemParent:
  * @ctxt:  the XPath Parser context
@@ -7728,7 +7799,7 @@ xmlXPathNextDescendantOrSelfElemParent(xmlNodePtr cur,
 #ifdef LIBXML_DOCB_ENABLED
            case XML_DOCB_DOCUMENT_NODE:
 #endif
-           case XML_HTML_DOCUMENT_NODE:            
+           case XML_HTML_DOCUMENT_NODE:
                return(contextNode);
            default:
                return(NULL);
@@ -7776,6 +7847,7 @@ next_sibling:
     }
     return(NULL);
 }
+#endif
 
 /**
  * xmlXPathNextDescendant:
@@ -7803,6 +7875,8 @@ xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
         return(ctxt->context->node->children);
     }
 
+    if (cur->type == XML_NAMESPACE_DECL)
+        return(NULL);
     if (cur->children != NULL) {
        /*
         * Do not descend on entities declarations
@@ -8185,6 +8259,10 @@ xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
 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 */
@@ -8222,7 +8300,7 @@ xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
         if (cur->type == XML_ATTRIBUTE_NODE)
             return(cur->parent);
     }
-    if (cur == NULL)
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
        return (NULL);
     if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
        cur = cur->prev;
@@ -8269,6 +8347,8 @@ xmlXPathNextPrecedingInternal(xmlXPathParserContextPtr ctxt,
             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) {
@@ -8476,7 +8556,7 @@ xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs) {
            int i = 0;
 
            tmp = cur->nodesetval->nodeTab[0];
-           if (tmp != NULL) {
+           if ((tmp != NULL) && (tmp->type != XML_NAMESPACE_DECL)) {
                tmp = tmp->children;
                while (tmp != NULL) {
                    tmp = tmp->next;
@@ -9146,7 +9226,7 @@ void
 xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
   xmlXPathObjectPtr str;
   xmlXPathObjectPtr find;
-  xmlBufferPtr target;
+  xmlBufPtr target;
   const xmlChar *point;
   int offset;
 
@@ -9156,16 +9236,16 @@ xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
   CAST_TO_STRING;
   str = valuePop(ctxt);
 
-  target = xmlBufferCreate();
+  target = xmlBufCreate();
   if (target) {
     point = xmlStrstr(str->stringval, find->stringval);
     if (point) {
       offset = (int)(point - str->stringval);
-      xmlBufferAdd(target, str->stringval, offset);
+      xmlBufAdd(target, str->stringval, offset);
     }
     valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
-       xmlBufferContent(target)));
-    xmlBufferFree(target);
+       xmlBufContent(target)));
+    xmlBufFree(target);
   }
   xmlXPathReleaseObject(ctxt->context, str);
   xmlXPathReleaseObject(ctxt->context, find);
@@ -9189,7 +9269,7 @@ void
 xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs) {
   xmlXPathObjectPtr str;
   xmlXPathObjectPtr find;
-  xmlBufferPtr target;
+  xmlBufPtr target;
   const xmlChar *point;
   int offset;
 
@@ -9199,17 +9279,17 @@ xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs) {
   CAST_TO_STRING;
   str = valuePop(ctxt);
 
-  target = xmlBufferCreate();
+  target = xmlBufCreate();
   if (target) {
     point = xmlStrstr(str->stringval, find->stringval);
     if (point) {
       offset = (int)(point - str->stringval) + xmlStrlen(find->stringval);
-      xmlBufferAdd(target, &str->stringval[offset],
+      xmlBufAdd(target, &str->stringval[offset],
                   xmlStrlen(str->stringval) - offset);
     }
     valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
-       xmlBufferContent(target)));
-    xmlBufferFree(target);
+       xmlBufContent(target)));
+    xmlBufFree(target);
   }
   xmlXPathReleaseObject(ctxt->context, str);
   xmlXPathReleaseObject(ctxt->context, find);
@@ -9233,7 +9313,7 @@ void
 xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
   xmlXPathObjectPtr obj = NULL;
   xmlChar *source = NULL;
-  xmlBufferPtr target;
+  xmlBufPtr target;
   xmlChar blank;
 
   if (ctxt == NULL) return;
@@ -9251,7 +9331,7 @@ xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
   obj = valuePop(ctxt);
   source = obj->stringval;
 
-  target = xmlBufferCreate();
+  target = xmlBufCreate();
   if (target && source) {
 
     /* Skip leading whitespaces */
@@ -9265,16 +9345,16 @@ xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
        blank = 0x20;
       } else {
        if (blank) {
-         xmlBufferAdd(target, &blank, 1);
+         xmlBufAdd(target, &blank, 1);
          blank = 0;
        }
-       xmlBufferAdd(target, source, 1);
+       xmlBufAdd(target, source, 1);
       }
       source++;
     }
     valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
-       xmlBufferContent(target)));
-    xmlBufferFree(target);
+       xmlBufContent(target)));
+    xmlBufFree(target);
   }
   xmlXPathReleaseObject(ctxt->context, obj);
 }
@@ -9305,7 +9385,7 @@ xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs) {
     xmlXPathObjectPtr str;
     xmlXPathObjectPtr from;
     xmlXPathObjectPtr to;
-    xmlBufferPtr target;
+    xmlBufPtr target;
     int offset, max;
     xmlChar ch;
     const xmlChar *point;
@@ -9320,7 +9400,7 @@ xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs) {
     CAST_TO_STRING;
     str = valuePop(ctxt);
 
-    target = xmlBufferCreate();
+    target = xmlBufCreate();
     if (target) {
        max = xmlUTF8Strlen(to->stringval);
        for (cptr = str->stringval; (ch=*cptr); ) {
@@ -9329,10 +9409,10 @@ xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs) {
                if (offset < max) {
                    point = xmlUTF8Strpos(to->stringval, offset);
                    if (point)
-                       xmlBufferAdd(target, point, xmlUTF8Strsize(point, 1));
+                       xmlBufAdd(target, point, xmlUTF8Strsize(point, 1));
                }
            } else
-               xmlBufferAdd(target, cptr, xmlUTF8Strsize(cptr, 1));
+               xmlBufAdd(target, cptr, xmlUTF8Strsize(cptr, 1));
 
            /* Step to next character in input */
            cptr++;
@@ -9358,8 +9438,8 @@ xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs) {
        }
     }
     valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
-       xmlBufferContent(target)));
-    xmlBufferFree(target);
+       xmlBufContent(target)));
+    xmlBufFree(target);
     xmlXPathReleaseObject(ctxt->context, str);
     xmlXPathReleaseObject(ctxt->context, from);
     xmlXPathReleaseObject(ctxt->context, to);
@@ -9866,7 +9946,7 @@ xmlChar *
 xmlXPathParseName(xmlXPathParserContextPtr ctxt) {
     const xmlChar *in;
     xmlChar *ret;
-    int count = 0;
+    size_t count = 0;
 
     if ((ctxt == NULL) || (ctxt->cur == NULL)) return(NULL);
     /*
@@ -9885,6 +9965,10 @@ xmlXPathParseName(xmlXPathParserContextPtr ctxt) {
            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);
@@ -9928,6 +10012,9 @@ xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, int qualified) {
            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);
@@ -9939,6 +10026,9 @@ xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, int qualified) {
                   (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));
@@ -10291,7 +10381,7 @@ xmlXPathCompVariableReference(xmlXPathParserContextPtr ctxt) {
                   name, prefix);
     SKIP_BLANKS;
     if ((ctxt->context != NULL) && (ctxt->context->flags & XML_XPATH_NOVAR)) {
-       XP_ERROR(XPATH_UNDEF_VARIABLE_ERROR);
+       XP_ERROR(XPATH_FORBID_VARIABLE_ERROR);
     }
 }
 
@@ -11655,9 +11745,13 @@ xmlXPathCompOpEvalPredicate(xmlXPathParserContextPtr ctxt,
            */
            if (contextObj == NULL)
                contextObj = xmlXPathCacheNewNodeSet(xpctxt, contextNode);
-           else
-               xmlXPathNodeSetAddUnique(contextObj->nodesetval,
-                   contextNode);
+           else {
+               if (xmlXPathNodeSetAddUnique(contextObj->nodesetval,
+                   contextNode) < 0) {
+                   ctxt->error = XPATH_MEMORY_ERROR;
+                   goto evaluation_exit;
+               }
+           }
 
            valuePush(ctxt, contextObj);
 
@@ -11803,9 +11897,13 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt,
            */
            if (contextObj == NULL)
                contextObj = xmlXPathCacheNewNodeSet(xpctxt, contextNode);
-           else
-               xmlXPathNodeSetAddUnique(contextObj->nodesetval,
-                   contextNode);
+           else {
+               if (xmlXPathNodeSetAddUnique(contextObj->nodesetval,
+                   contextNode) < 0) {
+                   ctxt->error = XPATH_MEMORY_ERROR;
+                   goto evaluation_exit;
+               }
+           }
 
             frame = xmlXPathSetFrame(ctxt);
            valuePush(ctxt, contextObj);
@@ -11977,22 +12075,25 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
 #define XP_TEST_HIT \
     if (hasAxisRange != 0) { \
        if (++pos == maxPos) { \
-           addNode(seq, cur); \
-       goto axis_range_end; } \
+           if (addNode(seq, cur) < 0) \
+               ctxt->error = XPATH_MEMORY_ERROR; \
+           goto axis_range_end; } \
     } else { \
-       addNode(seq, cur); \
+       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; \
-           xmlXPathNodeSetAddNs(seq, xpctxt->node, (xmlNsPtr) cur); \
+           if (xmlXPathNodeSetAddNs(seq, xpctxt->node, (xmlNsPtr) cur) < 0) \
+               ctxt->error = XPATH_MEMORY_ERROR; \
        goto axis_range_end; } \
     } else { \
        hasNsNodes = 1; \
-       xmlXPathNodeSetAddNs(seq, \
-       xpctxt->node, (xmlNsPtr) cur); \
+       if (xmlXPathNodeSetAddNs(seq, xpctxt->node, (xmlNsPtr) cur) < 0) \
+           ctxt->error = XPATH_MEMORY_ERROR; \
        if (breakOnFirstHit) goto first_hit; }
 
     xmlXPathAxisVal axis = (xmlXPathAxisVal) op->value;
@@ -12012,8 +12113,6 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
     xmlNodeSetPtr contextSeq;
     int contextIdx;
     xmlNodePtr contextNode;
-    /* The context node for a compound traversal */
-    xmlNodePtr outerContextNode;
     /* The final resulting node set wrt to all context nodes */
     xmlNodeSetPtr outSeq;
     /*
@@ -12029,9 +12128,7 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
     int breakOnFirstHit;
 
     xmlXPathTraversalFunction next = NULL;
-    /* compound axis traversal */
-    xmlXPathTraversalFunctionExt outerNext = NULL;
-    void (*addNode) (xmlNodeSetPtr, xmlNodePtr);
+    int (*addNode) (xmlNodeSetPtr, xmlNodePtr);
     xmlXPathNodeSetMergeFunction mergeAndClear;
     xmlNodePtr oldContextNode;
     xmlXPathContextPtr xpctxt = ctxt->context;
@@ -12080,13 +12177,6 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
             break;
         case AXIS_CHILD:
            last = NULL;
-           if (op->rewriteType == XP_REWRITE_DOS_CHILD_ELEM) {
-               /*
-               * This iterator will give us only nodes which can
-               * hold element nodes.
-               */
-               outerNext = xmlXPathNextDescendantOrSelfElemParent;
-           }
            if (((test == NODE_TEST_NAME) || (test == NODE_TEST_ALL)) &&
                (type == NODE_TYPE_NODE))
            {
@@ -12216,32 +12306,13 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
     addNode = xmlXPathNodeSetAddUnique;
     outSeq = NULL;
     seq = NULL;
-    outerContextNode = NULL;
     contextNode = NULL;
     contextIdx = 0;
 
 
-    while ((contextIdx < contextSeq->nodeNr) || (contextNode != NULL)) {
-       if (outerNext != NULL) {
-           /*
-           * This is a compound traversal.
-           */
-           if (contextNode == NULL) {
-               /*
-               * Set the context for the outer traversal.
-               */
-               outerContextNode = contextSeq->nodeTab[contextIdx++];
-               contextNode = outerNext(NULL, outerContextNode);
-           } else
-               contextNode = outerNext(contextNode, outerContextNode);
-           if (contextNode == NULL)
-               continue;
-           /*
-           * Set the context for the main traversal.
-           */
-           xpctxt->node = contextNode;
-       } else
-           xpctxt->node = contextSeq->nodeTab[contextIdx++];
+    while (((contextIdx < contextSeq->nodeNr) || (contextNode != NULL)) &&
+           (ctxt->error == XPATH_EXPRESSION_OK)) {
+       xpctxt->node = contextSeq->nodeTab[contextIdx++];
 
        if (seq == NULL) {
            seq = xmlXPathNodeSetCreate(NULL);
@@ -12328,7 +12399,7 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
                                break;
                        }
                    } else if (cur->type == type) {
-                       if (type == XML_NAMESPACE_DECL)
+                       if (cur->type == XML_NAMESPACE_DECL)
                            XP_TEST_HIT_NS
                        else
                            XP_TEST_HIT
@@ -12439,7 +12510,7 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
                     }
                     break;
            } /* switch(test) */
-        } while (cur != NULL);
+        } while ((cur != NULL) && (ctxt->error == XPATH_EXPRESSION_OK));
 
        goto apply_predicates;
 
@@ -12480,13 +12551,16 @@ first_hit: /* ---------------------------------------------------------- */
 #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.
@@ -12495,7 +12569,7 @@ apply_predicates: /* --------------------------------------------------- */
            *  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.
@@ -12988,8 +13062,10 @@ xmlXPathCompOpEvalFilterFirst(xmlXPathParserContextPtr ctxt,
                tmp = xmlXPathCacheNewNodeSet(ctxt->context,
                    ctxt->context->node);
            } else {
-               xmlXPathNodeSetAddUnique(tmp->nodesetval,
-                   ctxt->context->node);
+               if (xmlXPathNodeSetAddUnique(tmp->nodesetval,
+                                            ctxt->context->node) < 0) {
+                   ctxt->error = XPATH_MEMORY_ERROR;
+               }
            }
            valuePush(ctxt, tmp);
            if (op->ch2 != -1)
@@ -13102,8 +13178,10 @@ xmlXPathCompOpEvalFilterFirst(xmlXPathParserContextPtr ctxt,
                tmp = xmlXPathCacheNewNodeSet(ctxt->context,
                    ctxt->context->node);
            } else {
-               xmlXPathNodeSetAddUnique(tmp->nodesetval,
-                   ctxt->context->node);
+               if (xmlXPathNodeSetAddUnique(tmp->nodesetval,
+                                            ctxt->context->node) < 0) {
+                   ctxt->error = XPATH_MEMORY_ERROR;
+               }
            }
            valuePush(ctxt, tmp);
            ctxt->context->contextSize = oldset->nodeNr;
@@ -13121,7 +13199,8 @@ xmlXPathCompOpEvalFilterFirst(xmlXPathParserContextPtr ctxt,
            */
            res = valuePop(ctxt);
            if (xmlXPathEvaluatePredicateResult(ctxt, res)) {
-               xmlXPathNodeSetAdd(newset, oldset->nodeTab[i]);
+               if (xmlXPathNodeSetAdd(newset, oldset->nodeTab[i]) < 0)
+                   ctxt->error = XPATH_MEMORY_ERROR;
            }
            /*
            * Cleanup
@@ -13800,8 +13879,10 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
                            tmp = xmlXPathCacheNewNodeSet(ctxt->context,
                                ctxt->context->node);
                        } else {
-                           xmlXPathNodeSetAddUnique(tmp->nodesetval,
-                               ctxt->context->node);
+                           if (xmlXPathNodeSetAddUnique(tmp->nodesetval,
+                                              ctxt->context->node) < 0) {
+                               ctxt->error = XPATH_MEMORY_ERROR;
+                           }
                        }
                         valuePush(ctxt, tmp);
                         ctxt->context->contextSize = oldset->nodeNr;
@@ -13831,7 +13912,9 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
                        */
                         res = valuePop(ctxt);
                         if (xmlXPathEvaluatePredicateResult(ctxt, res)) {
-                            xmlXPathNodeSetAdd(newset, oldset->nodeTab[i]);
+                            if (xmlXPathNodeSetAdd(newset, oldset->nodeTab[i])
+                               < 0)
+                               ctxt->error = XPATH_MEMORY_ERROR;
                         }
 
                         /*
@@ -14194,7 +14277,7 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp,
            if (toBool)
                return(1);
            xmlXPathNodeSetAddUnique((*resultSeq)->nodesetval,
-               (xmlNodePtr) ctxt->doc);
+                                    (xmlNodePtr) ctxt->doc);
        } else {
            /* Select "self::node()" */
            if (toBool)
@@ -14287,7 +14370,11 @@ next_node:
                } else if (ret == 1) {
                    if (toBool)
                        goto return_1;
-                   xmlXPathNodeSetAddUnique((*resultSeq)->nodesetval, cur);
+                   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);
@@ -14303,6 +14390,7 @@ next_node:
        }
 
 scan_children:
+       if (cur->type == XML_NAMESPACE_DECL) break;
        if ((cur->children != NULL) && (depth < max_depth)) {
            /*
             * Do not descend on entities declarations
@@ -14623,57 +14711,63 @@ xmlXPathTryStreamCompile(xmlXPathContextPtr ctxt, const xmlChar *str) {
 }
 #endif /* XPATH_STREAMING */
 
-static int
-xmlXPathCanRewriteDosExpression(xmlChar *expr)
-{
-    if (expr == NULL)
-       return(0);
-    do {
-        if ((*expr == '/') && (*(++expr) == '/'))
-           return(1);
-    } while (*expr++);
-    return(0);
-}
 static void
-xmlXPathRewriteDOSExpression(xmlXPathCompExprPtr comp, xmlXPathStepOpPtr op)
+xmlXPathOptimizeExpression(xmlXPathCompExprPtr comp, xmlXPathStepOpPtr op)
 {
     /*
     * Try to rewrite "descendant-or-self::node()/foo" to an optimized
     * internal representation.
     */
-    if (op->ch1 != -1) {
-       if ((op->op == XPATH_OP_COLLECT /* 11 */) &&
-           ((xmlXPathAxisVal) op->value == AXIS_CHILD /* 4 */) &&
-           ((xmlXPathTestVal) op->value2 == NODE_TEST_NAME /* 5 */) &&
-           ((xmlXPathTypeVal) op->value3 == NODE_TYPE_NODE /* 0 */))
-       {
-           /*
-           * This is a "child::foo"
-           */
-           xmlXPathStepOpPtr prevop = &comp->steps[op->ch1];
-
-           if ((prevop->op == XPATH_OP_COLLECT /* 11 */) &&
-               (prevop->ch1 != -1) &&
-               ((xmlXPathAxisVal) prevop->value ==
-                   AXIS_DESCENDANT_OR_SELF) &&
-               (prevop->ch2 == -1) &&
-               ((xmlXPathTestVal) prevop->value2 == NODE_TEST_TYPE) &&
-               ((xmlXPathTypeVal) prevop->value3 == NODE_TYPE_NODE) &&
-               (comp->steps[prevop->ch1].op == XPATH_OP_ROOT))
-           {
-               /*
-               * This is a "/descendant-or-self::node()" without predicates.
-               * Eliminate it.
-               */
-               op->ch1 = prevop->ch1;
-               op->rewriteType = XP_REWRITE_DOS_CHILD_ELEM;
-           }
+
+    if ((op->ch1 != -1) &&
+        (op->op == XPATH_OP_COLLECT /* 11 */))
+    {
+        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;
+            }
        }
-       if (op->ch1 != -1)
-           xmlXPathRewriteDOSExpression(comp, &comp->steps[op->ch1]);
     }
+
+    /* Recurse */
+    if (op->ch1 != -1)
+        xmlXPathOptimizeExpression(comp, &comp->steps[op->ch1]);
     if (op->ch2 != -1)
-       xmlXPathRewriteDOSExpression(comp, &comp->steps[op->ch2]);
+       xmlXPathOptimizeExpression(comp, &comp->steps[op->ch2]);
 }
 
 /**
@@ -14731,12 +14825,8 @@ xmlXPathCtxtCompile(xmlXPathContextPtr ctxt, const xmlChar *str) {
        comp->string = xmlStrdup(str);
        comp->nb = 0;
 #endif
-       if ((comp->expr != NULL) &&
-           (comp->nbStep > 2) &&
-           (comp->last >= 0) &&
-           (xmlXPathCanRewriteDosExpression(comp->expr) == 1))
-       {
-           xmlXPathRewriteDOSExpression(comp, &comp->steps[comp->last]);
+       if ((comp->nbStep > 1) && (comp->last >= 0)) {
+           xmlXPathOptimizeExpression(comp, &comp->steps[comp->last]);
        }
     }
     return(comp);
@@ -14913,17 +15003,12 @@ xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) {
 #endif
     {
        xmlXPathCompileExpr(ctxt, 1);
-       /*
-       * In this scenario the expression string will sit in ctxt->base.
-       */
        if ((ctxt->error == XPATH_EXPRESSION_OK) &&
            (ctxt->comp != NULL) &&
-           (ctxt->base != NULL) &&
-           (ctxt->comp->nbStep > 2) &&
-           (ctxt->comp->last >= 0) &&
-           (xmlXPathCanRewriteDosExpression((xmlChar *) ctxt->base) == 1))
+           (ctxt->comp->nbStep > 1) &&
+           (ctxt->comp->last >= 0))
        {
-           xmlXPathRewriteDOSExpression(ctxt->comp,
+           xmlXPathOptimizeExpression(ctxt->comp,
                &ctxt->comp->steps[ctxt->comp->last]);
        }
     }
@@ -14994,6 +15079,49 @@ xmlXPathEval(const xmlChar *str, xmlXPathContextPtr ctx) {
 }
 
 /**
+ * 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
@@ -15097,7 +15225,7 @@ static void
 xmlXPathEscapeUriFunction(xmlXPathParserContextPtr ctxt, int nargs) {
     xmlXPathObjectPtr str;
     int escape_reserved;
-    xmlBufferPtr target;
+    xmlBufPtr target;
     xmlChar *cptr;
     xmlChar escape[4];
 
@@ -15108,7 +15236,7 @@ xmlXPathEscapeUriFunction(xmlXPathParserContextPtr ctxt, int nargs) {
     CAST_TO_STRING;
     str = valuePop(ctxt);
 
-    target = xmlBufferCreate();
+    target = xmlBufCreate();
 
     escape[0] = '%';
     escape[3] = 0;
@@ -15133,7 +15261,7 @@ xmlXPathEscapeUriFunction(xmlXPathParserContextPtr ctxt, int nargs) {
                  *cptr == ':' || *cptr == '@' || *cptr == '&' ||
                  *cptr == '=' || *cptr == '+' || *cptr == '$' ||
                  *cptr == ','))) {
-               xmlBufferAdd(target, cptr, 1);
+               xmlBufAdd(target, cptr, 1);
            } else {
                if ((*cptr >> 4) < 10)
                    escape[1] = '0' + (*cptr >> 4);
@@ -15144,13 +15272,13 @@ xmlXPathEscapeUriFunction(xmlXPathParserContextPtr ctxt, int nargs) {
                else
                    escape[2] = 'A' - 10 + (*cptr & 0xF);
 
-               xmlBufferAdd(target, &escape[0], 3);
+               xmlBufAdd(target, &escape[0], 3);
            }
        }
     }
     valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
-       xmlBufferContent(target)));
-    xmlBufferFree(target);
+       xmlBufContent(target)));
+    xmlBufFree(target);
     xmlXPathReleaseObject(ctxt->context, str);
 }
 
index 0b463dd..46f11e8 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Added support for the element() scheme described in:
  * W3C Proposed Recommendation 13 November 2002
- * http://www.w3.org/TR/2002/PR-xptr-element-20021113/  
+ * http://www.w3.org/TR/2002/PR-xptr-element-20021113/
  *
  * See Copyright for the status of this software.
  *
 #endif
 #endif
 
-#define TODO                                                           \
+#define TODO                                                           \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
 
-#define STRANGE                                                        \
+#define STRANGE                                                        \
     xmlGenericError(xmlGenericErrorContext,                            \
            "Internal error at %s:%d\n",                                \
             __FILE__, __LINE__);
 
 /************************************************************************
  *                                                                     *
- *             Some factorized error routines                          *
+ *             Some factorized error routines                          *
  *                                                                     *
  ************************************************************************/
 
@@ -134,7 +134,7 @@ xmlNodePtr xmlXPtrAdvanceNode(xmlNodePtr cur, int *level);
 static int
 xmlXPtrGetArity(xmlNodePtr cur) {
     int i;
-    if (cur == NULL) 
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
        return(-1);
     cur = cur->children;
     for (i = 0;cur != NULL;cur = cur->next) {
@@ -157,7 +157,7 @@ xmlXPtrGetArity(xmlNodePtr cur) {
 static int
 xmlXPtrGetIndex(xmlNodePtr cur) {
     int i;
-    if (cur == NULL) 
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
        return(-1);
     for (i = 1;cur != NULL;cur = cur->prev) {
        if ((cur->type == XML_ELEMENT_NODE) ||
@@ -179,11 +179,11 @@ xmlXPtrGetIndex(xmlNodePtr cur) {
 static xmlNodePtr
 xmlXPtrGetNthChild(xmlNodePtr cur, int no) {
     int i;
-    if (cur == NULL) 
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
        return(cur);
     cur = cur->children;
     for (i = 0;i <= no;cur = cur->next) {
-       if (cur == NULL) 
+       if (cur == NULL)
            return(cur);
        if ((cur->type == XML_ELEMENT_NODE) ||
            (cur->type == XML_DOCUMENT_NODE) ||
@@ -553,7 +553,7 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
            break;
        case XPATH_NODESET:
            /*
-            * Empty set ... 
+            * Empty set ...
             */
            if (end->nodesetval->nodeNr <= 0)
                return(NULL);
@@ -731,7 +731,7 @@ xmlXPtrLocationSetDel(xmlLocationSetPtr cur, xmlXPathObjectPtr val) {
 
     if (i >= cur->locNr) {
 #ifdef DEBUG
-        xmlGenericError(xmlGenericErrorContext, 
+        xmlGenericError(xmlGenericErrorContext,
                "xmlXPtrLocationSetDel: Range wasn't found in RangeList\n");
 #endif
         return;
@@ -903,7 +903,7 @@ static void xmlXPtrEvalChildSeq(xmlXPathParserContextPtr ctxt, xmlChar *name);
 #define NXT(val) ctxt->cur[(val)]
 #define CUR_PTR ctxt->cur
 
-#define SKIP_BLANKS                                                    \
+#define SKIP_BLANKS                                                    \
     while (IS_BLANK_CH(*(ctxt->cur))) NEXT
 
 #define CURRENT (*ctxt->cur)
@@ -945,7 +945,7 @@ xmlXPtrGetChildNo(xmlXPathParserContextPtr ctxt, int indx) {
  * xmlXPtrEvalXPtrPart:
  * @ctxt:  the XPointer Parser context
  * @name:  the preparsed Scheme for the XPtrPart
- * 
+ *
  * XPtrPart ::= 'xpointer' '(' XPtrExpr ')'
  *            | Scheme '(' SchemeSpecificExpr ')'
  *
@@ -953,7 +953,7 @@ xmlXPtrGetChildNo(xmlXPathParserContextPtr ctxt, int indx) {
  *
  * SchemeSpecificExpr ::= StringWithBalancedParens
  *
- * StringWithBalancedParens ::=  
+ * StringWithBalancedParens ::=
  *              [^()]* ('(' StringWithBalancedParens ')' [^()]*)*
  *              [VC: Parenthesis escaping]
  *
@@ -971,7 +971,7 @@ xmlXPtrGetChildNo(xmlXPathParserContextPtr ctxt, int indx) {
  *
  * 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
  */
 
@@ -1097,7 +1097,7 @@ xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) {
            xmlFree(name);
            XP_ERROR(XPATH_MEMORY_ERROR);
        }
-       
+
        xmlXPathRegisterNs(ctxt->context, prefix, URI);
        CUR_PTR = left;
        xmlFree(URI);
@@ -1229,7 +1229,7 @@ xmlXPtrEvalChildSeq(xmlXPathParserContextPtr ctxt, xmlChar *name) {
     while (CUR == '/') {
        int child = 0;
        NEXT;
-        
+
        while ((CUR >= '0') && (CUR <= '9')) {
            child = child * 10 + (CUR - '0');
            NEXT;
@@ -1253,7 +1253,7 @@ static void
 xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) {
     if (ctxt->valueTab == NULL) {
        /* Allocate the value stack */
-       ctxt->valueTab = (xmlXPathObjectPtr *) 
+       ctxt->valueTab = (xmlXPathObjectPtr *)
                         xmlMalloc(10 * sizeof(xmlXPathObjectPtr));
        if (ctxt->valueTab == NULL) {
            xmlXPtrErrMemory("allocating evaluation context");
@@ -1396,13 +1396,13 @@ xmlXPtrEval(const xmlChar *str, xmlXPathContextPtr ctx) {
                    /*
                     * Evaluation may push a root nodeset which is unused
                     */
-                   xmlNodeSetPtr set; 
+                   xmlNodeSetPtr set;
                    set = tmp->nodesetval;
                    if ((set->nodeNr != 1) ||
                        (set->nodeTab[0] != (xmlNodePtr) ctx->doc))
                        stack++;
                } else
-                   stack++;    
+                   stack++;
            }
            xmlXPathFreeObject(tmp);
         }
@@ -1416,7 +1416,7 @@ xmlXPtrEval(const xmlChar *str, xmlXPathContextPtr ctx) {
        xmlXPathFreeObject(res);
        res = NULL;
     }
-        
+
     xmlXPathFreeParserContext(ctxt);
     return(res);
 }
@@ -1444,11 +1444,13 @@ xmlXPtrBuildRangeNodeList(xmlXPathObjectPtr range) {
        return(NULL);
     start = (xmlNodePtr) range->user;
 
-    if (start == NULL)
+    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;
@@ -1478,7 +1480,7 @@ xmlXPtrBuildRangeNodeList(xmlXPathObjectPtr range) {
                /* prune and return full set */
                if (last != NULL)
                    xmlAddNextSibling(last, tmp);
-               else 
+               else
                    xmlAddChild(parent, tmp);
                return(list);
            } else {
@@ -1732,7 +1734,7 @@ xmlXPtrNbLocChildren(xmlNodePtr node) {
  * @ctxt:  the XPointer Parser context
  * @nargs:  the number of args
  *
- * Function implementing here() operation 
+ * Function implementing here() operation
  * as described in 5.4.3
  */
 static void
@@ -1741,7 +1743,7 @@ xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) {
 
     if (ctxt->context->here == NULL)
        XP_ERROR(XPTR_SYNTAX_ERROR);
-    
+
     valuePush(ctxt, xmlXPtrNewLocationSetNodes(ctxt->context->here, NULL));
 }
 
@@ -1750,7 +1752,7 @@ xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) {
  * @ctxt:  the XPointer Parser context
  * @nargs:  the number of args
  *
- * Function implementing origin() operation 
+ * Function implementing origin() operation
  * as described in 5.4.3
  */
 static void
@@ -1759,7 +1761,7 @@ xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) {
 
     if (ctxt->context->origin == NULL)
        XP_ERROR(XPTR_SYNTAX_ERROR);
-    
+
     valuePush(ctxt, xmlXPtrNewLocationSetNodes(ctxt->context->origin, NULL));
 }
 
@@ -1768,7 +1770,7 @@ xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) {
  * @ctxt:  the XPointer Parser context
  * @nargs:  the number of args
  *
- * Function implementing start-point() operation 
+ * Function implementing start-point() operation
  * as described in 5.4.3
  * ----------------
  * location-set start-point(location-set)
@@ -1860,7 +1862,7 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
  * @ctxt:  the XPointer Parser context
  * @nargs:  the number of args
  *
- * Function implementing end-point() operation 
+ * Function implementing end-point() operation
  * as described in 5.4.3
  * ----------------------------
  * location-set end-point(location-set)
@@ -1996,7 +1998,7 @@ xmlXPtrCoveringRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) {
                        case XML_NOTATION_NODE:
                        case XML_HTML_DOCUMENT_NODE: {
                            int indx = xmlXPtrGetIndex(node);
-                            
+
                            node = node->parent;
                            return(xmlXPtrNewRange(node, indx - 1,
                                                   node, indx + 1));
@@ -2243,7 +2245,7 @@ xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
 
     cur = ctxt->cur;
     newset = xmlXPtrLocationSetCreate(NULL);
-    
+
     for (i = 0; i < oldset->nodeNr; i++) {
        ctxt->cur = cur;
 
@@ -2277,7 +2279,7 @@ xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
            res = valuePop(ctxt);
            xmlXPathFreeObject(res);
        }
-       
+
        ctxt->context->node = NULL;
     }
 
@@ -2297,14 +2299,14 @@ xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
  * @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 
+ * 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)
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
        return(NULL);
     if (cur->children != NULL) {
         cur = cur->children ;
@@ -2362,7 +2364,7 @@ xmlXPtrAdvanceChar(xmlNodePtr *node, int *indx, int bytes) {
     if ((node == NULL) || (indx == NULL))
        return(-1);
     cur = *node;
-    if (cur == NULL)
+    if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
        return(-1);
     pos = *indx;
 
@@ -2400,7 +2402,7 @@ xmlXPtrAdvanceChar(xmlNodePtr *node, int *indx, int bytes) {
            return(0);
        }
        /*
-        * We should have a text (or cdata) node ... 
+        * We should have a text (or cdata) node ...
         */
        len = 0;
        if ((cur->type != XML_ELEMENT_NODE) &&
@@ -2453,9 +2455,10 @@ xmlXPtrMatchString(const xmlChar *string, xmlNodePtr start, int startindex,
 
     if (string == NULL)
        return(-1);
-    if (start == NULL)
+    if ((start == NULL) || (start->type == XML_NAMESPACE_DECL))
        return(-1);
-    if ((end == NULL) || (endindex == NULL))
+    if ((end == NULL) || (*end == NULL) ||
+        ((*end)->type == XML_NAMESPACE_DECL) || (endindex == NULL))
        return(-1);
     cur = start;
     if (cur == NULL)
@@ -2538,13 +2541,12 @@ xmlXPtrSearchString(const xmlChar *string, xmlNodePtr *start, int *startindex,
 
     if (string == NULL)
        return(-1);
-    if ((start == NULL) || (startindex == NULL))
+    if ((start == NULL) || (*start == NULL) ||
+        ((*start)->type == XML_NAMESPACE_DECL) || (startindex == NULL))
        return(-1);
     if ((end == NULL) || (endindex == NULL))
        return(-1);
     cur = *start;
-    if (cur == NULL)
-       return(-1);
     pos = *startindex - 1;
     first = string[0];
 
@@ -2577,7 +2579,7 @@ xmlXPtrSearchString(const xmlChar *string, xmlNodePtr *start, int *startindex,
                    /*
                     * An empty string is considered to match before each
                     * character of the string-value and after the final
-                    * character. 
+                    * character.
                     */
 #ifdef DEBUG_RANGES
                    xmlGenericError(xmlGenericErrorContext,
@@ -2618,14 +2620,12 @@ xmlXPtrGetLastChar(xmlNodePtr *node, int *indx) {
     xmlNodePtr cur;
     int pos, len = 0;
 
-    if ((node == NULL) || (indx == NULL))
+    if ((node == NULL) || (*node == NULL) ||
+        ((*node)->type == XML_NAMESPACE_DECL) || (indx == NULL))
        return(-1);
     cur = *node;
     pos = *indx;
 
-    if (cur == NULL)
-       return(-1);
-
     if ((cur->type == XML_ELEMENT_NODE) ||
        (cur->type == XML_DOCUMENT_NODE) ||
        (cur->type == XML_HTML_DOCUMENT_NODE)) {
@@ -2729,7 +2729,7 @@ xmlXPtrGetEndPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
  * @nargs:  the number of args
  *
  * Function implementing the string-range() function
- * range as described in 5.4.2 
+ * range as described in 5.4.2
  *
  * ------------------------------
  * [Definition: For each location in the location-set argument,
@@ -2893,7 +2893,7 @@ error:
  * @ctxt:  the XPointer Parser context
  *
  *  [8]   Predicate ::=   '[' PredicateExpr ']'
- *  [9]   PredicateExpr ::=   Expr 
+ *  [9]   PredicateExpr ::=   Expr
  *
  * Evaluate a predicate as in xmlXPathEvalPredicate() but for
  * a Location Set instead of a node set
@@ -2942,7 +2942,7 @@ xmlXPtrEvalRangePredicate(xmlXPathParserContextPtr ctxt) {
         */
         cur = ctxt->cur;
        newset = xmlXPtrLocationSetCreate(NULL);
-       
+
         for (i = 0; i < oldset->locNr; i++) {
            ctxt->cur = cur;
 
@@ -2978,7 +2978,7 @@ xmlXPtrEvalRangePredicate(xmlXPathParserContextPtr ctxt) {
                res = valuePop(ctxt);
                xmlXPathFreeObject(res);
            }
-           
+
            ctxt->context->node = NULL;
        }
 
index 966a8de..5ef1819 100644 (file)
@@ -118,7 +118,7 @@ pytests: $(PYSCRIPTS) $(TESTDIRS)
 
 tests:
        -@(if [ -x $(PYTHON) ] ; then                                   \
-          $(MAKE) MAKEFLAGS+=--silent pytests ; fi);
+          $(MAKE) pytests ; fi);
 
 #
 # Heavy, works well only on RHEL3
@@ -126,7 +126,7 @@ tests:
 valgrind:
        -@(if [ -x $(PYTHON) ] ; then                                   \
           echo '## Running the regression tests under Valgrind' ;      \
-          $(MAKE) CHECKER='valgrind -q' MAKEFLAGS+=--silent pytests ; fi);
+          $(MAKE) CHECKER='valgrind -q' pytests ; fi);
 
 CLEANFILES=$(PYSCRIPTS) test.log
 
index 8aee9e7..d2eeaf8 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
 
 @SET_MAKE@
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -46,20 +63,24 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+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_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 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
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
-AS = @AS@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -96,6 +117,7 @@ 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@
@@ -151,7 +173,6 @@ RANLIB = @RANLIB@
 RDL_LIBS = @RDL_LIBS@
 READER_TEST = @READER_TEST@
 RELDATE = @RELDATE@
-RM = @RM@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -176,7 +197,6 @@ TEST_VTIME = @TEST_VTIME@
 TEST_XINCLUDE = @TEST_XINCLUDE@
 TEST_XPATH = @TEST_XPATH@
 TEST_XPTR = @TEST_XPTR@
-THREADS_W32 = @THREADS_W32@
 THREAD_CFLAGS = @THREAD_CFLAGS@
 THREAD_LIBS = @THREAD_LIBS@
 VERSION = @VERSION@
@@ -209,6 +229,7 @@ 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@
@@ -395,10 +416,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       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:
@@ -589,7 +615,7 @@ pytests: $(PYSCRIPTS) $(TESTDIRS)
 
 tests:
        -@(if [ -x $(PYTHON) ] ; then                                   \
-          $(MAKE) MAKEFLAGS+=--silent pytests ; fi);
+          $(MAKE) pytests ; fi);
 
 #
 # Heavy, works well only on RHEL3
@@ -597,7 +623,7 @@ tests:
 valgrind:
        -@(if [ -x $(PYTHON) ] ; then                                   \
           echo '## Running the regression tests under Valgrind' ;      \
-          $(MAKE) CHECKER='valgrind -q' MAKEFLAGS+=--silent pytests ; fi);
+          $(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.