(libxml2) Remove LIBXML_LEGACY_ENABLED + SAX v1

This commit is contained in:
twinaphex 2012-11-17 22:57:01 +01:00
parent aeceadc3e3
commit c0ae8bc079
18 changed files with 14 additions and 3563 deletions

View File

@ -35,11 +35,9 @@ LOCAL_LIBXML_SRC_FILES = $(LIBXML_PATH)/c14n.c \
$(LIBXML_PATH)/error.c \ $(LIBXML_PATH)/error.c \
$(LIBXML_PATH)/globals.c \ $(LIBXML_PATH)/globals.c \
$(LIBXML_PATH)/hash.c \ $(LIBXML_PATH)/hash.c \
$(LIBXML_PATH)/legacy.c \
$(LIBXML_PATH)/list.c \ $(LIBXML_PATH)/list.c \
$(LIBXML_PATH)/parser.c \ $(LIBXML_PATH)/parser.c \
$(LIBXML_PATH)/parserInternals.c \ $(LIBXML_PATH)/parserInternals.c \
$(LIBXML_PATH)/SAX.c \
$(LIBXML_PATH)/SAX2.c \ $(LIBXML_PATH)/SAX2.c \
$(LIBXML_PATH)/threads.c \ $(LIBXML_PATH)/threads.c \
$(LIBXML_PATH)/tree.c \ $(LIBXML_PATH)/tree.c \

View File

@ -1,85 +0,0 @@
/*
* SAX.c : Old SAX v1 handlers to build a tree.
* Deprecated except for compatibility
*
* See Copyright for the status of this software.
*
* Daniel Veillard <daniel@veillard.com>
*/
#define IN_LIBXML
#include "libxml.h"
#include <stdlib.h>
#include <string.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/valid.h>
#include <libxml/entities.h>
#include <libxml/xmlerror.h>
#include <libxml/debugXML.h>
#include <libxml/xmlIO.h>
#include <libxml/SAX.h>
#include <libxml/uri.h>
#include <libxml/valid.h>
#include <libxml/HTMLtree.h>
#include <libxml/globals.h>
#include <libxml/SAX2.h>
#ifdef LIBXML_LEGACY_ENABLED
#ifdef LIBXML_SAX1_ENABLED
/**
* initxmlDefaultSAXHandler:
* @hdlr: the SAX handler
* @warning: flag if non-zero sets the handler warning procedure
*
* Initialize the default XML SAX version 1 handler
* DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks
*/
void
initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning)
{
if(hdlr->initialized == 1)
return;
hdlr->internalSubset = xmlSAX2InternalSubset;
hdlr->externalSubset = xmlSAX2ExternalSubset;
hdlr->isStandalone = xmlSAX2IsStandalone;
hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
hdlr->resolveEntity = xmlSAX2ResolveEntity;
hdlr->getEntity = xmlSAX2GetEntity;
hdlr->getParameterEntity = xmlSAX2GetParameterEntity;
hdlr->entityDecl = xmlSAX2EntityDecl;
hdlr->attributeDecl = xmlSAX2AttributeDecl;
hdlr->elementDecl = xmlSAX2ElementDecl;
hdlr->notationDecl = xmlSAX2NotationDecl;
hdlr->unparsedEntityDecl = xmlSAX2UnparsedEntityDecl;
hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
hdlr->startDocument = xmlSAX2StartDocument;
hdlr->endDocument = xmlSAX2EndDocument;
hdlr->startElement = xmlSAX2StartElement;
hdlr->endElement = xmlSAX2EndElement;
hdlr->reference = xmlSAX2Reference;
hdlr->characters = xmlSAX2Characters;
hdlr->cdataBlock = xmlSAX2CDataBlock;
hdlr->ignorableWhitespace = xmlSAX2Characters;
hdlr->processingInstruction = xmlSAX2ProcessingInstruction;
if (warning == 0)
hdlr->warning = NULL;
else
hdlr->warning = xmlParserWarning;
hdlr->error = xmlParserError;
hdlr->fatalError = xmlParserError;
hdlr->initialized = 1;
}
#endif /* LIBXML_SAX1_ENABLED */
#define bottom_SAX
#include "elfgcchack.h"
#endif /* LIBXML_LEGACY_ENABLED */

View File

@ -1037,7 +1037,7 @@ xmlSAX2EndDocument(void *ctx)
} }
} }
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) #if defined(LIBXML_WRITER_ENABLED)
/** /**
* xmlSAX2AttributeInternal: * xmlSAX2AttributeInternal:
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
@ -1775,7 +1775,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
#endif #endif
nodePop(ctxt); nodePop(ctxt);
} }
#endif /* LIBXML_SAX1_ENABLED || LIBXML_HTML_ENABLE */ #endif /* LIBXML_HTML_ENABLE */
/* /*
* xmlSAX2TextNode: * xmlSAX2TextNode:
@ -2743,31 +2743,6 @@ xmlSAX2CDataBlock(void *ctx, const xmlChar *value, int len)
static int xmlSAX2DefaultVersionValue = 2; static int xmlSAX2DefaultVersionValue = 2;
#ifdef LIBXML_SAX1_ENABLED
/**
* xmlSAXDefaultVersion:
* @version: the version, 1 or 2
*
* Set the default version of SAX used globally by the library.
* By default, during initialization the default is set to 2.
* Note that it is generally a better coding style to use
* xmlSAXVersion() to set up the version explicitly for a given
* parsing context.
*
* Returns the previous value in case of success and -1 in case of error.
*/
int
xmlSAXDefaultVersion(int version)
{
int ret = xmlSAX2DefaultVersionValue;
if ((version != 1) && (version != 2))
return(-1);
xmlSAX2DefaultVersionValue = version;
return(ret);
}
#endif /* LIBXML_SAX1_ENABLED */
/** /**
* xmlSAXVersion: * xmlSAXVersion:
* @hdlr: the SAX handler * @hdlr: the SAX handler
@ -2788,12 +2763,6 @@ xmlSAXVersion(xmlSAXHandler *hdlr, int version)
hdlr->endElementNs = xmlSAX2EndElementNs; hdlr->endElementNs = xmlSAX2EndElementNs;
hdlr->serror = NULL; hdlr->serror = NULL;
hdlr->initialized = XML_SAX2_MAGIC; hdlr->initialized = XML_SAX2_MAGIC;
#ifdef LIBXML_SAX1_ENABLED
} else if (version == 1) {
hdlr->startElement = xmlSAX2StartElement;
hdlr->endElement = xmlSAX2EndElement;
hdlr->initialized = 1;
#endif /* LIBXML_SAX1_ENABLED */
} else } else
return(-1); return(-1);
hdlr->internalSubset = xmlSAX2InternalSubset; hdlr->internalSubset = xmlSAX2InternalSubset;
@ -2853,9 +2822,6 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
void void
xmlDefaultSAXHandlerInit(void) xmlDefaultSAXHandlerInit(void)
{ {
#ifdef LIBXML_SAX1_ENABLED
xmlSAXVersion((xmlSAXHandlerPtr) &xmlDefaultSAXHandler, 1);
#endif /* LIBXML_SAX1_ENABLED */
} }
#define bottom_SAX2 #define bottom_SAX2

View File

