diff --git a/Configurations/libxml2.xcconfig b/Configurations/libxml2.xcconfig index 220f72e..c64cd3b 100644 --- a/Configurations/libxml2.xcconfig +++ b/Configurations/libxml2.xcconfig @@ -3,4 +3,4 @@ INSTALL_PATH_ACTUAL = /usr/lib; PUBLIC_HEADERS_FOLDER_PATH = $(INDIGO_INSTALL_PATH_PREFIX)/usr/include/libxml2/libxml; DYLIB_COMPATIBILITY_VERSION = 10.0.0; -DYLIB_CURRENT_VERSION = 10.8.0; +DYLIB_CURRENT_VERSION = 10.9.0; diff --git a/NMakefile b/NMakefileArch similarity index 60% rename from NMakefile rename to NMakefileArch index ee01ff9..51fb0c0 100644 --- a/NMakefile +++ b/NMakefileArch @@ -1,27 +1,27 @@ -# This relies on the sources being prepared on a Mac OS X machine via 'make COPY_SOURCES=YES install_source' - -install: -# ========== libxml2 ========== - set PATH=$(PATH);$(CYGWINPATH) - $(CYGWINPATH)\bash "$(SRCROOT)\AppleInternal\tools\scripts\auto-version.sh" "$(OBJROOT)\libxml\obj" - cd "$(SRCROOT)\libxml2\win32" - cscript //nologo configure.js cruntime=/MD prefix="$(OBJROOT)\libxml" rinclude="$(OBJROOT)\libxml\obj\include" include="$(SRCROOT)\AppleInternal\include;$(SRCROOT)\AppleInternal\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility" lib="$(SRCROOT)\AppleInternal\lib" iconv=no icu=yes - nmake /f Makefile.msvc - nmake /f Makefile.msvc install - xcopy "$(OBJROOT)\libxml\bin\libxml2.*" "$(DSTROOT)\AppleInternal\bin" /e/v/i/h/y - xcopy "$(OBJROOT)\libxml\lib\*.dll" "$(DSTROOT)\AppleInternal\bin" /e/v/i/h/y - xcopy "$(OBJROOT)\libxml\lib\*.lib" "$(DSTROOT)\AppleInternal\lib" /e/v/i/h/y - xcopy "$(OBJROOT)\libxml\include\libxml" "$(DSTROOT)\AppleInternal\include\libxml" /e/v/i/h/y - -install_DEBUG: -# ========== libxml2 ========== - set PATH=$(PATH);$(CYGWINPATH) - $(CYGWINPATH)\bash "$(SRCROOT)\AppleInternal\tools\scripts\auto-version.sh" "$(OBJROOT)\libxml\obj" - cd "$(SRCROOT)\libxml2\win32" - cscript //nologo configure.js debug=1 cruntime=/MDd prefix="$(OBJROOT)\libxml" rinclude="$(OBJROOT)\libxml\obj\include" include="$(SRCROOT)\AppleInternal\include;$(SRCROOT)\AppleInternal\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility" lib="$(SRCROOT)\AppleInternal\lib" iconv=no icu=yes - nmake /f Makefile.msvc - nmake /f Makefile.msvc install - xcopy "$(OBJROOT)\libxml\bin\libxml*" "$(DSTROOT)\AppleInternal\bin" /e/v/i/h/y - xcopy "$(OBJROOT)\libxml\lib\*.dll" "$(DSTROOT)\AppleInternal\bin" /e/v/i/h/y - xcopy "$(OBJROOT)\libxml\lib\*.lib" "$(DSTROOT)\AppleInternal\lib" /e/v/i/h/y - xcopy "$(OBJROOT)\libxml\include\libxml" "$(DSTROOT)\AppleInternal\include\libxml" /e/v/i/h/y +# This relies on the sources being prepared on a Mac OS X machine via 'make COPY_SOURCES=YES install_source' + +install: +# ========== libxml2 ========== + set PATH=$(PATH);$(CYGWINPATH);$(PROGRAMFILESAAS) + $(CYGWINPATH)\bash "$(SRCROOT)\AppleInternal\tools\scripts\auto-version.sh" "$(OBJROOT)\libxml\obj" + cd "$(SRCROOT)\libxml2\win32" + cscript //nologo configure.js cruntime=/MD prefix="$(OBJROOT)\libxml" rinclude="$(OBJROOT)\libxml\obj\include" include="$(SRCROOT)\AppleInternal\include;$(SRCROOT)\AppleInternal\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility" lib="$(SRCROOT)\AppleInternal\lib$(ARCH)" iconv=no icu=yes + nmake /f Makefile.msvc + nmake /f Makefile.msvc install + xcopy "$(OBJROOT)\libxml\bin\libxml2.*" "$(DSTROOT)\$(PROGRAMFILESAAS)" /e/v/i/h/y + xcopy "$(OBJROOT)\libxml\lib\*.dll" "$(DSTROOT)\$(PROGRAMFILESAAS)" /e/v/i/h/y + xcopy "$(OBJROOT)\libxml\lib\*.lib" "$(DSTROOT)\AppleInternal\lib$(ARCH)" /e/v/i/h/y + xcopy "$(OBJROOT)\libxml\include\libxml2\libxml" "$(DSTROOT)\AppleInternal\include\libxml" /e/v/i/h/y + +install_DEBUG: +# ========== libxml2 ========== + set PATH=$(PATH);$(CYGWINPATH);$(PROGRAMFILESAAS) + $(CYGWINPATH)\bash "$(SRCROOT)\AppleInternal\tools\scripts\auto-version.sh" "$(OBJROOT)\libxml\obj" + cd "$(SRCROOT)\libxml2\win32" + cscript //nologo configure.js debug=1 cruntime=/MDd prefix="$(OBJROOT)\libxml" rinclude="$(OBJROOT)\libxml\obj\include" include="$(SRCROOT)\AppleInternal\include;$(SRCROOT)\AppleInternal\include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility" lib="$(SRCROOT)\AppleInternal\lib$(ARCH)" iconv=no icu=yes + nmake /f Makefile.msvc + nmake /f Makefile.msvc install + xcopy "$(OBJROOT)\libxml\bin\libxml*" "$(DSTROOT)\$(PROGRAMFILESAAS)" /e/v/i/h/y + xcopy "$(OBJROOT)\libxml\lib\*.dll" "$(DSTROOT)\$(PROGRAMFILESAAS)" /e/v/i/h/y + xcopy "$(OBJROOT)\libxml\lib\*.lib" "$(DSTROOT)\AppleInternal\lib$(ARCH)" /e/v/i/h/y + xcopy "$(OBJROOT)\libxml\include\libxml2\libxml" "$(DSTROOT)\AppleInternal\include\libxml" /e/v/i/h/y diff --git a/Pregenerated Files/config.h b/Pregenerated Files/config.h index 8f30ec3..3bfd368 100644 --- a/Pregenerated Files/config.h +++ b/Pregenerated Files/config.h @@ -1,7 +1,7 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.in by autoheader. */ #define PACKAGE "libxml2" -#define VERSION "2.7.8" +#define VERSION "2.9.0" #define HAVE_LIBZ 1 /* #undef HAVE_LIBM */ #define HAVE_ISINF diff --git a/Pregenerated Files/libxml/xmlversion.h b/Pregenerated Files/libxml/xmlversion.h index 7cf0076..7e76fe5 100644 --- a/Pregenerated Files/libxml/xmlversion.h +++ b/Pregenerated Files/libxml/xmlversion.h @@ -29,21 +29,21 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); * * the version string like "1.2.3" */ -#define LIBXML_DOTTED_VERSION "2.7.8" +#define LIBXML_DOTTED_VERSION "2.9.0" /** * LIBXML_VERSION: * * the version number: 1.2.3 value is 10203 */ -#define LIBXML_VERSION 20708 +#define LIBXML_VERSION 20900 /** * LIBXML_VERSION_STRING: * * the version number string, 1.2.3 value is "10203" */ -#define LIBXML_VERSION_STRING "20708" +#define LIBXML_VERSION_STRING "20900" /** * LIBXML_VERSION_EXTRA: @@ -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(20708); +#define LIBXML_TEST_VERSION xmlCheckVersion(20900); #ifndef VMS #if 0 @@ -396,6 +396,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); #include #endif +/** + * LIBXML_LZMA_ENABLED: + * + * Whether the Lzma support is compiled in + */ +#if 0 +#define LIBXML_LZMA_ENABLED +#endif + /** * ATTRIBUTE_UNUSED: * @@ -403,7 +412,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 /** diff --git a/Pregenerated Files/xml2-config b/Pregenerated Files/xml2-config index 4a6064c..d048ef8 100755 --- a/Pregenerated Files/xml2-config +++ b/Pregenerated Files/xml2-config @@ -30,12 +30,12 @@ while test $# -gt 0; do case "$1" in --version) - echo 2.7.8 + echo 2.9.0 exit 0 ;; --prefix) - echo /usr + echo $(xcrun --show-sdk-path)/usr exit 0 ;; @@ -44,7 +44,7 @@ while test $# -gt 0; do ;; --cflags) - echo -I/usr/include/libxml2 + echo -I$(xcrun --show-sdk-path)/usr/include/libxml2 ;; --modules) diff --git a/buildlibxmlforaas.bat b/buildlibxmlforaas.bat new file mode 100644 index 0000000..110ddd7 --- /dev/null +++ b/buildlibxmlforaas.bat @@ -0,0 +1,8 @@ +set ARCH=32 +set PROGRAMFILESAAS=Program Files (x86)\Common Files\Apple\Apple Application Support +call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" x86 +nmake /f NMakefileArch %1 +set ARCH=64 +set PROGRAMFILESAAS=Program Files\Common Files\Apple\Apple Application Support +call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" amd64 +nmake /f NMakefileArch %1 diff --git a/libxml2.plist b/libxml2.plist index 11d82ca..9906939 100644 --- a/libxml2.plist +++ b/libxml2.plist @@ -5,15 +5,15 @@ OpenSourceProject libxml2 OpenSourceVersion - 2.7.8 + 2.9.0 OpenSourceWebsiteURL http://xmlsoft.org/ OpenSourceURL - http://xmlsoft.org/sources/libxml2-2.7.8.tar.gz + http://xmlsoft.org/sources/libxml2-2.9.0.tar.gz OpenSourceMD5 - 8127a65e8c3b08856093099b52599c86 + 5b9bebf4f5d2200ae2c4efe8fa6103f7 OpenSourceImportDate - 2012-01-20 + 2012-12-11 OpenSourceLicense other OpenSourceLicenseFile @@ -34,6 +34,8 @@ rdar://problem/10734584 rdar://problem/10734593 rdar://problem/10772343 + rdar://problem/12751928 + rdar://problem/12938958 diff --git a/libxml2.xcodeproj/project.pbxproj b/libxml2.xcodeproj/project.pbxproj index ee7dfcd..3bfb033 100644 --- a/libxml2.xcodeproj/project.pbxproj +++ b/libxml2.xcodeproj/project.pbxproj @@ -23,6 +23,7 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 5D0359B91677F7FC00B6692E /* buf.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D0359B81677F7FC00B6692E /* buf.c */; }; 5D58B01614F81A8D00BE69D8 /* c14n.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D58AFCE14F81A8D00BE69D8 /* c14n.c */; }; 5D58B01714F81A8D00BE69D8 /* catalog.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D58AFCF14F81A8D00BE69D8 /* catalog.c */; }; 5D58B01814F81A8D00BE69D8 /* chvalid.c in Sources */ = {isa = PBXBuildFile; fileRef = 5D58AFD014F81A8D00BE69D8 /* chvalid.c */; }; @@ -234,6 +235,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 5D0359B81677F7FC00B6692E /* buf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = buf.c; sourceTree = ""; }; 5D58AF5C14F815F500BE69D8 /* libxml2.2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libxml2.2.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 5D58AF6A14F816DF00BE69D8 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = ""; }; 5D58AF6B14F816DF00BE69D8 /* libxml2.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = libxml2.xcconfig; sourceTree = ""; }; @@ -434,6 +436,7 @@ 5D58AF6D14F819EA00BE69D8 /* Source */ = { isa = PBXGroup; children = ( + 5D0359B81677F7FC00B6692E /* buf.c */, 5DB38B1614F881090060A507 /* xmlcatalog.c */, 5DB38AF714F87C740060A507 /* xmllint.c */, 5D58AFCE14F81A8D00BE69D8 /* c14n.c */, @@ -796,6 +799,7 @@ 5D58B05B14F81A8D00BE69D8 /* xmlwriter.c in Sources */, 5D58B05C14F81A8D00BE69D8 /* xpath.c in Sources */, 5D58B05D14F81A8D00BE69D8 /* xpointer.c in Sources */, + 5D0359B91677F7FC00B6692E /* buf.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/libxml2/Copyright b/libxml2/Copyright index 417e955..d613185 100644 --- a/libxml2/Copyright +++ b/libxml2/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. diff --git a/libxml2/DOCBparser.c b/libxml2/DOCBparser.c index 3573743..f12511b 100644 --- a/libxml2/DOCBparser.c +++ b/libxml2/DOCBparser.c @@ -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. diff --git a/libxml2/HTMLparser.c b/libxml2/HTMLparser.c index 4d43b93..eda608b 100644 --- a/libxml2/HTMLparser.c +++ b/libxml2/HTMLparser.c @@ -44,6 +44,9 @@ #include #include +#include "buf.h" +#include "enc.h" + #define HTML_MAX_NAMELEN 1000 #define HTML_PARSER_BIG_BUFFER_SIZE 1000 #define HTML_PARSER_BUFFER_SIZE 100 @@ -727,7 +730,7 @@ static const char* const map_contents[] = { BLOCK, "area", NULL } ; static const char* const name_attr[] = { "name", NULL } ; static const char* const action_attr[] = { "action", NULL } ; static const char* const blockli_elt[] = { BLOCK, "li", NULL } ; -static const char* const meta_attrs[] = { I18N, "http-equiv", "name", "scheme", NULL } ; +static const char* const meta_attrs[] = { I18N, "http-equiv", "name", "scheme", "charset", NULL } ; static const char* const content_attr[] = { "content", NULL } ; static const char* const type_attr[] = { "type", NULL } ; static const char* const noframes_content[] = { "body", FLOW MODIFIER, NULL } ; @@ -1080,9 +1083,9 @@ static const char * const htmlStartClose[] = { "menu", "p", "head", "ul", NULL, "p", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", FONTSTYLE, NULL, "div", "p", "head", NULL, -"noscript", "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 */ +"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) @@ -3435,34 +3486,26 @@ htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) { } /** - * htmlCheckEncoding: + * htmlCheckEncodingDirect: * @ctxt: an HTML parser context * @attvalue: the attribute value * - * Checks an http-equiv attribute from a Meta tag to detect + * Checks an attribute value to detect * the encoding * If a new encoding is detected the parser is switched to decode * it and pass UTF8 */ static void -htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) { - const xmlChar *encoding; +htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) { - if ((ctxt == NULL) || (attvalue == NULL)) + if ((ctxt == NULL) || (encoding == NULL) || + (ctxt->options & HTML_PARSE_IGNORE_ENC)) return; /* do not change encoding */ if (ctxt->input->encoding != NULL) return; - encoding = xmlStrcasestr(attvalue, BAD_CAST"charset="); - if (encoding != NULL) { - encoding += 8; - } else { - encoding = xmlStrcasestr(attvalue, BAD_CAST"charset ="); - if (encoding != NULL) - encoding += 9; - } if (encoding != NULL) { xmlCharEncoding enc; xmlCharEncodingHandlerPtr handler; @@ -3500,7 +3543,9 @@ htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) { xmlSwitchToEncoding(ctxt, handler); ctxt->charset = XML_CHAR_ENCODING_UTF8; } else { - ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING; + htmlParseErr(ctxt, XML_ERR_UNSUPPORTED_ENCODING, + "htmlCheckEncoding: unknown encoding %s\n", + encoding, NULL); } } @@ -3515,23 +3560,50 @@ htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) { * 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); } } } +/** + * htmlCheckEncoding: + * @ctxt: an HTML parser context + * @attvalue: the attribute value + * + * Checks an http-equiv attribute from a Meta tag to detect + * the encoding + * If a new encoding is detected the parser is switched to decode + * it and pass UTF8 + */ +static void +htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) { + const xmlChar *encoding; + + if (!attvalue) + return; + + encoding = xmlStrcasestr(attvalue, BAD_CAST"charset"); + if (encoding != NULL) { + encoding += 7; + } + /* + * skip blank + */ + if (encoding && IS_BLANK_CH(*encoding)) + encoding = xmlStrcasestr(attvalue, BAD_CAST"="); + if (encoding && *encoding == '=') { + encoding ++; + htmlCheckEncodingDirect(ctxt, encoding); + } +} + /** * htmlCheckMeta: * @ctxt: an HTML parser context @@ -3556,6 +3628,8 @@ htmlCheckMeta(htmlParserCtxtPtr ctxt, const xmlChar **atts) { if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"http-equiv")) && (!xmlStrcasecmp(value, BAD_CAST"Content-Type"))) http = 1; + else if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"charset"))) + htmlCheckEncodingDirect(ctxt, value); else if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"content"))) content = value; att = atts[i++]; @@ -3885,6 +3959,7 @@ htmlParseEndTag(htmlParserCtxtPtr ctxt) if ((oldname != NULL) && (xmlStrEqual(oldname, name))) { if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) ctxt->sax->endElement(ctxt->userData, name); + htmlNodeInfoPop(ctxt); htmlnamePop(ctxt); ret = 1; } else { @@ -4877,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); @@ -4996,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 */ @@ -5089,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 @@ -5123,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++) { @@ -5173,6 +5246,8 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { int avail = 0; xmlChar cur, next; + htmlParserNodeInfo node_info; + #ifdef DEBUG_PUSH switch (ctxt->instate) { case XML_PARSER_EOF: @@ -5233,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)) { @@ -5269,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, @@ -5311,11 +5386,24 @@ 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); - if (avail < 2) + avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base); + /* + * no chars in buffer + */ + if (avail < 1) goto done; + /* + * not enouth chars in buffer + */ + if (avail < 2) { + if (!terminate) + goto done; + else + next = ' '; + } else { + next = in->cur[1]; + } cur = in->cur[0]; - next = in->cur[1]; if ((cur == '<') && (next == '!') && (in->cur[2] == '-') && (in->cur[3] == '-')) { if ((!terminate) && @@ -5371,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]; @@ -5412,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]; @@ -5465,8 +5553,22 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { int failed; const htmlElemDesc * info; - if (avail < 2) + /* + * no chars in buffer + */ + if (avail < 1) goto done; + /* + * not enouth chars in buffer + */ + if (avail < 2) { + if (!terminate) + goto done; + else + next = ' '; + } else { + next = in->cur[1]; + } cur = in->cur[0]; if (cur != '<') { ctxt->instate = XML_PARSER_CONTENT; @@ -5476,7 +5578,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { #endif break; } - if (in->cur[1] == '/') { + if (next == '/') { ctxt->instate = XML_PARSER_END_TAG; ctxt->checkIndex = 0; #ifdef DEBUG_PUSH @@ -5489,6 +5591,14 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0)) goto done; + /* Capture start position */ + if (ctxt->record_info) { + node_info.begin_pos = ctxt->input->consumed + + (CUR_PTR - ctxt->input->base); + node_info.begin_line = ctxt->input->line; + } + + failed = htmlParseStartTag(ctxt); name = ctxt->name; if ((failed == -1) || @@ -5538,6 +5648,9 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { htmlnamePop(ctxt); } + if (ctxt->record_info) + htmlNodeInfoPush(ctxt, &node_info); + ctxt->instate = XML_PARSER_CONTENT; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -5554,6 +5667,10 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { ctxt->sax->endElement(ctxt->userData, name); htmlnamePop(ctxt); } + + if (ctxt->record_info) + htmlNodeInfoPush(ctxt, &node_info); + ctxt->instate = XML_PARSER_CONTENT; #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, @@ -5581,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) @@ -5906,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); @@ -5916,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 @@ -5934,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); } } } @@ -6034,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 @@ -6478,6 +6595,50 @@ htmlCtxtReset(htmlParserCtxtPtr ctxt) } } +#ifdef __APPLE__ +#include +#include + +extern int dyld_get_program_sdk_version(void); +#define DYLD_MACOSX_VERSION_10_9 0x000A0900 + +// libxml2 v2.9 changed the HTML parser's handling of whitespace in a way that broke +// H&R Block at Home 2010. Detect H&R Block at Home 2010 and mimic the old parser behavior. +static bool evaluteHTMLParserNeedsNoBlankQuirkCriteria(void) +{ + const char* executablePath = _dyld_get_image_name(0); + if (!executablePath) + return false; + + // Find the base name portion of the path. + const char* executableName = strrchr(executablePath, '/'); + if (!executableName) + return false; + + // Move past the slash. + executableName++; + + if (strcmp(executableName, "TaxCut.real")) + return false; + + // Apply the workaround if the application was linked against an SDK prior to where + // libxml2 v2.9 was present. + return dyld_get_program_sdk_version() < DYLD_MACOSX_VERSION_10_9; +} + +static bool htmlParserNeedsNoBlankQuirk(void) +{ + static bool needsQuirk; + static dispatch_once_t hasEvaluatedQuirk; + dispatch_once(&hasEvaluatedQuirk, ^{ + needsQuirk = evaluteHTMLParserNeedsNoBlankQuirkCriteria(); + }); + + return needsQuirk; +} + +#endif + /** * htmlCtxtUseOptions: * @ctxt: an HTML parser context @@ -6494,6 +6655,11 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options) if (ctxt == NULL) return(-1); +#if __APPLE__ + if (htmlParserNeedsNoBlankQuirk()) + options |= XML_PARSE_NOBLANKS; +#endif + if (options & HTML_PARSE_NOWARNING) { ctxt->sax->warning = NULL; ctxt->vctxt.warning = NULL; @@ -6537,6 +6703,14 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options) ctxt->options |= HTML_PARSE_NODEFDTD; options -= HTML_PARSE_NODEFDTD; } + if (options & HTML_PARSE_IGNORE_ENC) { + ctxt->options |= HTML_PARSE_IGNORE_ENC; + options -= HTML_PARSE_IGNORE_ENC; + } + if (options & HTML_PARSE_NOIMPLIED) { + ctxt->options |= HTML_PARSE_NOIMPLIED; + options -= HTML_PARSE_NOIMPLIED; + } ctxt->dictNames = 0; return (options); } @@ -6730,8 +6904,11 @@ htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx, XML_CHAR_ENCODING_NONE); - if (input == NULL) + if (input == NULL) { + if (ioclose != NULL) + ioclose(ioctx); return (NULL); + } ctxt = htmlNewParserCtxt(); if (ctxt == NULL) { xmlFreeParserInputBuffer(input); @@ -6930,8 +7107,11 @@ htmlCtxtReadIO(htmlParserCtxtPtr ctxt, xmlInputReadCallback ioread, input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx, XML_CHAR_ENCODING_NONE); - if (input == NULL) + if (input == NULL) { + if (ioclose != NULL) + ioclose(ioctx); return (NULL); + } stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE); if (stream == NULL) { xmlFreeParserInputBuffer(input); diff --git a/libxml2/HTMLtree.c b/libxml2/HTMLtree.c index 0b0232a..588608e 100644 --- a/libxml2/HTMLtree.c +++ b/libxml2/HTMLtree.c @@ -30,16 +30,18 @@ #include #include +#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 @@ htmlGetMetaEncoding(htmlDocPtr doc) { 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; @@ -151,7 +153,7 @@ htmlGetMetaEncoding(htmlDocPtr doc) { * htmlSetMetaEncoding: * @doc: the document * @encoding: the encoding string - * + * * Sets the current encoding in the Meta tags * NOTE: this will not change the document content encoding, just * the META flag associated. @@ -164,6 +166,7 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) { const xmlChar *content = NULL; char newcontent[100]; + newcontent[0] = 0; if (doc == NULL) return(-1); @@ -244,7 +247,7 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) { http = 1; else { - if ((value != NULL) && + if ((value != NULL) && (!xmlStrcasecmp(attr->name, BAD_CAST"content"))) content = value; } @@ -278,8 +281,13 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) { xmlNewProp(meta, BAD_CAST"content", BAD_CAST newcontent); } } else { + /* remove the meta tag if NULL is passed */ + if (encoding == NULL) { + xmlUnlinkNode(meta); + xmlFreeNode(meta); + } /* change the document only if there is a real encoding change */ - if (xmlStrcasestr(content, encoding) == NULL) { + else if (xmlStrcasestr(content, encoding) == NULL) { xmlSetProp(meta, BAD_CAST"content", BAD_CAST newcontent); } } @@ -308,7 +316,7 @@ static const char* const 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 @@ -332,7 +340,7 @@ xmlOutputBufferPtr xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder); /************************************************************************ * * - * Output error handlers * + * Output error handlers * * * ************************************************************************/ /** @@ -381,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 @@ -400,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; @@ -426,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); } @@ -446,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); } /** @@ -481,7 +500,7 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc, if (enc != XML_CHAR_ENCODING_UTF8) { handler = xmlFindCharEncodingHandler(encoding); if (handler == NULL) - return(-1); + htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding); } } @@ -493,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); @@ -562,11 +581,9 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) { } handler = xmlFindCharEncodingHandler(encoding); - if (handler == NULL) { - *mem = NULL; - *size = 0; - return; - } + if (handler == NULL) + htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding); + } else { handler = xmlFindCharEncodingHandler(encoding); } @@ -587,15 +604,15 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) { return; } - htmlDocContentDumpFormatOutput(buf, cur, NULL, format); + htmlDocContentDumpFormatOutput(buf, cur, NULL, 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); } @@ -617,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 * * * ************************************************************************/ @@ -628,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. @@ -646,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"); } @@ -673,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) { @@ -703,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 { @@ -1061,7 +1083,7 @@ htmlDocDump(FILE *f, xmlDocPtr cur) { handler = xmlFindCharEncodingHandler(encoding); if (handler == NULL) - return(-1); + htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding); } else { handler = xmlFindCharEncodingHandler(encoding); } @@ -1101,7 +1123,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) { if ((cur == NULL) || (filename == NULL)) return(-1); - + xmlInitParser(); encoding = (const char *) htmlGetMetaEncoding(cur); @@ -1120,7 +1142,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) { handler = xmlFindCharEncodingHandler(encoding); if (handler == NULL) - return(-1); + htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding); } } @@ -1132,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); @@ -1152,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 @@ -1181,7 +1203,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur, handler = xmlFindCharEncodingHandler(encoding); if (handler == NULL) - return(-1); + htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding); } htmlSetMetaEncoding(cur, (const xmlChar *) encoding); } else { @@ -1196,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); @@ -1216,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/libxml2/Makefile.am b/libxml2/Makefile.am index 9af7167..96de46e 100644 --- a/libxml2/Makefile.am +++ b/libxml2/Makefile.am @@ -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@ +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@ $(ICONV_LIBS) $(ICU_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 +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 -endif + xmlmodule.c schematron.c xzlib.c DEPS = $(top_builddir)/libxml2.la -LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) $(ICU_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ +LDADDS = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(ICU_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,19 +1159,19 @@ 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) - (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn win32 macos vms VxWorks bakefile test result) | (cd $(distdir); tar xf -) + (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git win32 macos vms VxWorks bakefile test result) | (cd $(distdir); tar xf -) dist-source: distdir $(AMTAR) -chof - --exclude Tests --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz dist-test: distdir (mkdir -p $(distdir)) - (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn xstc/Tests) | (cd $(distdir); tar xf -) + (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git xstc/Tests) | (cd $(distdir); tar xf -) tar -cf - $(distdir)/test $(distdir)/result $(distdir)/xstc/Tests $(distdir)/Makefile.tests $(distdir)/README $(distdir)/README.tests $(distdir)/AUTHORS $(distdir)/testapi.c $(distdir)/runtest.c $(distdir)/runsuite.c | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-tests+"`.tar.gz @(rm -rf $(distdir)/xstc/Test) @@ -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 \ - 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 @@ -1231,7 +1244,7 @@ uninstall-local: rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE) tst: tst.c - $(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz + $(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz -llzma sparse: clean $(MAKE) CC=cgcc diff --git a/libxml2/README b/libxml2/README index f1817aa..749e671 100644 --- a/libxml2/README +++ b/libxml2/README @@ -31,7 +31,7 @@ The list archive is at: http://mail.gnome.org/archives/xml/ All technical answers asked privately will be automatically answered on -the list and archived for public access unless pricacy is explicitely +the list and archived for public access unless privacy is explicitly required and justified. Daniel Veillard diff --git a/libxml2/README.tests b/libxml2/README.tests index 66522ab..8d86f2a 100644 --- a/libxml2/README.tests +++ b/libxml2/README.tests @@ -14,17 +14,26 @@ program has a different testing purpose: The command: + make check +or make -f Makefile.tests check should be sufficient on an Unix system to build and exercise the tests for the version of the library installed on the system. Note however that there isn't backward compatibility provided so if the installed -version is older to the testsuite one, failing to compile or run the tests +version is older than the testsuite one, failing to compile or run the tests is likely. In any event this won't work with an installed libxml2 older than 2.6.20. -Building on other platfroms should be a matter of compiling the C files + +Building on other platforms should be a matter of compiling the C files like any other program using libxml2, running the test should be done simply by launching the resulting executables. +Also note the availability of a "make valgrind" target which will run the +above tests under valgrind to check for memory errors (but this relies +on the availability of the valgrind command and take far more time to +complete). + Daniel Veillard -Thu Jul 24 2008 +Mon May 7 2012 + diff --git a/libxml2/SAX.c b/libxml2/SAX.c index 8e5d460..292af57 100644 --- a/libxml2/SAX.c +++ b/libxml2/SAX.c @@ -41,7 +41,7 @@ void initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning) { - + if(hdlr->initialized == 1) return; diff --git a/libxml2/SAX2.c b/libxml2/SAX2.c index c0482c0..a929d13 100644 --- a/libxml2/SAX2.c +++ b/libxml2/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__); @@ -57,12 +57,29 @@ */ 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 @@ xmlCheckDefaultedAttributes(xmlParserCtxtPtr ctxt, const xmlChar *name, * - 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 @@ -1756,7 +1786,6 @@ void xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; - xmlParserNodeInfo node_info; xmlNodePtr cur; if (ctx == NULL) return; @@ -1767,13 +1796,13 @@ 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) { - node_info.end_pos = ctxt->input->cur - ctxt->input->base; - node_info.end_line = ctxt->input->line; - node_info.node = cur; - xmlParserAddNodeInfo(ctxt, &node_info); + ctxt->nodeInfo->end_pos = ctxt->input->cur - ctxt->input->base; + ctxt->nodeInfo->end_line = ctxt->input->line; + ctxt->nodeInfo->node = cur; + xmlParserAddNodeInfo(ctxt, ctxt->nodeInfo); } ctxt->nodemem = -1; @@ -1784,7 +1813,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED) cur); #endif /* LIBXML_VALID_ENABLED */ - + /* * end of parsing of this node. */ @@ -1800,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 */ @@ -1834,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; @@ -1866,8 +1895,17 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) { } 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); @@ -1880,7 +1918,7 @@ xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) { * @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 @@ -1946,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; @@ -1970,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); @@ -2056,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; @@ -2130,6 +2168,50 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt, xmlFree(dup); } +#ifdef __APPLE__ +#include +#include + +extern int dyld_get_program_sdk_version(void); +#define DYLD_MACOSX_VERSION_10_9 0x000A0900 + +// libxml2 v2.9 changed how elements with undeclared namespace prefixes are handled, an error case that has undefined behavior, +// in such a way that broke Microsoft Document Connection. Detect Microsoft Document Connection and mimic the old behavior. +static bool evaluateStartElementNSNeedsUndeclaredPrefixQuirk(void) +{ + const char* executablePath = _dyld_get_image_name(0); + if (!executablePath) + return false; + + // Find the base name portion of the path. + const char* executableName = strrchr(executablePath, '/'); + if (!executableName) + return false; + + // Move past the slash. + executableName++; + + if (strcmp(executableName, "Microsoft Document Connection")) + return false; + + // Apply the workaround if the application was linked against an SDK prior to where + // libxml2 v2.9 was present. + return dyld_get_program_sdk_version() < DYLD_MACOSX_VERSION_10_9; +} + +static bool startElementNSNeedsUndeclaredPrefixQuirk(void) +{ + static bool needsQuirk; + static dispatch_once_t hasEvaluatedQuirk; + dispatch_once(&hasEvaluatedQuirk, ^{ + needsQuirk = evaluateStartElementNSNeedsUndeclaredPrefixQuirk(); + }); + + return needsQuirk; +} + +#endif + /** * xmlSAX2StartElementNs: * @ctx: the user data (XML parser context) @@ -2163,6 +2245,7 @@ xmlSAX2StartElementNs(void *ctx, xmlNodePtr parent; xmlNsPtr last = NULL, ns; const xmlChar *uri, *pref; + xmlChar *lname = NULL; int i, j; if (ctx == NULL) return; @@ -2170,17 +2253,37 @@ 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; } +#ifdef __APPLE__ + if (!startElementNSNeedsUndeclaredPrefixQuirk()) { +#endif + /* + * Take care of the rare case of an undefined namespace prefix + */ + if ((prefix != NULL) && (URI == NULL)) { + if (ctxt->dictNames) { + const xmlChar *fullname; + + fullname = xmlDictQLookup(ctxt->dict, prefix, localname); + if (fullname != NULL) + localname = fullname; + } else { + lname = xmlBuildQName(localname, prefix, NULL, 0); + } + } +#ifdef __APPLE__ + } +#endif /* * allocate the node */ @@ -2194,7 +2297,10 @@ xmlSAX2StartElementNs(void *ctx, if (ctxt->dictNames) ret->name = localname; else { - ret->name = xmlStrdup(localname); + if (lname == NULL) + ret->name = xmlStrdup(localname); + else + ret->name = lname; if (ret->name == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); return; @@ -2204,10 +2310,13 @@ xmlSAX2StartElementNs(void *ctx, xmlRegisterNodeDefaultValue(ret); } else { if (ctxt->dictNames) - ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, + ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, (xmlChar *) localname, NULL); - else + else if (lname == NULL) ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL); + else + ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, + (xmlChar *) lname, NULL); if (ret == NULL) { xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); return; @@ -2222,7 +2331,7 @@ xmlSAX2StartElementNs(void *ctx, } } - if ((ctxt->myDoc->children == NULL) || (parent == NULL)) { + if (parent == NULL) { xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); } /* @@ -2314,8 +2423,33 @@ xmlSAX2StartElementNs(void *ctx, */ if (nb_attributes > 0) { for (j = 0,i = 0;i < nb_attributes;i++,j+=5) { + /* + * Handle the rare case of an undefined atribute prefix + */ + if ((attributes[j+1] != NULL) && (attributes[j+2] == NULL)) { + if (ctxt->dictNames) { + const xmlChar *fullname; + + fullname = xmlDictQLookup(ctxt->dict, attributes[j+1], + attributes[j]); + if (fullname != NULL) { + xmlSAX2AttributeNs(ctxt, fullname, NULL, + attributes[j+3], attributes[j+4]); + continue; + } + } else { + lname = xmlBuildQName(attributes[j], attributes[j+1], + NULL, 0); + if (lname != NULL) { + xmlSAX2AttributeNs(ctxt, lname, NULL, + attributes[j+3], attributes[j+4]); + xmlFree(lname); + continue; + } + } + } xmlSAX2AttributeNs(ctxt, attributes[j], attributes[j+1], - attributes[j+3], attributes[j+4]); + attributes[j+3], attributes[j+4]); } } @@ -2386,7 +2520,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) @@ -2491,7 +2625,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; @@ -2595,7 +2729,7 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target, xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret); return; } - if ((ctxt->myDoc->children == NULL) || (parent == NULL)) { + if (parent == NULL) { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "Setting PI %s as root\n", target); @@ -2656,7 +2790,7 @@ xmlSAX2Comment(void *ctx, const xmlChar *value) xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret); return; } - if ((ctxt->myDoc->children == NULL) || (parent == NULL)) { + if (parent == NULL) { #ifdef DEBUG_SAX_TREE xmlGenericError(xmlGenericErrorContext, "Setting xmlSAX2Comment as root\n"); diff --git a/libxml2/acconfig.h b/libxml2/acconfig.h deleted file mode 100644 index dedcf1d..0000000 --- a/libxml2/acconfig.h +++ /dev/null @@ -1,16 +0,0 @@ -#undef PACKAGE -#undef VERSION -#undef HAVE_LIBZ -#undef HAVE_LIBM -#undef HAVE_ISINF -#undef HAVE_ISNAN -#undef HAVE_LIBHISTORY -#undef HAVE_LIBREADLINE -#undef HAVE_LIBPTHREAD -#undef HAVE_PTHREAD_H - -/* Define if IPV6 support is there */ -#undef SUPPORT_IP6 - -/* Define if getaddrinfo is there */ -#undef HAVE_GETADDRINFO diff --git a/libxml2/acinclude.m4 b/libxml2/acinclude.m4 index 4ff672e..7ad8630 100644 --- a/libxml2/acinclude.m4 +++ b/libxml2/acinclude.m4 @@ -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 diff --git a/libxml2/autogen.sh b/libxml2/autogen.sh index 665d336..8b47ea5 100755 --- a/libxml2/autogen.sh +++ b/libxml2/autogen.sh @@ -16,7 +16,7 @@ DIE=0 DIE=1 } -(libtool --version) < /dev/null > /dev/null 2>&1 || { +(libtoolize --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have libtool installed to compile libxml." echo "Download the appropriate package for your distribution," @@ -41,9 +41,23 @@ test -f entities.c || { exit 1 } -if test -z "$*"; then - echo "I am going to run ./configure with no arguments - if you wish " +EXTRA_ARGS= +if test "x$1" = "x--system"; then + shift + prefix=/usr + libdir=$prefix/lib + sysconfdir=/etc + localstatedir=/var + if [ -d /usr/lib64 ]; then + libdir=$prefix/lib64 + fi + EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir" + echo "Running ./configure with $EXTRA_ARGS $@" +else + if test -z "$NOCONFIGURE" && test -z "$*"; then + echo "I am going to run ./configure with no arguments - if you wish " echo "to pass any to it, please specify them on the $0 command line." + fi fi if [ ! -d $srcdir/m4 ]; then @@ -51,11 +65,7 @@ if [ ! -d $srcdir/m4 ]; then fi # Replaced by autoreconf below -#libtoolize --copy --force -#aclocal $ACLOCAL_FLAGS -#automake --force-missing --add-missing --copy --foreign -#autoconf -autoreconf -if +autoreconf -if -Wall cd $THEDIR @@ -64,7 +74,8 @@ if test x$OBJ_DIR != x; then cd "$OBJ_DIR" fi -$srcdir/configure "$@" - -echo -echo "Now type 'make' to compile libxml." +if test -z "$NOCONFIGURE"; then + $srcdir/configure $EXTRA_ARGS "$@" + echo + echo "Now type 'make' to compile libxml2." +fi diff --git a/libxml2/buf.c b/libxml2/buf.c new file mode 100644 index 0000000..d1756c4 --- /dev/null +++ b/libxml2/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 /* for memset() only ! */ +#include +#ifdef HAVE_CTYPE_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif + +#include +#include +#include +#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 """, 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/libxml2/buf.h b/libxml2/buf.h new file mode 100644 index 0000000..e8c7715 --- /dev/null +++ b/libxml2/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 + +#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/libxml2/c14n.c b/libxml2/c14n.c index 9c3cad2..afd95b3 100644 --- a/libxml2/c14n.c +++ b/libxml2/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 */ #define IN_LIBXML @@ -27,6 +27,8 @@ #include #include +#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 &, all open angle brackets (<) are replaced by <, all closing - * angle brackets (>) are replaced by >, and all #xD characters are + * the string value, except all ampersands are replaced + * by &, all open angle brackets (<) are replaced by <, all closing + * angle brackets (>) are replaced by >, and all #xD characters are * replaced by . */ /* 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 (). 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 (). 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 (). 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 (). 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) diff --git a/libxml2/catalog.c b/libxml2/catalog.c index f33a0aa..8e34cd2 100644 --- a/libxml2/catalog.c +++ b/libxml2/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 #include +#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,19 +1397,17 @@ 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); - if (catal->children != NULL) - return(-1); /* * lock the whole catalog for modification @@ -1497,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); @@ -1550,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; } @@ -1573,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); @@ -1788,7 +1787,7 @@ xmlCatalogXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID, } if (nbList < MAX_DELEGATE) delegates[nbList++] = cur->URL; - + if (cur->children == NULL) { xmlFetchXMLCatalogFile(cur); } @@ -2001,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)) @@ -2010,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) { @@ -2090,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) @@ -2150,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] != '-')))) @@ -2685,7 +2684,7 @@ xmlLoadACatalog(const char *filename) first = content; - + while ((*first != 0) && (*first != '-') && (*first != '<') && (!(((*first >= 'A') && (*first <= 'Z')) || ((*first >= 'a') && (*first <= 'z'))))) @@ -2780,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); @@ -2815,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); @@ -2934,7 +2933,7 @@ xmlACatalogDump(xmlCatalogPtr catal, FILE *out) { } else { xmlHashScan(catal->sgml, (xmlHashScanner) xmlCatalogDumpEntry, out); - } + } } #endif /* LIBXML_OUTPUT_ENABLED */ @@ -2942,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 @@ -3001,7 +3000,7 @@ xmlACatalogRemove(xmlCatalogPtr catal, const xmlChar *value) { (xmlHashDeallocator) xmlFreeCatalogEntry); if (res == 0) res = 1; - } + } return(res); } @@ -3060,7 +3059,7 @@ xmlCatalogIsEmpty(xmlCatalogPtr catal) { return(1); if (res < 0) return(-1); - } + } return(0); } @@ -3083,7 +3082,7 @@ xmlInitializeCatalogData(void) { if (xmlCatalogInitialized != 0) return; - if (getenv("XML_DEBUG_CATALOG")) + if (getenv("XML_DEBUG_CATALOG")) xmlDebugCatalogs = 1; xmlCatalogMutex = xmlNewRMutex(); @@ -3104,7 +3103,7 @@ xmlInitializeCatalog(void) { xmlInitializeCatalogData(); xmlRMutexLock(xmlCatalogMutex); - if (getenv("XML_DEBUG_CATALOG")) + if (getenv("XML_DEBUG_CATALOG")) xmlDebugCatalogs = 1; if (xmlDefaultCatalog == NULL) { @@ -3127,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); @@ -3146,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; @@ -3247,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] = '/'; @@ -3279,7 +3278,7 @@ xmlCatalogCleanup(void) { xmlGenericError(xmlGenericErrorContext, "Catalogs cleanup\n"); if (xmlCatalogXMLFiles != NULL) - xmlHashFree(xmlCatalogXMLFiles, + xmlHashFree(xmlCatalogXMLFiles, (xmlHashDeallocator)xmlFreeCatalogHashEntryList); xmlCatalogXMLFiles = NULL; if (xmlDefaultCatalog != NULL) @@ -3394,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 @@ -3425,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); @@ -3613,7 +3612,7 @@ xmlCatalogFreeLocal(void *catalogs) { * * Returns the updated list */ -void * +void * xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) { xmlCatalogEntryPtr catal, add; @@ -3633,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) @@ -3648,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 @@ -3693,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 @@ -3754,7 +3753,7 @@ xmlCatalogGetSystem(const xmlChar *sysID) { if (sysID == NULL) return(NULL); - + /* * Check first the XML catalogs */ @@ -3798,7 +3797,7 @@ xmlCatalogGetPublic(const xmlChar *pubID) { if (pubID == NULL) return(NULL); - + /* * Check first the XML catalogs */ diff --git a/libxml2/chvalid.c b/libxml2/chvalid.c old mode 100755 new mode 100644 index 00dd962..06e8db0 --- a/libxml2/chvalid.c +++ b/libxml2/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}; diff --git a/libxml2/configure.in b/libxml2/configure.in index 4c1be47..24c013f 100644 --- a/libxml2/configure.in +++ b/libxml2/configure.in @@ -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=7 -LIBXML_MICRO_VERSION=8 +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 @@ -29,7 +30,7 @@ else if test -d .svn ; then LIBXML_VERSION_EXTRA="-SVN$extra" fi else if test -d .git ; then - extra=`git describe | sed 's+LIBXML[[0-9.]]*-++'` + extra=`git describe 2>/dev/null | sed 's+LIBXML[[0-9.]]*-++'` echo extra=$extra if test "$extra" != "" then @@ -50,12 +51,17 @@ VERSION=${LIBXML_VERSION} AM_INIT_AUTOMAKE(libxml2, $VERSION) +# Support silent build rules, requires at least automake-1.11. Disable +# by either passing --disable-silent-rules to configure or passing V=1 +# to make +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL +AC_PROG_LN_S AC_PROG_MKDIR_P AC_PROG_CPP -AC_PATH_PROG(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) @@ -63,12 +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) -dnl Make sure we have an ANSI compiler -AM_C_PROTOTYPES -test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant) - -AC_LIBTOOL_WIN32_DLL -AM_PROG_LIBTOOL +LT_INIT dnl #ifdef __APPLE__ dnl Disable -Wl,-undefined -Wl,dynamic_lookup when using libtool to link. @@ -93,7 +94,7 @@ else esac fi AC_SUBST(VERSION_SCRIPT_FLAGS) -AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -z "$VERSION_SCRIPT_FLAGS"]) +AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"]) dnl dnl We process the AC_ARG_WITH first so that later we can modify @@ -105,7 +106,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)]) @@ -124,11 +125,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"]) @@ -162,7 +163,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, @@ -198,15 +199,26 @@ 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, +[ --with-lzma[[=DIR]] use liblzma in DIR],[ + if test "$withval" != "no" -a "$withval" != "yes"; then + LZMA_DIR=$withval + CPPFLAGS="${CPPFLAGS} -I$withval/include" + LIBS="${LIBS} -L$withval/lib" fi ]) AC_ARG_WITH(coverage, [ --with-coverage build for code coverage with GCC (off)]) AC_ARG_ENABLE(rebuild-docs, -[ --enable-rebuild-docs[[=yes/no]] rebuild some generated docs [[default=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 @@ -403,8 +415,32 @@ AC_SUBST(Z_CFLAGS) AC_SUBST(Z_LIBS) AC_SUBST(WITH_ZLIB) +echo Checking lzma + +dnl Checks for lzma library. + +WITH_LZMA=0 +if test "$with_lzma" = "no"; then + echo "Disabling compression support" +else + AC_CHECK_HEADERS(lzma.h, + AC_CHECK_LIB(lzma, lzma_code,[ + AC_DEFINE([HAVE_LIBLZMA], [1], [Have compression library]) + WITH_LZMA=1 + if test "x${LZMA_DIR}" != "x"; then + LZMA_CFLAGS="-I${LZMA_DIR}/include" + LZMA_LIBS="-L${LZMA_DIR}/lib -llzma" + else + LZMA_LIBS="-llzma" + fi])) +fi + +AC_SUBST(LZMA_CFLAGS) +AC_SUBST(LZMA_LIBS) +AC_SUBST(WITH_LZMA) + CPPFLAGS=${_cppflags} -LDFLAGS=${_ldflags} +LIBS=${_libs} echo Checking headers @@ -421,7 +457,7 @@ AC_CHECK_HEADERS([stdarg.h]) AC_CHECK_HEADERS([sys/stat.h]) AC_CHECK_HEADERS([sys/types.h]) AC_CHECK_HEADERS([stdint.h]) -AC_CHECK_HEADERS([inttypes.h.h]) +AC_CHECK_HEADERS([inttypes.h]) AC_CHECK_HEADERS([time.h]) AC_CHECK_HEADERS([ansidecl.h]) AC_CHECK_HEADERS([ieeefp.h]) @@ -476,6 +512,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. @@ -484,15 +525,18 @@ AC_CHECK_FUNCS(strdup strndup strerror) AC_CHECK_FUNCS(finite isnand fp_class class fpclass) AC_CHECK_FUNCS(strftime localtime gettimeofday ftime) AC_CHECK_FUNCS(stat _stat signal) +AC_CHECK_FUNCS(rand rand_r srand time) +AC_CHECK_FUNCS(isascii mmap munmap putenv) -dnl Checking the standard string functions availability -AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,, - NEED_TRIO=1) +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 -va_list ap1,ap2;], [va_copy(ap1,ap2);], +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +va_list ap1,ap2;]], [[va_copy(ap1,ap2);]])], have_va_copy=yes, have_va_copy=no) AC_MSG_RESULT($have_va_copy) @@ -500,8 +544,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 - va_list ap1,ap2;], [__va_copy(ap1,ap2);], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include + va_list ap1,ap2;]], [[__va_copy(ap1,ap2);]])], have___va_copy=yes, have___va_copy=no) AC_MSG_RESULT($have___va_copy) @@ -552,13 +596,13 @@ then fi if test $enable_ipv6 = yes; then have_ipv6=no - AC_TRY_COMPILE([ - #include - #include - ], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +# include +# include + ]], [[ struct sockaddr_storage ss; socket(AF_INET6, SOCK_STREAM, 0) - ], + ]])], have_ipv6=yes, have_ipv6=no ) @@ -576,26 +620,26 @@ if test $enable_ipv6 = yes; then dnl present. dnl ******************************************************************** AC_MSG_CHECKING([struct sockaddr::ss_family]) - AC_TRY_COMPILE([ - #include - #include - ], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +# include +# include + ]], [[ 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 - #include - ], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +# include +# include + ]], [[ struct sockaddr_storage ss ; ss.__ss_family = 0 ; - ], + ]])], have_broken_ss_family=yes, have_broken_ss_family=no ) @@ -668,8 +712,11 @@ else # CFLAGS="${CFLAGS} -fexceptions" fi - - CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls" + + # warnings we'd like to see + CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls" + # warnings we'd like to supress + CFLAGS="${CFLAGS} -Wno-long-long" case "${host}" in alpha*-*-linux* ) CFLAGS="${CFLAGS} -mieee" @@ -728,7 +775,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 @@ -737,50 +784,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 @@ -915,27 +965,36 @@ WITH_THREADS=0 THREAD_CFLAGS="" TEST_THREADS="" THREADS_W32="" +WITH_THREAD_ALLOC=0 if test "$with_threads" = "no" ; then echo Disabling multithreaded support else echo Enabling multithreaded support - dnl Use pthread by default - if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then - AC_CHECK_HEADER(pthread.h, - AC_CHECK_LIB(pthread, pthread_join,[ - THREAD_LIBS="-lpthread" - AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)]) - AC_DEFINE([HAVE_PTHREAD_H], [], [Define if is there]) - WITH_THREADS="1"])) - fi + + dnl Default to native threads on Win32 case $host_os in - *mingw32*) if test "$THREAD_LIBS" != "-lpthread"; then + *mingw32*) if test "$with_threads" != "pthread" && test "$with_threads" != "no"; then WITH_THREADS="1" - THREADS_W32="Win32" - THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS" + THREADS_W32="1" + THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS" fi ;; + esac + + dnl Use pthread by default in other cases + if test -z "$THREADS_W32"; then + if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then + AC_CHECK_HEADER(pthread.h, + AC_CHECK_LIB(pthread, pthread_join,[ + THREAD_LIBS="-lpthread" + AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)]) + AC_DEFINE([HAVE_PTHREAD_H], [], [Define if is there]) + WITH_THREADS="1"])) + fi + fi + + case $host_os in *cygwin*) THREAD_LIBS="" ;; *beos*) WITH_THREADS="1" @@ -970,7 +1029,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) @@ -978,7 +1037,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 @@ -1102,6 +1162,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 @@ -1268,10 +1329,10 @@ else AC_CHECK_HEADER(iconv.h, AC_MSG_CHECKING(for iconv) - AC_TRY_LINK([#include -#include ],[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]],[[ 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) @@ -1282,10 +1343,10 @@ iconv (cd, NULL, NULL, NULL, NULL);],[ LDFLAGS="${LDFLAGS} ${ICONV_LIBS}" LIBS="${LIBS} -liconv" - AC_TRY_LINK([#include -#include ],[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]],[[ 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" @@ -1298,7 +1359,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 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include extern #ifdef __cplusplus @@ -1309,7 +1370,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:- @@ -1331,14 +1392,14 @@ esac 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 @@ -1377,6 +1438,7 @@ fi XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $ICU_LIBS $M_LIBS $LIBS" XML_LIBTOOLLIBS="libxml2.la" AC_SUBST(WITH_ICU) +AC_SUBST(ICU_LIBS) WITH_ISO8859X=1 if test "$WITH_ICONV" != "1" ; then @@ -1474,11 +1536,9 @@ case "$host" in WIN32_EXTRA_LIBADD="-lws2_32" WIN32_EXTRA_LDFLAGS="-no-undefined" AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation]) - AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around]) - AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around]) if test "${PYTHON}" != "" then - WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython${PYTHON_VERSION//./}" + WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)" fi ;; *-*-cygwin*) @@ -1495,6 +1555,24 @@ AC_SUBST(WIN32_EXTRA_PYTHON_LIBADD) AC_SUBST(CYGWIN_EXTRA_LDFLAGS) AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD) +dnl Checking the standard string functions availability +dnl +dnl Note mingw* has C99 implementation that produce expected xml numbers +dnl if code use {v}snprintf functions. +dnl If you like to activate at run-time C99 compatible number output +dnl see release note for mingw runtime 3.15: +dnl http://sourceforge.net/project/shownotes.php?release_id=24832 +dnl +dnl Also *win32*config.h files redefine them for various MSC compilers. +dnl +dnl So do not redefine {v}snprintf to _{v}snprintf like follwing: +dnl AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around]) +dnl AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around]) +dnl and do not redefine those functions is C-source files. +dnl +AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,, + NEED_TRIO=1) + if test "$with_coverage" = "yes" -a "${GCC}" = "yes" then echo Enabling code coverage for GCC @@ -1532,10 +1610,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 diff --git a/libxml2/debugXML.c b/libxml2/debugXML.c index c26217a..c8efe6a 100644 --- a/libxml2/debugXML.c +++ b/libxml2/debugXML.c @@ -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, "-"); } @@ -1724,8 +1723,11 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) { switch (node->type) { case XML_ELEMENT_NODE: - if (node->name != NULL) + if (node->name != NULL) { + if ((node->ns != NULL) && (node->ns->prefix != NULL)) + fprintf(output, "%s:", node->ns->prefix); fprintf(output, "%s", (const char *) node->name); + } break; case XML_ATTRIBUTE_NODE: if (node->name != NULL) @@ -1783,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" */ @@ -1799,7 +1801,7 @@ xmlBoolToText(int boolval) #ifdef LIBXML_XPATH_ENABLED /**************************************************************** * * - * The XML shell related functions * + * The XML shell related functions * * * ****************************************************************/ @@ -2050,7 +2052,7 @@ xmlShellBase(xmlShellCtxtPtr ctxt, if (node == NULL) { fprintf(ctxt->output, "NULL\n"); return (0); - } + } base = xmlNodeGetBase(node->doc, node); @@ -2277,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); @@ -2412,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) @@ -2696,6 +2698,8 @@ xmlShellDu(xmlShellCtxtPtr ctxt, } else if (node->type == XML_ELEMENT_NODE) { for (i = 0; i < indent; i++) fprintf(ctxt->output, " "); + if ((node->ns) && (node->ns->prefix)) + fprintf(ctxt->output, "%s:", node->ns->prefix); fprintf(ctxt->output, "%s\n", node->name); } else { } @@ -2748,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" @@ -2793,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. */ @@ -2837,6 +2841,10 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, while (1) { if (ctxt->node == (xmlNodePtr) ctxt->doc) snprintf(prompt, sizeof(prompt), "%s > ", "/"); + else if ((ctxt->node != NULL) && (ctxt->node->name) && + (ctxt->node->ns) && (ctxt->node->ns->prefix)) + snprintf(prompt, sizeof(prompt), "%s:%s > ", + (ctxt->node->ns->prefix), ctxt->node->name); else if ((ctxt->node != NULL) && (ctxt->node->name)) snprintf(prompt, sizeof(prompt), "%s > ", ctxt->node->name); else @@ -2911,6 +2919,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, fprintf(ctxt->output, "\t the default namespace if any uses 'defaultns' prefix\n"); #endif /* LIBXML_XPATH_ENABLED */ fprintf(ctxt->output, "\tpwd display current working directory\n"); + fprintf(ctxt->output, "\twhereis display absolute path of [path] or current working directory\n"); fprintf(ctxt->output, "\tquit leave shell\n"); #ifdef LIBXML_OUTPUT_ENABLED fprintf(ctxt->output, "\tsave [name] save this document to name or the original name\n"); @@ -2960,7 +2969,79 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, if (!xmlShellPwd(ctxt, dir, ctxt->node, NULL)) fprintf(ctxt->output, "%s\n", dir); } else if (!strcmp(command, "du")) { - xmlShellDu(ctxt, NULL, ctxt->node, NULL); + if (arg[0] == 0) { + xmlShellDu(ctxt, NULL, ctxt->node, NULL); + } else { + ctxt->pctxt->node = ctxt->node; +#ifdef LIBXML_XPATH_ENABLED + ctxt->pctxt->node = ctxt->node; + list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt); +#else + list = NULL; +#endif /* LIBXML_XPATH_ENABLED */ + if (list != NULL) { + switch (list->type) { + case XPATH_UNDEFINED: + xmlGenericError(xmlGenericErrorContext, + "%s: no such node\n", arg); + break; + case XPATH_NODESET:{ + int indx; + + if (list->nodesetval == NULL) + break; + + for (indx = 0; + indx < list->nodesetval->nodeNr; + indx++) + xmlShellDu(ctxt, NULL, + list->nodesetval-> + nodeTab[indx], NULL); + break; + } + case XPATH_BOOLEAN: + xmlGenericError(xmlGenericErrorContext, + "%s is a Boolean\n", arg); + break; + case XPATH_NUMBER: + xmlGenericError(xmlGenericErrorContext, + "%s is a number\n", arg); + break; + case XPATH_STRING: + xmlGenericError(xmlGenericErrorContext, + "%s is a string\n", arg); + break; + case XPATH_POINT: + xmlGenericError(xmlGenericErrorContext, + "%s is a point\n", arg); + break; + case XPATH_RANGE: + xmlGenericError(xmlGenericErrorContext, + "%s is a range\n", arg); + break; + case XPATH_LOCATIONSET: + xmlGenericError(xmlGenericErrorContext, + "%s is a range\n", arg); + break; + case XPATH_USERS: + xmlGenericError(xmlGenericErrorContext, + "%s is user-defined\n", arg); + break; + case XPATH_XSLT_TREE: + xmlGenericError(xmlGenericErrorContext, + "%s is an XSLT value tree\n", + arg); + break; + } +#ifdef LIBXML_XPATH_ENABLED + xmlXPathFreeObject(list); +#endif + } else { + xmlGenericError(xmlGenericErrorContext, + "%s: no such node\n", arg); + } + ctxt->pctxt->node = NULL; + } } else if (!strcmp(command, "base")) { xmlShellBase(ctxt, NULL, ctxt->node, NULL); } else if (!strcmp(command, "set")) { @@ -3071,6 +3152,83 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, } #ifdef LIBXML_XPATH_ENABLED xmlXPathFreeObject(list); +#endif + } else { + xmlGenericError(xmlGenericErrorContext, + "%s: no such node\n", arg); + } + ctxt->pctxt->node = NULL; + } + } else if (!strcmp(command, "whereis")) { + char dir[500]; + + if (arg[0] == 0) { + if (!xmlShellPwd(ctxt, dir, ctxt->node, NULL)) + fprintf(ctxt->output, "%s\n", dir); + } else { + ctxt->pctxt->node = ctxt->node; +#ifdef LIBXML_XPATH_ENABLED + list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt); +#else + list = NULL; +#endif /* LIBXML_XPATH_ENABLED */ + if (list != NULL) { + switch (list->type) { + case XPATH_UNDEFINED: + xmlGenericError(xmlGenericErrorContext, + "%s: no such node\n", arg); + break; + case XPATH_NODESET:{ + int indx; + + if (list->nodesetval == NULL) + break; + + for (indx = 0; + indx < list->nodesetval->nodeNr; + indx++) { + if (!xmlShellPwd(ctxt, dir, list->nodesetval-> + nodeTab[indx], NULL)) + fprintf(ctxt->output, "%s\n", dir); + } + break; + } + case XPATH_BOOLEAN: + xmlGenericError(xmlGenericErrorContext, + "%s is a Boolean\n", arg); + break; + case XPATH_NUMBER: + xmlGenericError(xmlGenericErrorContext, + "%s is a number\n", arg); + break; + case XPATH_STRING: + xmlGenericError(xmlGenericErrorContext, + "%s is a string\n", arg); + break; + case XPATH_POINT: + xmlGenericError(xmlGenericErrorContext, + "%s is a point\n", arg); + break; + case XPATH_RANGE: + xmlGenericError(xmlGenericErrorContext, + "%s is a range\n", arg); + break; + case XPATH_LOCATIONSET: + xmlGenericError(xmlGenericErrorContext, + "%s is a range\n", arg); + break; + case XPATH_USERS: + xmlGenericError(xmlGenericErrorContext, + "%s is user-defined\n", arg); + break; + case XPATH_XSLT_TREE: + xmlGenericError(xmlGenericErrorContext, + "%s is an XSLT value tree\n", + arg); + break; + } +#ifdef LIBXML_XPATH_ENABLED + xmlXPathFreeObject(list); #endif } else { xmlGenericError(xmlGenericErrorContext, diff --git a/libxml2/dict.c b/libxml2/dict.c index 3eff231..5f71d55 100644 --- a/libxml2/dict.c +++ b/libxml2/dict.c @@ -2,7 +2,7 @@ * dict.c: dictionary of reusable strings, just used to avoid allocation * and freeing operations. * - * Copyright (C) 2003 Daniel Veillard. + * Copyright (C) 2003-2012 Daniel Veillard. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -19,6 +19,29 @@ #define IN_LIBXML #include "libxml.h" +#include +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + +/* + * Following http://www.ocert.org/advisories/ocert-2011-003.html + * it seems that having hash randomization might be a good idea + * when using XML with untrusted data + * Note1: that it works correctly only if compiled with WITH_BIG_KEY + * which is the default. + * Note2: the fast function used for a small dict won't protect very + * well but since the attack is based on growing a very big hash + * list we will use the BigKey algo as soon as the hash size grows + * over MIN_DICT_SIZE so this actually works + */ +#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME) +#define DICT_RANDOMIZATION +#endif + #include #ifdef HAVE_STDINT_H #include @@ -44,23 +67,23 @@ typedef unsigned __int32 uint32_t; #define WITH_BIG_KEY #ifdef WITH_BIG_KEY -#define xmlDictComputeKey(dict, name, len) \ - (((dict)->size == MIN_DICT_SIZE) ? \ - xmlDictComputeFastKey(name, len) : \ - xmlDictComputeBigKey(name, len)) - -#define xmlDictComputeQKey(dict, prefix, plen, name, len) \ - (((prefix) == NULL) ? \ - (xmlDictComputeKey(dict, name, len)) : \ - (((dict)->size == MIN_DICT_SIZE) ? \ - xmlDictComputeFastQKey(prefix, plen, name, len) : \ - xmlDictComputeBigQKey(prefix, plen, name, len))) +#define xmlDictComputeKey(dict, name, len) \ + (((dict)->size == MIN_DICT_SIZE) ? \ + xmlDictComputeFastKey(name, len, (dict)->seed) : \ + xmlDictComputeBigKey(name, len, (dict)->seed)) + +#define xmlDictComputeQKey(dict, prefix, plen, name, len) \ + (((prefix) == NULL) ? \ + (xmlDictComputeKey(dict, name, len)) : \ + (((dict)->size == MIN_DICT_SIZE) ? \ + xmlDictComputeFastQKey(prefix, plen, name, len, (dict)->seed) : \ + xmlDictComputeBigQKey(prefix, plen, name, len, (dict)->seed))) #else /* !WITH_BIG_KEY */ -#define xmlDictComputeKey(dict, name, len) \ - xmlDictComputeFastKey(name, len) -#define xmlDictComputeQKey(dict, prefix, plen, name, len) \ - xmlDictComputeFastQKey(prefix, plen, name, len) +#define xmlDictComputeKey(dict, name, len) \ + xmlDictComputeFastKey(name, len, (dict)->seed) +#define xmlDictComputeQKey(dict, prefix, plen, name, len) \ + xmlDictComputeFastQKey(prefix, plen, name, len, (dict)->seed) #endif /* WITH_BIG_KEY */ /* @@ -71,7 +94,7 @@ typedef xmlDictEntry *xmlDictEntryPtr; struct _xmlDictEntry { struct _xmlDictEntry *next; const xmlChar *name; - int len; + unsigned int len; int valid; unsigned long okey; }; @@ -82,8 +105,8 @@ struct _xmlDictStrings { xmlDictStringsPtr next; xmlChar *free; xmlChar *end; - int size; - int nbStrings; + size_t size; + size_t nbStrings; xmlChar array[1]; }; /* @@ -93,11 +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; }; /* @@ -111,28 +138,84 @@ static xmlRMutexPtr xmlDictMutex = NULL; */ static int xmlDictInitialized = 0; +#ifdef DICT_RANDOMIZATION +#ifdef HAVE_RAND_R +/* + * Internal data for random function, protected by xmlDictMutex + */ +static unsigned int rand_seed = 0; +#endif +#endif + /** * xmlInitializeDict: * * Do the dictionary mutex initialization. + * this function is deprecated + * + * Returns 0 if initialization was already done, and 1 if that + * call led to the initialization + */ +int xmlInitializeDict(void) { + return(0); +} + +/** + * __xmlInitializeDict: + * + * This function is not public + * Do the dictionary mutex initialization. * this function is not thread safe, initialization should - * preferably be done once at startup + * 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 */ -static int xmlInitializeDict(void) { +int __xmlInitializeDict(void) { if (xmlDictInitialized) return(1); if ((xmlDictMutex = xmlNewRMutex()) == NULL) return(0); + xmlRMutexLock(xmlDictMutex); +#ifdef DICT_RANDOMIZATION +#ifdef HAVE_RAND_R + rand_seed = time(NULL); + rand_r(& rand_seed); +#else + srand(time(NULL)); +#endif +#endif xmlDictInitialized = 1; + xmlRMutexUnlock(xmlDictMutex); return(1); } +#ifdef DICT_RANDOMIZATION +int __xmlRandom(void) { + int ret; + + if (xmlDictInitialized == 0) + __xmlInitializeDict(); + + xmlRMutexLock(xmlDictMutex); +#ifdef HAVE_RAND_R + ret = rand_r(& rand_seed); +#else + ret = rand(); +#endif + xmlRMutexUnlock(xmlDictMutex); + return(ret); +} +#endif + /** * xmlDictCleanup: * - * Free the dictionary mutex. + * Free the dictionary mutex. Do not call unless sure the library + * is not in use anymore ! */ void xmlDictCleanup(void) { @@ -148,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, "-"); @@ -168,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) @@ -206,19 +295,20 @@ xmlDictAddString(xmlDictPtr dict, const xmlChar *name, int namelen) { * @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)); @@ -230,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)) @@ -277,13 +372,13 @@ xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, int plen, */ static uint32_t -xmlDictComputeBigKey(const xmlChar* data, int namelen) { +xmlDictComputeBigKey(const xmlChar* data, int namelen, int seed) { uint32_t hash; int i; if (namelen <= 0 || data == NULL) return(0); - hash = 0; + hash = seed; for (i = 0;i < namelen; i++) { hash += data[i]; @@ -310,12 +405,12 @@ xmlDictComputeBigKey(const xmlChar* data, int namelen) { */ static unsigned long xmlDictComputeBigQKey(const xmlChar *prefix, int plen, - const xmlChar *name, int len) + const xmlChar *name, int len, int seed) { uint32_t hash; int i; - hash = 0; + hash = seed; for (i = 0;i < plen; i++) { hash += prefix[i]; @@ -346,8 +441,8 @@ xmlDictComputeBigQKey(const xmlChar *prefix, int plen, * for low hash table fill. */ static unsigned long -xmlDictComputeFastKey(const xmlChar *name, int namelen) { - unsigned long value = 0L; +xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) { + unsigned long value = seed; if (name == NULL) return(0); value = *name; @@ -381,9 +476,9 @@ xmlDictComputeFastKey(const xmlChar *name, int namelen) { */ static unsigned long xmlDictComputeFastQKey(const xmlChar *prefix, int plen, - const xmlChar *name, int len) + const xmlChar *name, int len, int seed) { - unsigned long value = 0L; + unsigned long value = (unsigned long) seed; if (plen == 0) value += 30 * (unsigned long) ':'; @@ -442,7 +537,7 @@ xmlDictCreate(void) { xmlDictPtr dict; if (!xmlDictInitialized) - if (!xmlInitializeDict()) + if (!__xmlInitializeDict()) return(NULL); #ifdef DICT_DEBUG_PATTERNS @@ -452,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; @@ -460,6 +556,11 @@ xmlDictCreate(void) { dict->subdict = NULL; if (dict->dict) { memset(dict->dict, 0, MIN_DICT_SIZE * sizeof(xmlDictEntry)); +#ifdef DICT_RANDOMIZATION + dict->seed = __xmlRandom(); +#else + dict->seed = 0; +#endif return(dict); } xmlFree(dict); @@ -486,6 +587,7 @@ xmlDictCreateSub(xmlDictPtr sub) { #ifdef DICT_DEBUG_PATTERNS fprintf(stderr, "R"); #endif + dict->seed = sub->seed; dict->subdict = sub; xmlDictReference(dict->subdict); } @@ -503,7 +605,7 @@ xmlDictCreateSub(xmlDictPtr sub) { int xmlDictReference(xmlDictPtr dict) { if (!xmlDictInitialized) - if (!xmlInitializeDict()) + if (!__xmlInitializeDict()) return(-1); if (dict == NULL) return -1; @@ -523,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 @@ -642,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); @@ -657,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; @@ -667,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 */ @@ -726,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; @@ -744,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 } @@ -775,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; @@ -786,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) { @@ -822,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++; @@ -857,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; @@ -875,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 } @@ -906,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; @@ -917,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 } @@ -961,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); @@ -1037,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++; @@ -1095,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" diff --git a/libxml2/doc/APIchunk0.html b/libxml2/doc/APIchunk0.html index 417e202..c90e042 100644 --- a/libxml2/doc/APIchunk0.html +++ b/libxml2/doc/APIchunk0.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index A-B for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index A-B for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index A-B for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index A-B for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -46,6 +46,7 @@
ANY
xmlIsMixedElement
xmlParseElementContentDecl
APIs
LIBXML_LEGACY_ENABLED
+xmlSchemaValidateSetFilename
ARRAY
xmlStrlen
xmlUTF8Strsize
ASCII
UTF8ToHtml
@@ -55,6 +56,8 @@ xmlDelEncodingAlias
xmlEncodeEntitiesReentrant
xmlGetEncodingAlias
+xmlModuleOpen
+xmlModuleSymbol
xmlNewCharEncodingHandler
xmlParseCharEncoding
ATTLIST
xmlTextWriterStartDTDAttlist
@@ -72,6 +75,7 @@ xmlSchemaValueGetNext
Activation
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
@@ -94,6 +98,8 @@ xmlHashUpdateEntry
xmlHashUpdateEntry2
xmlHashUpdateEntry3
+
Added
xmlDictGetUsage
+xmlDictSetLimit
Additional
_htmlElemDesc
xmlCleanupGlobals
xmlInitGlobals
@@ -116,6 +122,7 @@ xmlSchemaNewStringValue
Allocates
xmlDOMWrapNewCtxt
Allows
xmlCatalogSetDefaultPrefer
+xmlSchemaValidateSetLocator
AlphabeticPresentationForms
xmlUCSIsAlphabeticPresentationForms
Also
xmlCheckUTF8
xmlParseAttribute
@@ -270,8 +277,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk1.html b/libxml2/doc/APIchunk1.html index ea89c70..7947196 100644 --- a/libxml2/doc/APIchunk1.html +++ b/libxml2/doc/APIchunk1.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index C-C for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index C-C for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index C-C for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index C-C for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -358,8 +358,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk10.html b/libxml2/doc/APIchunk10.html index 1141116..22d5061 100644 --- a/libxml2/doc/APIchunk10.html +++ b/libxml2/doc/APIchunk10.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index Z-a for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index Z-a for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index Y-a for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index Y-a for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -37,7 +37,11 @@ w-w x-x y-z -

