From 4a8c71eb7cc1c9001afaeefbd454f06f5fdaa046 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Fri, 4 Mar 2022 03:35:57 +0100 Subject: [PATCH] Remove DOCBparser This code has been broken and deprecated since version 2.6.0, released in 2003. Because of a bug in commit 961b535c, DOCBparser.c was never compiled since 2012. I couldn't find a Debian package using any of its symbols, so it seems safe to remove this module. --- CMakeLists.txt | 8 +- DOCBparser.c | 304 ---------------------------- Makefile.am | 9 - SAX.c | 47 ----- SAX2.c | 62 +----- c14n.c | 3 - configure.ac | 15 -- debugXML.c | 6 - doc/devhelp/Makefile.am | 1 - doc/devhelp/libxml2-DOCBparser.html | 138 ------------- gentest.py | 4 - globals.c | 53 ----- include/libxml/DOCBparser.h | 106 ---------- include/libxml/Makefile.am | 1 - include/libxml/SAX.h | 5 - include/libxml/SAX2.h | 9 +- include/libxml/globals.h | 13 +- include/libxml/parser.h | 2 +- include/libxml/tree.h | 8 +- include/libxml/xmlversion.h.in | 9 - pattern.c | 12 -- python/generator.py | 1 - python/libxml.c | 26 --- tree.c | 38 +--- valid.c | 8 - win32/Makefile.bcb | 3 - win32/Makefile.mingw | 3 - win32/Makefile.msvc | 4 - win32/configure.js | 8 - win32/defgen.xsl | 29 +-- xinclude.c | 6 - xmlreader.c | 12 -- xpath.c | 27 --- xpointer.c | 3 - 34 files changed, 12 insertions(+), 971 deletions(-) delete mode 100644 DOCBparser.c delete mode 100644 doc/devhelp/libxml2-DOCBparser.html delete mode 100644 include/libxml/DOCBparser.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c37b8cb..691978de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,6 @@ set(LIBXML2_WITH_AUTOMATA ON) option(LIBXML2_WITH_C14N "Add the Canonicalization support" ON) option(LIBXML2_WITH_CATALOG "Add the Catalog support" ON) option(LIBXML2_WITH_DEBUG "Add the debugging module" ON) -option(LIBXML2_WITH_DOCB "Add Docbook SGML support" ON) set(LIBXML2_WITH_EXPR ON) option(LIBXML2_WITH_FTP "Add the FTP support" ON) option(LIBXML2_WITH_HTML "Add the HTML support" ON) @@ -97,7 +96,7 @@ if(LIBXML2_WITH_ZLIB) find_package(ZLIB REQUIRED) endif() -foreach(VARIABLE IN ITEMS WITH_AUTOMATA WITH_C14N WITH_CATALOG WITH_DEBUG WITH_DOCB WITH_EXPR WITH_FTP WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LEGACY WITH_LZMA WITH_MEM_DEBUG WITH_MODULES WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_RUN_DEBUG WITH_SAX1 WITH_SCHEMAS WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_TREE WITH_TRIO WITH_UNICODE WITH_VALID WITH_WRITER WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_ZLIB) +foreach(VARIABLE IN ITEMS WITH_AUTOMATA WITH_C14N WITH_CATALOG WITH_DEBUG WITH_EXPR WITH_FTP WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LEGACY WITH_LZMA WITH_MEM_DEBUG WITH_MODULES WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_RUN_DEBUG WITH_SAX1 WITH_SCHEMAS WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_TREE WITH_TRIO WITH_UNICODE WITH_VALID WITH_WRITER WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_ZLIB) if(LIBXML2_${VARIABLE}) set(${VARIABLE} 1) else() @@ -253,7 +252,6 @@ set( include/libxml/chvalid.h include/libxml/debugXML.h include/libxml/dict.h - include/libxml/DOCBparser.h include/libxml/encoding.h include/libxml/entities.h include/libxml/globals.h @@ -356,10 +354,6 @@ if(WIN32) ) endif() -if(LIBXML2_WITH_SAX1) - list(APPEND LIBXML2_SRCS DOCBparser.c) -endif() - if(LIBXML2_WITH_TRIO) list(APPEND LIBXML2_SRCS trio.c triostr.c) endif() diff --git a/DOCBparser.c b/DOCBparser.c deleted file mode 100644 index c5a06f9a..00000000 --- a/DOCBparser.c +++ /dev/null @@ -1,304 +0,0 @@ -/* - * DOCBparser.c : an attempt to parse SGML Docbook documents - * - * This is deprecated !!! - * Code removed with release 2.6.0 it was broken. - * The doc are expect to be migrated to XML DocBook - * - * See Copyright for the status of this software. - * - * daniel@veillard.com - */ - -#define IN_LIBXML -#include "libxml.h" -#ifdef LIBXML_DOCB_ENABLED - -#include -#include - -/** - * docbEncodeEntities: - * @out: a pointer to an array of bytes to store the result - * @outlen: the length of @out - * @in: a pointer to an array of UTF-8 chars - * @inlen: the length of @in - * @quoteChar: the quote character to escape (' or ") or zero. - * - * Take a block of UTF-8 chars in and try to convert it to an ASCII - * plus SGML entities block of chars out. - * - * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise - * The value of @inlen after return is the number of octets consumed - * as the return value is positive, else unpredictable. - * The value of @outlen after return is the number of octets consumed. - */ -int -docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED, - int *outlen ATTRIBUTE_UNUSED, - const unsigned char *in ATTRIBUTE_UNUSED, - int *inlen ATTRIBUTE_UNUSED, - int quoteChar ATTRIBUTE_UNUSED) -{ - static int deprecated = 0; - - if (!deprecated) { - xmlGenericError(xmlGenericErrorContext, - "docbEncodeEntities() deprecated function reached\n"); - deprecated = 1; - } - return(-1); -} - -/** - * docbParseDocument: - * @ctxt: an SGML parser context - * - * parse an SGML document (and build a tree if using the standard SAX - * interface). - * - * Returns 0, -1 in case of error. the parser context is augmented - * as a result of the parsing. - */ - -int -docbParseDocument(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED) -{ - static int deprecated = 0; - - if (!deprecated) { - xmlGenericError(xmlGenericErrorContext, - "docbParseDocument() deprecated function reached\n"); - deprecated = 1; - } - return (xmlParseDocument(ctxt)); -} - -/** - * docbFreeParserCtxt: - * @ctxt: an SGML parser context - * - * Free all the memory used by a parser context. However the parsed - * document in ctxt->myDoc is not freed. - */ - -void -docbFreeParserCtxt(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED) -{ - static int deprecated = 0; - - if (!deprecated) { - xmlGenericError(xmlGenericErrorContext, - "docbFreeParserCtxt() deprecated function reached\n"); - deprecated = 1; - } - xmlFreeParserCtxt(ctxt); -} - -/** - * docbParseChunk: - * @ctxt: an XML parser context - * @chunk: an char array - * @size: the size in byte of the chunk - * @terminate: last chunk indicator - * - * Parse a Chunk of memory - * - * Returns zero if no error, the xmlParserErrors otherwise. - */ -int -docbParseChunk(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED, - const char *chunk ATTRIBUTE_UNUSED, - int size ATTRIBUTE_UNUSED, - int terminate ATTRIBUTE_UNUSED) -{ - static int deprecated = 0; - - if (!deprecated) { - xmlGenericError(xmlGenericErrorContext, - "docbParseChunk() deprecated function reached\n"); - deprecated = 1; - } - - return (xmlParseChunk(ctxt, chunk, size, terminate)); -} - -/** - * docbCreatePushParserCtxt: - * @sax: a SAX handler - * @user_data: The user data returned on SAX callbacks - * @chunk: a pointer to an array of chars - * @size: number of chars in the array - * @filename: an optional file name or URI - * @enc: an optional encoding - * - * Create a parser context for using the DocBook SGML parser in push mode - * To allow content encoding detection, @size should be >= 4 - * The value of @filename is used for fetching external entities - * and error/warning reports. - * - * Returns the new parser context or NULL - */ -docbParserCtxtPtr -docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED, - void *user_data ATTRIBUTE_UNUSED, - const char *chunk ATTRIBUTE_UNUSED, - int size ATTRIBUTE_UNUSED, - const char *filename ATTRIBUTE_UNUSED, - xmlCharEncoding enc ATTRIBUTE_UNUSED) -{ - static int deprecated = 0; - - if (!deprecated) { - xmlGenericError(xmlGenericErrorContext, - "docbParseChunk() deprecated function reached\n"); - deprecated = 1; - } - - return(xmlCreatePushParserCtxt(sax, user_data, chunk, size, filename)); -} - -/** - * docbSAXParseDoc: - * @cur: a pointer to an array of xmlChar - * @encoding: a free form C string describing the SGML document encoding, or NULL - * @sax: the SAX handler block - * @userData: if using SAX, this pointer will be provided on callbacks. - * - * parse an SGML in-memory document and build a tree. - * It use the given SAX function block to handle the parsing callback. - * If sax is NULL, fallback to the default DOM tree building routines. - * - * Returns the resulting document tree - */ - -docbDocPtr -docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED, - const char *encoding ATTRIBUTE_UNUSED, - docbSAXHandlerPtr sax ATTRIBUTE_UNUSED, - void *userData ATTRIBUTE_UNUSED) -{ - static int deprecated = 0; - - if (!deprecated) { - xmlGenericError(xmlGenericErrorContext, - "docbParseChunk() deprecated function reached\n"); - deprecated = 1; - } - - return (xmlSAXParseMemoryWithData(sax, (const char *)cur, - xmlStrlen((const xmlChar *) cur), 0, userData)); -} - -/** - * docbParseDoc: - * @cur: a pointer to an array of xmlChar - * @encoding: a free form C string describing the SGML document encoding, or NULL - * - * parse an SGML in-memory document and build a tree. - * - * Returns the resulting document tree - */ - -docbDocPtr -docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED, - const char *encoding ATTRIBUTE_UNUSED) -{ - static int deprecated = 0; - - if (!deprecated) { - xmlGenericError(xmlGenericErrorContext, - "docbParseChunk() deprecated function reached\n"); - deprecated = 1; - } - - return (xmlParseDoc(cur)); -} - - -/** - * docbCreateFileParserCtxt: - * @filename: the filename - * @encoding: the SGML document encoding, or NULL - * - * Create a parser context for a file content. - * Automatic support for ZLIB/Compress compressed document is provided - * by default if found at compile-time. - * - * Returns the new parser context or NULL - */ -docbParserCtxtPtr -docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED, - const char *encoding ATTRIBUTE_UNUSED) -{ - static int deprecated = 0; - - if (!deprecated) { - xmlGenericError(xmlGenericErrorContext, - "docbCreateFileParserCtxt() deprecated function reached\n"); - deprecated = 1; - } - - return (xmlCreateFileParserCtxt(filename)); -} - -/** - * docbSAXParseFile: - * @filename: the filename - * @encoding: a free form C string describing the SGML document encoding, or NULL - * @sax: the SAX handler block - * @userData: if using SAX, this pointer will be provided on callbacks. - * - * parse an SGML file and build a tree. Automatic support for ZLIB/Compress - * compressed document is provided by default if found at compile-time. - * It use the given SAX function block to handle the parsing callback. - * If sax is NULL, fallback to the default DOM tree building routines. - * - * Returns the resulting document tree - */ - -docbDocPtr -docbSAXParseFile(const char *filename ATTRIBUTE_UNUSED, - const char *encoding ATTRIBUTE_UNUSED, - docbSAXHandlerPtr sax ATTRIBUTE_UNUSED, - void *userData ATTRIBUTE_UNUSED) -{ - static int deprecated = 0; - - if (!deprecated) { - xmlGenericError(xmlGenericErrorContext, - "docbSAXParseFile() deprecated function reached\n"); - deprecated = 1; - } - - return (xmlSAXParseFileWithData(sax, filename, 0, userData)); -} - -/** - * docbParseFile: - * @filename: the filename - * @encoding: a free form C string describing document encoding, or NULL - * - * parse a Docbook SGML file and build a tree. Automatic support for - * ZLIB/Compress compressed document is provided by default if found - * at compile-time. - * - * Returns the resulting document tree - */ - -docbDocPtr -docbParseFile(const char *filename ATTRIBUTE_UNUSED, - const char *encoding ATTRIBUTE_UNUSED) -{ - static int deprecated = 0; - - if (!deprecated) { - xmlGenericError(xmlGenericErrorContext, - "docbParseFile() deprecated function reached\n"); - deprecated = 1; - } - - return (xmlParseFile(filename)); -} - -#endif /* LIBXML_DOCB_ENABLED */ diff --git a/Makefile.am b/Makefile.am index 6ae6175d..559fa652 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,12 +33,6 @@ libxml2_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \ -version-info $(LIBXML_VERSION_INFO) \ $(MODULE_PLATFORM_LIBS) -if WITH_SAX1_SOURCES -docb_sources = DOCBparser.c -else -docb_sources = -endif - if WITH_TRIO_SOURCES trio_sources = triostr.c trio.c else @@ -49,7 +43,6 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \ valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \ xpointer.c xinclude.c nanohttp.c nanoftp.c \ - $(docb_sources) \ catalog.c globals.c threads.c c14n.c xmlstring.c buf.c \ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \ $(trio_sources) \ @@ -461,8 +454,6 @@ Errtests : xmllint$(EXEEXT) rm error.$$name ; \ fi ; fi ; done) -Docbtests : xmllint$(EXEEXT) - XMLenttests : xmllint$(EXEEXT) @(echo > .memdump) @echo "## XML entity subst regression tests" diff --git a/SAX.c b/SAX.c index 4df25f9c..d8e972b8 100644 --- a/SAX.c +++ b/SAX.c @@ -126,53 +126,6 @@ inithtmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr) #endif /* LIBXML_HTML_ENABLED */ -#ifdef LIBXML_DOCB_ENABLED -/** - * initdocbDefaultSAXHandler: - * @hdlr: the SAX handler - * - * Initialize the default DocBook SAX version 1 handler - * DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks - */ -void -initdocbDefaultSAXHandler(xmlSAXHandlerV1 *hdlr) -{ - if(hdlr->initialized == 1) - return; - - hdlr->internalSubset = xmlSAX2InternalSubset; - hdlr->externalSubset = NULL; - hdlr->isStandalone = xmlSAX2IsStandalone; - hdlr->hasInternalSubset = xmlSAX2HasInternalSubset; - hdlr->hasExternalSubset = xmlSAX2HasExternalSubset; - hdlr->resolveEntity = xmlSAX2ResolveEntity; - hdlr->getEntity = xmlSAX2GetEntity; - hdlr->getParameterEntity = NULL; - hdlr->entityDecl = xmlSAX2EntityDecl; - hdlr->attributeDecl = NULL; - hdlr->elementDecl = NULL; - hdlr->notationDecl = NULL; - hdlr->unparsedEntityDecl = NULL; - hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; - hdlr->startDocument = xmlSAX2StartDocument; - hdlr->endDocument = xmlSAX2EndDocument; - hdlr->startElement = xmlSAX2StartElement; - hdlr->endElement = xmlSAX2EndElement; - hdlr->reference = xmlSAX2Reference; - hdlr->characters = xmlSAX2Characters; - hdlr->cdataBlock = NULL; - hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace; - hdlr->processingInstruction = NULL; - hdlr->comment = xmlSAX2Comment; - hdlr->warning = xmlParserWarning; - hdlr->error = xmlParserError; - hdlr->fatalError = xmlParserError; - - hdlr->initialized = 1; -} - -#endif /* LIBXML_DOCB_ENABLED */ - #endif /* LIBXML_SAX1_ENABLED */ #endif /* LIBXML_LEGACY_ENABLED */ diff --git a/SAX2.c b/SAX2.c index 9a093bcd..0e056c49 100644 --- a/SAX2.c +++ b/SAX2.c @@ -1034,7 +1034,7 @@ xmlSAX2EndDocument(void *ctx) } } -#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) +#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) /** * xmlNsErrMsg: * @ctxt: an XML parser context @@ -2159,7 +2159,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt, * * Open issue: normalization of the value. */ -#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) +#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) #ifdef LIBXML_VALID_ENABLED if (xmlValidateNCName(content, 1) != 0) { xmlErrValid(ctxt, XML_DTD_XMLID_VALUE, @@ -2995,61 +2995,3 @@ htmlDefaultSAXHandlerInit(void) } #endif /* LIBXML_HTML_ENABLED */ - -#ifdef LIBXML_DOCB_ENABLED - -/** - * xmlSAX2InitDocbDefaultSAXHandler: - * @hdlr: the SAX handler - * - * Initialize the default DocBook SAX2 handler - */ -void -xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr) -{ - if ((hdlr == NULL) || (hdlr->initialized != 0)) - return; - - hdlr->internalSubset = xmlSAX2InternalSubset; - hdlr->externalSubset = NULL; - hdlr->isStandalone = xmlSAX2IsStandalone; - hdlr->hasInternalSubset = xmlSAX2HasInternalSubset; - hdlr->hasExternalSubset = xmlSAX2HasExternalSubset; - hdlr->resolveEntity = xmlSAX2ResolveEntity; - hdlr->getEntity = xmlSAX2GetEntity; - hdlr->getParameterEntity = NULL; - hdlr->entityDecl = xmlSAX2EntityDecl; - hdlr->attributeDecl = NULL; - hdlr->elementDecl = NULL; - hdlr->notationDecl = NULL; - hdlr->unparsedEntityDecl = NULL; - hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; - hdlr->startDocument = xmlSAX2StartDocument; - hdlr->endDocument = xmlSAX2EndDocument; - hdlr->startElement = xmlSAX2StartElement; - hdlr->endElement = xmlSAX2EndElement; - hdlr->reference = xmlSAX2Reference; - hdlr->characters = xmlSAX2Characters; - hdlr->cdataBlock = NULL; - hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace; - hdlr->processingInstruction = NULL; - hdlr->comment = xmlSAX2Comment; - hdlr->warning = xmlParserWarning; - hdlr->error = xmlParserError; - hdlr->fatalError = xmlParserError; - - hdlr->initialized = 1; -} - -/** - * docbDefaultSAXHandlerInit: - * - * Initialize the default SAX handler - */ -void -docbDefaultSAXHandlerInit(void) -{ - xmlSAX2InitDocbDefaultSAXHandler((xmlSAXHandlerPtr) &docbDefaultSAXHandler); -} - -#endif /* LIBXML_DOCB_ENABLED */ diff --git a/c14n.c b/c14n.c index 7a3960c3..d55729cc 100644 --- a/c14n.c +++ b/c14n.c @@ -1657,9 +1657,6 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur) break; case XML_DOCUMENT_NODE: case XML_DOCUMENT_FRAG_NODE: /* should be processed as document? */ -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: /* should be processed as document? */ -#endif #ifdef LIBXML_HTML_ENABLED case XML_HTML_DOCUMENT_NODE: /* should be processed as document? */ #endif diff --git a/configure.ac b/configure.ac index 496018de..84df2c77 100644 --- a/configure.ac +++ b/configure.ac @@ -97,8 +97,6 @@ AC_ARG_WITH(catalog, [ --with-catalog add the Catalog support (on)]) AC_ARG_WITH(debug, [ --with-debug add the debugging module (on)]) -AC_ARG_WITH(docbook, -[ --with-docbook add Docbook SGML support (off)]) AC_ARG_WITH(fexceptions, [ --with-fexceptions add GCC flag -fexceptions for C++ exceptions (off)]) AC_ARG_WITH(ftp, @@ -1154,7 +1152,6 @@ 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 @@ -1216,18 +1213,6 @@ AC_SUBST(WITH_CATALOG) AC_SUBST(CATALOG_OBJ) AC_SUBST(TEST_CATALOG) -if test "$with_docbook" != "yes" ; then - echo Disabling Docbook support - WITH_DOCB=0 - DOCB_OBJ= -else - WITH_DOCB=1 - DOCB_OBJ="DOCBparser.o" -fi -AC_SUBST(WITH_DOCB) -AC_SUBST(DOCB_OBJ) - - if test "$with_xptr" = "no" ; then echo Disabling XPointer support WITH_XPTR=0 diff --git a/debugXML.c b/debugXML.c index 5f73fce7..9a81a2d2 100644 --- a/debugXML.c +++ b/debugXML.c @@ -405,9 +405,6 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) { case XML_NAMESPACE_DECL: case XML_XINCLUDE_START: case XML_XINCLUDE_END: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: break; @@ -1611,9 +1608,6 @@ xmlLsCountNode(xmlNodePtr node) { break; case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif list = ((xmlDocPtr) node)->children; break; case XML_ATTRIBUTE_NODE: diff --git a/doc/devhelp/Makefile.am b/doc/devhelp/Makefile.am index 3850fd32..57156cc8 100644 --- a/doc/devhelp/Makefile.am +++ b/doc/devhelp/Makefile.am @@ -16,7 +16,6 @@ HTML_MODULES= \ libxml2-chvalid.html \ libxml2-debugXML.html \ libxml2-dict.html \ - libxml2-DOCBparser.html \ libxml2-encoding.html \ libxml2-entities.html \ libxml2-globals.html \ diff --git a/doc/devhelp/libxml2-DOCBparser.html b/doc/devhelp/libxml2-DOCBparser.html deleted file mode 100644 index a7b514e1..00000000 --- a/doc/devhelp/libxml2-DOCBparser.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - DOCBparser: old DocBook SGML parser - - - - - - - - - - - - - - - -