@ -1007,17 +1007,6 @@ extern __typeof (xmlCleanupParser) xmlCleanupParser__internal_alias __attribute(
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlCleanupPredefinedEntities
extern __typeof (xmlCleanupPredefinedEntities) xmlCleanupPredefinedEntities __attribute((alias("xmlCleanupPredefinedEntities__internal_alias")));
#else
#ifndef xmlCleanupPredefinedEntities
extern __typeof (xmlCleanupPredefinedEntities) xmlCleanupPredefinedEntities__internal_alias __attribute((visibility("hidden")));
#define xmlCleanupPredefinedEntities xmlCleanupPredefinedEntities__internal_alias
#endif
#endif
#endif
#ifdef bottom_threads #ifdef bottom_threads
#undef xmlCleanupThreads #undef xmlCleanupThreads
@ -1525,17 +1514,6 @@ extern __typeof (xmlDOMWrapRemoveNode) xmlDOMWrapRemoveNode__internal_alias __at
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlDecodeEntities
extern __typeof (xmlDecodeEntities) xmlDecodeEntities __attribute((alias("xmlDecodeEntities__internal_alias")));
#else
#ifndef xmlDecodeEntities
extern __typeof (xmlDecodeEntities) xmlDecodeEntities__internal_alias __attribute((visibility("hidden")));
#define xmlDecodeEntities xmlDecodeEntities__internal_alias
#endif
#endif
#endif
#ifdef bottom_SAX2 #ifdef bottom_SAX2
#undef xmlDefaultSAXHandlerInit #undef xmlDefaultSAXHandlerInit
@ -1899,18 +1877,6 @@ extern __typeof (xmlElemDump) xmlElemDump__internal_alias __attribute((visibilit
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlEncodeEntities
extern __typeof (xmlEncodeEntities) xmlEncodeEntities __attribute((alias("xmlEncodeEntities__internal_alias")));
#else
#ifndef xmlEncodeEntities
extern __typeof (xmlEncodeEntities) xmlEncodeEntities__internal_alias __attribute((visibility("hidden")));
#define xmlEncodeEntities xmlEncodeEntities__internal_alias
#endif
#endif
#endif
#ifdef bottom_entities #ifdef bottom_entities
#undef xmlEncodeEntitiesReentrant #undef xmlEncodeEntitiesReentrant
extern __typeof (xmlEncodeEntitiesReentrant) xmlEncodeEntitiesReentrant __attribute((alias("xmlEncodeEntitiesReentrant__internal_alias"))); extern __typeof (xmlEncodeEntitiesReentrant) xmlEncodeEntitiesReentrant __attribute((alias("xmlEncodeEntitiesReentrant__internal_alias")));
@ -2669,30 +2635,6 @@ extern __typeof (xmlGetExternalEntityLoader) xmlGetExternalEntityLoader__interna
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlGetFeature
extern __typeof (xmlGetFeature) xmlGetFeature __attribute((alias("xmlGetFeature__internal_alias")));
#else
#ifndef xmlGetFeature
extern __typeof (xmlGetFeature) xmlGetFeature__internal_alias __attribute((visibility("hidden")));
#define xmlGetFeature xmlGetFeature__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlGetFeaturesList
extern __typeof (xmlGetFeaturesList) xmlGetFeaturesList __attribute((alias("xmlGetFeaturesList__internal_alias")));
#else
#ifndef xmlGetFeaturesList
extern __typeof (xmlGetFeaturesList) xmlGetFeaturesList__internal_alias __attribute((visibility("hidden")));
#define xmlGetFeaturesList xmlGetFeaturesList__internal_alias
#endif
#endif
#endif
#ifdef bottom_threads #ifdef bottom_threads
#undef xmlGetGlobalState #undef xmlGetGlobalState
extern __typeof (xmlGetGlobalState) xmlGetGlobalState __attribute((alias("xmlGetGlobalState__internal_alias"))); extern __typeof (xmlGetGlobalState) xmlGetGlobalState __attribute((alias("xmlGetGlobalState__internal_alias")));
@ -2857,18 +2799,6 @@ extern __typeof (xmlGetUTF8Char) xmlGetUTF8Char__internal_alias __attribute((vis
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlHandleEntity
extern __typeof (xmlHandleEntity) xmlHandleEntity __attribute((alias("xmlHandleEntity__internal_alias")));
#else
#ifndef xmlHandleEntity
extern __typeof (xmlHandleEntity) xmlHandleEntity__internal_alias __attribute((visibility("hidden")));
#define xmlHandleEntity xmlHandleEntity__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlHasFeature #undef xmlHasFeature
extern __typeof (xmlHasFeature) xmlHasFeature __attribute((alias("xmlHasFeature__internal_alias"))); extern __typeof (xmlHasFeature) xmlHasFeature __attribute((alias("xmlHasFeature__internal_alias")));
@ -3231,17 +3161,6 @@ extern __typeof (xmlInitializeGlobalState) xmlInitializeGlobalState__internal_al
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlInitializePredefinedEntities
extern __typeof (xmlInitializePredefinedEntities) xmlInitializePredefinedEntities __attribute((alias("xmlInitializePredefinedEntities__internal_alias")));
#else
#ifndef xmlInitializePredefinedEntities
extern __typeof (xmlInitializePredefinedEntities) xmlInitializePredefinedEntities__internal_alias __attribute((visibility("hidden")));
#define xmlInitializePredefinedEntities xmlInitializePredefinedEntities__internal_alias
#endif
#endif
#endif
#ifdef bottom_chvalid #ifdef bottom_chvalid
#undef xmlIsBaseChar #undef xmlIsBaseChar
@ -3923,42 +3842,6 @@ extern __typeof (xmlMutexUnlock) xmlMutexUnlock__internal_alias __attribute((vis
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlNamespaceParseNCName
extern __typeof (xmlNamespaceParseNCName) xmlNamespaceParseNCName __attribute((alias("xmlNamespaceParseNCName__internal_alias")));
#else
#ifndef xmlNamespaceParseNCName
extern __typeof (xmlNamespaceParseNCName) xmlNamespaceParseNCName__internal_alias __attribute((visibility("hidden")));
#define xmlNamespaceParseNCName xmlNamespaceParseNCName__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlNamespaceParseNSDef
extern __typeof (xmlNamespaceParseNSDef) xmlNamespaceParseNSDef __attribute((alias("xmlNamespaceParseNSDef__internal_alias")));
#else
#ifndef xmlNamespaceParseNSDef
extern __typeof (xmlNamespaceParseNSDef) xmlNamespaceParseNSDef__internal_alias __attribute((visibility("hidden")));
#define xmlNamespaceParseNSDef xmlNamespaceParseNSDef__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlNamespaceParseQName
extern __typeof (xmlNamespaceParseQName) xmlNamespaceParseQName __attribute((alias("xmlNamespaceParseQName__internal_alias")));
#else
#ifndef xmlNamespaceParseQName
extern __typeof (xmlNamespaceParseQName) xmlNamespaceParseQName__internal_alias __attribute((visibility("hidden")));
#define xmlNamespaceParseQName xmlNamespaceParseQName__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED) #if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
#ifdef bottom_xmlregexp #ifdef bottom_xmlregexp
#undef xmlNewAutomata #undef xmlNewAutomata
@ -4177,18 +4060,6 @@ extern __typeof (xmlNewEntityInputStream) xmlNewEntityInputStream__internal_alia
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlNewGlobalNs
extern __typeof (xmlNewGlobalNs) xmlNewGlobalNs __attribute((alias("xmlNewGlobalNs__internal_alias")));
#else
#ifndef xmlNewGlobalNs
extern __typeof (xmlNewGlobalNs) xmlNewGlobalNs__internal_alias __attribute((visibility("hidden")));
#define xmlNewGlobalNs xmlNewGlobalNs__internal_alias
#endif
#endif
#endif
#ifdef bottom_parserInternals #ifdef bottom_parserInternals
#undef xmlNewIOInputStream #undef xmlNewIOInputStream
extern __typeof (xmlNewIOInputStream) xmlNewIOInputStream __attribute((alias("xmlNewIOInputStream__internal_alias"))); extern __typeof (xmlNewIOInputStream) xmlNewIOInputStream __attribute((alias("xmlNewIOInputStream__internal_alias")));
@ -4869,17 +4740,6 @@ extern __typeof (xmlParseAttValue) xmlParseAttValue__internal_alias __attribute(
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlParseAttribute
extern __typeof (xmlParseAttribute) xmlParseAttribute __attribute((alias("xmlParseAttribute__internal_alias")));
#else
#ifndef xmlParseAttribute
extern __typeof (xmlParseAttribute) xmlParseAttribute__internal_alias __attribute((visibility("hidden")));
#define xmlParseAttribute xmlParseAttribute__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlParseAttributeListDecl #undef xmlParseAttributeListDecl
@ -4901,30 +4761,6 @@ extern __typeof (xmlParseAttributeType) xmlParseAttributeType__internal_alias __
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlParseBalancedChunkMemory
extern __typeof (xmlParseBalancedChunkMemory) xmlParseBalancedChunkMemory __attribute((alias("xmlParseBalancedChunkMemory__internal_alias")));
#else
#ifndef xmlParseBalancedChunkMemory
extern __typeof (xmlParseBalancedChunkMemory) xmlParseBalancedChunkMemory__internal_alias __attribute((visibility("hidden")));
#define xmlParseBalancedChunkMemory xmlParseBalancedChunkMemory__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlParseBalancedChunkMemoryRecover
extern __typeof (xmlParseBalancedChunkMemoryRecover) xmlParseBalancedChunkMemoryRecover __attribute((alias("xmlParseBalancedChunkMemoryRecover__internal_alias")));
#else
#ifndef xmlParseBalancedChunkMemoryRecover
extern __typeof (xmlParseBalancedChunkMemoryRecover) xmlParseBalancedChunkMemoryRecover__internal_alias __attribute((visibility("hidden")));
#define xmlParseBalancedChunkMemoryRecover xmlParseBalancedChunkMemoryRecover__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlParseCDSect #undef xmlParseCDSect
extern __typeof (xmlParseCDSect) xmlParseCDSect __attribute((alias("xmlParseCDSect__internal_alias"))); extern __typeof (xmlParseCDSect) xmlParseCDSect __attribute((alias("xmlParseCDSect__internal_alias")));
@ -5029,18 +4865,6 @@ extern __typeof (xmlParseDefaultDecl) xmlParseDefaultDecl__internal_alias __attr
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlParseDoc
extern __typeof (xmlParseDoc) xmlParseDoc __attribute((alias("xmlParseDoc__internal_alias")));
#else
#ifndef xmlParseDoc
extern __typeof (xmlParseDoc) xmlParseDoc__internal_alias __attribute((visibility("hidden")));
#define xmlParseDoc xmlParseDoc__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlParseDocTypeDecl #undef xmlParseDocTypeDecl
extern __typeof (xmlParseDocTypeDecl) xmlParseDocTypeDecl __attribute((alias("xmlParseDocTypeDecl__internal_alias"))); extern __typeof (xmlParseDocTypeDecl) xmlParseDocTypeDecl __attribute((alias("xmlParseDocTypeDecl__internal_alias")));
@ -5131,30 +4955,6 @@ extern __typeof (xmlParseEncodingDecl) xmlParseEncodingDecl__internal_alias __at
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlParseEndTag
extern __typeof (xmlParseEndTag) xmlParseEndTag __attribute((alias("xmlParseEndTag__internal_alias")));
#else
#ifndef xmlParseEndTag
extern __typeof (xmlParseEndTag) xmlParseEndTag__internal_alias __attribute((visibility("hidden")));
#define xmlParseEndTag xmlParseEndTag__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlParseEntity
extern __typeof (xmlParseEntity) xmlParseEntity __attribute((alias("xmlParseEntity__internal_alias")));
#else
#ifndef xmlParseEntity
extern __typeof (xmlParseEntity) xmlParseEntity__internal_alias __attribute((visibility("hidden")));
#define xmlParseEntity xmlParseEntity__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlParseEntityDecl #undef xmlParseEntityDecl
extern __typeof (xmlParseEntityDecl) xmlParseEntityDecl __attribute((alias("xmlParseEntityDecl__internal_alias"))); extern __typeof (xmlParseEntityDecl) xmlParseEntityDecl __attribute((alias("xmlParseEntityDecl__internal_alias")));
@ -5215,18 +5015,6 @@ extern __typeof (xmlParseExtParsedEnt) xmlParseExtParsedEnt__internal_alias __at
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlParseExternalEntity
extern __typeof (xmlParseExternalEntity) xmlParseExternalEntity __attribute((alias("xmlParseExternalEntity__internal_alias")));
#else
#ifndef xmlParseExternalEntity
extern __typeof (xmlParseExternalEntity) xmlParseExternalEntity__internal_alias __attribute((visibility("hidden")));
#define xmlParseExternalEntity xmlParseExternalEntity__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlParseExternalID #undef xmlParseExternalID
extern __typeof (xmlParseExternalID) xmlParseExternalID __attribute((alias("xmlParseExternalID__internal_alias"))); extern __typeof (xmlParseExternalID) xmlParseExternalID __attribute((alias("xmlParseExternalID__internal_alias")));
@ -5247,18 +5035,6 @@ extern __typeof (xmlParseExternalSubset) xmlParseExternalSubset__internal_alias
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlParseFile
extern __typeof (xmlParseFile) xmlParseFile __attribute((alias("xmlParseFile__internal_alias")));
#else
#ifndef xmlParseFile
extern __typeof (xmlParseFile) xmlParseFile__internal_alias __attribute((visibility("hidden")));
#define xmlParseFile xmlParseFile__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlParseInNodeContext #undef xmlParseInNodeContext
extern __typeof (xmlParseInNodeContext) xmlParseInNodeContext __attribute((alias("xmlParseInNodeContext__internal_alias"))); extern __typeof (xmlParseInNodeContext) xmlParseInNodeContext __attribute((alias("xmlParseInNodeContext__internal_alias")));
@ -5279,18 +5055,6 @@ extern __typeof (xmlParseMarkupDecl) xmlParseMarkupDecl__internal_alias __attrib
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlParseMemory
extern __typeof (xmlParseMemory) xmlParseMemory __attribute((alias("xmlParseMemory__internal_alias")));
#else
#ifndef xmlParseMemory
extern __typeof (xmlParseMemory) xmlParseMemory__internal_alias __attribute((visibility("hidden")));
#define xmlParseMemory xmlParseMemory__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlParseMisc #undef xmlParseMisc
extern __typeof (xmlParseMisc) xmlParseMisc __attribute((alias("xmlParseMisc__internal_alias"))); extern __typeof (xmlParseMisc) xmlParseMisc __attribute((alias("xmlParseMisc__internal_alias")));
@ -5311,18 +5075,6 @@ extern __typeof (xmlParseName) xmlParseName__internal_alias __attribute((visibil
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlParseNamespace
extern __typeof (xmlParseNamespace) xmlParseNamespace __attribute((alias("xmlParseNamespace__internal_alias")));
#else
#ifndef xmlParseNamespace
extern __typeof (xmlParseNamespace) xmlParseNamespace__internal_alias __attribute((visibility("hidden")));
#define xmlParseNamespace xmlParseNamespace__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlParseNmtoken #undef xmlParseNmtoken
extern __typeof (xmlParseNmtoken) xmlParseNmtoken __attribute((alias("xmlParseNmtoken__internal_alias"))); extern __typeof (xmlParseNmtoken) xmlParseNmtoken __attribute((alias("xmlParseNmtoken__internal_alias")));
@ -5393,18 +5145,6 @@ extern __typeof (xmlParsePubidLiteral) xmlParsePubidLiteral__internal_alias __at
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlParseQuotedString
extern __typeof (xmlParseQuotedString) xmlParseQuotedString __attribute((alias("xmlParseQuotedString__internal_alias")));
#else
#ifndef xmlParseQuotedString
extern __typeof (xmlParseQuotedString) xmlParseQuotedString__internal_alias __attribute((visibility("hidden")));
#define xmlParseQuotedString xmlParseQuotedString__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlParseReference #undef xmlParseReference
extern __typeof (xmlParseReference) xmlParseReference __attribute((alias("xmlParseReference__internal_alias"))); extern __typeof (xmlParseReference) xmlParseReference __attribute((alias("xmlParseReference__internal_alias")));
@ -5425,18 +5165,6 @@ extern __typeof (xmlParseSDDecl) xmlParseSDDecl__internal_alias __attribute((vis
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlParseStartTag
extern __typeof (xmlParseStartTag) xmlParseStartTag __attribute((alias("xmlParseStartTag__internal_alias")));
#else
#ifndef xmlParseStartTag
extern __typeof (xmlParseStartTag) xmlParseStartTag__internal_alias __attribute((visibility("hidden")));
#define xmlParseStartTag xmlParseStartTag__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlParseSystemLiteral #undef xmlParseSystemLiteral
extern __typeof (xmlParseSystemLiteral) xmlParseSystemLiteral __attribute((alias("xmlParseSystemLiteral__internal_alias"))); extern __typeof (xmlParseSystemLiteral) xmlParseSystemLiteral __attribute((alias("xmlParseSystemLiteral__internal_alias")));
@ -5577,18 +5305,6 @@ extern __typeof (xmlParserHandlePEReference) xmlParserHandlePEReference__interna
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlParserHandleReference
extern __typeof (xmlParserHandleReference) xmlParserHandleReference __attribute((alias("xmlParserHandleReference__internal_alias")));
#else
#ifndef xmlParserHandleReference
extern __typeof (xmlParserHandleReference) xmlParserHandleReference__internal_alias __attribute((visibility("hidden")));
#define xmlParserHandleReference xmlParserHandleReference__internal_alias
#endif
#endif
#endif
#ifdef bottom_xmlIO #ifdef bottom_xmlIO
#undef xmlParserInputBufferCreateFd #undef xmlParserInputBufferCreateFd
extern __typeof (xmlParserInputBufferCreateFd) xmlParserInputBufferCreateFd __attribute((alias("xmlParserInputBufferCreateFd__internal_alias"))); extern __typeof (xmlParserInputBufferCreateFd) xmlParserInputBufferCreateFd __attribute((alias("xmlParserInputBufferCreateFd__internal_alias")));
@ -6077,42 +5793,6 @@ extern __typeof (xmlReconciliateNs) xmlReconciliateNs__internal_alias __attribut
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlRecoverDoc
extern __typeof (xmlRecoverDoc) xmlRecoverDoc __attribute((alias("xmlRecoverDoc__internal_alias")));
#else
#ifndef xmlRecoverDoc
extern __typeof (xmlRecoverDoc) xmlRecoverDoc__internal_alias __attribute((visibility("hidden")));
#define xmlRecoverDoc xmlRecoverDoc__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlRecoverFile
extern __typeof (xmlRecoverFile) xmlRecoverFile __attribute((alias("xmlRecoverFile__internal_alias")));
#else
#ifndef xmlRecoverFile
extern __typeof (xmlRecoverFile) xmlRecoverFile__internal_alias __attribute((visibility("hidden")));
#define xmlRecoverFile xmlRecoverFile__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlRecoverMemory
extern __typeof (xmlRecoverMemory) xmlRecoverMemory __attribute((alias("xmlRecoverMemory__internal_alias")));
#else
#ifndef xmlRecoverMemory
extern __typeof (xmlRecoverMemory) xmlRecoverMemory__internal_alias __attribute((visibility("hidden")));
#define xmlRecoverMemory xmlRecoverMemory__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_REGEXP_ENABLED) #if defined(LIBXML_REGEXP_ENABLED)
#ifdef bottom_xmlregexp #ifdef bottom_xmlregexp
#undef xmlRegExecErrInfo #undef xmlRegExecErrInfo
@ -6431,7 +6111,7 @@ extern __typeof (xmlSAX2EndDocument) xmlSAX2EndDocument__internal_alias __attrib
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) #if defined(LIBXML_WRITER_ENABLED)
#ifdef bottom_SAX2 #ifdef bottom_SAX2
#undef xmlSAX2EndElement #undef xmlSAX2EndElement
extern __typeof (xmlSAX2EndElement) xmlSAX2EndElement __attribute((alias("xmlSAX2EndElement__internal_alias"))); extern __typeof (xmlSAX2EndElement) xmlSAX2EndElement __attribute((alias("xmlSAX2EndElement__internal_alias")));
@ -6653,7 +6333,7 @@ extern __typeof (xmlSAX2StartDocument) xmlSAX2StartDocument__internal_alias __at
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) #if defined(LIBXML_WRITER_ENABLED)
#ifdef bottom_SAX2 #ifdef bottom_SAX2
#undef xmlSAX2StartElement #undef xmlSAX2StartElement
extern __typeof (xmlSAX2StartElement) xmlSAX2StartElement __attribute((alias("xmlSAX2StartElement__internal_alias"))); extern __typeof (xmlSAX2StartElement) xmlSAX2StartElement __attribute((alias("xmlSAX2StartElement__internal_alias")));
@ -6685,18 +6365,6 @@ extern __typeof (xmlSAX2UnparsedEntityDecl) xmlSAX2UnparsedEntityDecl__internal_
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_SAX2
#undef xmlSAXDefaultVersion
extern __typeof (xmlSAXDefaultVersion) xmlSAXDefaultVersion __attribute((alias("xmlSAXDefaultVersion__internal_alias")));
#else
#ifndef xmlSAXDefaultVersion
extern __typeof (xmlSAXDefaultVersion) xmlSAXDefaultVersion__internal_alias __attribute((visibility("hidden")));
#define xmlSAXDefaultVersion xmlSAXDefaultVersion__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_VALID_ENABLED) #if defined(LIBXML_VALID_ENABLED)
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlSAXParseDTD #undef xmlSAXParseDTD
@ -6709,102 +6377,6 @@ extern __typeof (xmlSAXParseDTD) xmlSAXParseDTD__internal_alias __attribute((vis
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlSAXParseDoc
extern __typeof (xmlSAXParseDoc) xmlSAXParseDoc __attribute((alias("xmlSAXParseDoc__internal_alias")));
#else
#ifndef xmlSAXParseDoc
extern __typeof (xmlSAXParseDoc) xmlSAXParseDoc__internal_alias __attribute((visibility("hidden")));
#define xmlSAXParseDoc xmlSAXParseDoc__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlSAXParseEntity
extern __typeof (xmlSAXParseEntity) xmlSAXParseEntity __attribute((alias("xmlSAXParseEntity__internal_alias")));
#else
#ifndef xmlSAXParseEntity
extern __typeof (xmlSAXParseEntity) xmlSAXParseEntity__internal_alias __attribute((visibility("hidden")));
#define xmlSAXParseEntity xmlSAXParseEntity__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlSAXParseFile
extern __typeof (xmlSAXParseFile) xmlSAXParseFile __attribute((alias("xmlSAXParseFile__internal_alias")));
#else
#ifndef xmlSAXParseFile
extern __typeof (xmlSAXParseFile) xmlSAXParseFile__internal_alias __attribute((visibility("hidden")));
#define xmlSAXParseFile xmlSAXParseFile__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlSAXParseFileWithData
extern __typeof (xmlSAXParseFileWithData) xmlSAXParseFileWithData __attribute((alias("xmlSAXParseFileWithData__internal_alias")));
#else
#ifndef xmlSAXParseFileWithData
extern __typeof (xmlSAXParseFileWithData) xmlSAXParseFileWithData__internal_alias __attribute((visibility("hidden")));
#define xmlSAXParseFileWithData xmlSAXParseFileWithData__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlSAXParseMemory
extern __typeof (xmlSAXParseMemory) xmlSAXParseMemory __attribute((alias("xmlSAXParseMemory__internal_alias")));
#else
#ifndef xmlSAXParseMemory
extern __typeof (xmlSAXParseMemory) xmlSAXParseMemory__internal_alias __attribute((visibility("hidden")));
#define xmlSAXParseMemory xmlSAXParseMemory__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlSAXParseMemoryWithData
extern __typeof (xmlSAXParseMemoryWithData) xmlSAXParseMemoryWithData __attribute((alias("xmlSAXParseMemoryWithData__internal_alias")));
#else
#ifndef xmlSAXParseMemoryWithData
extern __typeof (xmlSAXParseMemoryWithData) xmlSAXParseMemoryWithData__internal_alias __attribute((visibility("hidden")));
#define xmlSAXParseMemoryWithData xmlSAXParseMemoryWithData__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlSAXUserParseFile
extern __typeof (xmlSAXUserParseFile) xmlSAXUserParseFile __attribute((alias("xmlSAXUserParseFile__internal_alias")));
#else
#ifndef xmlSAXUserParseFile
extern __typeof (xmlSAXUserParseFile) xmlSAXUserParseFile__internal_alias __attribute((visibility("hidden")));
#define xmlSAXUserParseFile xmlSAXUserParseFile__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlSAXUserParseMemory
extern __typeof (xmlSAXUserParseMemory) xmlSAXUserParseMemory __attribute((alias("xmlSAXUserParseMemory__internal_alias")));
#else
#ifndef xmlSAXUserParseMemory
extern __typeof (xmlSAXUserParseMemory) xmlSAXUserParseMemory__internal_alias __attribute((visibility("hidden")));
#define xmlSAXUserParseMemory xmlSAXUserParseMemory__internal_alias
#endif
#endif
#endif
#ifdef bottom_SAX2 #ifdef bottom_SAX2
#undef xmlSAXVersion #undef xmlSAXVersion
extern __typeof (xmlSAXVersion) xmlSAXVersion __attribute((alias("xmlSAXVersion__internal_alias"))); extern __typeof (xmlSAXVersion) xmlSAXVersion __attribute((alias("xmlSAXVersion__internal_alias")));
@ -7017,18 +6589,6 @@ extern __typeof (xmlSaveUri) xmlSaveUri__internal_alias __attribute((visibility(
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlScanName
extern __typeof (xmlScanName) xmlScanName __attribute((alias("xmlScanName__internal_alias")));
#else
#ifndef xmlScanName
extern __typeof (xmlScanName) xmlScanName__internal_alias __attribute((visibility("hidden")));
#define xmlScanName xmlScanName__internal_alias
#endif
#endif
#endif
#ifdef bottom_tree #ifdef bottom_tree
#undef xmlSearchNs #undef xmlSearchNs
extern __typeof (xmlSearchNs) xmlSearchNs __attribute((alias("xmlSearchNs__internal_alias"))); extern __typeof (xmlSearchNs) xmlSearchNs __attribute((alias("xmlSearchNs__internal_alias")));
@ -7079,18 +6639,6 @@ extern __typeof (xmlSetDocCompressMode) xmlSetDocCompressMode__internal_alias __
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_parser
#undef xmlSetEntityReferenceFunc
extern __typeof (xmlSetEntityReferenceFunc) xmlSetEntityReferenceFunc __attribute((alias("xmlSetEntityReferenceFunc__internal_alias")));
#else
#ifndef xmlSetEntityReferenceFunc
extern __typeof (xmlSetEntityReferenceFunc) xmlSetEntityReferenceFunc__internal_alias __attribute((visibility("hidden")));
#define xmlSetEntityReferenceFunc xmlSetEntityReferenceFunc__internal_alias
#endif
#endif
#endif
#ifdef bottom_xmlIO #ifdef bottom_xmlIO
#undef xmlSetExternalEntityLoader #undef xmlSetExternalEntityLoader
extern __typeof (xmlSetExternalEntityLoader) xmlSetExternalEntityLoader __attribute((alias("xmlSetExternalEntityLoader__internal_alias"))); extern __typeof (xmlSetExternalEntityLoader) xmlSetExternalEntityLoader __attribute((alias("xmlSetExternalEntityLoader__internal_alias")));
@ -7101,17 +6649,6 @@ extern __typeof (xmlSetExternalEntityLoader) xmlSetExternalEntityLoader__interna
#endif #endif
#endif #endif
#if defined(LIBXML_LEGACY_ENABLED)
#ifdef bottom_legacy
#undef xmlSetFeature
extern __typeof (xmlSetFeature) xmlSetFeature __attribute((alias("xmlSetFeature__internal_alias")));
#else
#ifndef xmlSetFeature
extern __typeof (xmlSetFeature) xmlSetFeature__internal_alias __attribute((visibility("hidden")));
#define xmlSetFeature xmlSetFeature__internal_alias
#endif
#endif
#endif
#ifdef bottom_error #ifdef bottom_error
#undef xmlSetGenericErrorFunc #undef xmlSetGenericErrorFunc
@ -7187,18 +6724,6 @@ extern __typeof (xmlSetTreeDoc) xmlSetTreeDoc__internal_alias __attribute((visib
#endif #endif
#endif #endif
#if defined(LIBXML_SAX1_ENABLED)
#ifdef bottom_parser
#undef xmlSetupParserForBuffer
extern __typeof (xmlSetupParserForBuffer) xmlSetupParserForBuffer __attribute((alias("xmlSetupParserForBuffer__internal_alias")));
#else
#ifndef xmlSetupParserForBuffer
extern __typeof (xmlSetupParserForBuffer) xmlSetupParserForBuffer__internal_alias __attribute((visibility("hidden")));
#define xmlSetupParserForBuffer xmlSetupParserForBuffer__internal_alias
#endif
#endif
#endif
#ifdef bottom_parser #ifdef bottom_parser
#undef xmlSkipBlankChars #undef xmlSkipBlankChars
extern __typeof (xmlSkipBlankChars) xmlSkipBlankChars __attribute((alias("xmlSkipBlankChars__internal_alias"))); extern __typeof (xmlSkipBlankChars) xmlSkipBlankChars __attribute((alias("xmlSkipBlankChars__internal_alias")));
@ -11685,7 +11210,7 @@ extern __typeof (xmlValidateElementDecl) xmlValidateElementDecl__internal_alias
#endif #endif
#endif #endif
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
#ifdef bottom_tree #ifdef bottom_tree
#undef xmlValidateNCName #undef xmlValidateNCName
extern __typeof (xmlValidateNCName) xmlValidateNCName __attribute((alias("xmlValidateNCName__internal_alias"))); extern __typeof (xmlValidateNCName) xmlValidateNCName __attribute((alias("xmlValidateNCName__internal_alias")));

View File

@ -356,44 +356,6 @@ static const char *xmlTreeIndentStringThrDef = " ";
int xmlSaveNoEmptyTags = 0; int xmlSaveNoEmptyTags = 0;
static int xmlSaveNoEmptyTagsThrDef = 0; static int xmlSaveNoEmptyTagsThrDef = 0;
#ifdef LIBXML_SAX1_ENABLED
/**
* xmlDefaultSAXHandler:
*
* Default SAX version1 handler for XML, builds the DOM tree
*/
xmlSAXHandlerV1 xmlDefaultSAXHandler = {
xmlSAX2InternalSubset,
xmlSAX2IsStandalone,
xmlSAX2HasInternalSubset,
xmlSAX2HasExternalSubset,
xmlSAX2ResolveEntity,
xmlSAX2GetEntity,
xmlSAX2EntityDecl,
xmlSAX2NotationDecl,
xmlSAX2AttributeDecl,
xmlSAX2ElementDecl,
xmlSAX2UnparsedEntityDecl,
xmlSAX2SetDocumentLocator,
xmlSAX2StartDocument,
xmlSAX2EndDocument,
xmlSAX2StartElement,
xmlSAX2EndElement,
xmlSAX2Reference,
xmlSAX2Characters,
xmlSAX2Characters,
xmlSAX2ProcessingInstruction,
xmlSAX2Comment,
xmlParserWarning,
xmlParserError,
xmlParserError,
xmlSAX2GetParameterEntity,
xmlSAX2CDataBlock,
xmlSAX2ExternalSubset,
0,
};
#endif /* LIBXML_SAX1_ENABLED */
/** /**
* xmlDefaultSAXLocator: * xmlDefaultSAXLocator:
* *
@ -433,9 +395,6 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
gs->oldXMLWDcompatibility = 0; gs->oldXMLWDcompatibility = 0;
gs->xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef; gs->xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef;
gs->xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef; gs->xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef;
#if defined(LIBXML_SAX1_ENABLED) && defined(LIBXML_LEGACY_ENABLED)
initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1);
#endif /* LIBXML_SAX1_ENABLED */
gs->xmlDefaultSAXLocator.getPublicId = xmlSAX2GetPublicId; gs->xmlDefaultSAXLocator.getPublicId = xmlSAX2GetPublicId;
gs->xmlDefaultSAXLocator.getSystemId = xmlSAX2GetSystemId; gs->xmlDefaultSAXLocator.getSystemId = xmlSAX2GetSystemId;
gs->xmlDefaultSAXLocator.getLineNumber = xmlSAX2GetLineNumber; gs->xmlDefaultSAXLocator.getLineNumber = xmlSAX2GetLineNumber;
@ -717,17 +676,6 @@ int xmlThrDefDefaultBufferSize(int v) {
return ret; return ret;
} }
#ifdef LIBXML_SAX1_ENABLED
#undef xmlDefaultSAXHandler
xmlSAXHandlerV1 *
__xmlDefaultSAXHandler(void) {
if (IS_MAIN_THREAD)
return (&xmlDefaultSAXHandler);
else
return (&xmlGetGlobalState()->xmlDefaultSAXHandler);
}
#endif /* LIBXML_SAX1_ENABLED */
#undef xmlDefaultSAXLocator #undef xmlDefaultSAXLocator
xmlSAXLocator * xmlSAXLocator *
__xmlDefaultSAXLocator(void) { __xmlDefaultSAXLocator(void) {

File diff suppressed because it is too large Load Diff

View File

@ -18,148 +18,5 @@
#include <libxml/parser.h> #include <libxml/parser.h>
#include <libxml/xlink.h> #include <libxml/xlink.h>
#ifdef LIBXML_LEGACY_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN const xmlChar * XMLCALL
getPublicId (void *ctx);
XMLPUBFUN const xmlChar * XMLCALL
getSystemId (void *ctx);
XMLPUBFUN void XMLCALL
setDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
XMLPUBFUN int XMLCALL
getLineNumber (void *ctx);
XMLPUBFUN int XMLCALL
getColumnNumber (void *ctx);
XMLPUBFUN int XMLCALL
isStandalone (void *ctx);
XMLPUBFUN int XMLCALL
hasInternalSubset (void *ctx);
XMLPUBFUN int XMLCALL
hasExternalSubset (void *ctx);
XMLPUBFUN void XMLCALL
internalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN void XMLCALL
externalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlEntityPtr XMLCALL
getEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL
getParameterEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlParserInputPtr XMLCALL
resolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void XMLCALL
entityDecl (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
XMLPUBFUN void XMLCALL
attributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
int type,
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
XMLPUBFUN void XMLCALL
elementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
XMLPUBFUN void XMLCALL
notationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void XMLCALL
unparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
XMLPUBFUN void XMLCALL
startDocument (void *ctx);
XMLPUBFUN void XMLCALL
endDocument (void *ctx);
XMLPUBFUN void XMLCALL
attribute (void *ctx,
const xmlChar *fullname,
const xmlChar *value);
XMLPUBFUN void XMLCALL
startElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
XMLPUBFUN void XMLCALL
endElement (void *ctx,
const xmlChar *name);
XMLPUBFUN void XMLCALL
reference (void *ctx,
const xmlChar *name);
XMLPUBFUN void XMLCALL
characters (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void XMLCALL
ignorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void XMLCALL
processingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
XMLPUBFUN void XMLCALL
globalNamespace (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
XMLPUBFUN void XMLCALL
setNamespace (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlNsPtr XMLCALL
getNamespace (void *ctx);
XMLPUBFUN int XMLCALL
checkNamespace (void *ctx,
xmlChar *nameSpace);
XMLPUBFUN void XMLCALL
namespaceDecl (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
XMLPUBFUN void XMLCALL
comment (void *ctx,
const xmlChar *value);
XMLPUBFUN void XMLCALL
cdataBlock (void *ctx,
const xmlChar *value,
int len);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN void XMLCALL
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
int warning);
#endif /* LIBXML_SAX1_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_LEGACY_ENABLED */
#endif /* __XML_SAX_H__ */ #endif /* __XML_SAX_H__ */

View File

@ -98,7 +98,7 @@ XMLPUBFUN void XMLCALL
xmlSAX2StartDocument (void *ctx); xmlSAX2StartDocument (void *ctx);
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
xmlSAX2EndDocument (void *ctx); xmlSAX2EndDocument (void *ctx);
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) #if defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
xmlSAX2StartElement (void *ctx, xmlSAX2StartElement (void *ctx,
const xmlChar *fullname, const xmlChar *fullname,
@ -106,7 +106,7 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
xmlSAX2EndElement (void *ctx, xmlSAX2EndElement (void *ctx,
const xmlChar *name); const xmlChar *name);
#endif /* LIBXML_SAX1_ENABLED */ #endif /* */
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
xmlSAX2StartElementNs (void *ctx, xmlSAX2StartElementNs (void *ctx,
const xmlChar *localname, const xmlChar *localname,
@ -145,10 +145,6 @@ XMLPUBFUN void XMLCALL
const xmlChar *value, const xmlChar *value,
int len); int len);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
xmlSAXDefaultVersion (int version);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL
xmlSAXVersion (xmlSAXHandler *hdlr, xmlSAXVersion (xmlSAXHandler *hdlr,

View File

@ -73,10 +73,6 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
* External functions: * External functions:
*/ */
#ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN void XMLCALL
xmlInitializePredefinedEntities (void);
#endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr XMLCALL
xmlNewEntity (xmlDocPtr doc, xmlNewEntity (xmlDocPtr doc,
@ -110,11 +106,6 @@ XMLPUBFUN xmlEntityPtr XMLCALL
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr XMLCALL
xmlGetParameterEntity (xmlDocPtr doc, xmlGetParameterEntity (xmlDocPtr doc,
const xmlChar *name); const xmlChar *name);
#ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN const xmlChar * XMLCALL
xmlEncodeEntities (xmlDocPtr doc,
const xmlChar *input);
#endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar * XMLCALL
xmlEncodeEntitiesReentrant(xmlDocPtr doc, xmlEncodeEntitiesReentrant(xmlDocPtr doc,
const xmlChar *input); const xmlChar *input);
@ -137,10 +128,6 @@ XMLPUBFUN void XMLCALL
xmlDumpEntityDecl (xmlBufferPtr buf, xmlDumpEntityDecl (xmlBufferPtr buf,
xmlEntityPtr ent); xmlEntityPtr ent);
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN void XMLCALL
xmlCleanupPredefinedEntities(void);
#endif /* LIBXML_LEGACY_ENABLED */
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -834,15 +834,6 @@ XMLPUBFUN int XMLCALL
/* /*
* Basic parsing Interfaces * Basic parsing Interfaces
*/ */
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseDoc (const xmlChar *cur);
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseFile (const char *filename);
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseMemory (const char *buffer,
int size);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL
xmlSubstituteEntitiesDefault(int val); xmlSubstituteEntitiesDefault(int val);
XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL
@ -854,18 +845,6 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL
xmlLineNumbersDefault (int val); xmlLineNumbersDefault (int val);
#ifdef LIBXML_SAX1_ENABLED
/*
* Recovery mode
*/
XMLPUBFUN xmlDocPtr XMLCALL
xmlRecoverDoc (const xmlChar *cur);
XMLPUBFUN xmlDocPtr XMLCALL
xmlRecoverMemory (const char *buffer,
int size);
XMLPUBFUN xmlDocPtr XMLCALL
xmlRecoverFile (const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
/* /*
* Less common routines and SAX interfaces * Less common routines and SAX interfaces
@ -874,46 +853,6 @@ XMLPUBFUN int XMLCALL
xmlParseDocument (xmlParserCtxtPtr ctxt); xmlParseDocument (xmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt); xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
void *user_data,
const char *filename);
XMLPUBFUN int XMLCALL
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
void *user_data,
const char *buffer,
int size);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
const xmlChar *cur,
int recovery);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
const char *buffer,
int size,
int recovery);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
const char *buffer,
int size,
int recovery,
void *data);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseFile (xmlSAXHandlerPtr sax,
const char *filename,
int recovery);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
const char *filename,
int recovery,
void *data);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseEntity (xmlSAXHandlerPtr sax,
const char *filename);
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseEntity (const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
#ifdef LIBXML_VALID_ENABLED #ifdef LIBXML_VALID_ENABLED
XMLPUBFUN xmlDtdPtr XMLCALL XMLPUBFUN xmlDtdPtr XMLCALL
@ -928,39 +867,12 @@ XMLPUBFUN xmlDtdPtr XMLCALL
xmlParserInputBufferPtr input, xmlParserInputBufferPtr input,
xmlCharEncoding enc); xmlCharEncoding enc);
#endif /* LIBXML_VALID_ENABLE */ #endif /* LIBXML_VALID_ENABLE */
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
xmlParseBalancedChunkMemory(xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
int depth,
const xmlChar *string,
xmlNodePtr *lst);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN xmlParserErrors XMLCALL XMLPUBFUN xmlParserErrors XMLCALL
xmlParseInNodeContext (xmlNodePtr node, xmlParseInNodeContext (xmlNodePtr node,
const char *data, const char *data,
int datalen, int datalen,
int options, int options,
xmlNodePtr *lst); xmlNodePtr *lst);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
int depth,
const xmlChar *string,
xmlNodePtr *lst,
int recover);
XMLPUBFUN int XMLCALL
xmlParseExternalEntity (xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
int depth,
const xmlChar *URL,
const xmlChar *ID,
xmlNodePtr *lst);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL
xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
const xmlChar *URL, const xmlChar *URL,
@ -978,31 +890,9 @@ XMLPUBFUN void XMLCALL
xmlClearParserCtxt (xmlParserCtxtPtr ctxt); xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN void XMLCALL
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
const xmlChar* buffer,
const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN xmlParserCtxtPtr XMLCALL XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateDocParserCtxt (const xmlChar *cur); xmlCreateDocParserCtxt (const xmlChar *cur);
#ifdef LIBXML_LEGACY_ENABLED
/*
* Reading/setting optional parsing features.
*/
XMLPUBFUN int XMLCALL
xmlGetFeaturesList (int *len,
const char **result);
XMLPUBFUN int XMLCALL
xmlGetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *result);
XMLPUBFUN int XMLCALL
xmlSetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *value);
#endif /* LIBXML_LEGACY_ENABLED */
#ifdef LIBXML_PUSH_ENABLED #ifdef LIBXML_PUSH_ENABLED
/* /*

View File

@ -425,15 +425,6 @@ XMLPUBFUN void XMLCALL
xmlParsePEReference (xmlParserCtxtPtr ctxt); xmlParsePEReference (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN const xmlChar * XMLCALL
xmlParseAttribute (xmlParserCtxtPtr ctxt,
xmlChar **value);
XMLPUBFUN const xmlChar * XMLCALL
xmlParseStartTag (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
xmlParseEndTag (xmlParserCtxtPtr ctxt);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
xmlParseCDSect (xmlParserCtxtPtr ctxt); xmlParseCDSect (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
@ -541,51 +532,6 @@ XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
* Specific function to keep track of entities references * Specific function to keep track of entities references
* and used by the XSLT debugger. * and used by the XSLT debugger.
*/ */
#ifdef LIBXML_LEGACY_ENABLED
/**
* xmlEntityReferenceFunc:
* @ent: the entity
* @firstNode: the fist node in the chunk
* @lastNode: the last nod in the chunk
*
* Callback function used when one needs to be able to track back the
* provenance of a chunk of nodes inherited from an entity replacement.
*/
typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
xmlNodePtr firstNode,
xmlNodePtr lastNode);
XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
XMLPUBFUN xmlChar * XMLCALL
xmlParseQuotedString (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
xmlParseNamespace (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
xmlScanName (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
xmlChar **prefix);
/**
* Entities
*/
XMLPUBFUN xmlChar * XMLCALL
xmlDecodeEntities (xmlParserCtxtPtr ctxt,
int len,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3);
XMLPUBFUN void XMLCALL
xmlHandleEntity (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
#endif /* LIBXML_LEGACY_ENABLED */
#ifdef IN_LIBXML #ifdef IN_LIBXML
/* /*

View File

@ -613,7 +613,7 @@ struct _xmlDOMWrapCtxt {
/* /*
* Some helper functions * Some helper functions
*/ */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN int XMLCALL XMLPUBFUN int XMLCALL
xmlValidateNCName (const xmlChar *value, xmlValidateNCName (const xmlChar *value,
int space); int space);
@ -714,12 +714,6 @@ XMLPUBFUN xmlDtdPtr XMLCALL
xmlGetIntSubset (xmlDocPtr doc); xmlGetIntSubset (xmlDocPtr doc);
XMLPUBFUN void XMLCALL XMLPUBFUN void XMLCALL
xmlFreeDtd (xmlDtdPtr cur); xmlFreeDtd (xmlDtdPtr cur);
#ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN xmlNsPtr XMLCALL
xmlNewGlobalNs (xmlDocPtr doc,
const xmlChar *href,
const xmlChar *prefix);
#endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlNsPtr XMLCALL XMLPUBFUN xmlNsPtr XMLCALL
xmlNewNs (xmlNodePtr node, xmlNewNs (xmlNodePtr node,
const xmlChar *href, const xmlChar *href,

View File

@ -142,15 +142,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#define LIBXML_WRITER_ENABLED #define LIBXML_WRITER_ENABLED
#endif #endif
/**
* LIBXML_SAX1_ENABLED:
*
* Whether the older SAX1 interface is configured in
*/
#if 1
#define LIBXML_SAX1_ENABLED
#endif
/** /**
* LIBXML_VALID_ENABLED: * LIBXML_VALID_ENABLED:
* *
@ -160,15 +151,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#define LIBXML_VALID_ENABLED #define LIBXML_VALID_ENABLED
#endif #endif
/**
* LIBXML_LEGACY_ENABLED:
*
* Whether the deprecated APIs are compiled in for compatibility
*/
#if 0
#define LIBXML_LEGACY_ENABLED
#endif
/** /**
* LIBXML_C14N_ENABLED: * LIBXML_C14N_ENABLED:
* *

File diff suppressed because it is too large Load Diff

View File

@ -1785,13 +1785,8 @@ xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
if (ctxt->encoding != NULL) xmlFree((char *) ctxt->encoding); if (ctxt->encoding != NULL) xmlFree((char *) ctxt->encoding);
if (ctxt->extSubURI != NULL) xmlFree((char *) ctxt->extSubURI); if (ctxt->extSubURI != NULL) xmlFree((char *) ctxt->extSubURI);
if (ctxt->extSubSystem != NULL) xmlFree((char *) ctxt->extSubSystem); if (ctxt->extSubSystem != NULL) xmlFree((char *) ctxt->extSubSystem);
#ifdef LIBXML_SAX1_ENABLED
if ((ctxt->sax != NULL) &&
(ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler))
#else
if (ctxt->sax != NULL) if (ctxt->sax != NULL)
#endif /* LIBXML_SAX1_ENABLED */ xmlFree(ctxt->sax);
xmlFree(ctxt->sax);
if (ctxt->directory != NULL) xmlFree((char *) ctxt->directory); if (ctxt->directory != NULL) xmlFree((char *) ctxt->directory);
if (ctxt->vctxt.nodeTab != NULL) xmlFree(ctxt->vctxt.nodeTab); if (ctxt->vctxt.nodeTab != NULL) xmlFree(ctxt->vctxt.nodeTab);
if (ctxt->atts != NULL) xmlFree((xmlChar * *)ctxt->atts); if (ctxt->atts != NULL) xmlFree((xmlChar * *)ctxt->atts);

View File

@ -343,7 +343,7 @@ xmlSplitQName3(const xmlChar *name, int *len) {
#define CUR_SCHAR(s, l) xmlStringCurrentChar(NULL, s, &l) #define CUR_SCHAR(s, l) xmlStringCurrentChar(NULL, s, &l)
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_WRITER_ENABLED) #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
/** /**
* xmlValidateNCName: * xmlValidateNCName:
* @value: the value to check * @value: the value to check

View File

@ -154,9 +154,6 @@ static int walker = 0;
#endif /* LIBXML_READER_ENABLED */ #endif /* LIBXML_READER_ENABLED */
static int chkregister = 0; static int chkregister = 0;
static int nbregister = 0; static int nbregister = 0;
#ifdef LIBXML_SAX1_ENABLED
static int sax1 = 0;
#endif /* LIBXML_SAX1_ENABLED */
static int options = XML_PARSE_COMPACT; static int options = XML_PARSE_COMPACT;
static int sax = 0; static int sax = 0;
static int oldxml10 = 0; static int oldxml10 = 0;
@ -1546,10 +1543,6 @@ testSAX(const char *filename) {
if (noout) { if (noout) {
handler = emptySAXHandler; handler = emptySAXHandler;
#ifdef LIBXML_SAX1_ENABLED
} else if (sax1) {
handler = debugSAXHandler;
#endif
} else { } else {
handler = debugSAX2Handler; handler = debugSAX2Handler;
} }
@ -1913,11 +1906,6 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
if (rectxt != NULL) if (rectxt != NULL)
doc = xmlCtxtReadFile(rectxt, filename, NULL, options); doc = xmlCtxtReadFile(rectxt, filename, NULL, options);
else { else {
#ifdef LIBXML_SAX1_ENABLED
if (sax1)
doc = xmlParseFile(filename);
else
#endif /* LIBXML_SAX1_ENABLED */
doc = xmlReadFile(filename, NULL, options); doc = xmlReadFile(filename, NULL, options);
} }
} }
@ -2381,9 +2369,6 @@ static void usage(const char *name) {
printf("\t--walker : create a reader and walk though the resulting doc\n"); printf("\t--walker : create a reader and walk though the resulting doc\n");
#endif /* LIBXML_READER_ENABLED */ #endif /* LIBXML_READER_ENABLED */
printf("\t--chkregister : verify the node registration code\n"); printf("\t--chkregister : verify the node registration code\n");
#ifdef LIBXML_SAX1_ENABLED
printf("\t--sax1: use the old SAX1 interfaces for processing\n");
#endif
printf("\t--sax: do not build a tree but work just at the SAX level\n"); printf("\t--sax: do not build a tree but work just at the SAX level\n");
printf("\t--oldxml10: use XML-1.0 parsing rules before the 5th edition\n"); printf("\t--oldxml10: use XML-1.0 parsing rules before the 5th edition\n");
@ -2635,13 +2620,6 @@ main(int argc, char **argv) {
noout++; noout++;
} }
#endif /* LIBXML_READER_ENABLED */ #endif /* LIBXML_READER_ENABLED */
#ifdef LIBXML_SAX1_ENABLED
else if ((!strcmp(argv[i], "-sax1")) ||
(!strcmp(argv[i], "--sax1"))) {
sax1++;
options |= XML_PARSE_SAX1;
}
#endif /* LIBXML_SAX1_ENABLED */
else if ((!strcmp(argv[i], "-sax")) || else if ((!strcmp(argv[i], "-sax")) ||
(!strcmp(argv[i], "--sax"))) { (!strcmp(argv[i], "--sax"))) {
sax++; sax++;
@ -2675,12 +2653,6 @@ main(int argc, char **argv) {
} }
#ifdef LIBXML_SAX1_ENABLED
if (sax1)
xmlSAXDefaultVersion(1);
else
xmlSAXDefaultVersion(2);
#endif /* LIBXML_SAX1_ENABLED */
if (chkregister) { if (chkregister) {
xmlRegisterNodeDefault(registerNode); xmlRegisterNodeDefault(registerNode);

View File

@ -1916,19 +1916,10 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
ret->sax->startElement = xmlTextReaderStartElement; ret->sax->startElement = xmlTextReaderStartElement;
ret->endElement = ret->sax->endElement; ret->endElement = ret->sax->endElement;
ret->sax->endElement = xmlTextReaderEndElement; ret->sax->endElement = xmlTextReaderEndElement;
#ifdef LIBXML_SAX1_ENABLED
if (ret->sax->initialized == XML_SAX2_MAGIC) {
#endif /* LIBXML_SAX1_ENABLED */
ret->startElementNs = ret->sax->startElementNs; ret->startElementNs = ret->sax->startElementNs;
ret->sax->startElementNs = xmlTextReaderStartElementNs; ret->sax->startElementNs = xmlTextReaderStartElementNs;
ret->endElementNs = ret->sax->endElementNs; ret->endElementNs = ret->sax->endElementNs;
ret->sax->endElementNs = xmlTextReaderEndElementNs; ret->sax->endElementNs = xmlTextReaderEndElementNs;
#ifdef LIBXML_SAX1_ENABLED
} else {
ret->startElementNs = NULL;
ret->endElementNs = NULL;
}
#endif /* LIBXML_SAX1_ENABLED */
ret->characters = ret->sax->characters; ret->characters = ret->sax->characters;
ret->sax->characters = xmlTextReaderCharacters; ret->sax->characters = xmlTextReaderCharacters;
ret->sax->ignorableWhitespace = xmlTextReaderCharacters; ret->sax->ignorableWhitespace = xmlTextReaderCharacters;
@ -4198,19 +4189,10 @@ xmlTextReaderSetup(xmlTextReaderPtr reader,
reader->sax->startElement = xmlTextReaderStartElement; reader->sax->startElement = xmlTextReaderStartElement;
reader->endElement = reader->sax->endElement; reader->endElement = reader->sax->endElement;
reader->sax->endElement = xmlTextReaderEndElement; reader->sax->endElement = xmlTextReaderEndElement;
#ifdef LIBXML_SAX1_ENABLED reader->startElementNs = reader->sax->startElementNs;
if (reader->sax->initialized == XML_SAX2_MAGIC) { reader->sax->startElementNs = xmlTextReaderStartElementNs;
#endif /* LIBXML_SAX1_ENABLED */ reader->endElementNs = reader->sax->endElementNs;
reader->startElementNs = reader->sax->startElementNs; reader->sax->endElementNs = xmlTextReaderEndElementNs;
reader->sax->startElementNs = xmlTextReaderStartElementNs;
reader->endElementNs = reader->sax->endElementNs;
reader->sax->endElementNs = xmlTextReaderEndElementNs;
#ifdef LIBXML_SAX1_ENABLED
} else {
reader->startElementNs = NULL;
reader->endElementNs = NULL;
}
#endif /* LIBXML_SAX1_ENABLED */
reader->characters = reader->sax->characters; reader->characters = reader->sax->characters;
reader->sax->characters = xmlTextReaderCharacters; reader->sax->characters = xmlTextReaderCharacters;
reader->sax->ignorableWhitespace = xmlTextReaderCharacters; reader->sax->ignorableWhitespace = xmlTextReaderCharacters;