Letter Z:

ZLIB
docbCreateFileParserCtxt
+

Letter Y:

YES
htmlNodeStatus
+
YiRadicals
xmlUCSIsYiRadicals
+
YiSyllables
xmlUCSIsYiSyllables
+
YijingHexagramSymbols
xmlUCSIsYijingHexagramSymbols
+

Letter Z:

ZLIB
docbCreateFileParserCtxt
docbParseFile
docbSAXParseFile
htmlCreateFileParserCtxt
@@ -144,11 +148,11 @@ xmlAutomataNewTransition2
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
activates
xmlXPathContextSetCache
-
activation
xmlGetLineNo
acts
xmlGetProp
actual
xmlGetUTF8Char
xmlSchemaValidateLengthFacet
@@ -250,6 +254,7 @@ xmlAddPrevSibling
xmlAddSibling
affect
xmlKeepBlanksDefault
+
affected
xmlSchemaValidityLocatorFunc
affiliation
_xmlSchemaElement
afraid
xmlEncodeEntities
after
UTF8ToHtml
@@ -267,6 +272,7 @@ xmlReconciliateNs
xmlSaveFileTo
xmlSaveFormatFileTo
+xmlUnlinkNode
xmlValidGetValidElements
xmlXPathNextFollowing
xmlXPathStringFunction
@@ -285,8 +291,10 @@ xmlSchematronValidateDoc
xmlShellValidate
xmlValidateDtd
-
aggregate
xmlNodeBufGetContent
+
aggregate
xmlBufGetNodeContent
+xmlNodeBufGetContent
xmlNodeGetContent
+
ahead
XML_MAX_LOOKUP_LIMIT
algebraic
xmlExpExpDerive
alias
xmlAddEncodingAlias
xmlDelEncodingAlias
@@ -306,7 +314,8 @@ xmlNewRMutex
xmlReallocLoc
xmlXPathObjectCopy
-
allocation
htmlNewParserCtxt
+
allocation
LIBXML_THREAD_ALLOC_ENABLED
+htmlNewParserCtxt
xmlBufferSetAllocationScheme
xmlGetBufferAllocationScheme
xmlMallocAtomicLoc
@@ -349,7 +358,10 @@ xmlValidateName
xmlValidateQName
allowable
xmlSkipBlankChars
-
allowed
XML_MAX_TEXT_LENGTH
+
allowed
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
_htmlElemDesc
_xmlElement
_xmlSchemaWildcard
@@ -358,6 +370,7 @@ htmlNodeStatus
xmlAutomataNewAllTrans
xmlAutomataNewCounterTrans
+xmlBufNodeDump
xmlIsLetter
xmlNodeAddContent
xmlNodeAddContentLen
@@ -392,11 +405,11 @@ xmlDOMWrapReconcileNamespaces
xmlFreeFunc
xmlGcMemSetup
+xmlInitializeDict
xmlMemSetup
xmlParseCharEncoding
xmlParseNotationType
xmlParserInputGrow
-xmlParserInputRead
xmlReallocFunc
xmlReplaceNode
xmlXPathNodeSetAddUnique
@@ -428,10 +441,12 @@
amd
xmlCatalogIsEmpty
amount
INPUT_CHUNK
_xmlParserInputBuffer
+xmlDictGetUsage
xmlMemDisplayLast
xmlMemUsed
xmlParserInputBufferGrow
xmlParserInputBufferRead
+xmlParserInputGrow
amp
xmlParseEntityRef
xmlParseSDDecl
xmlParserHandleReference
@@ -467,6 +482,7 @@ XML_SCHEMAS_ANYATTR_SKIP
XML_SCHEMAS_ANYATTR_STRICT
XML_SCHEMAS_ELEM_NSDEFAULT
+xmlDictCleanup
xmlNamespaceParseNCName
xmlNamespaceParseNSDef
xmlNamespaceParseQName
@@ -619,8 +635,10 @@ xmlStrncatNew
automaton
_xmlSchemaType
autoreference
_xmlDoc
-
avoid
xmlCleanupParser
+
avoid
XML_MAX_LOOKUP_LIMIT
+xmlCleanupParser
xmlCleanupThreads
+xmlGetBufferAllocationScheme
avoiding
xmlTextReaderNext
xmlTextReaderNextSibling
aware
xmlGetProp
@@ -633,8 +651,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk11.html b/libxml2/doc/APIchunk11.html index ae2e0d0..c1336cb 100644 --- a/libxml2/doc/APIchunk11.html +++ b/libxml2/doc/APIchunk11.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index b-b for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index b-b for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index b-b for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index b-b for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -37,7 +37,8 @@ w-w x-x y-z -