- DOCBparser -

-

DOCBparser - old DocBook SGML parser

-

interface for a DocBook SGML non-verifying parser This code is DEPRECATED, and should not be used anymore.

-

WARNING: this module is deprecated !

-

Author(s): Daniel Veillard

-
-

Synopsis

-
typedef xmlParserInputPtr docbParserInputPtr;
-typedef xmlParserCtxt docbParserCtxt;
-typedef xmlParserCtxtPtr docbParserCtxtPtr;
-typedef xmlParserInput docbParserInput;
-typedef xmlDocPtr docbDocPtr;
-typedef xmlSAXHandler docbSAXHandler;
-typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
-void	docbFreeParserCtxt		(docbParserCtxtPtr ctxt);
-docbDocPtr	docbParseDoc		(xmlChar * cur, 
const char * encoding); -docbParserCtxtPtr docbCreateFileParserCtxt (const char * filename,
const char * encoding); -docbDocPtr docbSAXParseFile (const char * filename,
const char * encoding,
docbSAXHandlerPtr sax,
void * userData); -docbDocPtr docbSAXParseDoc (xmlChar * cur,
const char * encoding,
docbSAXHandlerPtr sax,
void * userData); -docbParserCtxtPtr docbCreatePushParserCtxt (docbSAXHandlerPtr sax,
void * user_data,
const char * chunk,
int size,
const char * filename,
xmlCharEncoding enc); -int docbEncodeEntities (unsigned char * out,
int * outlen,
const unsigned char * in,
int * inlen,
int quoteChar); -docbDocPtr docbParseFile (const char * filename,
const char * encoding); -int docbParseDocument (docbParserCtxtPtr ctxt); -int docbParseChunk (docbParserCtxtPtr ctxt,
const char * chunk,
int size,
int terminate); -
-
-
-

