(libxml2) Remove docbook parser

This commit is contained in:
twinaphex 2012-11-17 22:02:08 +01:00
parent 089a1da8b2
commit 14cd3c1184
20 changed files with 7 additions and 711 deletions

View File

@ -30,7 +30,6 @@ LIBXML_PATH := ../libxml2
LOCAL_LIBXML_SRC_FILES = $(LIBXML_PATH)/c14n.c \
$(LIBXML_PATH)/chvalid.c \
$(LIBXML_PATH)/dict.c \
$(LIBXML_PATH)/DOCBparser.c \
$(LIBXML_PATH)/encoding.c \
$(LIBXML_PATH)/entities.c \
$(LIBXML_PATH)/error.c \

View File

@ -1,305 +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));
}
#define bottom_DOCBparser
#include "elfgcchack.h"
#endif /* LIBXML_DOCB_ENABLED */

View File

@ -78,53 +78,6 @@ initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning)
hdlr->initialized = 1;
}
#ifdef LIBXML_DOCB_ENABLED
/**
* initdocbDefaultSAXHandler:
* @hdlr: the SAX handler
*
* Initialize the default DocBook SAX version 1 handler
* DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks
*/
void
initdocbDefaultSAXHandler(xmlSAXHandlerV1 *hdlr)
{
if(hdlr->initialized == 1)
return;
hdlr->internalSubset = xmlSAX2InternalSubset;
hdlr->externalSubset = NULL;
hdlr->isStandalone = xmlSAX2IsStandalone;
hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
hdlr->resolveEntity = xmlSAX2ResolveEntity;
hdlr->getEntity = xmlSAX2GetEntity;
hdlr->getParameterEntity = NULL;
hdlr->entityDecl = xmlSAX2EntityDecl;
hdlr->attributeDecl = NULL;
hdlr->elementDecl = NULL;
hdlr->notationDecl = NULL;
hdlr->unparsedEntityDecl = NULL;
hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
hdlr->startDocument = xmlSAX2StartDocument;
hdlr->endDocument = xmlSAX2EndDocument;
hdlr->startElement = xmlSAX2StartElement;
hdlr->endElement = xmlSAX2EndElement;
hdlr->reference = xmlSAX2Reference;
hdlr->characters = xmlSAX2Characters;
hdlr->cdataBlock = NULL;
hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
hdlr->processingInstruction = NULL;
hdlr->comment = xmlSAX2Comment;
hdlr->warning = xmlParserWarning;
hdlr->error = xmlParserError;
hdlr->fatalError = xmlParserError;
hdlr->initialized = 1;
}
#endif /* LIBXML_DOCB_ENABLED */
#endif /* LIBXML_SAX1_ENABLED */
#define bottom_SAX

View File

@ -1037,7 +1037,7 @@ xmlSAX2EndDocument(void *ctx)
}
}
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED)
/**
* xmlSAX2AttributeInternal:
* @ctx: the user data (XML parser context)
@ -2858,62 +2858,5 @@ xmlDefaultSAXHandlerInit(void)
#endif /* LIBXML_SAX1_ENABLED */
}
#ifdef LIBXML_DOCB_ENABLED
/**
* xmlSAX2InitDocbDefaultSAXHandler:
* @hdlr: the SAX handler
*
* Initialize the default DocBook SAX2 handler
*/
void
xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr)
{
if ((hdlr == NULL) || (hdlr->initialized != 0))
return;
hdlr->internalSubset = xmlSAX2InternalSubset;
hdlr->externalSubset = NULL;
hdlr->isStandalone = xmlSAX2IsStandalone;
hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
hdlr->resolveEntity = xmlSAX2ResolveEntity;
hdlr->getEntity = xmlSAX2GetEntity;
hdlr->getParameterEntity = NULL;
hdlr->entityDecl = xmlSAX2EntityDecl;
hdlr->attributeDecl = NULL;
hdlr->elementDecl = NULL;
hdlr->notationDecl = NULL;
hdlr->unparsedEntityDecl = NULL;
hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
hdlr->startDocument = xmlSAX2StartDocument;
hdlr->endDocument = xmlSAX2EndDocument;
hdlr->startElement = xmlSAX2StartElement;
hdlr->endElement = xmlSAX2EndElement;
hdlr->reference = xmlSAX2Reference;
hdlr->characters = xmlSAX2Characters;
hdlr->cdataBlock = NULL;
hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
hdlr->processingInstruction = NULL;
hdlr->comment = xmlSAX2Comment;
hdlr->warning = xmlParserWarning;
hdlr->error = xmlParserError;
hdlr->fatalError = xmlParserError;
hdlr->initialized = 1;
}
/**
* docbDefaultSAXHandlerInit:
*
* Initialize the default SAX handler
*/
void
docbDefaultSAXHandlerInit(void)
{
xmlSAX2InitDocbDefaultSAXHandler((xmlSAXHandlerPtr) &docbDefaultSAXHandler);
}
#endif /* LIBXML_DOCB_ENABLED */
#define bottom_SAX2
#include "elfgcchack.h"