Letter b:

back
xmlChildElementCount
+

Letter b:

back
xmlBufferDetach
+xmlChildElementCount
xmlEntityReferenceFunc
xmlFirstElementChild
xmlKeepBlanksDefault
@@ -48,6 +49,7 @@ xmlPreviousElementSibling
xmlRelaxNGDump
xmlSetEntityReferenceFunc
+
bad
XML_MAX_LOOKUP_LIMIT
badly
xmlParseExternalID
bahaviour
xmlTextReaderNormalization
balanced
xmlParseBalancedChunkMemory
@@ -99,11 +101,11 @@ xmlCleanupThreads
xmlCurrentChar
xmlGcMemSetup
-xmlGetLineNo
xmlInitParser
xmlMemSetup
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetParserProp
@@ -111,7 +113,8 @@ xmlValidGetValidElements
xmlXPathNextPreceding
xmlXPathStringFunction
-
beginning
xmlBufferAddHead
+
beginning
xmlBufShrink
+xmlBufferAddHead
xmlBufferShrink
xmlByteConsumed
xmlListInsert
@@ -125,16 +128,21 @@ xmlCurrentChar
xmlKeepBlanksDefault
xmlSubstituteEntitiesDefault
-
behaviour
htmlNodeDump
+
behaviour
XML_MAX_LOOKUP_LIMIT
+htmlNodeDump
htmlNodeDumpFile
htmlNodeDumpFileFormat
htmlNodeDumpFormatOutput
htmlNodeDumpOutput
resolveEntity
resolveEntitySAXFunc
+xmlBufNodeDump
+xmlBufShrink
xmlElemDump
xmlFreeNode
xmlFreeNodeList
+xmlModuleOpen
+xmlModuleSymbol
xmlNodeDump
xmlNodeDumpOutput
xmlNodeGetSpacePreserve
@@ -169,6 +177,7 @@ xmlTextWriterWriteBinHex
bindings
_xmlSchema
bit
xmlStrEqual
+
bits
xmlGetLineNo
blanks
xmlKeepBlanksDefault
xmlSkipBlankChars
bloc
xmlParseBalancedChunkMemory
@@ -204,7 +213,10 @@
bound
xmlExpNewRange
boundaries
_xmlParserCtxt
xmlSearchNs
-
boundary
XML_MAX_TEXT_LENGTH
+
boundary
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
xmlParseElementChildrenContentDecl
xmlParseElementMixedContentDecl
bracket
xmlParseCharData
@@ -247,6 +259,8 @@ xmlParserInputBufferPush
xmlParserInputBufferRead
xmlTextReaderGetRemainder
+
buffers
LIBXML2_NEW_BUFFER
+xmlBufferDetach
builded
XML_SCHEMAS_ATTRGROUP_GLOBAL
XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED
building
XML_MAX_TEXT_LENGTH
@@ -301,8 +315,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk12.html b/libxml2/doc/APIchunk12.html index 0bd9058..113385b 100644 --- a/libxml2/doc/APIchunk12.html +++ b/libxml2/doc/APIchunk12.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index c-c for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index c-c for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index c-c for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index c-c for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -52,7 +52,6 @@ xmlCheckFilename
xmlCleanupParser
xmlCleanupThreads
-xmlGetLineNo
xmlTextReaderCurrentDoc
xmlXPathAddValues
xmlXPathDivValues
@@ -87,10 +86,13 @@ xmlC14NDocSave
xmlC14NDocSaveTo
xmlC14NExecute
+
canot
xmlModuleOpen
+xmlModuleSymbol
capable
xmlCheckUTF8
caracters
xmlOutputBufferWriteEscape
cardinality
xmlExpParse
-
carried
xmlNewDocProp
+
carried
xmlBufGetNodeContent
+xmlNewDocProp
xmlNewNsProp
xmlNewNsPropEatName
xmlNewProp
@@ -139,7 +141,8 @@
ceiling
xmlXPathCeilingFunction
certainly
xmlTextReaderGetRemainder
chained
xmlFreeNsList
-
change
htmlSetMetaEncoding
+
change
LIBXML2_NEW_BUFFER
+htmlSetMetaEncoding
xmlCtxtResetLastError
xmlNanoFTPCwd
xmlParseSDDecl
@@ -581,6 +584,8 @@ xmlParserInputBufferRead
xmlXPathSubstringFunction
consist
xmlXPathNextAncestor
+
const
xmlModuleOpen
+xmlModuleSymbol
constant
XML_SAX2_MAGIC
xmlByteConsumed
constraint
_xmlSchemaAttribute
@@ -642,7 +647,8 @@ xmlXPathSubstringBeforeFunction
xmlXPathTrailing
xmlXPathTrailingSorted
-
contained
xmlGetUTF8Char
+
contained
xmlBufferDetach
+xmlGetUTF8Char
xmlNodeListGetRawString
xmlNodeListGetString
xmlParseElementChildrenContentDecl
@@ -651,6 +657,7 @@ xmlXPathDistinct
xmlXPathDistinctSorted
contains
XML_SCHEMAS_ATTRGROUP_HAS_REFS
+_xmlEntity
xmlCurrentChar
xmlParseEntityRef
xmlParsePEReference
@@ -802,6 +809,7 @@ xmlTextReaderByteConsumed
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
@@ -879,6 +887,8 @@ xmlMemGet
xmlMemUsed
xmlOutputBufferCreateFilename
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
xmlSchemaValidateFile
xmlXPathContextSetCache
custom
xmlDOMWrapAdoptNode
@@ -894,8 +904,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk13.html b/libxml2/doc/APIchunk13.html index 6f089e0..b1f069d 100644 --- a/libxml2/doc/APIchunk13.html +++ b/libxml2/doc/APIchunk13.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index d-d for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index d-d for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index d-d for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index d-d for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -45,6 +45,7 @@
de-coupled
xmlValidateDtd
deactivated
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
@@ -241,7 +242,10 @@ xmlCheckLanguageID
xmlCreateEntitiesTable
xmlDecodeEntities
+xmlInitializeDict
+xmlNodeDump
xmlParserHandleReference
+xmlParserInputRead
xmlScanName
depth
_xmlParserCtxt
_xmlValidCtxt
@@ -378,13 +382,18 @@
determinist
xmlAutomataIsDeterminist
xmlRegexpIsDeterminist
dict
_xmlDoc
-
dictionary
_xmlParserCtxt
+
dictionaries
XML_MAX_NAME_LENGTH
+
dictionary
XML_MAX_DICTIONARY_LIMIT
+_xmlParserCtxt
_xmlXPathContext
xmlDictCleanup
xmlDictCreate
xmlDictCreateSub
+xmlDictGetUsage
xmlDictReference
+xmlDictSetLimit
xmlHashCreateDict
+xmlInitializeDict
xmlPatterncompile
xmlStreamPush
xmlStreamPushAttr
@@ -394,10 +403,12 @@ xmlDictCreateSub
xmlDictExists
xmlDictFree
+xmlDictGetUsage
xmlDictLookup
xmlDictOwns
xmlDictQLookup
xmlDictReference
+xmlDictSetLimit
xmlDictSize
xmlExpNewCtxt
did
XML_SCHEMAS_TYPE_BLOCK_DEFAULT
@@ -418,7 +429,8 @@ xmlStrQEqual
differentiate
xmlXPathOrderDocElems
differently
xmlTextReaderGetRemainder
-
differs
xmlNewEntity
+
differs
xmlBufShrink
+xmlNewEntity
digit
xmlXPathStringFunction
digits
xmlXPathStringFunction
dir
xmlShellDir
@@ -441,7 +453,8 @@ xmlXPathNextPreceding
xmlXPathNextPrecedingSibling
xmlXPathNextSelf
-
directly
xmlNodeBufGetContent
+
directly
xmlBufGetNodeContent
+xmlNodeBufGetContent
xmlNodeGetContent
xmlNormalizeURIPath
xmlParseAttribute
@@ -464,6 +477,7 @@ xmlParserGetDirectory
xmlShellList
disable
xmlCatalogSetDebug
+xmlSchemaValidateSetLocator
disabled
XML_CAST_FPTR
_xmlParserCtxt
xmlParseURIRaw
@@ -472,7 +486,7 @@
disallowed
XML_SCHEMAS_ELEM_BLOCK_EXTENSION
XML_SCHEMAS_ELEM_BLOCK_RESTRICTION
XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION
-
discard
xmlParserInputRead
+
discard
xmlUnlinkNode
discarded
xmlDeregisterNodeFunc
discarding
xmlParseAttValue
xmlValidCtxtNormalizeAttributeValue
@@ -520,6 +534,7 @@ xmlXPathOrderDocElems
doesn
_htmlElemDesc
htmlElementAllowedHere
+xmlBufferDetach
xmlCheckLanguageID
xmlCleanupParser
xmlCreateEntitiesTable
@@ -528,7 +543,6 @@ xmlInitCharEncodingHandlers
xmlKeepBlanksDefault
xmlNodeListGetRawString
-xmlParserInputRead
xmlPatternMatch
xmlRemoveProp
xmlUTF8Strlen
@@ -575,6 +589,7 @@ xmlXPtrLocationSetCreate
double-hyphen
xmlParseComment
double-quotes
xmlBufferWriteQuotedString
+
doubleit
xmlGetBufferAllocationScheme
doublequotes
xmlParseQuotedString
doubt
xmlCleanupParser
xmlCleanupThreads
@@ -596,7 +611,11 @@
dtds
getSystemId
xmlSAX2GetSystemId
xmlValidateDtdFinal
-
dump
xmlBufferAdd
+
due
xmlBufShrink
+xmlModuleOpen
+xmlModuleSymbol
+
dump
xmlBufShrink
+xmlBufferAdd
xmlBufferCCat
xmlBufferDump
xmlBufferShrink
@@ -638,8 +657,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk14.html b/libxml2/doc/APIchunk14.html index aa6643d..2eac2f6 100644 --- a/libxml2/doc/APIchunk14.html +++ b/libxml2/doc/APIchunk14.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index e-e for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index e-e for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index e-e for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index e-e for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -55,6 +55,7 @@ xmlLoadCatalogs
efficiency
xmlBuildRelativeURI
either
xmlBoolToText
+xmlBufGetNodeContent
xmlCurrentChar
xmlLoadACatalog
xmlNodeBufGetContent
@@ -170,6 +171,7 @@ xmlXPtrNewRangePoints
ends
_xmlParserNodeInfo
xmlNanoHTTPClose
+
enforced
XML_MAX_LOOKUP_LIMIT
engine
xmlXPathAxisFunc
xmlXPathFuncLookupFunc
xmlXPathVariableLookupFunc
@@ -311,6 +313,7 @@ xmlXPathEvalFunc
xmlXPathEvalPredicate
xmlXPathEvaluatePredicateResult
+xmlXPathNodeEval
xmlXPtrBuildNodeList
xmlXPtrEval
evaulation
xmlRegFreeExecCtxt
@@ -395,6 +398,7 @@
explicitly
xmlSAXDefaultVersion
explored
xmlXPathAxisFunc
exposing
xmlTextReaderRead
+
express
LIBXML2_NEW_BUFFER
expressing
xmlPathToURI
expressions
LIBXML_EXPR_ENABLED
LIBXML_REGEXP_ENABLED
@@ -432,6 +436,8 @@
extlang
xmlCheckLanguageID
extract
XML_GET_CONTENT
XML_GET_LINE
+xmlBufContent
+xmlBufEnd
xmlBufferContent

