1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-27 14:03:36 +03:00

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.
This commit is contained in:
Nick Wellnhofer 2022-03-04 03:35:57 +01:00
parent ebb1797030
commit 4a8c71eb7c
34 changed files with 12 additions and 971 deletions

View File

@ -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()

View File

@ -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 <libxml/xmlerror.h>
#include <libxml/DOCBparser.h>
/**
* docbEncodeEntities:
* @out: a pointer to an array of bytes to store the result
* @outlen: the length of @out
* @in: a pointer to an array of UTF-8 chars
* @inlen: the length of @in
* @quoteChar: the quote character to escape (' or ") or zero.
*
* Take a block of UTF-8 chars in and try to convert it to an ASCII
* plus SGML entities block of chars out.
*
* Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
* The value of @inlen after return is the number of octets consumed
* as the return value is positive, else unpredictable.
* The value of @outlen after return is the number of octets consumed.
*/
int
docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED,
int *outlen ATTRIBUTE_UNUSED,
const unsigned char *in ATTRIBUTE_UNUSED,
int *inlen ATTRIBUTE_UNUSED,
int quoteChar ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbEncodeEntities() deprecated function reached\n");
deprecated = 1;
}
return(-1);
}
/**
* docbParseDocument:
* @ctxt: an SGML parser context
*
* parse an SGML document (and build a tree if using the standard SAX
* interface).
*
* Returns 0, -1 in case of error. the parser context is augmented
* as a result of the parsing.
*/
int
docbParseDocument(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseDocument() deprecated function reached\n");
deprecated = 1;
}
return (xmlParseDocument(ctxt));
}
/**
* docbFreeParserCtxt:
* @ctxt: an SGML parser context
*
* Free all the memory used by a parser context. However the parsed
* document in ctxt->myDoc is not freed.
*/
void
docbFreeParserCtxt(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbFreeParserCtxt() deprecated function reached\n");
deprecated = 1;
}
xmlFreeParserCtxt(ctxt);
}
/**
* docbParseChunk:
* @ctxt: an XML parser context
* @chunk: an char array
* @size: the size in byte of the chunk
* @terminate: last chunk indicator
*
* Parse a Chunk of memory
*
* Returns zero if no error, the xmlParserErrors otherwise.
*/
int
docbParseChunk(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
const char *chunk ATTRIBUTE_UNUSED,
int size ATTRIBUTE_UNUSED,
int terminate ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseChunk() deprecated function reached\n");
deprecated = 1;
}
return (xmlParseChunk(ctxt, chunk, size, terminate));
}
/**
* docbCreatePushParserCtxt:
* @sax: a SAX handler
* @user_data: The user data returned on SAX callbacks
* @chunk: a pointer to an array of chars
* @size: number of chars in the array
* @filename: an optional file name or URI
* @enc: an optional encoding
*
* Create a parser context for using the DocBook SGML parser in push mode
* To allow content encoding detection, @size should be >= 4
* The value of @filename is used for fetching external entities
* and error/warning reports.
*
* Returns the new parser context or NULL
*/
docbParserCtxtPtr
docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
void *user_data ATTRIBUTE_UNUSED,
const char *chunk ATTRIBUTE_UNUSED,
int size ATTRIBUTE_UNUSED,
const char *filename ATTRIBUTE_UNUSED,
xmlCharEncoding enc ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseChunk() deprecated function reached\n");
deprecated = 1;
}
return(xmlCreatePushParserCtxt(sax, user_data, chunk, size, filename));
}
/**
* docbSAXParseDoc:
* @cur: a pointer to an array of xmlChar
* @encoding: a free form C string describing the SGML document encoding, or NULL
* @sax: the SAX handler block
* @userData: if using SAX, this pointer will be provided on callbacks.
*
* parse an SGML in-memory document and build a tree.
* It use the given SAX function block to handle the parsing callback.
* If sax is NULL, fallback to the default DOM tree building routines.
*
* Returns the resulting document tree
*/
docbDocPtr
docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
const char *encoding ATTRIBUTE_UNUSED,
docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
void *userData ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseChunk() deprecated function reached\n");
deprecated = 1;
}
return (xmlSAXParseMemoryWithData(sax, (const char *)cur,
xmlStrlen((const xmlChar *) cur), 0, userData));
}
/**
* docbParseDoc:
* @cur: a pointer to an array of xmlChar
* @encoding: a free form C string describing the SGML document encoding, or NULL
*
* parse an SGML in-memory document and build a tree.
*
* Returns the resulting document tree
*/
docbDocPtr
docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
const char *encoding ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseChunk() deprecated function reached\n");
deprecated = 1;
}
return (xmlParseDoc(cur));
}
/**
* docbCreateFileParserCtxt:
* @filename: the filename
* @encoding: the SGML document encoding, or NULL
*
* Create a parser context for a file content.
* Automatic support for ZLIB/Compress compressed document is provided
* by default if found at compile-time.
*
* Returns the new parser context or NULL
*/
docbParserCtxtPtr
docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED,
const char *encoding ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbCreateFileParserCtxt() deprecated function reached\n");
deprecated = 1;
}
return (xmlCreateFileParserCtxt(filename));
}
/**
* docbSAXParseFile:
* @filename: the filename
* @encoding: a free form C string describing the SGML document encoding, or NULL
* @sax: the SAX handler block
* @userData: if using SAX, this pointer will be provided on callbacks.
*
* parse an SGML file and build a tree. Automatic support for ZLIB/Compress
* compressed document is provided by default if found at compile-time.
* It use the given SAX function block to handle the parsing callback.
* If sax is NULL, fallback to the default DOM tree building routines.
*
* Returns the resulting document tree
*/
docbDocPtr
docbSAXParseFile(const char *filename ATTRIBUTE_UNUSED,
const char *encoding ATTRIBUTE_UNUSED,
docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
void *userData ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbSAXParseFile() deprecated function reached\n");
deprecated = 1;
}
return (xmlSAXParseFileWithData(sax, filename, 0, userData));
}
/**
* docbParseFile:
* @filename: the filename
* @encoding: a free form C string describing document encoding, or NULL
*
* parse a Docbook SGML file and build a tree. Automatic support for
* ZLIB/Compress compressed document is provided by default if found
* at compile-time.
*
* Returns the resulting document tree
*/
docbDocPtr
docbParseFile(const char *filename ATTRIBUTE_UNUSED,
const char *encoding ATTRIBUTE_UNUSED)
{
static int deprecated = 0;
if (!deprecated) {
xmlGenericError(xmlGenericErrorContext,
"docbParseFile() deprecated function reached\n");
deprecated = 1;
}
return (xmlParseFile(filename));
}
#endif /* LIBXML_DOCB_ENABLED */