Description

-
-
-

Details

-
-

Typedef docbDocPtr

xmlDocPtr docbDocPtr;
-

-

-
-

Typedef docbParserCtxt

xmlParserCtxt docbParserCtxt;
-

-

-
-

Typedef docbParserCtxtPtr

xmlParserCtxtPtr docbParserCtxtPtr;
-

-

-
-

Typedef docbParserInput

xmlParserInput docbParserInput;
-

-

-
-

Typedef docbParserInputPtr

xmlParserInputPtr docbParserInputPtr;
-

-

-
-

Typedef docbSAXHandler

xmlSAXHandler docbSAXHandler;
-

-

-
-

Typedef docbSAXHandlerPtr

xmlSAXHandlerPtr docbSAXHandlerPtr;
-

-

-
-

docbCreateFileParserCtxt ()

docbParserCtxtPtr	docbCreateFileParserCtxt	(const char * filename, 
const char * encoding)
-

Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

-
filename:the filename
encoding:the SGML document encoding, or NULL
Returns:the new parser context or NULL
-
-

docbCreatePushParserCtxt ()

docbParserCtxtPtr	docbCreatePushParserCtxt	(docbSAXHandlerPtr sax, 
void * user_data,
const char * chunk,
int size,
const char * filename,
xmlCharEncoding enc)
-