A-B C-C @@ -442,8 +448,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk15.html b/libxml2/doc/APIchunk15.html index b0cb99e..163d67b 100644 --- a/libxml2/doc/APIchunk15.html +++ b/libxml2/doc/APIchunk15.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index f-f for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index f-f for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index f-f for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index f-f for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -38,6 +38,7 @@ x-x y-z

Letter f:

fTP
xmlNanoFTPConnectTo
+
face
XML_MAX_NAME_LENGTH
facet
XML_SCHEMAS_FACET_COLLAPSE
XML_SCHEMAS_FACET_PRESERVE
XML_SCHEMAS_FACET_REPLACE
@@ -114,7 +115,9 @@
fatal
fatalErrorSAXFunc
fatalError
fatalErrorSAXFunc
favor
xmlNewElementContent
-
feature
XML_MAX_TEXT_LENGTH
+
feature
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
xmlGetFeature
xmlGetFeaturesList
xmlHasFeature
@@ -177,6 +180,7 @@ XML_SCHEMAS_FINAL_DEFAULT_UNION
find
xmlGetThreadId
xmlIsXHTML
+xmlSchemaValidityLocatorFunc
finding
xmlNanoFTPScanProxy
xmlNanoFTPUpdateURL
xmlNanoHTTPScanProxy
@@ -233,6 +237,7 @@
flow
xmlScanName
xmlSchemaSAXPlug
xmlSchemaSAXUnplug
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
flushed
xmlTextWriterEndDocument
flushes
xmlOutputBufferClose
@@ -305,6 +310,7 @@ htmlNodeDumpOutput
htmlSaveFileEnc
htmlSaveFileFormat
+xmlBufNodeDump
xmlDocDumpFormatMemory
xmlDocDumpFormatMemoryEnc
xmlDocFormatDump
@@ -424,8 +430,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk16.html b/libxml2/doc/APIchunk16.html index 0c53574..92d3845 100644 --- a/libxml2/doc/APIchunk16.html +++ b/libxml2/doc/APIchunk16.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index g-h for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index g-h for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index g-h for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index g-h for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -110,6 +110,7 @@
get
_xmlSAXHandler
_xmlSAXHandlerV1
fatalErrorSAXFunc
+xmlBufUse
xmlBufferLength
xmlCatalogGetDefaults
xmlGetCompressMode
@@ -127,6 +128,7 @@ xmlTextReaderGetParserProp
xmlTextReaderGetRemainder
xmlValidateNotationDecl
+
gie
xmlBufferDetach
gif
xmlBuildRelativeURI
give
_xmlParserInput
_xmlSchema
@@ -177,6 +179,10 @@
grows
xmlBufferWriteCHAR
xmlBufferWriteChar
xmlBufferWriteQuotedString
+
guarantee
xmlModuleOpen
+xmlModuleSymbol
+
guaranteed
xmlModuleOpen
+xmlModuleSymbol
guess
xmlCleanupParser
xmlCleanupThreads