View File

@ -1651,9 +1651,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
if (cur->children != NULL) {
ctx->pos = XMLC14N_BEFORE_DOCUMENT_ELEMENT;
ctx->parent_is_doc = 1;

View File

@ -84,19 +84,6 @@ extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_al
#endif
#endif
/* list generated from libxml2-api.xml */
#if defined(LIBXML_DOCB_ENABLED)
#ifdef bottom_DOCBparser
#undef docbCreatePushParserCtxt
extern __typeof (docbCreatePushParserCtxt) docbCreatePushParserCtxt __attribute((alias("docbCreatePushParserCtxt__internal_alias")));
#else
#ifndef docbCreatePushParserCtxt
extern __typeof (docbCreatePushParserCtxt) docbCreatePushParserCtxt__internal_alias __attribute((visibility("hidden")));
#define docbCreatePushParserCtxt docbCreatePushParserCtxt__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser
#undef inputPop
extern __typeof (inputPop) inputPop __attribute((alias("inputPop__internal_alias")));
@ -6876,7 +6863,7 @@ extern __typeof (xmlSAX2EndDocument) xmlSAX2EndDocument__internal_alias __attrib
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED)
#ifdef bottom_SAX2
#undef xmlSAX2EndElement
extern __typeof (xmlSAX2EndElement) xmlSAX2EndElement __attribute((alias("xmlSAX2EndElement__internal_alias")));
@ -7018,18 +7005,6 @@ extern __typeof (xmlSAX2InitDefaultSAXHandler) xmlSAX2InitDefaultSAXHandler__int
#endif
#endif
#if defined(LIBXML_DOCB_ENABLED)
#ifdef bottom_SAX2
#undef xmlSAX2InitDocbDefaultSAXHandler
extern __typeof (xmlSAX2InitDocbDefaultSAXHandler) xmlSAX2InitDocbDefaultSAXHandler __attribute((alias("xmlSAX2InitDocbDefaultSAXHandler__internal_alias")));
#else
#ifndef xmlSAX2InitDocbDefaultSAXHandler
extern __typeof (xmlSAX2InitDocbDefaultSAXHandler) xmlSAX2InitDocbDefaultSAXHandler__internal_alias __attribute((visibility("hidden")));
#define xmlSAX2InitDocbDefaultSAXHandler xmlSAX2InitDocbDefaultSAXHandler__internal_alias
#endif
#endif
#endif
#ifdef bottom_SAX2
#undef xmlSAX2InternalSubset
extern __typeof (xmlSAX2InternalSubset) xmlSAX2InternalSubset __attribute((alias("xmlSAX2InternalSubset__internal_alias")));
@ -7110,7 +7085,7 @@ extern __typeof (xmlSAX2StartDocument) xmlSAX2StartDocument__internal_alias __at
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED)
#ifdef bottom_SAX2
#undef xmlSAX2StartElement
extern __typeof (xmlSAX2StartElement) xmlSAX2StartElement __attribute((alias("xmlSAX2StartElement__internal_alias")));
@ -13126,7 +13101,7 @@ extern __typeof (xmlValidateElementDecl) xmlValidateElementDecl__internal_alias
#endif
#endif
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED)
#ifdef bottom_tree
#undef xmlValidateNCName
extern __typeof (xmlValidateNCName) xmlValidateNCName __attribute((alias("xmlValidateNCName__internal_alias")));

View File

@ -407,44 +407,6 @@ xmlSAXLocator xmlDefaultSAXLocator = {
xmlSAX2GetColumnNumber
};
#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
@ -468,10 +430,6 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
xmlMutexLock(xmlThrDefMutex);
#if defined(LIBXML_DOCB_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler);
#endif
gs->oldXMLWDcompatibility = 0;
gs->xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef;
gs->xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef;
@ -648,17 +606,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
#undef xmlLastError
xmlError *
__xmlLastError(void) {

View File

@ -12,85 +12,5 @@
#define __DOCB_PARSER_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_DOCB_ENABLED
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#ifndef IN_LIBXML
#ifdef __GNUC__
#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Most of the back-end structures from XML and SGML are shared.
*/
typedef xmlParserCtxt docbParserCtxt;
typedef xmlParserCtxtPtr docbParserCtxtPtr;
typedef xmlSAXHandler docbSAXHandler;
typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
typedef xmlParserInput docbParserInput;
typedef xmlParserInputPtr docbParserInputPtr;
typedef xmlDocPtr docbDocPtr;
/*
* There is only few public functions.
*/
XMLPUBFUN int XMLCALL
docbEncodeEntities(unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen, int quoteChar);
XMLPUBFUN docbDocPtr XMLCALL
docbSAXParseDoc (xmlChar *cur,
const char *encoding,
docbSAXHandlerPtr sax,
void *userData);
XMLPUBFUN docbDocPtr XMLCALL
docbParseDoc (xmlChar *cur,
const char *encoding);
XMLPUBFUN docbDocPtr XMLCALL
docbSAXParseFile (const char *filename,
const char *encoding,
docbSAXHandlerPtr sax,
void *userData);
XMLPUBFUN docbDocPtr XMLCALL
docbParseFile (const char *filename,
const char *encoding);
/**
* Interfaces for the Push mode.
*/
XMLPUBFUN void XMLCALL
docbFreeParserCtxt (docbParserCtxtPtr ctxt);
XMLPUBFUN docbParserCtxtPtr XMLCALL
docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename,
xmlCharEncoding enc);
XMLPUBFUN int XMLCALL
docbParseChunk (docbParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);
XMLPUBFUN docbParserCtxtPtr XMLCALL
docbCreateFileParserCtxt(const char *filename,
const char *encoding);
XMLPUBFUN int XMLCALL
docbParseDocument (docbParserCtxtPtr ctxt);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_DOCB_ENABLED */
#endif /* __DOCB_PARSER_H__ */