Create a parser context for using the DocBook SGML parser in push mode To allow content encoding detection, @size should be >= 4 The value of @filename is used for fetching external entities and error/warning reports.

-
sax:a SAX handler
user_data:The user data returned on SAX callbacks
chunk:a pointer to an array of chars
size:number of chars in the array
filename:an optional file name or URI
enc:an optional encoding
Returns:the new parser context or NULL
-
- -
-

docbFreeParserCtxt ()

void	docbFreeParserCtxt		(docbParserCtxtPtr ctxt)
-

Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed.

-
ctxt:an SGML parser context
-
-

docbParseChunk ()

int	docbParseChunk			(docbParserCtxtPtr ctxt, 
const char * chunk,
int size,
int terminate)
-

Parse a Chunk of memory

-
ctxt:an XML parser context
chunk:an char array
size:the size in byte of the chunk
terminate:last chunk indicator
Returns:zero if no error, the xmlParserErrors otherwise.
-
-

docbParseDoc ()

docbDocPtr	docbParseDoc		(xmlChar * cur, 
const char * encoding)
-

parse an SGML in-memory document and build a tree.

-
cur:a pointer to an array of xmlChar
encoding:a free form C string describing the SGML document encoding, or NULL
Returns:the resulting document tree
-
-

docbParseDocument ()

int	docbParseDocument		(docbParserCtxtPtr ctxt)
-

parse an SGML document (and build a tree if using the standard SAX interface).

-
ctxt:an SGML parser context
Returns:0, -1 in case of error. the parser context is augmented as a result of the parsing.
-
-

docbParseFile ()

docbDocPtr	docbParseFile		(const char * filename, 
const char * encoding)
-

parse a Docbook SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.

-
filename:the filename
encoding:a free form C string describing document encoding, or NULL
Returns:the resulting document tree
-
-

docbSAXParseDoc ()

docbDocPtr	docbSAXParseDoc		(xmlChar * cur, 
const char * encoding,
docbSAXHandlerPtr sax,
void * userData)
-

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.

-
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.
Returns:the resulting document tree
-
-

docbSAXParseFile ()

docbDocPtr	docbSAXParseFile	(const char * filename, 
const char * encoding,
docbSAXHandlerPtr sax,
void * userData)
-

parse an SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.