Letter h:

had
xmlNewGlobalNs
@@ -245,6 +251,8 @@ xmlNanoHTTPMethodRedir
xmlNanoHTTPMimeType
heading
xmlCharEncodingOutputFunc
+
held
xmlOutputBufferGetContent
+xmlOutputBufferGetSize
helper
XML_SCHEMAS_ELEM_CIRCULAR
here
_xmlXPathContext
htmlNodeStatus
@@ -273,6 +281,7 @@ xmlNewNsPropEatName
xmlNewProp
holds
xmlBufferWriteQuotedString
+
hooks
LIBXML_THREAD_ALLOC_ENABLED
host
xmlNanoFTPProxy
xmlNanoFTPScanProxy
xmlNanoFTPUpdateURL
@@ -284,6 +293,7 @@ xmlNanoFTPUpdateURL
hour
ftpListCallback
how
_xmlError
+xmlDictGetUsage
href
XINCLUDE_HREF
href==NULL
xmlNewNs
hrefs
xlinkExtendedLinkFunk
@@ -341,8 +351,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk17.html b/libxml2/doc/APIchunk17.html index bd98a9c..070f8ce 100644 --- a/libxml2/doc/APIchunk17.html +++ b/libxml2/doc/APIchunk17.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index i-i for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index i-i for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index i-i for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index i-i for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -42,6 +42,7 @@ LIBXML_ISO8859X_ENABLED
icu
LIBXML_ICU_ENABLED
identify
xmlParseAttributeType
+
identitier
XML_MAX_NAME_LENGTH
identity-constraint
_xmlSchema
_xmlSchemaElement
ignorable
ignorableWhitespace
@@ -59,7 +60,8 @@ xmlC14NDocSave
xmlC14NDocSaveTo
xmlC14NExecute
-
imbrication
xmlNodeDump
+
imbrication
xmlBufNodeDump
+xmlNodeDump
xmlNodeDumpOutput
img
xmlBuildRelativeURI
immediately
xmlCheckVersion
@@ -68,6 +70,7 @@ xmlOutputBufferWriteString
xmlXPathStringFunction
immutable
xmlBufferCreateStatic
+xmlBufferDetach
xmlParserInputBufferCreateStatic
implementation
xmlFreeFunc
xmlMallocFunc
@@ -190,7 +193,8 @@ xmlXPathDebugDumpObject
indentation?
xmlTextWriterSetIndent
indented
xmlSaveFormatFile
-
indenting
xmlDocDumpFormatMemory
+
indenting
xmlBufNodeDump
+xmlDocDumpFormatMemory
xmlDocDumpFormatMemoryEnc
xmlDocFormatDump
xmlNodeDump
@@ -217,7 +221,6 @@ LIBXML_ATTR_FORMAT
xmlParseExternalID
xmlParserInputGrow
-xmlParserInputRead
xmlRegExecPushString
xmlRegExecPushString2
xmlURIUnescapeString
@@ -301,7 +304,10 @@ xmlNewTextReader
xmlRelaxNGGetParserErrors
xmlSchemaGetParserErrors
+xmlSchemaValidateSetFilename
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
+xmlSchemaValidityLocatorFunc
xmlTextReaderByteConsumed
xmlXPathOrderDocElems
informations
_xmlAttr
@@ -328,6 +334,7 @@ xmlSAX2StartElementNs
xmlSchemaGetValidErrors
xmlSchemaSetValidErrors
+xmlSchemaValidityLocatorFunc
xmlShellDir
xmlXIncludeProcessNode
informative
_xmlError
@@ -362,6 +369,7 @@ xmlXPtrLocationSetRemove
initialisation
xmlInitGlobals
initialization
xmlInitializeCatalog
+xmlInitializeDict
xmlLoadCatalog
xmlLoadCatalogs
xmlSAXDefaultVersion
@@ -415,6 +423,7 @@ xmlAddChild
xmlAddNextSibling
xmlAddPrevSibling
+xmlBufShrink
xmlCopyElementContent
xmlDocSetRootElement
xmlFreeElementContent
@@ -427,6 +436,7 @@ xmlIsIdeographic
xmlIsPubidChar
xmlKeepBlanksDefault
+xmlNodeDump
xmlRegisterHTTPPostCallbacks
xmlSaveDoc
xmlSaveTree
@@ -495,17 +505,20 @@
interprestation
xmlXPathFunction
interpreter
xmlXPathAxisFunc
intersection
xmlXPathIntersection
+
introduced
LIBXML2_NEW_BUFFER
+
ints
xmlGetLineNo
invalid
XML_SCHEMAS_TYPE_INTERNAL_INVALID
xmlParseSDDecl
xmlReconciliateNs
xmlValidateDtdFinal
invited
xmlValidGetValidElements
-
invoking
xmlGetLineNo
isinf
xmlXPathIsInf
isn
xmlRegisterCharEncodingHandler
isnan
xmlXPathIsNaN
issue
xmlEncodeEntities
issued
xlinkIsLink
+
issues
xmlModuleOpen
+xmlModuleSymbol
item
XML_SCHEMAS_TYPE_BLOCK_DEFAULT
XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE
XML_SCHEMAS_TYPE_MARKED
@@ -543,8 +556,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk18.html b/libxml2/doc/APIchunk18.html index 4640001..90249a1 100644 --- a/libxml2/doc/APIchunk18.html +++ b/libxml2/doc/APIchunk18.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index j-l for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index j-l for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index j-l for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index j-l for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -61,6 +61,7 @@

Letter k:

keep
xmlExpNewOr
xmlExpNewRange
xmlExpNewSeq
+xmlGetBufferAllocationScheme
xmlParseURIRaw
xmlParserInputGrow
xmlSubstituteEntitiesDefault
@@ -100,7 +101,8 @@ xmlParserInputBufferCreateIO
xmlParserInputBufferCreateMem
xmlParserInputBufferCreateStatic
-

Letter l:

labeled
xmlParseCtxtExternalEntity
+

Letter l:

label
_xmlParserCtxt
+
labeled
xmlParseCtxtExternalEntity
xmlParseExtParsedEnt
xmlParseExternalEntity
lack
xmlCharEncodingInputFunc
@@ -122,6 +124,7 @@ xmlExpSubsume
large
_xmlParserCtxt
_xmlParserInput
+xmlGetBufferAllocationScheme
largest
xmlXPathFloorFunction
later
xmlHashAddEntry
xmlHashAddEntry2
@@ -160,6 +163,7 @@ xmlCleanupThreads
least
xmlDetectCharEncoding
xmlXPathStringFunction
+
led
xmlInitializeDict
left
xmlExpNewOr
xmlExpNewSeq
xmlMemDisplayLast
@@ -180,12 +184,6 @@ xmlStrndup
xmlUTF8Strndup
xmlUTF8Strsize
-
lenght
xmlExpGetLanguage
-xmlExpGetStart
-xmlExpNewAtom
-xmlRelaxNGValidatePushCData
-xmlSplitQName3
-xmlValidatePushCData
length-1
xmlXPathNodeSetItem
less
xmlExpExpDerive
xmlSaveToFilename
@@ -195,6 +193,7 @@
less-than
xmlNewTextChild
level
XML_SCHEMAS_ELEM_TOPLEVEL
_xmlDoc
+xmlBufNodeDump
xmlC14NDocSave
xmlCatalogSetDebug
xmlCleanupMemory
@@ -235,6 +234,7 @@ xmlCleanupMemory
xmlCleanupParser
xmlCleanupThreads
+xmlDictCleanup
xmlHasFeature
xmlInitThreads
xmlInitializeGlobalState
@@ -294,14 +294,22 @@ xmlValidityErrorFunc
xmlValidityWarningFunc
likely
xmlGetThreadId
-
limit
xmlCharEncFirstLine
+
limit
XML_MAX_NAME_LENGTH
+_xmlXPathParserContext
+xmlCharEncFirstLine
xmlDecodeEntities
+xmlDictSetLimit
xmlPatternMaxDepth
-
limitation
XML_MAX_TEXT_LENGTH
+
limitation
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
+xmlGetLineNo
limited
_htmlElemDesc
+xmlNodeDump
linear
htmlEntityLookup
htmlEntityValueLookup
xmlExpExpDerive
+
lines
xmlGetLineNo
linked
_xmlSchemaAttributeLink
_xmlSchemaFacetLink
_xmlSchemaTypeLink
@@ -366,6 +374,8 @@ xmlCanonicPath
xmlPathToURI
xmlSAX2SetDocumentLocator
+xmlSchemaValidateSetLocator
+xmlSchemaValidityLocatorFunc
xmlTextReaderErrorFunc
xmlTextReaderLocatorBaseURI
xmlTextReaderLocatorLineNumber
@@ -423,8 +433,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk19.html b/libxml2/doc/APIchunk19.html index 2386064..23f434e 100644 --- a/libxml2/doc/APIchunk19.html +++ b/libxml2/doc/APIchunk19.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index m-m for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index m-m for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index m-m for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index m-m for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -97,7 +97,8 @@ xmlStringLenDecodeEntities
marking
xmlParseCharData
marks
xmlParseCharData
-
markup
xmlParseMarkupDecl
+
markup
XML_MAX_NAME_LENGTH
+xmlParseMarkupDecl
xmlParseSDDecl
xmlTextReaderReadInnerXml
xmlTextReaderReadOuterXml
@@ -289,6 +290,7 @@ xmlDOMWrapRemoveNode
month
ftpListCallback
more
XML_MAX_NAMELEN
+XML_MAX_NAME_LENGTH
xmlExpGetLanguage
xmlExpGetStart
xmlParseAttributeType
@@ -308,7 +310,8 @@ xmlGetFeaturesList
move
xmlDOMWrapAdoptNode
moved
xmlTextReaderMoveToElement
-
much
xmlReconciliateNs
+
much
xmlDictGetUsage
+xmlReconciliateNs
multi-threaded
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
multi-threading
xmlCleanupGlobals
@@ -323,6 +326,7 @@
mutex
xmlDictCleanup
xmlFreeMutex
xmlFreeRMutex
+xmlInitializeDict
xmlMutexLock
xmlMutexUnlock
xmlNewMutex
@@ -345,8 +349,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk2.html b/libxml2/doc/APIchunk2.html index 40a0b9f..1d10f93 100644 --- a/libxml2/doc/APIchunk2.html +++ b/libxml2/doc/APIchunk2.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index D-E for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index D-E for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index D-E for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index D-E for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -208,7 +208,8 @@ xmlParseEntityValue
xmlValidateAttributeValue
xmlValidateDtdFinal
-
ENTITY_REF
xmlNodeBufGetContent
+
ENTITY_REF
xmlBufGetNodeContent
+xmlNodeBufGetContent
xmlNodeGetContent
ENTITY_REFs
xmlNewChild
xmlNodeListGetRawString
@@ -287,6 +288,7 @@
EntitiesTable
htmlEntityLookup
htmlEntityValueLookup
Entity
_xmlEntity
+xmlBufGetNodeContent
xmlNewEntityInputStream
xmlNodeBufGetContent
xmlNodeGetBase
@@ -328,6 +330,7 @@ xmlXPathEvalExpression
xmlXPathEvalPredicate
xmlXPathEvaluatePredicateResult
+xmlXPathNodeEval
xmlXPtrEval
xmlXPtrEvalRangePredicate
Evaluates
xmlExpExpDerive
@@ -389,8 +392,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk20.html b/libxml2/doc/APIchunk20.html index 50d3bf8..0317066 100644 --- a/libxml2/doc/APIchunk20.html +++ b/libxml2/doc/APIchunk20.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index n-n for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index n-n for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index n-n for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index n-n for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -224,7 +224,8 @@ xmlSetStructuredErrorFunc
xmlTextReaderReadInnerXml
xmlXPathBooleanFunction
-
normal
xmlInitCharEncodingHandlers
+
normal
xmlGetBufferAllocationScheme
+xmlInitCharEncodingHandlers
xmlParserInputBufferGrow
normalization
xmlNormalizeURIPath
xmlParseSDDecl
@@ -305,8 +306,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk21.html b/libxml2/doc/APIchunk21.html index 5b9195d..c655198 100644 --- a/libxml2/doc/APIchunk21.html +++ b/libxml2/doc/APIchunk21.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index o-o for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index o-o for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index o-o for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index o-o for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -230,7 +230,9 @@ xmlXPathValueFlipSign
opposite
xmlCleanupParser
optimized
xmlXPathNodeSetAddUnique
-
option
XML_MAX_TEXT_LENGTH
+
option
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
xmlDOMWrapAdoptNode
xmlDOMWrapCloneNode
xmlDOMWrapReconcileNamespaces
@@ -247,6 +249,7 @@ xmlSchemaSetValidOptions
xmlSchemaValidCtxtGetOptions
xmlSchemaValidateFile
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetup
xmlXPathContextSetCache
@@ -320,6 +323,7 @@ xmlLockLibrary
xmlParseEntity
xmlSAXParseEntity
+xmlSchemaValidityLocatorFunc
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
xmlTextReaderNormalization
@@ -335,11 +339,15 @@
outside
xmlReconciliateNs
over
xmlExpCtxtNbCons
overflow
_xmlParserInput
-
override
XML_MAX_TEXT_LENGTH
+
override
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
resolveEntity
resolveEntitySAXFunc
xmlCatalogAdd
+xmlGetLineNo
xmlSAX2ResolveEntity
+
overriding
XML_MAX_NAME_LENGTH
overwrite
xmlACatalogAdd
xmlCatalogAdd
overwritten
xmlAddEncodingAlias
@@ -367,8 +375,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk22.html b/libxml2/doc/APIchunk22.html index bdd8909..2f20018 100644 --- a/libxml2/doc/APIchunk22.html +++ b/libxml2/doc/APIchunk22.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index p-p for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index p-p for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index p-p for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index p-p for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -129,6 +129,7 @@ xmlShellValidate
xmlTextReaderRelaxNGValidate
xmlTextReaderSchemaValidate
+
pathological
xmlGetBufferAllocationScheme
pattern
XML_SCHEMAS_TYPE_NORMVALUENEEDED
xmlPatternFromRoot
xmlPatternGetStreamCtxt
@@ -150,6 +151,7 @@ xmlParseAttributeType
xmlValidateElementDecl
xmlXPathContextSetCache
+
per-thread
LIBXML_THREAD_ALLOC_ENABLED
performance
xmlGetBufferAllocationScheme
xmlSetBufferAllocationScheme
performed
htmlNodeStatus
@@ -188,7 +190,6 @@
pnetlib-doc
xmlTextReaderNodeType
pointed
xmlPopInput
pointers
xmlParserInputGrow
-xmlParserInputRead
xmlReconciliateNs
xmlRegExecErrInfo
xmlRegExecNextValues
@@ -207,6 +208,8 @@ xmlNanoHTTPScanProxy
portability
INVALID_SOCKET
SOCKET
+xmlModuleOpen
+xmlModuleSymbol
portable
xmlXPathIsInf
xmlXPathIsNaN
pos
xmlUTF8Strsub
@@ -223,6 +226,7 @@ xmlRegExecNextValues
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
@@ -328,7 +332,6 @@ xmlNodeGetSpacePreserve
xmlNodeSetSpacePreserve
xmlParserInputGrow
-xmlParserInputRead
xmlTextReaderPreserve
xmlTextReaderPreservePattern
preserved
HTML_PRESERVE_NODE
@@ -348,9 +351,11 @@ htmlHandleOmittedElem
htmlParseElement
xmlAddPrevSibling
+xmlBufferDetach
xmlCatalogSetDebug
xmlCatalogSetDefaultPrefer
xmlDeregisterNodeDefault
+xmlDictSetLimit
xmlKeepBlanksDefault
xmlLineNumbersDefault
xmlPedanticParserDefault
@@ -369,6 +374,7 @@ htmlNodeDumpFileFormat
htmlNodeDumpFormatOutput
htmlNodeDumpOutput
+xmlBufNodeDump
xmlElemDump
xmlNodeDump
xmlNodeDumpOutput
@@ -424,6 +430,7 @@ xmlSAX2StartElement
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
@@ -503,6 +510,7 @@
provenance
xmlEntityReferenceFunc
provide
INVALID_SOCKET
SOCKET
+xmlBufNodeDump
xmlDocDumpFormatMemory
xmlDocDumpFormatMemoryEnc
xmlDocFormatDump
@@ -512,6 +520,8 @@ xmlOutputMatchCallback
xmlSaveFormatFile
xmlSaveFormatFileEnc
+xmlSchemaValidateSetFilename
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
xmlUTF8Strloc
xmlUTF8Strpos
@@ -565,8 +575,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk23.html b/libxml2/doc/APIchunk23.html index aba3d80..16c7c21 100644 --- a/libxml2/doc/APIchunk23.html +++ b/libxml2/doc/APIchunk23.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index q-r for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index q-r for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index q-r for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index q-r for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -59,8 +59,10 @@
quote
docbEncodeEntities
htmlEncodeEntities
xmlBufferWriteQuotedString
+xmlTextWriterSetQuoteChar
quoted
xmlBufferWriteQuotedString
quotes
xmlParseQuotedString
+
quoting
xmlTextWriterSetQuoteChar