View File

@ -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"

47
SAX.c
View File

@ -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 */

62
SAX2.c
View File

@ -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 */

3
c14n.c
View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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 \

View File

@ -1,138 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>DOCBparser: old DocBook SGML parser</title>
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="u" href="general.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="libxml2-HTMLparser.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">DOCBparser</span>
</h2>
<p>DOCBparser - old DocBook SGML parser</p>
<p>interface for a DocBook SGML non-verifying parser This code is DEPRECATED, and should not be used anymore. </p>
<p> WARNING: this module is deprecated !</p>
<p>Author(s): Daniel Veillard </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">typedef <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#docbParserInputPtr">docbParserInputPtr</a>;
typedef <a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> <a href="#docbParserCtxt">docbParserCtxt</a>;
typedef <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#docbParserCtxtPtr">docbParserCtxtPtr</a>;
typedef <a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> <a href="#docbParserInput">docbParserInput</a>;
typedef <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#docbDocPtr">docbDocPtr</a>;
typedef <a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> <a href="#docbSAXHandler">docbSAXHandler</a>;
typedef <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> <a href="#docbSAXHandlerPtr">docbSAXHandlerPtr</a>;
void <a href="#docbFreeParserCtxt">docbFreeParserCtxt</a> (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt);
<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbParseDoc">docbParseDoc</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding);
<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> <a href="#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a> (const char * filename, <br/> const char * encoding);
<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbSAXParseFile">docbSAXParseFile</a> (const char * filename, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData);
<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbSAXParseDoc">docbSAXParseDoc</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData);
<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> <a href="#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a> (<a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
int <a href="#docbEncodeEntities">docbEncodeEntities</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen, <br/> int quoteChar);
<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbParseFile">docbParseFile</a> (const char * filename, <br/> const char * encoding);
int <a href="#docbParseDocument">docbParseDocument</a> (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt);
int <a href="#docbParseChunk">docbParseChunk</a> (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate);
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="docbDocPtr">Typedef </a>docbDocPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> docbDocPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParserCtxt">Typedef </a>docbParserCtxt</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> docbParserCtxt;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParserCtxtPtr">Typedef </a>docbParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> docbParserCtxtPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParserInput">Typedef </a>docbParserInput</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> docbParserInput;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParserInputPtr">Typedef </a>docbParserInputPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> docbParserInputPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbSAXHandler">Typedef </a>docbSAXHandler</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> docbSAXHandler;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbSAXHandlerPtr">Typedef </a>docbSAXHandlerPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> docbSAXHandlerPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbCreateFileParserCtxt"/>docbCreateFileParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> docbCreateFileParserCtxt (const char * filename, <br/> const char * encoding)<br/>
</pre><p>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbCreatePushParserCtxt"/>docbCreatePushParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> docbCreatePushParserCtxt (<a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
</pre><p>Create a parser context for using the DocBook SGML parser in push mode To allow content encoding detection, @size should be &gt;= 4 The value of @filename is used for fetching external entities and error/warning reports.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbEncodeEntities"/>docbEncodeEntities ()</h3><pre class="programlisting">int docbEncodeEntities (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen, <br/> int quoteChar)<br/>
</pre><p>Take a block of UTF-8 chars in and try to convert it to an ASCII plus SGML entities block of chars out.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>quoteChar</tt></i>:</span></td><td>the quote character to escape (' or ") or zero.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbFreeParserCtxt"/>docbFreeParserCtxt ()</h3><pre class="programlisting">void docbFreeParserCtxt (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt)<br/>
</pre><p>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an SGML parser context</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParseChunk"/>docbParseChunk ()</h3><pre class="programlisting">int docbParseChunk (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate)<br/>
</pre><p>Parse a Chunk of memory</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte of the chunk</td></tr><tr><td><span class="term"><i><tt>terminate</tt></i>:</span></td><td>last chunk indicator</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>zero if no error, the <a href="libxml2-xmlerror.html#xmlParserErrors">xmlParserErrors</a> otherwise.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParseDoc"/>docbParseDoc ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbParseDoc (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding)<br/>
</pre><p>parse an SGML in-memory document and build a tree.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParseDocument"/>docbParseDocument ()</h3><pre class="programlisting">int docbParseDocument (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt)<br/>
</pre><p>parse an SGML document (and build a tree if using the standard SAX interface).</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an SGML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbParseFile"/>docbParseFile ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbParseFile (const char * filename, <br/> const char * encoding)<br/>
</pre><p>parse a Docbook SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbSAXParseDoc"/>docbSAXParseDoc ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbSAXParseDoc (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData)<br/>
</pre><p>parse an SGML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="docbSAXParseFile"/>docbSAXParseFile ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbSAXParseFile (const char * filename, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData)<br/>
</pre><p>parse an SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
<hr/>
</div>
</div>
</body>
</html>

View File

@ -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",
}