-
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.
Returns:the resulting document tree
-
-
-
- - diff --git a/gentest.py b/gentest.py index 88f88f18..6fa044a3 100755 --- a/gentest.py +++ b/gentest.py @@ -21,8 +21,6 @@ else: # skipped_modules = [ "SAX", "xlink", "threads", "globals", "xmlmemory", "xmlversion", "xmlexports", - #deprecated - "DOCBparser", ] # @@ -43,7 +41,6 @@ modules_defines = { "xmlregexp" : "LIBXML_REGEXP_ENABLED", "xmlautomata" : "LIBXML_AUTOMATA_ENABLED", "xmlsave" : "LIBXML_OUTPUT_ENABLED", - "DOCBparser" : "LIBXML_DOCB_ENABLED", "xmlmodule" : "LIBXML_MODULES_ENABLED", "pattern" : "LIBXML_PATTERN_ENABLED", "schematron" : "LIBXML_SCHEMATRON_ENABLED", @@ -94,7 +91,6 @@ function_defines = { "xmlSprintfElementContent": "LIBXML_OUTPUT_ENABLED", "xmlValidGetPotentialChildren" : "LIBXML_VALID_ENABLED", "xmlValidGetValidElements" : "LIBXML_VALID_ENABLED", - "docbDefaultSAXHandlerInit" : "LIBXML_DOCB_ENABLED", "xmlTextReaderPreservePattern" : "LIBXML_PATTERN_ENABLED", } diff --git a/globals.c b/globals.c index cfbb4b9d..19760ea0 100644 --- a/globals.c +++ b/globals.c @@ -134,7 +134,6 @@ xmlStrdupFunc xmlMemStrdup = xmlPosixStrdup; #include #include -#undef docbDefaultSAXHandler #undef htmlDefaultSAXHandler #undef oldXMLWDcompatibility #undef xmlBufferAllocScheme @@ -441,44 +440,6 @@ xmlSAXHandlerV1 htmlDefaultSAXHandler = { }; #endif /* LIBXML_HTML_ENABLED */ -#ifdef LIBXML_DOCB_ENABLED -/** - * docbDefaultSAXHandler: - * - * Default old SAX v1 handler for SGML DocBook, builds the DOM tree - */ -xmlSAXHandlerV1 docbDefaultSAXHandler = { - xmlSAX2InternalSubset, - xmlSAX2IsStandalone, - xmlSAX2HasInternalSubset, - xmlSAX2HasExternalSubset, - xmlSAX2ResolveEntity, - xmlSAX2GetEntity, - xmlSAX2EntityDecl, - NULL, - NULL, - NULL, - NULL, - xmlSAX2SetDocumentLocator, - xmlSAX2StartDocument, - xmlSAX2EndDocument, - xmlSAX2StartElement, - xmlSAX2EndElement, - xmlSAX2Reference, - xmlSAX2Characters, - xmlSAX2IgnorableWhitespace, - NULL, - xmlSAX2Comment, - xmlParserWarning, - xmlParserError, - xmlParserError, - xmlSAX2GetParameterEntity, - NULL, - NULL, - 0, -}; -#endif /* LIBXML_DOCB_ENABLED */ - /** * xmlInitializeGlobalState: * @gs: a pointer to a newly allocated global state @@ -502,9 +463,6 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs) xmlMutexLock(xmlThrDefMutex); -#if defined(LIBXML_DOCB_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED) - initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler); -#endif #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED) inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler); #endif @@ -701,17 +659,6 @@ xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc fun return(old); } -#ifdef LIBXML_DOCB_ENABLED -#undef docbDefaultSAXHandler -xmlSAXHandlerV1 * -__docbDefaultSAXHandler(void) { - if (IS_MAIN_THREAD) - return (&docbDefaultSAXHandler); - else - return (&xmlGetGlobalState()->docbDefaultSAXHandler); -} -#endif - #ifdef LIBXML_HTML_ENABLED #undef htmlDefaultSAXHandler xmlSAXHandlerV1 * diff --git a/include/libxml/DOCBparser.h b/include/libxml/DOCBparser.h deleted file mode 100644 index 748e1ab3..00000000 --- a/include/libxml/DOCBparser.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Summary: old DocBook SGML parser - * Description: interface for a DocBook SGML non-verifying parser - * This code is DEPRECATED, and should not be used anymore. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __DOCB_PARSER_H__ -#define __DOCB_PARSER_H__ -#include - -#ifdef LIBXML_DOCB_ENABLED - -#include -#include - -#ifndef IN_LIBXML -#ifdef __GNUC__ -#warning "The DOCBparser module has been deprecated in libxml2-2.6.0" -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Most of the back-end structures from XML and SGML are shared. - */ -typedef xmlParserCtxt docbParserCtxt; -typedef xmlParserCtxtPtr docbParserCtxtPtr; -typedef xmlSAXHandler docbSAXHandler; -typedef xmlSAXHandlerPtr docbSAXHandlerPtr; -typedef xmlParserInput docbParserInput; -typedef xmlParserInputPtr docbParserInputPtr; -typedef xmlDocPtr docbDocPtr; - -/* - * There is only few public functions. - */ -XML_DEPRECATED -XMLPUBFUN int XMLCALL - docbEncodeEntities(unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen, int quoteChar); - -XML_DEPRECATED -XMLPUBFUN docbDocPtr XMLCALL - docbSAXParseDoc (xmlChar *cur, - const char *encoding, - docbSAXHandlerPtr sax, - void *userData); -XML_DEPRECATED -XMLPUBFUN docbDocPtr XMLCALL - docbParseDoc (xmlChar *cur, - const char *encoding); -XML_DEPRECATED -XMLPUBFUN docbDocPtr XMLCALL - docbSAXParseFile (const char *filename, - const char *encoding, - docbSAXHandlerPtr sax, - void *userData); -XML_DEPRECATED -XMLPUBFUN docbDocPtr XMLCALL - docbParseFile (const char *filename, - const char *encoding); - -/** - * Interfaces for the Push mode. - */ -XML_DEPRECATED -XMLPUBFUN void XMLCALL - docbFreeParserCtxt (docbParserCtxtPtr ctxt); -XML_DEPRECATED -XMLPUBFUN docbParserCtxtPtr XMLCALL - docbCreatePushParserCtxt(docbSAXHandlerPtr sax, - void *user_data, - const char *chunk, - int size, - const char *filename, - xmlCharEncoding enc); -XML_DEPRECATED -XMLPUBFUN int XMLCALL - docbParseChunk (docbParserCtxtPtr ctxt, - const char *chunk, - int size, - int terminate); -XML_DEPRECATED -XMLPUBFUN docbParserCtxtPtr XMLCALL - docbCreateFileParserCtxt(const char *filename, - const char *encoding); -XML_DEPRECATED -XMLPUBFUN int XMLCALL - docbParseDocument (docbParserCtxtPtr ctxt); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_DOCB_ENABLED */ - -#endif /* __DOCB_PARSER_H__ */ diff --git a/include/libxml/Makefile.am b/include/libxml/Makefile.am index cf9297aa..6373bc71 100644 --- a/include/libxml/Makefile.am +++ b/include/libxml/Makefile.am @@ -27,7 +27,6 @@ xmlinc_HEADERS = \ valid.h \ xlink.h \ xmlversion.h \ - DOCBparser.h \ catalog.h \ threads.h \ globals.h \ diff --git a/include/libxml/SAX.h b/include/libxml/SAX.h index ce58bcbd..fa50568f 100644 --- a/include/libxml/SAX.h +++ b/include/libxml/SAX.h @@ -193,11 +193,6 @@ XML_DEPRECATED XMLPUBFUN void XMLCALL inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr); #endif -#ifdef LIBXML_DOCB_ENABLED -XML_DEPRECATED -XMLPUBFUN void XMLCALL - initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr); -#endif #endif /* LIBXML_SAX1_ENABLED */ #ifdef __cplusplus diff --git a/include/libxml/SAX2.h b/include/libxml/SAX2.h index 842748fc..25047914 100644 --- a/include/libxml/SAX2.h +++ b/include/libxml/SAX2.h @@ -98,8 +98,7 @@ XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL xmlSAX2EndDocument (void *ctx); #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ - defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || \ - defined(LIBXML_LEGACY_ENABLED) + defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) XMLPUBFUN void XMLCALL xmlSAX2StartElement (void *ctx, const xmlChar *fullname, @@ -163,12 +162,6 @@ XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL htmlDefaultSAXHandlerInit (void); #endif -#ifdef LIBXML_DOCB_ENABLED -XMLPUBFUN void XMLCALL - xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr); -XMLPUBFUN void XMLCALL - docbDefaultSAXHandlerInit (void); -#endif XMLPUBFUN void XMLCALL xmlDefaultSAXHandlerInit (void); #ifdef __cplusplus diff --git a/include/libxml/globals.h b/include/libxml/globals.h index 5e41b7bb..40815217 100644 --- a/include/libxml/globals.h +++ b/include/libxml/globals.h @@ -67,7 +67,6 @@ XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc * compatibility support. */ -#undef docbDefaultSAXHandler #undef htmlDefaultSAXHandler #undef oldXMLWDcompatibility #undef xmlBufferAllocScheme @@ -124,7 +123,7 @@ struct _xmlGlobalState xmlSAXLocator xmlDefaultSAXLocator; xmlSAXHandlerV1 xmlDefaultSAXHandler; - xmlSAXHandlerV1 docbDefaultSAXHandler; + xmlSAXHandlerV1 docbDefaultSAXHandler; /* unused */ xmlSAXHandlerV1 htmlDefaultSAXHandler; xmlFreeFunc xmlFree; @@ -251,16 +250,6 @@ XMLPUBVAR xmlFreeFunc xmlFree; XMLPUBVAR xmlStrdupFunc xmlMemStrdup; #endif /* LIBXML_THREAD_ALLOC_ENABLED */ -#ifdef LIBXML_DOCB_ENABLED -XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void); -#ifdef LIBXML_THREAD_ENABLED -#define docbDefaultSAXHandler \ -(*(__docbDefaultSAXHandler())) -#else -XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler; -#endif -#endif - #ifdef LIBXML_HTML_ENABLED XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void); #ifdef LIBXML_THREAD_ENABLED diff --git a/include/libxml/parser.h b/include/libxml/parser.h index 44581808..82c61d67 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -190,7 +190,7 @@ struct _xmlParserCtxt { const xmlChar *version; /* the XML version string */ const xmlChar *encoding; /* the declared encoding, if any */ int standalone; /* standalone document */ - int html; /* an HTML(1)/Docbook(2) document + int html; /* an HTML(1) document * 3 is HTML after * 10 is HTML after */ diff --git a/include/libxml/tree.h b/include/libxml/tree.h index 9823654a..98e20874 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -177,11 +177,11 @@ typedef enum { XML_NAMESPACE_DECL= 18, XML_XINCLUDE_START= 19, XML_XINCLUDE_END= 20 -#ifdef LIBXML_DOCB_ENABLED - ,XML_DOCB_DOCUMENT_NODE= 21 -#endif + /* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */ } xmlElementType; +/* For backward compatibility */ +#define XML_DOCB_DOCUMENT_NODE 21 /** * xmlNotation: @@ -659,7 +659,7 @@ struct _xmlDOMWrapCtxt { defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || \ defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \ defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || \ - defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) + defined(LIBXML_LEGACY_ENABLED) XMLPUBFUN int XMLCALL xmlValidateNCName (const xmlChar *value, int space); diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in index b1d2a208..944920b2 100644 --- a/include/libxml/xmlversion.h.in +++ b/include/libxml/xmlversion.h.in @@ -229,15 +229,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); #define LIBXML_CATALOG_ENABLED #endif -/** - * LIBXML_DOCB_ENABLED: - * - * Whether the SGML Docbook support is configured in - */ -#if @WITH_DOCB@ -#define LIBXML_DOCB_ENABLED -#endif - /** * LIBXML_XPATH_ENABLED: * diff --git a/pattern.c b/pattern.c index 73851a1f..cff4469c 100644 --- a/pattern.c +++ b/pattern.c @@ -516,9 +516,6 @@ restart: goto rollback; node = node->parent; if ((node->type == XML_DOCUMENT_NODE) || -#ifdef LIBXML_DOCB_ENABLED - (node->type == XML_DOCB_DOCUMENT_NODE) || -#endif (node->type == XML_HTML_DOCUMENT_NODE)) continue; goto rollback; @@ -548,9 +545,6 @@ restart: if ((node->type != XML_ELEMENT_NODE) && (node->type != XML_DOCUMENT_NODE) && -#ifdef LIBXML_DOCB_ENABLED - (node->type != XML_DOCB_DOCUMENT_NODE) && -#endif (node->type != XML_HTML_DOCUMENT_NODE)) goto rollback; @@ -590,9 +584,6 @@ restart: case XML_OP_PARENT: if ((node->type == XML_DOCUMENT_NODE) || (node->type == XML_HTML_DOCUMENT_NODE) || -#ifdef LIBXML_DOCB_ENABLED - (node->type == XML_DOCB_DOCUMENT_NODE) || -#endif (node->type == XML_NAMESPACE_DECL)) goto rollback; node = node->parent; @@ -631,9 +622,6 @@ restart: goto rollback; if ((node->type == XML_DOCUMENT_NODE) || (node->type == XML_HTML_DOCUMENT_NODE) || -#ifdef LIBXML_DOCB_ENABLED - (node->type == XML_DOCB_DOCUMENT_NODE) || -#endif (node->type == XML_NAMESPACE_DECL)) goto rollback; node = node->parent; diff --git a/python/generator.py b/python/generator.py index a34a8c8b..b885827b 100755 --- a/python/generator.py +++ b/python/generator.py @@ -152,7 +152,6 @@ def enum(type, name, value): skipped_modules = { 'xmlmemory': None, - 'DOCBparser': None, 'SAX': None, 'hash': None, 'list': None, diff --git a/python/libxml.c b/python/libxml.c index 9bdcb0b6..e071e824 100644 --- a/python/libxml.c +++ b/python/libxml.c @@ -2438,9 +2438,6 @@ libxml_name(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) switch (cur->type) { case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE:{ xmlDocPtr doc = (xmlDocPtr) cur; @@ -2485,9 +2482,6 @@ libxml_doc(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) switch (cur->type) { case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: res = NULL; break; @@ -2543,9 +2537,6 @@ libxml_next(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) switch (cur->type) { case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: res = NULL; break; @@ -2587,9 +2578,6 @@ libxml_prev(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) switch (cur->type) { case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: res = NULL; break; @@ -2632,9 +2620,6 @@ libxml_children(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) case XML_PI_NODE: case XML_COMMENT_NODE: case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: case XML_DTD_NODE: res = cur->children; @@ -2675,9 +2660,6 @@ libxml_last(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) case XML_PI_NODE: case XML_COMMENT_NODE: case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: case XML_DTD_NODE: res = cur->last; @@ -2714,9 +2696,6 @@ libxml_parent(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) switch (cur->type) { case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif res = NULL; break; case XML_ATTRIBUTE_NODE:{ @@ -2819,11 +2798,6 @@ libxml_type(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) case XML_XINCLUDE_END: res = (const xmlChar *) "xinclude_end"; break; -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: - res = (const xmlChar *) "document_docbook"; - break; -#endif } #ifdef DEBUG printf("libxml_type: cur = %p: %s\n", cur, res); diff --git a/tree.c b/tree.c index 1253274f..583a7ea7 100644 --- a/tree.c +++ b/tree.c @@ -355,7 +355,7 @@ xmlSplitQName3(const xmlChar *name, int *len) { #define CUR_SCHAR(s, l) xmlStringCurrentChar(NULL, s, &l) -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) +#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) /** * xmlValidateNCName: * @value: the value to check @@ -3703,9 +3703,6 @@ xmlFreeNodeList(xmlNodePtr cur) { while (1) { while ((cur->children != NULL) && (cur->type != XML_DOCUMENT_NODE) && -#ifdef LIBXML_DOCB_ENABLED - (cur->type != XML_DOCB_DOCUMENT_NODE) && -#endif (cur->type != XML_HTML_DOCUMENT_NODE) && (cur->type != XML_DTD_NODE) && (cur->type != XML_ENTITY_REF_NODE)) { @@ -3716,9 +3713,6 @@ xmlFreeNodeList(xmlNodePtr cur) { next = cur->next; parent = cur->parent; if ((cur->type == XML_DOCUMENT_NODE) || -#ifdef LIBXML_DOCB_ENABLED - (cur->type == XML_DOCB_DOCUMENT_NODE) || -#endif (cur->type == XML_HTML_DOCUMENT_NODE)) { xmlFreeDoc((xmlDocPtr) cur); } else if (cur->type != XML_DTD_NODE) { @@ -4235,9 +4229,6 @@ xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent, case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif #ifdef LIBXML_TREE_ENABLED return((xmlNodePtr) xmlCopyDoc((xmlDocPtr) node, extended)); #endif /* LIBXML_TREE_ENABLED */ @@ -5037,9 +5028,6 @@ xmlNodeSetLang(xmlNodePtr cur, const xmlChar *lang) { case XML_ENTITY_REF_NODE: case XML_ENTITY_NODE: case XML_NAMESPACE_DECL: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_XINCLUDE_START: case XML_XINCLUDE_END: return; @@ -5113,9 +5101,6 @@ xmlNodeSetSpacePreserve(xmlNodePtr cur, int val) { case XML_NAMESPACE_DECL: case XML_XINCLUDE_START: case XML_XINCLUDE_END: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif return; case XML_ELEMENT_NODE: case XML_ATTRIBUTE_NODE: @@ -5196,9 +5181,6 @@ xmlNodeSetName(xmlNodePtr cur, const xmlChar *name) { case XML_NAMESPACE_DECL: case XML_XINCLUDE_START: case XML_XINCLUDE_END: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif return; case XML_ELEMENT_NODE: case XML_ATTRIBUTE_NODE: @@ -5269,9 +5251,6 @@ xmlNodeSetBase(xmlNodePtr cur, const xmlChar* uri) { case XML_ATTRIBUTE_NODE: break; case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: { xmlDocPtr doc = (xmlDocPtr) cur; @@ -5533,9 +5512,6 @@ xmlBufGetNodeContent(xmlBufPtr buf, const xmlNode *cur) case XML_XINCLUDE_END: break; case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: cur = cur->children; while (cur!= NULL) { @@ -5623,9 +5599,6 @@ xmlNodeGetContent(const xmlNode *cur) case XML_XINCLUDE_END: return (NULL); case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: { xmlBufPtr buf; xmlChar *ret; @@ -5717,9 +5690,6 @@ xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) { case XML_DOCUMENT_TYPE_NODE: case XML_XINCLUDE_START: case XML_XINCLUDE_END: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif break; case XML_NOTATION_NODE: break; @@ -5797,9 +5767,6 @@ xmlNodeSetContentLen(xmlNodePtr cur, const xmlChar *content, int len) { case XML_NAMESPACE_DECL: case XML_XINCLUDE_START: case XML_XINCLUDE_END: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif break; case XML_ELEMENT_DECL: /* TODO !!! */ @@ -5879,9 +5846,6 @@ xmlNodeAddContentLen(xmlNodePtr cur, const xmlChar *content, int len) { case XML_NAMESPACE_DECL: case XML_XINCLUDE_START: case XML_XINCLUDE_END: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif break; case XML_ELEMENT_DECL: case XML_ATTRIBUTE_DECL: diff --git a/valid.c b/valid.c index 16fa9238..825a3cfc 100644 --- a/valid.c +++ b/valid.c @@ -518,11 +518,6 @@ xmlValidPrintNode(xmlNodePtr cur) { case XML_HTML_DOCUMENT_NODE: xmlGenericError(xmlGenericErrorContext, "?html? "); break; -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: - xmlGenericError(xmlGenericErrorContext, "?docb? "); - break; -#endif case XML_DTD_NODE: xmlGenericError(xmlGenericErrorContext, "?dtd? "); break; @@ -5283,9 +5278,6 @@ xmlSnprintfElements(char *buf, int size, xmlNodePtr node, int glob) { break; case XML_ATTRIBUTE_NODE: case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: case XML_DOCUMENT_TYPE_NODE: case XML_DOCUMENT_FRAG_NODE: diff --git a/win32/Makefile.bcb b/win32/Makefile.bcb index d326fb99..6adc245e 100644 --- a/win32/Makefile.bcb +++ b/win32/Makefile.bcb @@ -119,7 +119,6 @@ XML_OBJS = $(XML_INTDIR)\buf.obj\ $(XML_INTDIR)\chvalid.obj\ $(XML_INTDIR)\debugXML.obj\ $(XML_INTDIR)\dict.obj\ - $(XML_INTDIR)\DOCBparser.obj\ $(XML_INTDIR)\encoding.obj\ $(XML_INTDIR)\entities.obj\ $(XML_INTDIR)\error.obj\ @@ -165,7 +164,6 @@ XML_OBJS_A = $(XML_INTDIR_A)\buf.obj\ $(XML_INTDIR_A)\chvalid.obj\ $(XML_INTDIR_A)\debugXML.obj\ $(XML_INTDIR_A)\dict.obj\ - $(XML_INTDIR_A)\DOCBparser.obj\ $(XML_INTDIR_A)\encoding.obj\ $(XML_INTDIR_A)\entities.obj\ $(XML_INTDIR_A)\error.obj\ @@ -209,7 +207,6 @@ UTILS = $(BINDIR)\xmllint.exe\ $(BINDIR)\xmlcatalog.exe\ $(BINDIR)\testAutomata.exe\ $(BINDIR)\testC14N.exe\ - $(BINDIR)\testDocbook.exe\ $(BINDIR)\testHTML.exe\ $(BINDIR)\testReader.exe\ $(BINDIR)\testRelax.exe\ diff --git a/win32/Makefile.mingw b/win32/Makefile.mingw index 9dfa4abe..a4452ffb 100644 --- a/win32/Makefile.mingw +++ b/win32/Makefile.mingw @@ -111,7 +111,6 @@ XML_OBJS = $(XML_INTDIR)/buf.o\ $(XML_INTDIR)/chvalid.o\ $(XML_INTDIR)/debugXML.o\ $(XML_INTDIR)/dict.o\ - $(XML_INTDIR)/DOCBparser.o\ $(XML_INTDIR)/encoding.o\ $(XML_INTDIR)/entities.o\ $(XML_INTDIR)/error.o\ @@ -159,7 +158,6 @@ XML_OBJS_A = $(XML_INTDIR_A)/buf.o\ $(XML_INTDIR_A)/chvalid.o\ $(XML_INTDIR_A)/debugXML.o\ $(XML_INTDIR_A)/dict.o\ - $(XML_INTDIR_A)/DOCBparser.o\ $(XML_INTDIR_A)/encoding.o\ $(XML_INTDIR_A)/entities.o\ $(XML_INTDIR_A)/error.o\ @@ -205,7 +203,6 @@ UTILS = $(BINDIR)/xmllint.exe\ $(BINDIR)/xmlcatalog.exe\ $(BINDIR)/testAutomata.exe\ $(BINDIR)/testC14N.exe\ - $(BINDIR)/testDocbook.exe\ $(BINDIR)/testHTML.exe\ $(BINDIR)/testReader.exe\ $(BINDIR)/testRegexp.exe\ diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc index 725b0ca1..5d3b4e1b 100644 --- a/win32/Makefile.msvc +++ b/win32/Makefile.msvc @@ -118,7 +118,6 @@ XML_OBJS = $(XML_INTDIR)\buf.obj\ $(XML_INTDIR)\chvalid.obj\ $(XML_INTDIR)\debugXML.obj\ $(XML_INTDIR)\dict.obj\ - $(XML_INTDIR)\DOCBparser.obj\ $(XML_INTDIR)\encoding.obj\ $(XML_INTDIR)\entities.obj\ $(XML_INTDIR)\error.obj\ @@ -164,7 +163,6 @@ XML_OBJS_A = $(XML_INTDIR_A)\buf.obj\ $(XML_INTDIR_A)\chvalid.obj\ $(XML_INTDIR_A)\debugXML.obj\ $(XML_INTDIR_A)\dict.obj\ - $(XML_INTDIR_A)\DOCBparser.obj\ $(XML_INTDIR_A)\encoding.obj\ $(XML_INTDIR_A)\entities.obj\ $(XML_INTDIR_A)\error.obj\ @@ -210,7 +208,6 @@ XML_OBJS_A_DLL = $(XML_INTDIR_A_DLL)\buf.obj\ $(XML_INTDIR_A_DLL)\chvalid.obj\ $(XML_INTDIR_A_DLL)\debugXML.obj\ $(XML_INTDIR_A_DLL)\dict.obj\ - $(XML_INTDIR_A_DLL)\DOCBparser.obj\ $(XML_INTDIR_A_DLL)\encoding.obj\ $(XML_INTDIR_A_DLL)\entities.obj\ $(XML_INTDIR_A_DLL)\error.obj\ @@ -260,7 +257,6 @@ UTILS = $(BINDIR)\xmllint.exe\ $(BINDIR)\xmlcatalog.exe\ $(BINDIR)\testAutomata.exe\ $(BINDIR)\testC14N.exe\ - $(BINDIR)\testDocbook.exe\ $(BINDIR)\testHTML.exe\ $(BINDIR)\testReader.exe\ $(BINDIR)\testRelax.exe\ diff --git a/win32/configure.js b/win32/configure.js index d784f3bf..e98df081 100644 --- a/win32/configure.js +++ b/win32/configure.js @@ -35,7 +35,6 @@ var withHttp = true; var withHtml = true; var withC14n = true; var withCatalog = true; -var withDocb = true; var withXpath = true; var withXptr = true; var withXinclude = true; @@ -121,7 +120,6 @@ function usage() txt += " html: Enable HTML processor (" + (withHtml? "yes" : "no") + ")\n"; txt += " c14n: Enable C14N support (" + (withC14n? "yes" : "no") + ")\n"; txt += " catalog: Enable catalog support (" + (withCatalog? "yes" : "no") + ")\n"; - txt += " docb: Enable DocBook support (" + (withDocb? "yes" : "no") + ")\n"; txt += " xpath: Enable XPath support (" + (withXpath? "yes" : "no") + ")\n"; txt += " xptr: Enable XPointer support (" + (withXptr? "yes" : "no") + ")\n"; txt += " xinclude: Enable XInclude support (" + (withXinclude? "yes" : "no") + ")\n"; @@ -218,7 +216,6 @@ function discoverVersion() vf.WriteLine("WITH_HTML=" + (withHtml? "1" : "0")); vf.WriteLine("WITH_C14N=" + (withC14n? "1" : "0")); vf.WriteLine("WITH_CATALOG=" + (withCatalog? "1" : "0")); - vf.WriteLine("WITH_DOCB=" + (withDocb? "1" : "0")); vf.WriteLine("WITH_XPATH=" + (withXpath? "1" : "0")); vf.WriteLine("WITH_XPTR=" + (withXptr? "1" : "0")); vf.WriteLine("WITH_XINCLUDE=" + (withXinclude? "1" : "0")); @@ -315,8 +312,6 @@ function configureLibxml() of.WriteLine(s.replace(/\@WITH_C14N\@/, withC14n? "1" : "0")); } else if (s.search(/\@WITH_CATALOG\@/) != -1) { of.WriteLine(s.replace(/\@WITH_CATALOG\@/, withCatalog? "1" : "0")); - } else if (s.search(/\@WITH_DOCB\@/) != -1) { - of.WriteLine(s.replace(/\@WITH_DOCB\@/, withDocb? "1" : "0")); } else if (s.search(/\@WITH_XPATH\@/) != -1) { of.WriteLine(s.replace(/\@WITH_XPATH\@/, withXpath? "1" : "0")); } else if (s.search(/\@WITH_XPTR\@/) != -1) { @@ -470,8 +465,6 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { withC14n = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "catalog") withCatalog = strToBool(arg.substring(opt.length + 1, arg.length)); - else if (opt == "docb") - withDocb = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "xpath") withXpath = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "xptr") @@ -661,7 +654,6 @@ txtOut += " HTTP client: " + boolToStr(withHttp) + "\n"; txtOut += " HTML processor: " + boolToStr(withHtml) + "\n"; txtOut += " C14N support: " + boolToStr(withC14n) + "\n"; txtOut += " Catalog support: " + boolToStr(withCatalog) + "\n"; -txtOut += " DocBook support: " + boolToStr(withDocb) + "\n"; txtOut += " XPath support: " + boolToStr(withXpath) + "\n"; txtOut += " XPointer support: " + boolToStr(withXptr) + "\n"; txtOut += " XInclude support: " + boolToStr(withXinclude) + "\n"; diff --git a/win32/defgen.xsl b/win32/defgen.xsl index a598ff19..423a2311 100644 --- a/win32/defgen.xsl +++ b/win32/defgen.xsl @@ -34,9 +34,6 @@ #ifdef LIBXML_DEBUG_ENABLED&nl; - - #ifdef LIBXML_DOCB_ENABLED&nl; - #ifdef LIBXML_HTML_ENABLED&nl; @@ -86,10 +83,6 @@ or (@name = 'xmlIOHTTPClose')"> #ifdef LIBXML_HTML_ENABLED&nl; - - #ifdef LIBXML_DOCB_ENABLED&nl; - #ifdef LIBXML_REGEXP_ENABLED&nl; @@ -129,8 +122,7 @@ DATA&nl; #endif&nl; - #ifdef LIBXML_THREAD_ENABLED&nl; - - #ifdef LIBXML_DOCB_ENABLED&nl; - #ifdef LIBXML_HTML_ENABLED&nl; __ &nl; - - #endif&nl; - #endif&nl; #else&nl; - - #ifdef LIBXML_DOCB_ENABLED&nl; - #ifdef LIBXML_HTML_ENABLED&nl; DATA&nl; - - #endif&nl; - #endif&nl; @@ -203,9 +183,6 @@ #endif&nl; - - #endif&nl; - #endif&nl; @@ -255,10 +232,6 @@ or (@name = 'xmlIOHTTPClose')"> #endif&nl; - - #endif&nl; - #endif&nl; diff --git a/xinclude.c b/xinclude.c index ae5fd5de..180e70b5 100644 --- a/xinclude.c +++ b/xinclude.c @@ -1163,9 +1163,6 @@ xmlXIncludeCopyXPointer(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target, case XML_COMMENT_NODE: case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_XINCLUDE_END: break; case XML_XINCLUDE_START: { @@ -1639,9 +1636,6 @@ loaded: case XML_COMMENT_NODE: case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif continue; case XML_ATTRIBUTE_NODE: diff --git a/xmlreader.c b/xmlreader.c index 45062a47..5d2250a6 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -1384,9 +1384,6 @@ get_next_node: reader->node = reader->node->parent; if ((reader->node == NULL) || (reader->node->type == XML_DOCUMENT_NODE) || -#ifdef LIBXML_DOCB_ENABLED - (reader->node->type == XML_DOCB_DOCUMENT_NODE) || -#endif (reader->node->type == XML_HTML_DOCUMENT_NODE)) { if (reader->mode != XML_TEXTREADER_MODE_EOF) { val = xmlParseChunk(reader->ctxt, "", 0, 1); @@ -2978,9 +2975,6 @@ xmlTextReaderNodeType(xmlTextReaderPtr reader) { return(XML_READER_TYPE_COMMENT); case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif return(XML_READER_TYPE_DOCUMENT); case XML_DOCUMENT_FRAG_NODE: return(XML_READER_TYPE_DOCUMENT_FRAGMENT); @@ -3135,9 +3129,6 @@ xmlTextReaderName(xmlTextReaderPtr reader) { return(xmlStrdup(BAD_CAST "#comment")); case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif return(xmlStrdup(BAD_CAST "#document")); case XML_DOCUMENT_FRAG_NODE: return(xmlStrdup(BAD_CAST "#document-fragment")); @@ -3206,9 +3197,6 @@ xmlTextReaderConstName(xmlTextReaderPtr reader) { return(CONSTSTR(BAD_CAST "#comment")); case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif return(CONSTSTR(BAD_CAST "#document")); case XML_DOCUMENT_FRAG_NODE: return(CONSTSTR(BAD_CAST "#document-fragment")); diff --git a/xpath.c b/xpath.c index 0e0418b4..314cd91f 100644 --- a/xpath.c +++ b/xpath.c @@ -7638,9 +7638,6 @@ xmlXPathNextChild(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { case XML_DOCUMENT_TYPE_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif return(((xmlDocPtr) ctxt->context->node)->children); case XML_ELEMENT_DECL: case XML_ATTRIBUTE_DECL: @@ -7696,9 +7693,6 @@ xmlXPathNextChildElement(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { return(NULL); case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif return(xmlDocGetRootElement((xmlDocPtr) cur)); default: return(NULL); @@ -7759,9 +7753,6 @@ xmlXPathNextDescendantOrSelfElemParent(xmlNodePtr cur, case XML_XINCLUDE_START: case XML_DOCUMENT_FRAG_NODE: case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: return(contextNode); default: @@ -7786,9 +7777,6 @@ xmlXPathNextDescendantOrSelfElemParent(xmlNodePtr cur, break; /* Not sure if we need those here. */ case XML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_HTML_DOCUMENT_NODE: if (cur != start) return(cur); @@ -7955,9 +7943,6 @@ xmlXPathNextParent(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { case XML_DOCUMENT_TYPE_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif return(NULL); case XML_NAMESPACE_DECL: { xmlNsPtr ns = (xmlNsPtr) ctxt->context->node; @@ -8028,9 +8013,6 @@ xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { case XML_DOCUMENT_TYPE_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif return(NULL); case XML_NAMESPACE_DECL: { xmlNsPtr ns = (xmlNsPtr) ctxt->context->node; @@ -8089,9 +8071,6 @@ xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { case XML_DOCUMENT_TYPE_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif return(NULL); } return(NULL); @@ -12262,9 +12241,6 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt, switch (cur->type) { case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_ELEMENT_NODE: case XML_ATTRIBUTE_NODE: case XML_PI_NODE: @@ -13694,9 +13670,6 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp, case XML_DOCUMENT_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif cur = ctxt->node; break; case XML_ATTRIBUTE_NODE: diff --git a/xpointer.c b/xpointer.c index d6728896..2449157c 100644 --- a/xpointer.c +++ b/xpointer.c @@ -1601,9 +1601,6 @@ xmlXPtrBuildNodeList(xmlXPathObjectPtr obj) { case XML_COMMENT_NODE: case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: -#ifdef LIBXML_DOCB_ENABLED - case XML_DOCB_DOCUMENT_NODE: -#endif case XML_XINCLUDE_START: case XML_XINCLUDE_END: break;