Letter r:

raise
XP_ERROR
XP_ERROR0
raised
_xmlError
@@ -190,6 +192,7 @@ htmlNodeDumpFormatOutput
htmlNodeDumpOutput
htmlParseElement
+xmlBufNodeDump
xmlCopyDoc
xmlCopyEnumeration
xmlCopyNode
@@ -244,7 +247,6 @@ xmlGetParameterEntity
referred
xmlParseAttribute
xmlParseCharRef
-
refresh
xmlParserInputRead
refs
_xmlDoc
_xmlParserCtxt
refuse
xmlNewNs
@@ -335,6 +337,7 @@ xmlHashRemoveEntry2
xmlHashRemoveEntry3
remove
xmlACatalogRemove
+xmlBufShrink
xmlBufferShrink
xmlCatalogRemove
xmlDecodeEntities
@@ -352,6 +355,7 @@ nodePop
valuePop
xmlACatalogRemove
+xmlBufShrink
xmlBufferShrink
xmlCatalogRemove
xmlCheckLanguageID
@@ -403,6 +407,7 @@ xmlXPathNormalizeFunction
reporting
INPUT_CHUNK
_xmlXPathContext
+xmlSchemaValidateSetFilename
xmlStructuredErrorFunc
reports
docbCreatePushParserCtxt
htmlCreatePushParserCtxt
@@ -447,13 +452,13 @@
requires
_htmlElemDesc
xmlC14NDocSaveTo
xmlC14NExecute
-xmlGetLineNo
xmlRelaxNGValidatePushElement
requred
xmlC14NDocSave
reserved
xmlCheckLanguageID
xmlNewTextChild
xmlURIEscapeStr
reset
initGenericErrorDefaultFunc
+xmlBufferDetach
xmlCtxtReadFd
xmlNodeSetBase
xmlNodeSetName
@@ -517,6 +522,7 @@
restored
xmlSchemaSAXUnplug
xmlTextReaderSetErrorHandler
xmlTextReaderSetStructuredErrorHandler
+xmlXPathNodeEval
restrict
xmlParseExternalID
restriction
XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION
XML_SCHEMAS_ELEM_BLOCK_RESTRICTION
@@ -627,6 +633,7 @@
running
xmlKeepBlanksDefault
runtime
LIBXML_DEBUG_RUNTIME
XML_MAX_NAMELEN
+XML_MAX_NAME_LENGTH
xmlMemDisplayLast

A-B C-C @@ -637,8 +644,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk24.html b/libxml2/doc/APIchunk24.html index d06d941..e81f34d 100644 --- a/libxml2/doc/APIchunk24.html +++ b/libxml2/doc/APIchunk24.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index s-s for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index s-s for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index s-s for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index s-s for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -42,7 +42,9 @@ xmlInitializeCatalog
xmlLoadCatalog
xmlLoadCatalogs
-
safety
XML_MAX_TEXT_LENGTH
+
safety
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
same
HTML_COMMENT_NODE
HTML_ENTITY_REF_NODE
HTML_PI_NODE
@@ -65,6 +67,7 @@ xmlXPathNextFollowing
xmlXPathNextPreceding
xmlXPathNormalizeFunction
+xmlXPathSetContextNode
save
htmlNodeDumpFileFormat
xmlGcMemGet
xmlMemGet
@@ -134,7 +137,10 @@ xmlSchemaValidateFacetWhtsp
xmlSchemaValidateFile
xmlSchemaValidateStream
+xmlSchemaValidityLocatorFunc
xmlSchematronNewMemParserCtxt
+xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
schematron
xmlSchematronValidateDoc
@@ -381,6 +387,7 @@ xmlParseExternalID
xmlPreviousElementSibling
xmlRelaxNGNewDocParserCtxt
+xmlSchemaValidateSetLocator
single
IS_DIGIT_CH
XML_MAX_TEXT_LENGTH
xmlCurrentChar
@@ -404,6 +411,7 @@
singleton
xmlCheckLanguageID
site1
xmlBuildRelativeURI
site2
xmlBuildRelativeURI
+
size_t
xmlBufShrink
sizes
xmlGetBufferAllocationScheme
xmlSetBufferAllocationScheme
skip
xmlSkipBlankChars
@@ -412,6 +420,7 @@ xmlSkipBlankChars
slot
xmlXPathContextSetCache
slots
xmlXPathContextSetCache
+
small
xmlGetBufferAllocationScheme
smaller
xmlURIUnescapeString
smallest
xmlXPathCeilingFunction
socket
INVALID_SOCKET
@@ -449,6 +458,7 @@ xmlXIncludeProcessTree
xmlXIncludeProcessTreeFlags
xmlXIncludeProcessTreeFlagsData
+
somehow
xmlNodeDump
sometimes
xmlCheckLanguageID
xmlCleanupParser
xmlCleanupThreads
@@ -683,6 +693,7 @@ xmlExpGetLanguage
xmlExpGetStart
xmlGetFeature
+xmlGetLineNo
xmlInputReadCallback
xmlOutputBufferWrite
xmlOutputBufferWriteEscape
@@ -698,6 +709,7 @@ xmlSAXParseFileWithData
xmlSAXParseMemoryWithData
xmlXPathOrderDocElems
+
stores
xmlBufNodeDump
str
htmlParseEntityRef
xmlBufferAdd
strcasecmp
xmlStrcasecmp
@@ -730,9 +742,11 @@
stringi
xmlXPathSubstringAfterFunction
strings
_xmlParserCtxt
xmlDictCreateSub
+xmlDictGetUsage
xmlExpGetLanguage
xmlExpGetStart
xmlExpParse
+xmlGetBufferAllocationScheme
xmlGetFeaturesList
xmlPatterncompile
xmlRegExecErrInfo
@@ -770,6 +784,7 @@ xmlFreeNsList
xmlLoadACatalog
xmlNewRMutex
+xmlNodeDump
xmlRegFreeExecCtxt
struture
xmlRelaxNGParse
xmlSchemaParse
@@ -802,6 +817,7 @@ XML_SUBSTITUTE_NONE
XML_SUBSTITUTE_PEREF
XML_SUBSTITUTE_REF
+xmlBufGetNodeContent
xmlNodeBufGetContent
xmlNodeGetContent
xmlParseEntityValue
@@ -885,6 +901,7 @@ xmlTextReaderSetParserProp
xmlUnsetNsProp
xmlUnsetProp
+xmlXPathSetContextNode
successfully
xmlTextReaderNext
xmlTextReaderNextSibling
xmlTextReaderRead
@@ -936,7 +953,8 @@ xmlNodeSetContentLen
xmlStrcat
xmlStrdup
-
sure
xmlSaveClose
+
sure
xmlDictCleanup
+xmlSaveClose
xmlSaveFlush
xmlURIEscape
xmlXPathNodeSetAddUnique
@@ -959,8 +977,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk25.html b/libxml2/doc/APIchunk25.html index 8971d90..dec65ba 100644 --- a/libxml2/doc/APIchunk25.html +++ b/libxml2/doc/APIchunk25.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index t-t for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index t-t for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index t-t for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index t-t for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -117,6 +117,7 @@ xmlNodeListGetRawString
xmlNodeListGetString
xmlParseEntityRef
+xmlUnlinkNode
xmlXPathAddValues
xmlXPathDivValues
xmlXPathIdFunction
@@ -138,11 +139,13 @@ xmlCheckUTF8
xmlParseSDDecl
they
_htmlElemDesc
+xmlBufferDetach
xmlCreatePushParserCtxt
xmlStrEqual
xmlStrQEqual
xmlStrcat
xmlStrdup
+xmlUnlinkNode
third
xmlHashAddEntry3
xmlHashLookup3
xmlHashQLookup3
@@ -157,6 +160,7 @@
those
xmlCheckLanguageID
xmlKeepBlanksDefault
xmlParseSDDecl
+xmlSchemaValidateSetLocator
xmlSearchNs
xmlXPathSubstringFunction
though
xmlDocDumpMemory
@@ -184,6 +188,7 @@ xmlXPathNextAncestor
xmlXPathNextAncestorOrSelf
xmlXPathNextDescendantOrSelf
+
tight
xmlGetBufferAllocationScheme
time
xmlExpExpDerive
xmlXPathAxisFunc
title
xlinkSimpleLinkFunk
@@ -214,6 +219,7 @@ htmlNodeDumpFileFormat
htmlNodeDumpFormatOutput
htmlNodeDumpOutput
+xmlBufNodeDump
xmlCheckLanguageID
xmlCopyDoc
xmlElemDump
@@ -362,7 +368,6 @@ xmlNanoHTTPMethodRedir
xmlNanoHTTPOpen
xmlNanoHTTPOpenRedir
-xmlParserInputRead
xmlReconciliateNs
xmlURIEscape
xmlValidateRoot
@@ -422,8 +427,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk26.html b/libxml2/doc/APIchunk26.html index aed42a6..17666cf 100644 --- a/libxml2/doc/APIchunk26.html +++ b/libxml2/doc/APIchunk26.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index u-v for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index u-v for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index u-v for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index u-v for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -62,6 +62,8 @@ xmlNodeAddContentLen
xmlURIUnescapeString
unescaping
xmlParseURIRaw
+
unfriendly
XML_MAX_LOOKUP_LIMIT
+XML_MAX_NAME_LENGTH
unicode
htmlEntityValueLookup
xmlIsLetter
unimplemented
htmlCtxtUseOptions
@@ -93,6 +95,7 @@ xmlUCSIsCat
unless
htmlSAXParseDoc
htmlSAXParseFile
+xmlDictCleanup
xmlExpNewOr
xmlExpNewRange
xmlExpNewSeq
@@ -104,11 +107,13 @@ xmlXPathNextNamespace
unliked
xmlDOMWrapAdoptNode
unlink
xmlFreeNode
+xmlUnlinkNode
unlinked
xmlAddNextSibling
xmlAddPrevSibling
xmlAddSibling
xmlNewEntity
xmlReplaceNode
+xmlUnlinkNode
unload
xmlModuleClose
xmlModuleFree
unloaded
xmlModuleClose
@@ -183,10 +188,12 @@ xmlSplitQName2
upon
checkNamespace
xlinkNodeDetectFunc
-
upper
xmlExpNewRange
+
upper
XML_MAX_LOOKUP_LIMIT
+xmlExpNewRange
xmlIsRef
uri
xmlNormalizeWindowsPath
-
usage
xmlGetBufferAllocationScheme
+
usage
XML_MAX_NAME_LENGTH
+xmlGetBufferAllocationScheme
xmlSetBufferAllocationScheme
used:
XML_DEFAULT_VERSION
used?
_xmlSchemaAttribute
@@ -237,6 +244,7 @@ xmlRelaxNGValidatePushElement
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
+
validator
xmlSchemaValidityLocatorFunc
validity
_xmlParserCtxt
_xmlValidCtxt
xlinkIsLink
@@ -290,6 +298,7 @@
void
XML_CAST_FPTR
xmlSAXParseFileWithData
xmlSAXParseMemoryWithData
+
volume
_xmlParserCtxt

A-B C-C D-E @@ -299,8 +308,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk27.html b/libxml2/doc/APIchunk27.html index cc057c9..cabaa27 100644 --- a/libxml2/doc/APIchunk27.html +++ b/libxml2/doc/APIchunk27.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index w-w for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index w-w for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index w-w for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index w-w for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -132,6 +132,7 @@
what
xmlCatalogGetDefaults
xmlCatalogSetDefaults
xmlParseNamespace
+xmlSchemaValidityLocatorFunc
xmlTextReaderGetRemainder
xmlTextWriterWriteRawLen
where
_htmlElemDesc
@@ -188,6 +189,8 @@ xmlAutomataNewOnceTrans
xmlAutomataNewOnceTrans2
xmlTextReaderLookupNamespace
+
why
xmlModuleOpen
+xmlModuleSymbol
wierd
xmlBuildRelativeURI
wildcard
XML_SCHEMAS_ATTRGROUP_GLOBAL
XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED
@@ -254,7 +257,10 @@
word
_htmlElemDesc
words
xmlXPathNormalizeFunction
xmlXPathStringLengthFunction
-
work
xmlNodeGetBase
+
work
xmlBufferDetach
+xmlModuleOpen
+xmlModuleSymbol
+xmlNodeGetBase
xmlPatternStreamable
xmlRemoveProp
xmlSAXParseDoc
@@ -269,6 +275,8 @@
worthwhile
xmlBuildRelativeURI
would
_xmlError
htmlAutoCloseTag
+xmlModuleOpen
+xmlModuleSymbol
xmlTextReaderGetRemainder
wrapper
xmlDOMWrapAcquireNsFunction
xmlDOMWrapReconcileNamespaces
@@ -317,8 +325,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk28.html b/libxml2/doc/APIchunk28.html index c729ea1..c5993f9 100644 --- a/libxml2/doc/APIchunk28.html +++ b/libxml2/doc/APIchunk28.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index x-x for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index x-x for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index x-x for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index x-x for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -107,12 +107,16 @@
xmlAttributePtr
xmlGetDtdAttrDesc
xmlGetDtdQAttrDesc
xmlAttributeTablePtr
xmlCopyAttributeTable
+
xmlBufNodeDump
xmlNodeDump
+
xmlBufPtr
xmlBufGetNodeContent
xmlBuffer
xmlCharEncFirstLine
xmlCharEncInFunc
xmlCharEncOutFunc
+xmlNodeDump
xmlOutputBufferCreateBuffer
xmlBufferPtr
xmlNewTextWriterMemory
xmlOutputBufferCreateBuffer
+
xmlBufferShrink
xmlBufShrink
xmlBuildURI
xmlBuildRelativeURI
xmlBytesConsumed
xmlTextReaderByteConsumed
xmlCatalogAllow
xmlCatalogGetDefaults
@@ -129,8 +133,6 @@
xmlCharEncodingOutputFunc
xmlNewCharEncodingHandler
xmlChars
_xmlParserInput
xmlBufferWriteCHAR
-xmlParserInputGrow
-xmlParserInputRead
xmlCleanupParser
xmlCleanupParser
xmlCleanupThreads
xmlCleanupThreads
xmlCopyDocElementContent
xmlCopyElementContent
@@ -206,6 +208,7 @@
xmlFreeDoc
xmlTextReaderCurrentDoc
xmlFreeDocElementContent
xmlFreeElementContent
xmlFreeMutex
xmlFreeMutex
+
xmlFreeNode
xmlUnlinkNode
xmlFreeStreamCtxt
xmlPatternGetStreamCtxt
xmlGetGlobalState
xmlGetGlobalState
xmlGetNoNsProp
xmlGetProp
@@ -215,7 +218,8 @@
xmlHashTablePtr
xmlHashCreate
xmlHashCreateDict
xmlIDPtr
xmlAddID
-
xmlIndentTreeOutput
xmlDocDumpFormatMemory
+
xmlIndentTreeOutput
xmlBufNodeDump
+xmlDocDumpFormatMemory
xmlDocDumpFormatMemoryEnc
xmlDocFormatDump
xmlNodeDump
@@ -247,14 +251,14 @@
xmlIsMainThread
xmlIsMainThread
xmlIsPubidCharQ
xmlIsPubidChar
xmlIsPubidChar_ch
xmlIsPubidChar
-
xmlKeepBlanksDefault
xmlDocDumpFormatMemory
+
xmlKeepBlanksDefault
xmlBufNodeDump
+xmlDocDumpFormatMemory
xmlDocDumpFormatMemoryEnc
xmlDocFormatDump
xmlNodeDump
xmlNodeDumpOutput
xmlSaveFormatFile
xmlSaveFormatFileEnc
-
xmlLineNumbersDefault
xmlGetLineNo
xmlListWalk
xmlListWalker
xmlLoadExtDtdDefaultValue
XML_COMPLETE_ATTRS
XML_DETECT_IDS
@@ -310,10 +314,13 @@ xmlCopyNamespaceList
xmlDOMWrapAcquireNsFunction
xmlGetNsList
+
xmlOutputBuffer
LIBXML2_NEW_BUFFER
xmlOutputBufferClose
xmlSaveFileTo
xmlSaveFormatFileTo
xmlOutputBufferPtr
xmlNewTextWriter
xmlOutputBufferCreateFilenameFunc
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
xmlOutputCloseCallback
xmlRegisterOutputCallbacks
xmlOutputMatchCallback
xmlRegisterOutputCallbacks
xmlOutputOpenCallback
xmlRegisterOutputCallbacks
@@ -337,6 +344,7 @@ xmlParseChunk
xmlParserFindNodeInfoIndex
xmlParserFindNodeInfoIndex
xmlParserHandleReference
xmlScanName
+
xmlParserInputBuffer
LIBXML2_NEW_BUFFER
xmlParserInputBufferPtr
xmlNewTextReader
xmlParserInputBufferCreateFilenameFunc
xmlTextReaderGetRemainder
@@ -490,6 +498,7 @@ xmlXPathNewNodeSetList
xmlXPathNewString
xmlXPathNewValueTree
+xmlXPathNodeEval
xmlXPathWrapNodeSet
xmlXPtrEval
xmlXPtrLocationSetAdd
@@ -532,8 +541,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk29.html b/libxml2/doc/APIchunk29.html index 669be08..2aaa21b 100644 --- a/libxml2/doc/APIchunk29.html +++ b/libxml2/doc/APIchunk29.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index y-z for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index y-z for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index y-z for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index y-z for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -57,6 +57,7 @@ xmlSaveTree
xmlSchemaGetCanonValue
xmlSchemaGetCanonValueWhtsp
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidateCtxt
you
xmlDOMWrapAdoptNode
xmlDOMWrapCloneNode
@@ -106,8 +107,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk3.html b/libxml2/doc/APIchunk3.html index a601bfe..515118a 100644 --- a/libxml2/doc/APIchunk3.html +++ b/libxml2/doc/APIchunk3.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index F-I for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index F-I for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index F-I for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index F-I for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -57,7 +57,8 @@
False
xmlBoolToText
Fetch
xmlNanoFTPGet
File
xmlTextReaderGetRemainder
-
Fills
xmlNodeBufGetContent
+
Fills
xmlBufGetNodeContent
+xmlNodeBufGetContent
Find
xmlExpGetLanguage
xmlExpGetStart
xmlGetRefs
@@ -120,7 +121,10 @@ xmlDOMWrapFreeCtxt
xmlNanoFTPFreeCtxt
Front-end
xmlCharEncFirstLine
-
Function
xmlBufferContent
+
Function
xmlBufContent
+xmlBufEnd
+xmlBufUse
+xmlBufferContent
xmlBufferLength
xmlSetGenericErrorFunc
xmlSetStructuredErrorFunc
@@ -140,7 +144,9 @@
GeometricShapes
xmlUCSIsGeometricShapes
Georgian
xmlUCSIsGeorgian
Gets
xmlTextReaderReadState
-
Gives
xmlSchemaGetBuiltInType
+
Gives
xmlOutputBufferGetContent
+xmlOutputBufferGetSize
+xmlSchemaGetBuiltInType
Global
_xmlDoc
Gothic
xmlUCSIsGothic
Greek
xmlUCSIsGreek
@@ -316,6 +322,10 @@
Intended
xmlSnprintfElementContent
Internal
_xmlDOMWrapCtxt
xmlParseMarkupDecl
+
Introduced
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
Irregular
xmlCheckLanguageID