View File

@ -154,10 +154,6 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
int warning);
#ifdef LIBXML_DOCB_ENABLED
XMLPUBFUN void XMLCALL
initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
#endif
#endif /* LIBXML_SAX1_ENABLED */
#ifdef __cplusplus

View File

@ -98,7 +98,7 @@ XMLPUBFUN void XMLCALL
xmlSAX2StartDocument (void *ctx);
XMLPUBFUN void XMLCALL
xmlSAX2EndDocument (void *ctx);
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN void XMLCALL
xmlSAX2StartElement (void *ctx,
const xmlChar *fullname,
@ -156,12 +156,6 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
int warning);
#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

@ -247,16 +247,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
XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlLastError \

View File

@ -138,9 +138,6 @@ typedef enum {
XML_NAMESPACE_DECL= 18,
XML_XINCLUDE_START= 19,
XML_XINCLUDE_END= 20
#ifdef LIBXML_DOCB_ENABLED
,XML_DOCB_DOCUMENT_NODE= 21
#endif
} xmlElementType;
@ -616,7 +613,7 @@ struct _xmlDOMWrapCtxt {
/*
* Some helper functions
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN int XMLCALL
xmlValidateNCName (const xmlChar *value,
int space);

View File

@ -187,15 +187,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#define LIBXML_C14N_ENABLED
#endif
/**
* LIBXML_DOCB_ENABLED:
*
* Whether the SGML Docbook support is configured in
*/
#if 0
#define LIBXML_DOCB_ENABLED
#endif
/**
* LIBXML_XPATH_ENABLED:
*

View File

@ -509,9 +509,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;
@ -541,9 +538,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;
@ -583,9 +577,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;
@ -624,9 +615,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

@ -343,7 +343,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_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED)
/**
* xmlValidateNCName:
* @value: the value to check
@ -3592,9 +3592,6 @@ xmlFreeNodeList(xmlNodePtr cur) {
return;
}
if ((cur->type == XML_DOCUMENT_NODE) ||
#ifdef LIBXML_DOCB_ENABLED
(cur->type == XML_DOCB_DOCUMENT_NODE) ||
#endif
(cur->type == XML_HTML_DOCUMENT_NODE)) {
xmlFreeDoc((xmlDocPtr) cur);
return;
@ -4101,9 +4098,6 @@ xmlStaticCopyNode(const 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 */
@ -4862,9 +4856,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;
@ -4936,9 +4927,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:
@ -5016,9 +5004,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:
@ -5085,9 +5070,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;
@ -5319,9 +5301,6 @@ xmlNodeBufGetContent(xmlBufferPtr buffer, xmlNodePtr 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) {
@ -5410,9 +5389,6 @@ xmlNodeGetContent(xmlNodePtr 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: {
xmlBufferPtr buffer;
xmlChar *ret;
@ -5505,9 +5481,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;
@ -5585,9 +5558,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 !!! */
@ -5667,9 +5637,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

@ -526,11 +526,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;
@ -5184,9 +5179,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

@ -1142,9 +1142,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: {
@ -1627,9 +1624,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

@ -1416,9 +1416,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);
@ -3007,9 +3004,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);
@ -3164,9 +3158,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"));
@ -3235,9 +3226,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"));

View File

@ -6697,9 +6697,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:
@ -6755,9 +6752,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);
@ -6817,9 +6811,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:
@ -6844,9 +6835,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);
@ -7010,9 +6998,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;
@ -7083,9 +7068,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;
@ -7144,9 +7126,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);
@ -11404,9 +11383,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:
@ -13306,9 +13282,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

@ -1622,9 +1622,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;