View File

@ -134,7 +134,6 @@ xmlStrdupFunc xmlMemStrdup = xmlPosixStrdup;
#include <libxml/globals.h>
#include <libxml/SAX.h>
#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 *

View File

@ -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 <libxml/xmlversion.h>
#ifdef LIBXML_DOCB_ENABLED
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#ifndef IN_LIBXML
#ifdef __GNUC__
#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Most of the back-end structures from XML and SGML are shared.
*/
typedef xmlParserCtxt docbParserCtxt;
typedef xmlParserCtxtPtr docbParserCtxtPtr;
typedef xmlSAXHandler docbSAXHandler;
typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
typedef xmlParserInput docbParserInput;
typedef xmlParserInputPtr docbParserInputPtr;
typedef xmlDocPtr docbDocPtr;
/*
* There is only few public functions.
*/
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__ */

View File

@ -27,7 +27,6 @@ xmlinc_HEADERS = \
valid.h \
xlink.h \
xmlversion.h \
DOCBparser.h \
catalog.h \
threads.h \
globals.h \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 <head>
* 10 is HTML after <body>
*/

View File

@ -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);

View File

@ -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:
*

View File

@ -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;

View File

@ -152,7 +152,6 @@ def enum(type, name, value):
skipped_modules = {
'xmlmemory': None,
'DOCBparser': None,
'SAX': None,
'hash': None,
'list': None,

View File

@ -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);

38
tree.c
View File

@ -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:

View File

@ -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:

View File

@ -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\

View File

@ -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\

View File

@ -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\

View File

@ -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";

View File

@ -34,9 +34,6 @@
<xsl:if test="@file = 'debugXML'">
<xsl:text>#ifdef LIBXML_DEBUG_ENABLED&nl;</xsl:text>
</xsl:if>
<xsl:if test="@file = 'DOCBparser'">
<xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
</xsl:if>
<xsl:if test="(@file = 'HTMLparser')
or (@file = 'HTMLtree')">
<xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
@ -86,10 +83,6 @@
or (@name = 'xmlIOHTTPClose')">
<xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
</xsl:if>
<xsl:if test="(@name = 'docbDefaultSAXHandlerInit')
or (@name = 'initdocbDefaultSAXHandler')">
<xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
</xsl:if>
<xsl:if test="@name = 'xmlValidBuildContentModel'">
<xsl:text>#ifdef LIBXML_REGEXP_ENABLED&nl;</xsl:text>
</xsl:if>
@ -129,8 +122,7 @@
<xsl:text> DATA&nl;</xsl:text>
<xsl:text>#endif&nl;</xsl:text>
</xsl:when>
<xsl:when test="(@name = 'docbDefaultSAXHandler')
or (@name = 'htmlDefaultSAXHandler')
<xsl:when test="(@name = 'htmlDefaultSAXHandler')
or (@name = 'oldXMLWDcompatibility')
or (@name = 'xmlBufferAllocScheme')
or (@name = 'xmlDefaultBufferSize')
@ -153,33 +145,21 @@
or (@name = 'xmlRegisterNodeDefaultValue')
or (@name = 'xmlDeregisterNodeDefaultValue')">
<xsl:text>#ifdef LIBXML_THREAD_ENABLED&nl;</xsl:text>
<xsl:if test="@name = 'docbDefaultSAXHandler'">
<xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
</xsl:if>
<xsl:if test="@name = 'htmlDefaultSAXHandler'">
<xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
</xsl:if>
<xsl:text>__</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>&nl;</xsl:text>
<xsl:if test="@name = 'docbDefaultSAXHandler'">
<xsl:text>#endif&nl;</xsl:text>
</xsl:if>
<xsl:if test="@name = 'htmlDefaultSAXHandler'">
<xsl:text>#endif&nl;</xsl:text>
</xsl:if>
<xsl:text>#else&nl;</xsl:text>
<xsl:if test="@name = 'docbDefaultSAXHandler'">
<xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
</xsl:if>
<xsl:if test="@name = 'htmlDefaultSAXHandler'">
<xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
</xsl:if>
<xsl:value-of select="@name"/>
<xsl:text> DATA&nl;</xsl:text>
<xsl:if test="@name = 'docbDefaultSAXHandler'">
<xsl:text>#endif&nl;</xsl:text>
</xsl:if>
<xsl:if test="@name = 'htmlDefaultSAXHandler'">
<xsl:text>#endif&nl;</xsl:text>
</xsl:if>
@ -203,9 +183,6 @@
<xsl:if test="@file = 'debugXML'">
<xsl:text>#endif&nl;</xsl:text>
</xsl:if>
<xsl:if test="@file = 'DOCBparser'">
<xsl:text>#endif&nl;</xsl:text>
</xsl:if>
<xsl:if test="(@file = 'HTMLparser')
or (@file = 'HTMLtree')">
<xsl:text>#endif&nl;</xsl:text>
@ -255,10 +232,6 @@
or (@name = 'xmlIOHTTPClose')">
<xsl:text>#endif&nl;</xsl:text>
</xsl:if>
<xsl:if test="(@name = 'docbDefaultSAXHandlerInit')
or (@name = 'initdocbDefaultSAXHandler')">
<xsl:text>#endif&nl;</xsl:text>
</xsl:if>
<xsl:if test="@name = 'xmlValidBuildContentModel'">
<xsl:text>#endif&nl;</xsl:text>
</xsl:if>

View File

@ -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:

View File

@ -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"));

27
xpath.c
View File

@ -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:

View File

@ -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;