A-B C-C @@ -326,8 +336,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk4.html b/libxml2/doc/APIchunk4.html index 76eca77..d26883b 100644 --- a/libxml2/doc/APIchunk4.html +++ b/libxml2/doc/APIchunk4.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index J-N for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index J-N for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index J-N for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index J-N for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -91,6 +91,7 @@ xmlSplitQName
xmlSplitQName2
Location
xmlXPathEval
+xmlXPathNodeEval
xmlXPtrEval
xmlXPtrEvalRangePredicate
LocationSet
xmlXPtrFreeLocationSet
@@ -113,6 +114,7 @@ xmlSchemaGetPredefinedType
Loose
_htmlElemDesc
LowSurrogates
xmlUCSIsLowSurrogates
+
Lzma
LIBXML_LZMA_ENABLED

Letter M:

META
htmlSetMetaEncoding
MODIFIER
_htmlElemDesc
MULT
_xmlElementContent
@@ -133,7 +135,10 @@
MathematicalOperators
xmlUCSIsMathematicalOperators
Max
_xmlParserCtxt
_xmlValidCtxt
-
Maximum
XML_MAX_TEXT_LENGTH
+
Maximum
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
May
xmlURIEscape
Memory
xmlDocDumpFormatMemoryEnc
xmlDocDumpMemoryEnc
@@ -192,7 +197,8 @@ xmlSchemaGetCanonValue
xmlSchemaNewNOTATIONValue
xmlValidateDtdFinal
-
NOTE
xmlCtxtReadFd
+
NOTE
xmlBufShrink
+xmlCtxtReadFd
xmlParseExternalID
xmlParseNotationDecl
xmlReadFd
@@ -206,6 +212,8 @@ xmlDOMWrapRemoveNode
xmlGetProp
xmlInitCharEncodingHandlers
+xmlModuleOpen
+xmlModuleSymbol
xmlNewChild
xmlNewDocNode
xmlNewDocNodeEatName
@@ -319,8 +327,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk5.html b/libxml2/doc/APIchunk5.html index 6ba3cdb..da60d1a 100644 --- a/libxml2/doc/APIchunk5.html +++ b/libxml2/doc/APIchunk5.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index O-P for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index O-P for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index O-P for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index O-P for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -149,6 +149,7 @@ xmlSchemaGetBuiltInListSimpleTypeItemType
Path
xmlGetNodePath
xmlXPathEval
+xmlXPathNodeEval
xmlXPtrEval
People
xmlEncodeEntities
PhoneticExtensions
xmlUCSIsPhoneticExtensions
@@ -156,7 +157,8 @@
Plug
xmlSchemaSAXPlug
Pointer
xmlCheckUTF8
Points
xmlXPtrNewRangePoints
-
Pop
xmlRelaxNGValidatePopElement
+
Pop
_xmlXPathParserContext
+xmlRelaxNGValidatePopElement
xmlValidatePopElement
Pops
inputPop
namePop
@@ -267,8 +269,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk6.html b/libxml2/doc/APIchunk6.html index 9649a27..346e7e5 100644 --- a/libxml2/doc/APIchunk6.html +++ b/libxml2/doc/APIchunk6.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index Q-R for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index Q-R for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index Q-R for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index Q-R for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -82,7 +82,8 @@
Raises
xmlXPathSetArityError
xmlXPathSetError
xmlXPathSetTypeError
-
Read
xmlFileRead
+
Read
xmlBufGetNodeContent
+xmlFileRead
xmlGetFeature
xmlGetUTF8Char
xmlIOFTPRead
@@ -93,6 +94,7 @@ xmlTextReaderGetParserProp
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
@@ -194,11 +196,14 @@ xmlRelaxParserSetFlag
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
RelaxNGs
xmlRelaxNGNewDocParserCtxt
xmlRelaxNGNewMemParserCtxt
xmlRelaxNGNewParserCtxt
xmlRelaxNGNewValidCtxt
Remove
xmlACatalogRemove
+xmlBufShrink
+xmlBufferDetach
xmlBufferShrink
xmlCatalogRemove
xmlListClear
@@ -265,8 +270,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk7.html b/libxml2/doc/APIchunk7.html index 0a0b449..3f46f99 100644 --- a/libxml2/doc/APIchunk7.html +++ b/libxml2/doc/APIchunk7.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index S-S for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index S-S for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index S-S for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index S-S for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -185,8 +185,10 @@ xmlXPathNodeLeadingSorted
xmlXPathNodeTrailing
xmlXPathNodeTrailingSorted
+xmlXPathSetContextNode
xmlXPathTrailing
xmlXPathTrailingSorted
+
Setting
xmlSchemaValidateSetLocator
Setup
xmlNanoFTPProxy
xmlReaderNewDoc
xmlReaderNewFd
@@ -229,7 +231,8 @@ xmlTextReaderErrorFunc
Similarly
xmlParseEntityRef
Simply
xmlCreateURI
-
Since
xmlStrcat
+
Since
xmlNodeDump
+xmlStrcat
xmlStrdup
xmlTextReaderNormalization
Single
xmlCheckLanguageID
@@ -303,8 +306,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk8.html b/libxml2/doc/APIchunk8.html index 6f277cc..934e39d 100644 --- a/libxml2/doc/APIchunk8.html +++ b/libxml2/doc/APIchunk8.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index T-U for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index T-U for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index T-U for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index T-U for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -41,6 +41,7 @@ xmlAddChildList
xmlAddPrevSibling
xmlAddSibling
+xmlBufGetNodeContent
xmlNewTextChild
xmlNodeBufGetContent
xmlNodeGetContent
@@ -152,6 +153,7 @@ xmlCatalogGetSystem
xmlCatalogResolvePublic
xmlCatalogResolveSystem
+xmlGetLineNo
xmlIsXHTML
xmlNanoFTPGetConnection
xmlValidateAttributeDecl
@@ -250,6 +252,7 @@ xmlPatternGetStreamCtxt
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetSchema
@@ -280,8 +283,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIchunk9.html b/libxml2/doc/APIchunk9.html index c2609a9..8c4ac1f 100644 --- a/libxml2/doc/APIchunk9.html +++ b/libxml2/doc/APIchunk9.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -API Alphabetic Index V-Y for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index V-Y for libxml2

Developer Menu
API Indexes
Related links

A-B +API Alphabetic Index V-X for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

API Alphabetic Index V-X for libxml2

Developer Menu
API Indexes
Related links

A-B C-C D-E F-I @@ -16,8 +16,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d @@ -132,6 +132,7 @@
With
xmlParseAttribute
xmlParseEndTag
xmlParseStartTag
+
Workaround
xmlSchemaValidateSetFilename
Working
xmlParseNamespace
Wrap
xmlXPathWrapNodeSet
xmlXPtrWrapLocationSet
@@ -181,6 +182,7 @@ xmlSetBufferAllocationScheme
XML_BUFFER_ALLOC_EXACT
xmlGetBufferAllocationScheme
xmlSetBufferAllocationScheme
+
XML_BUFFER_ALLOC_HYBRID
xmlGetBufferAllocationScheme
XML_CAST_FPTR
XML_CAST_FPTR
XML_CATA_PREFER_PUBLIC
xmlCatalogSetDefaultPrefer
XML_CATA_PREFER_SYSTEM
xmlCatalogSetDefaultPrefer
@@ -194,7 +196,10 @@
XML_ELEMENT_TYPE_xxx
xmlParseElementContentDecl
XML_ENTITY_DECL
_xmlEntity
XML_ERR_OK
xmlParseInNodeContext
-
XML_PARSE_HUGE
XML_MAX_TEXT_LENGTH
+
XML_PARSE_BIG_LINES
xmlGetLineNo
+
XML_PARSE_HUGE
XML_MAX_DICTIONARY_LIMIT
+XML_MAX_NAME_LENGTH
+XML_MAX_TEXT_LENGTH
XML_SCHEMAS_ELEM_GLOBAL
XML_SCHEMAS_ELEM_TOPLEVEL
XML_SCHEMAS_FACET_PRESERVE
_xmlSchemaFacet
XML_SCHEMAS_STRING
xmlSchemaNewStringValue
@@ -235,10 +240,6 @@ XINCLUDE_OLD_NS
Xml
xmlTextReaderNodeType
XmlNodeType
xmlTextReaderNodeType
-

Letter Y:

YES
htmlNodeStatus
-
YiRadicals
xmlUCSIsYiRadicals
-
YiSyllables
xmlUCSIsYiSyllables
-
YijingHexagramSymbols
xmlUCSIsYijingHexagramSymbols

A-B C-C D-E @@ -248,8 +249,8 @@ Q-R S-S T-U -V-Y -Z-a +V-X +Y-a b-b c-c d-d diff --git a/libxml2/doc/APIconstructors.html b/libxml2/doc/APIconstructors.html index 4c3fbdb..d5ca488 100644 --- a/libxml2/doc/APIconstructors.html +++ b/libxml2/doc/APIconstructors.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -List of constructors for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

List of constructors for libxml2

Developer Menu
API Indexes
Related links

Type SOCKET:

xmlNanoFTPGetConnection
+List of constructors for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

List of constructors for libxml2

Developer Menu
API Indexes
Related links

Type SOCKET:

xmlNanoFTPGetConnection
xmlNanoFTPGetSocket

Type const htmlElemDesc *:

htmlTagLookup

Type const htmlEntityDesc *:

htmlEntityLookup
@@ -24,6 +24,7 @@ xmlDictLookup
xmlDictQLookup
xmlEncodeEntities
+xmlOutputBufferGetContent
xmlParseAttribute
xmlParseEncodingDecl
xmlParseName
@@ -91,6 +92,12 @@ xmlSaveTree
xmlTextReaderByteConsumed
xmlXPathOrderDocElems
+

Type size_t:

xmlBufNodeDump
+xmlBufShrink
+xmlBufUse
+xmlDictGetUsage
+xmlDictSetLimit
+xmlOutputBufferGetSize

Type unsigned long:

xmlChildElementCount
xmlParserFindNodeInfoIndex
xmlSchemaGetFacetValueAsULong
@@ -173,6 +180,9 @@ xmlACatalogResolvePublic
xmlACatalogResolveSystem
xmlACatalogResolveURI
+xmlBufContent
+xmlBufEnd
+xmlBufferDetach
xmlBuildQName
xmlBuildRelativeURI
xmlBuildURI
@@ -561,6 +571,7 @@ xmlXPathNewNodeSetList
xmlXPathNewString
xmlXPathNewValueTree
+xmlXPathNodeEval
xmlXPathObjectCopy
xmlXPathVariableLookup
xmlXPathVariableLookupFunc
diff --git a/libxml2/doc/APIfiles.html b/libxml2/doc/APIfiles.html index 8f95296..65e004b 100644 --- a/libxml2/doc/APIfiles.html +++ b/libxml2/doc/APIfiles.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -List of Symbols per Module for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

List of Symbols per Module for libxml2

Developer Menu
API Indexes
Related links

Module DOCBparser:

docbCreateFileParserCtxt
+List of Symbols per Module for libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

List of Symbols per Module for libxml2

Developer Menu
API Indexes
Related links

Module DOCBparser:

docbCreateFileParserCtxt
docbCreatePushParserCtxt
docbDocPtr
docbEncodeEntities
@@ -28,6 +28,7 @@ HTML_INVALID
HTML_NA
HTML_PARSE_COMPACT
+HTML_PARSE_IGNORE_ENC
HTML_PARSE_NOBLANKS
HTML_PARSE_NODEFDTD
HTML_PARSE_NOERROR
@@ -330,12 +331,15 @@ xmlDictCreateSub
xmlDictExists
xmlDictFree
+xmlDictGetUsage
xmlDictLookup
xmlDictOwns
xmlDictPtr
xmlDictQLookup
xmlDictReference
+xmlDictSetLimit
xmlDictSize
+xmlInitializeDict

Module encoding:

UTF8Toisolat1
XML_CHAR_ENCODING_2022_JP
XML_CHAR_ENCODING_8859_1
@@ -608,12 +612,14 @@ XML_PARSER_START
XML_PARSER_START_TAG
XML_PARSER_SYSTEM_LITERAL
+XML_PARSE_BIG_LINES
XML_PARSE_COMPACT
XML_PARSE_DOM
XML_PARSE_DTDATTR
XML_PARSE_DTDLOAD
XML_PARSE_DTDVALID
XML_PARSE_HUGE
+XML_PARSE_IGNORE_ENC
XML_PARSE_NOBASEFIX
XML_PARSE_NOBLANKS
XML_PARSE_NOCDATA
@@ -651,6 +657,7 @@ XML_WITH_ICU
XML_WITH_ISO8859X
XML_WITH_LEGACY
+XML_WITH_LZMA
XML_WITH_MODULES
XML_WITH_NONE
XML_WITH_OUTPUT
@@ -812,7 +819,10 @@ MOVETO_ENDTAG
MOVETO_STARTTAG
SKIP_EOL
+XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
XML_MAX_NAMELEN
+XML_MAX_NAME_LENGTH
XML_MAX_TEXT_LENGTH
XML_SUBSTITUTE_BOTH
XML_SUBSTITUTE_NONE
@@ -1282,6 +1292,7 @@ xmlRMutexUnlock
xmlUnlockLibrary

Module tree:

BASE_BUFFER_SIZE
+LIBXML2_NEW_BUFFER
XML_ATTRIBUTE_CDATA
XML_ATTRIBUTE_DECL
XML_ATTRIBUTE_ENTITIES
@@ -1300,6 +1311,7 @@ XML_ATTRIBUTE_REQUIRED
XML_BUFFER_ALLOC_DOUBLEIT
XML_BUFFER_ALLOC_EXACT
+XML_BUFFER_ALLOC_HYBRID
XML_BUFFER_ALLOC_IMMUTABLE
XML_BUFFER_ALLOC_IO
XML_CDATA_SECTION_NODE
@@ -1373,6 +1385,14 @@ xmlAttributeDefault
xmlAttributePtr
xmlAttributeType
+xmlBuf
+xmlBufContent
+xmlBufEnd
+xmlBufGetNodeContent
+xmlBufNodeDump
+xmlBufPtr
+xmlBufShrink
+xmlBufUse
xmlBuffer
xmlBufferAdd
xmlBufferAddHead
@@ -1383,6 +1403,7 @@ xmlBufferCreate
xmlBufferCreateSize
xmlBufferCreateStatic
+xmlBufferDetach
xmlBufferDump
xmlBufferEmpty
xmlBufferFree
@@ -1765,6 +1786,8 @@ xmlOutputBufferCreateFilename
xmlOutputBufferCreateIO
xmlOutputBufferFlush
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
xmlOutputBufferWrite
xmlOutputBufferWriteEscape
xmlOutputBufferWriteString
@@ -1811,7 +1834,8 @@ xmlAutomataStatePtr
xmlFreeAutomata
xmlNewAutomata
-

Module xmlerror:

XML_C14N_CREATE_CTXT
+

Module xmlerror:

XML_BUF_OVERFLOW
+XML_C14N_CREATE_CTXT
XML_C14N_CREATE_STACK
XML_C14N_INVALID_NODE
XML_C14N_RELATIVE_NAMESPACE
@@ -1822,7 +1846,6 @@ XML_CATALOG_NOT_CATALOG
XML_CATALOG_PREFER_VALUE
XML_CATALOG_RECURSION
-XML_CHECK_
XML_CHECK_ENTITY_TYPE
XML_CHECK_FOUND_ATTRIBUTE
XML_CHECK_FOUND_CDATA
@@ -1861,7 +1884,6 @@ XML_CHECK_WRONG_NEXT
XML_CHECK_WRONG_PARENT
XML_CHECK_WRONG_PREV
-XML_CHECK_X
XML_DTD_ATTRIBUTE_DEFAULT
XML_DTD_ATTRIBUTE_REDEFINED
XML_DTD_ATTRIBUTE_VALUE
@@ -1967,6 +1989,7 @@ XML_ERR_MIXED_NOT_FINISHED
XML_ERR_MIXED_NOT_STARTED
XML_ERR_NAME_REQUIRED
+XML_ERR_NAME_TOO_LONG
XML_ERR_NMTOKEN_REQUIRED
XML_ERR_NONE
XML_ERR_NOTATION_NOT_FINISHED
@@ -2003,12 +2026,14 @@ XML_ERR_UNSUPPORTED_ENCODING
XML_ERR_URI_FRAGMENT
XML_ERR_URI_REQUIRED
+XML_ERR_USER_STOP
XML_ERR_VALUE_REQUIRED
XML_ERR_VERSION_MISMATCH
XML_ERR_VERSION_MISSING
XML_ERR_WARNING
XML_ERR_XMLDECL_NOT_FINISHED
XML_ERR_XMLDECL_NOT_STARTED
+XML_FROM_BUFFER
XML_FROM_C14N
XML_FROM_CATALOG
XML_FROM_CHECK
@@ -2032,6 +2057,7 @@ XML_FROM_SCHEMASV
XML_FROM_SCHEMATRONV
XML_FROM_TREE
+XML_FROM_URI
XML_FROM_VALID
XML_FROM_WRITER
XML_FROM_XINCLUDE
@@ -2759,6 +2785,7 @@ xmlTextReaderReadString
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetErrorHandler
@@ -2899,8 +2926,11 @@ xmlSchemaValidateDoc
xmlSchemaValidateFile
xmlSchemaValidateOneElement
+xmlSchemaValidateSetFilename
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
xmlSchemaValidityErrorFunc
+xmlSchemaValidityLocatorFunc
xmlSchemaValidityWarningFunc

Module xmlschemastypes:

XML_SCHEMA_WHITESPACE_COLLAPSE
XML_SCHEMA_WHITESPACE_PRESERVE
@@ -3158,6 +3188,7 @@ LIBXML_ICU_ENABLED
LIBXML_ISO8859X_ENABLED
LIBXML_LEGACY_ENABLED
+LIBXML_LZMA_ENABLED
LIBXML_MODULES_ENABLED
LIBXML_MODULE_EXTENSION
LIBXML_OUTPUT_ENABLED
@@ -3169,6 +3200,7 @@ LIBXML_SCHEMAS_ENABLED
LIBXML_SCHEMATRON_ENABLED
LIBXML_TEST_VERSION
+LIBXML_THREAD_ALLOC_ENABLED
LIBXML_THREAD_ENABLED
LIBXML_TREE_ENABLED
LIBXML_UNICODE_ENABLED
@@ -3207,6 +3239,7 @@ xmlTextWriterPtr
xmlTextWriterSetIndent
xmlTextWriterSetIndentString
+xmlTextWriterSetQuoteChar
xmlTextWriterStartAttribute
xmlTextWriterStartAttributeNS
xmlTextWriterStartCDATA
@@ -3273,6 +3306,7 @@ XPATH_ENCODING_ERROR
XPATH_EXPRESSION_OK
XPATH_EXPR_ERROR
+XPATH_FORBID_VARIABLE_ERROR
XPATH_INVALID_ARITY
XPATH_INVALID_CHAR_ERROR
XPATH_INVALID_CTXT
@@ -3288,6 +3322,7 @@ XPATH_NUMBER_ERROR
XPATH_POINT
XPATH_RANGE
+XPATH_STACK_ERROR
XPATH_START_LITERAL_ERROR
XPATH_STRING
XPATH_UNCLOSED_ERROR
@@ -3363,6 +3398,7 @@ xmlXPathNAN
xmlXPathNINF
xmlXPathNewContext
+xmlXPathNodeEval
xmlXPathNodeSetCreate
xmlXPathNodeSetGetLength
xmlXPathNodeSetIsEmpty
@@ -3375,6 +3411,7 @@ xmlXPathPINF
xmlXPathParserContext
xmlXPathParserContextPtr
+xmlXPathSetContextNode
xmlXPathType
xmlXPathTypePtr
xmlXPathVariable
diff --git a/libxml2/doc/APIfunctions.html b/libxml2/doc/APIfunctions.html index 117666b..3c47863 100644 --- a/libxml2/doc/APIfunctions.html +++ b/libxml2/doc/APIfunctions.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -List of function manipulating types in libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

List of function manipulating types in libxml2

Developer Menu
API Indexes
Related links

Type ...:

errorSAXFunc
+List of function manipulating types in libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

List of function manipulating types in libxml2

Developer Menu
API Indexes
Related links

Type ...:

errorSAXFunc
fatalErrorSAXFunc
warningSAXFunc
xmlGenericErrorFunc
@@ -81,6 +81,7 @@ xmlOutputMatchCallback
xmlOutputOpenCallback

Type const char **:

xmlGetFeaturesList
+xmlSchemaValidityLocatorFunc

Type const htmlElemDesc *:

htmlAttrAllowed
htmlElementAllowedHere
htmlElementStatusHere
@@ -108,6 +109,9 @@

Type const xlinkTitle:

xlinkSimpleLinkFunk

Type const xlinkTitle *:

xlinkExtendedLinkFunk
xlinkExtendedLinkSetFunk
+

Type const xmlBufPtr:

xmlBufContent
+xmlBufEnd
+xmlBufUse

Type const xmlBufferPtr:

xmlBufferContent
xmlBufferLength

Type const xmlChRangeGroup *:

xmlCharInRange
@@ -485,6 +489,7 @@ xmlXPathIsNodeType
xmlXPathNewParserContext
xmlXPathNewString
+xmlXPathNodeEval
xmlXPathNsLookup
xmlXPathRegisterFunc
xmlXPathRegisterFuncNS
@@ -581,8 +586,10 @@ xmlStringCurrentChar
xmlValidGetPotentialChildren

Type long:

xmlMemDisplayLast
-

Type size_t:

xmlBufferCreateSize
+

Type size_t:

xmlBufShrink
+xmlBufferCreateSize
xmlBufferCreateStatic
+xmlDictSetLimit
xmlMallocAtomicLoc
xmlMallocFunc
xmlMallocLoc
@@ -616,6 +623,7 @@

Type unsigned long *:

xmlSchemaValidateLengthFacet
xmlSchemaValidateLengthFacetWhtsp
xmlSchemaValidateListSimpleTypeFacet
+xmlSchemaValidityLocatorFunc

Type va_list:

xmlStrVPrintf
xmlTextWriterWriteVFormatAttribute
xmlTextWriterWriteVFormatAttributeNS
@@ -853,8 +861,10 @@ xmlSchemaSetParserStructuredErrors
xmlSchemaSetValidErrors
xmlSchemaSetValidStructuredErrors
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
xmlSchemaValidityErrorFunc
+xmlSchemaValidityLocatorFunc
xmlSchemaValidityWarningFunc
xmlSchematronSetValidStructuredErrors
xmlSchematronValidityErrorFunc
@@ -941,6 +951,9 @@ xmlAutomataNewTransition
xmlAutomataNewTransition2
xmlAutomataSetFinalState
+

Type xmlBufPtr:

xmlBufGetNodeContent
+xmlBufNodeDump
+xmlBufShrink

Type xmlBufferAllocationScheme:

xmlBufferSetAllocationScheme
xmlSetBufferAllocationScheme
xmlThrDefBufferAllocScheme
@@ -950,6 +963,7 @@ xmlBufferAddHead
xmlBufferCCat
xmlBufferCat
+xmlBufferDetach
xmlBufferDump
xmlBufferEmpty
xmlBufferFree
@@ -994,6 +1008,7 @@ xmlStrchr
xmlStringDecodeEntities
xmlStringLenDecodeEntities
+xmlTextWriterSetQuoteChar

Type xmlChar *:

checkNamespace
docbParseDoc
docbSAXParseDoc
@@ -1084,10 +1099,12 @@

Type xmlDictPtr:

xmlDictCreateSub
xmlDictExists
xmlDictFree
+xmlDictGetUsage
xmlDictLookup
xmlDictOwns
xmlDictQLookup
xmlDictReference
+xmlDictSetLimit
xmlDictSize
xmlExpNewCtxt
xmlHashCreateDict
@@ -1110,6 +1127,7 @@ xmlAddID
xmlAddRef
xmlAttrSerializeTxtContent
+xmlBufNodeDump
xmlC14NDocDumpMemory
xmlC14NDocSave
xmlC14NDocSaveTo
@@ -1436,6 +1454,8 @@ xmlAddNextSibling
xmlAddPrevSibling
xmlAddSibling
+xmlBufGetNodeContent
+xmlBufNodeDump
xmlC14NIsVisibleCallback
xmlChildElementCount
xmlCopyProp
@@ -1563,6 +1583,7 @@ xmlXPathNextPreceding
xmlXPathNextPrecedingSibling
xmlXPathNextSelf
+xmlXPathNodeEval
xmlXPathNodeLeading
xmlXPathNodeLeadingSorted
xmlXPathNodeSetAdd
@@ -1573,6 +1594,7 @@ xmlXPathNodeSetDel
xmlXPathNodeTrailing
xmlXPathNodeTrailingSorted
+xmlXPathSetContextNode
xmlXPtrNewCollapsedRange
xmlXPtrNewContext
xmlXPtrNewLocationSetNodes
@@ -1654,6 +1676,8 @@ xmlNodeDumpOutput
xmlOutputBufferClose
xmlOutputBufferFlush
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
xmlOutputBufferWrite
xmlOutputBufferWriteEscape
xmlOutputBufferWriteString
@@ -1845,6 +1869,7 @@ xmlRelaxNGValidatePopElement
xmlRelaxNGValidatePushCData
xmlRelaxNGValidatePushElement
+xmlTextReaderRelaxNGValidateCtxt

Type xmlRelaxNGValidityErrorFunc:

xmlRelaxNGSetParserErrors
xmlRelaxNGSetValidErrors

Type xmlRelaxNGValidityErrorFunc *:

xmlRelaxNGGetParserErrors
@@ -1948,12 +1973,15 @@ xmlSchemaValidateDoc
xmlSchemaValidateFile
xmlSchemaValidateOneElement
+xmlSchemaValidateSetFilename
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
xmlTextReaderSchemaValidateCtxt

Type xmlSchemaValidityErrorFunc:

xmlSchemaSetParserErrors
xmlSchemaSetValidErrors

Type xmlSchemaValidityErrorFunc *:

xmlSchemaGetParserErrors
xmlSchemaGetValidErrors
+

Type xmlSchemaValidityLocatorFunc:

xmlSchemaValidateSetLocator

Type xmlSchemaValidityWarningFunc:

xmlSchemaSetParserErrors
xmlSchemaSetValidErrors

Type xmlSchemaValidityWarningFunc *:

xmlSchemaGetParserErrors
@@ -2070,6 +2098,7 @@ xmlTextReaderReadString
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetErrorHandler
@@ -2095,6 +2124,7 @@ xmlTextWriterFullEndElement
xmlTextWriterSetIndent
xmlTextWriterSetIndentString
+xmlTextWriterSetQuoteChar
xmlTextWriterStartAttribute
xmlTextWriterStartAttributeNS
xmlTextWriterStartCDATA
@@ -2199,6 +2229,7 @@ xmlXPathFunctionLookup
xmlXPathFunctionLookupNS
xmlXPathNewParserContext
+xmlXPathNodeEval
xmlXPathNsLookup
xmlXPathRegisterAllFunctions
xmlXPathRegisterFunc
@@ -2211,6 +2242,7 @@ xmlXPathRegisteredFuncsCleanup
xmlXPathRegisteredNsCleanup
xmlXPathRegisteredVariablesCleanup
+xmlXPathSetContextNode
xmlXPathVariableLookup
xmlXPathVariableLookupNS
xmlXPtrEval
diff --git a/libxml2/doc/APIsymbols.html b/libxml2/doc/APIsymbols.html index d9097fe..c2b82e7 100644 --- a/libxml2/doc/APIsymbols.html +++ b/libxml2/doc/APIsymbols.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -Alphabetic List of Symbols in libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

Alphabetic List of Symbols in libxml2

Developer Menu
API Indexes
Related links

Letter A:

ATTRIBUTE_UNUSED
+Alphabetic List of Symbols in libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

Alphabetic List of Symbols in libxml2

Developer Menu
API Indexes
Related links

Letter A:

ATTRIBUTE_UNUSED

Letter B:

BAD_CAST
BASE_BUFFER_SIZE

Letter C:

CAST_TO_BOOLEAN
@@ -26,6 +26,7 @@ HTML_INVALID
HTML_NA
HTML_PARSE_COMPACT
+HTML_PARSE_IGNORE_ENC
HTML_PARSE_NOBLANKS
HTML_PARSE_NODEFDTD
HTML_PARSE_NOERROR
@@ -60,7 +61,8 @@ IS_LETTER_CH
IS_PUBIDCHAR
IS_PUBIDCHAR_CH
-

Letter L:

LIBXML_ATTR_ALLOC_SIZE
+

Letter L:

LIBXML2_NEW_BUFFER
+LIBXML_ATTR_ALLOC_SIZE
LIBXML_ATTR_FORMAT
LIBXML_AUTOMATA_ENABLED
LIBXML_C14N_ENABLED
@@ -78,6 +80,7 @@ LIBXML_ICU_ENABLED
LIBXML_ISO8859X_ENABLED
LIBXML_LEGACY_ENABLED
+LIBXML_LZMA_ENABLED
LIBXML_MODULES_ENABLED
LIBXML_MODULE_EXTENSION
LIBXML_OUTPUT_ENABLED
@@ -89,6 +92,7 @@ LIBXML_SCHEMAS_ENABLED
LIBXML_SCHEMATRON_ENABLED
LIBXML_TEST_VERSION
+LIBXML_THREAD_ALLOC_ENABLED
LIBXML_THREAD_ENABLED
LIBXML_TREE_ENABLED
LIBXML_UNICODE_ENABLED
@@ -152,8 +156,10 @@ XML_ATTRIBUTE_REQUIRED
XML_BUFFER_ALLOC_DOUBLEIT
XML_BUFFER_ALLOC_EXACT
+XML_BUFFER_ALLOC_HYBRID
XML_BUFFER_ALLOC_IMMUTABLE
XML_BUFFER_ALLOC_IO
+XML_BUF_OVERFLOW
XML_C14N_1_0
XML_C14N_1_1
XML_C14N_CREATE_CTXT
@@ -203,7 +209,6 @@ XML_CHAR_ENCODING_UTF16BE
XML_CHAR_ENCODING_UTF16LE
XML_CHAR_ENCODING_UTF8
-XML_CHECK_
XML_CHECK_ENTITY_TYPE
XML_CHECK_FOUND_ATTRIBUTE
XML_CHECK_FOUND_CDATA
@@ -242,7 +247,6 @@ XML_CHECK_WRONG_NEXT
XML_CHECK_WRONG_PARENT
XML_CHECK_WRONG_PREV
-XML_CHECK_X
XML_COMMENT_NODE
XML_COMPLETE_ATTRS
XML_CTXT_FINISH_DTD_0
@@ -385,6 +389,7 @@ XML_ERR_MIXED_NOT_FINISHED
XML_ERR_MIXED_NOT_STARTED
XML_ERR_NAME_REQUIRED
+XML_ERR_NAME_TOO_LONG
XML_ERR_NMTOKEN_REQUIRED
XML_ERR_NONE
XML_ERR_NOTATION_NOT_FINISHED
@@ -421,6 +426,7 @@ XML_ERR_UNSUPPORTED_ENCODING
XML_ERR_URI_FRAGMENT
XML_ERR_URI_REQUIRED
+XML_ERR_USER_STOP
XML_ERR_VALUE_REQUIRED
XML_ERR_VERSION_MISMATCH
XML_ERR_VERSION_MISSING
@@ -436,6 +442,7 @@ XML_EXTERNAL_GENERAL_PARSED_ENTITY
XML_EXTERNAL_GENERAL_UNPARSED_ENTITY
XML_EXTERNAL_PARAMETER_ENTITY
+XML_FROM_BUFFER
XML_FROM_C14N
XML_FROM_CATALOG
XML_FROM_CHECK
@@ -459,6 +466,7 @@ XML_FROM_SCHEMASV
XML_FROM_SCHEMATRONV
XML_FROM_TREE
+XML_FROM_URI
XML_FROM_VALID
XML_FROM_WRITER
XML_FROM_XINCLUDE
@@ -543,7 +551,10 @@ XML_IO_UNKNOWN
XML_IO_WRITE
XML_LOCAL_NAMESPACE
+XML_MAX_DICTIONARY_LIMIT
+XML_MAX_LOOKUP_LIMIT
XML_MAX_NAMELEN
+XML_MAX_NAME_LENGTH
XML_MAX_TEXT_LENGTH
XML_MODULE_CLOSE
XML_MODULE_LAZY
@@ -583,12 +594,14 @@ XML_PARSER_SUBST_ENTITIES
XML_PARSER_SYSTEM_LITERAL
XML_PARSER_VALIDATE
+XML_PARSE_BIG_LINES
XML_PARSE_COMPACT
XML_PARSE_DOM
XML_PARSE_DTDATTR
XML_PARSE_DTDLOAD
XML_PARSE_DTDVALID
XML_PARSE_HUGE
+XML_PARSE_IGNORE_ENC
XML_PARSE_NOBASEFIX
XML_PARSE_NOBLANKS
XML_PARSE_NOCDATA
@@ -1341,6 +1354,7 @@ XML_WITH_ICU
XML_WITH_ISO8859X
XML_WITH_LEGACY
+XML_WITH_LZMA
XML_WITH_MODULES
XML_WITH_NONE
XML_WITH_OUTPUT
@@ -1415,6 +1429,7 @@ XPATH_ENCODING_ERROR
XPATH_EXPRESSION_OK
XPATH_EXPR_ERROR
+XPATH_FORBID_VARIABLE_ERROR
XPATH_INVALID_ARITY
XPATH_INVALID_CHAR_ERROR
XPATH_INVALID_CTXT
@@ -1430,6 +1445,7 @@ XPATH_NUMBER_ERROR
XPATH_POINT
XPATH_RANGE
+XPATH_STACK_ERROR
XPATH_START_LITERAL_ERROR
XPATH_STRING
XPATH_UNCLOSED_ERROR
@@ -1755,6 +1771,14 @@ xmlAutomataState
xmlAutomataStatePtr
xmlBoolToText
+xmlBuf
+xmlBufContent
+xmlBufEnd
+xmlBufGetNodeContent
+xmlBufNodeDump
+xmlBufPtr
+xmlBufShrink
+xmlBufUse
xmlBuffer
xmlBufferAdd
xmlBufferAddHead
@@ -1766,6 +1790,7 @@ xmlBufferCreate
xmlBufferCreateSize
xmlBufferCreateStatic
+xmlBufferDetach
xmlBufferDump
xmlBufferEmpty
xmlBufferFree
@@ -1927,11 +1952,13 @@ xmlDictCreateSub
xmlDictExists
xmlDictFree
+xmlDictGetUsage
xmlDictLookup
xmlDictOwns
xmlDictPtr
xmlDictQLookup
xmlDictReference
+xmlDictSetLimit
xmlDictSize
xmlDllMain
xmlDoValidityCheckingDefaultValue
@@ -2147,6 +2174,7 @@ xmlInitParserCtxt
xmlInitThreads
xmlInitializeCatalog
+xmlInitializeDict
xmlInitializeGlobalState
xmlInitializePredefinedEntities
xmlInputCloseCallback
@@ -2406,6 +2434,8 @@ xmlOutputBufferCreateFilenameValue
xmlOutputBufferCreateIO
xmlOutputBufferFlush
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
xmlOutputBufferPtr
xmlOutputBufferWrite
xmlOutputBufferWriteEscape
@@ -2804,8 +2834,11 @@ xmlSchemaValidateListSimpleTypeFacet
xmlSchemaValidateOneElement
xmlSchemaValidatePredefinedType
+xmlSchemaValidateSetFilename
+xmlSchemaValidateSetLocator
xmlSchemaValidateStream
xmlSchemaValidityErrorFunc
+xmlSchemaValidityLocatorFunc
xmlSchemaValidityWarningFunc
xmlSchemaValueAppend
xmlSchemaValueGetAsBoolean
@@ -2986,6 +3019,7 @@ xmlTextReaderReadString
xmlTextReaderRelaxNGSetSchema
xmlTextReaderRelaxNGValidate
+xmlTextReaderRelaxNGValidateCtxt
xmlTextReaderSchemaValidate
xmlTextReaderSchemaValidateCtxt
xmlTextReaderSetErrorHandler
@@ -3012,6 +3046,7 @@ xmlTextWriterPtr
xmlTextWriterSetIndent
xmlTextWriterSetIndentString
+xmlTextWriterSetQuoteChar
xmlTextWriterStartAttribute
xmlTextWriterStartAttributeNS
xmlTextWriterStartCDATA
@@ -3434,6 +3469,7 @@ xmlXPathNextPreceding
xmlXPathNextPrecedingSibling
xmlXPathNextSelf
+xmlXPathNodeEval
xmlXPathNodeLeading
xmlXPathNodeLeadingSorted
xmlXPathNodeSetAdd
@@ -3495,6 +3531,7 @@ xmlXPathRoot
xmlXPathRoundFunction
xmlXPathSetArityError
+xmlXPathSetContextNode
xmlXPathSetError
xmlXPathSetTypeError
xmlXPathStackIsExternal
diff --git a/libxml2/doc/DOM.html b/libxml2/doc/DOM.html index 66d6d8e..5b2517c 100644 --- a/libxml2/doc/DOM.html +++ b/libxml2/doc/DOM.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -DOM Principles
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

DOM Principles

Developer Menu
API Indexes
Related links

DOM stands for the Document +DOM Principles
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

DOM Principles

Developer Menu
API Indexes
Related links

DOM stands for the Document Object Model; this is an API for accessing XML or HTML structured documents. Native support for DOM in Gnome is on the way (module gnome-dom), and will be based on gnome-xml. This will be a far cleaner interface to diff --git a/libxml2/doc/FAQ.html b/libxml2/doc/FAQ.html index 71fb76f..0bfd387 100644 --- a/libxml2/doc/FAQ.html +++ b/libxml2/doc/FAQ.html @@ -7,7 +7,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } -FAQ
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

The XML C parser and toolkit of Gnome

FAQ

Main Menu
Related links

Table of Contents: