(libxml2) Remove XInclude
This commit is contained in:
parent
9f123a54d9
commit
818a204fbc
|
@ -46,7 +46,6 @@ LOCAL_LIBXML_SRC_FILES = $(LIBXML_PATH)/c14n.c \
|
|||
$(LIBXML_PATH)/tree.c \
|
||||
$(LIBXML_PATH)/uri.c \
|
||||
$(LIBXML_PATH)/valid.c \
|
||||
$(LIBXML_PATH)/xinclude.c \
|
||||
$(LIBXML_PATH)/xmlIO.c \
|
||||
$(LIBXML_PATH)/xmlmemory.c \
|
||||
$(LIBXML_PATH)/xmlmodule.c \
|
||||
|
|
|
@ -1677,10 +1677,6 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur)
|
|||
case XML_ELEMENT_DECL:
|
||||
case XML_ATTRIBUTE_DECL:
|
||||
case XML_ENTITY_DECL:
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
case XML_XINCLUDE_START:
|
||||
case XML_XINCLUDE_END:
|
||||
#endif
|
||||
/*
|
||||
* should be ignored according to "W3C Canonical XML"
|
||||
*/
|
||||
|
|
|
@ -4639,7 +4639,7 @@ extern __typeof (xmlNodeListGetString) xmlNodeListGetString__internal_alias __at
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED)
|
||||
#ifdef bottom_tree
|
||||
#undef xmlNodeSetBase
|
||||
extern __typeof (xmlNodeSetBase) xmlNodeSetBase __attribute((alias("xmlNodeSetBase__internal_alias")));
|
||||
|
@ -8163,7 +8163,7 @@ extern __typeof (xmlSetNs) xmlSetNs__internal_alias __attribute((visibility("hid
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#ifdef bottom_tree
|
||||
#undef xmlSetNsProp
|
||||
extern __typeof (xmlSetNsProp) xmlSetNsProp __attribute((alias("xmlSetNsProp__internal_alias")));
|
||||
|
@ -8175,7 +8175,7 @@ extern __typeof (xmlSetNsProp) xmlSetNsProp__internal_alias __attribute((visibil
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#ifdef bottom_tree
|
||||
#undef xmlSetProp
|
||||
extern __typeof (xmlSetProp) xmlSetProp __attribute((alias("xmlSetProp__internal_alias")));
|
||||
|
@ -12969,127 +12969,6 @@ extern __typeof (xmlValidateRoot) xmlValidateRoot__internal_alias __attribute((v
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_xinclude
|
||||
#undef xmlXIncludeFreeContext
|
||||
extern __typeof (xmlXIncludeFreeContext) xmlXIncludeFreeContext __attribute((alias("xmlXIncludeFreeContext__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXIncludeFreeContext
|
||||
extern __typeof (xmlXIncludeFreeContext) xmlXIncludeFreeContext__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXIncludeFreeContext xmlXIncludeFreeContext__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_xinclude
|
||||
#undef xmlXIncludeNewContext
|
||||
extern __typeof (xmlXIncludeNewContext) xmlXIncludeNewContext __attribute((alias("xmlXIncludeNewContext__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXIncludeNewContext
|
||||
extern __typeof (xmlXIncludeNewContext) xmlXIncludeNewContext__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXIncludeNewContext xmlXIncludeNewContext__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_xinclude
|
||||
#undef xmlXIncludeProcess
|
||||
extern __typeof (xmlXIncludeProcess) xmlXIncludeProcess __attribute((alias("xmlXIncludeProcess__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXIncludeProcess
|
||||
extern __typeof (xmlXIncludeProcess) xmlXIncludeProcess__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXIncludeProcess xmlXIncludeProcess__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_xinclude
|
||||
#undef xmlXIncludeProcessFlags
|
||||
extern __typeof (xmlXIncludeProcessFlags) xmlXIncludeProcessFlags __attribute((alias("xmlXIncludeProcessFlags__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXIncludeProcessFlags
|
||||
extern __typeof (xmlXIncludeProcessFlags) xmlXIncludeProcessFlags__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXIncludeProcessFlags xmlXIncludeProcessFlags__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_xinclude
|
||||
#undef xmlXIncludeProcessFlagsData
|
||||
extern __typeof (xmlXIncludeProcessFlagsData) xmlXIncludeProcessFlagsData __attribute((alias("xmlXIncludeProcessFlagsData__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXIncludeProcessFlagsData
|
||||
extern __typeof (xmlXIncludeProcessFlagsData) xmlXIncludeProcessFlagsData__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXIncludeProcessFlagsData xmlXIncludeProcessFlagsData__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_xinclude
|
||||
#undef xmlXIncludeProcessNode
|
||||
extern __typeof (xmlXIncludeProcessNode) xmlXIncludeProcessNode __attribute((alias("xmlXIncludeProcessNode__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXIncludeProcessNode
|
||||
extern __typeof (xmlXIncludeProcessNode) xmlXIncludeProcessNode__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXIncludeProcessNode xmlXIncludeProcessNode__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_xinclude
|
||||
#undef xmlXIncludeProcessTree
|
||||
extern __typeof (xmlXIncludeProcessTree) xmlXIncludeProcessTree __attribute((alias("xmlXIncludeProcessTree__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXIncludeProcessTree
|
||||
extern __typeof (xmlXIncludeProcessTree) xmlXIncludeProcessTree__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXIncludeProcessTree xmlXIncludeProcessTree__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_xinclude
|
||||
#undef xmlXIncludeProcessTreeFlags
|
||||
extern __typeof (xmlXIncludeProcessTreeFlags) xmlXIncludeProcessTreeFlags __attribute((alias("xmlXIncludeProcessTreeFlags__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXIncludeProcessTreeFlags
|
||||
extern __typeof (xmlXIncludeProcessTreeFlags) xmlXIncludeProcessTreeFlags__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXIncludeProcessTreeFlags xmlXIncludeProcessTreeFlags__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_xinclude
|
||||
#undef xmlXIncludeProcessTreeFlagsData
|
||||
extern __typeof (xmlXIncludeProcessTreeFlagsData) xmlXIncludeProcessTreeFlagsData __attribute((alias("xmlXIncludeProcessTreeFlagsData__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXIncludeProcessTreeFlagsData
|
||||
extern __typeof (xmlXIncludeProcessTreeFlagsData) xmlXIncludeProcessTreeFlagsData__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXIncludeProcessTreeFlagsData xmlXIncludeProcessTreeFlagsData__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#ifdef bottom_xinclude
|
||||
#undef xmlXIncludeSetFlags
|
||||
extern __typeof (xmlXIncludeSetFlags) xmlXIncludeSetFlags __attribute((alias("xmlXIncludeSetFlags__internal_alias")));
|
||||
#else
|
||||
#ifndef xmlXIncludeSetFlags
|
||||
extern __typeof (xmlXIncludeSetFlags) xmlXIncludeSetFlags__internal_alias __attribute((visibility("hidden")));
|
||||
#define xmlXIncludeSetFlags xmlXIncludeSetFlags__internal_alias
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -534,36 +534,6 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
|
|||
if (file != NULL)
|
||||
to->file = (char *) xmlStrdup((const xmlChar *) file);
|
||||
else if (baseptr != NULL) {
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
/*
|
||||
* We check if the error is within an XInclude section and,
|
||||
* if so, attempt to print out the href of the XInclude instead
|
||||
* of the usual "base" (doc->URL) for the node (bug 152623).
|
||||
*/
|
||||
xmlNodePtr prev = baseptr;
|
||||
int inclcount = 0;
|
||||
while (prev != NULL) {
|
||||
if (prev->prev == NULL)
|
||||
prev = prev->parent;
|
||||
else {
|
||||
prev = prev->prev;
|
||||
if (prev->type == XML_XINCLUDE_START) {
|
||||
if (--inclcount < 0)
|
||||
break;
|
||||
} else if (prev->type == XML_XINCLUDE_END)
|
||||
inclcount++;
|
||||
}
|
||||
}
|
||||
if (prev != NULL) {
|
||||
if (prev->type == XML_XINCLUDE_START) {
|
||||
prev->type = XML_ELEMENT_NODE;
|
||||
to->file = (char *) xmlGetProp(prev, BAD_CAST "href");
|
||||
prev->type = XML_XINCLUDE_START;
|
||||
} else {
|
||||
to->file = (char *) xmlGetProp(prev, BAD_CAST "href");
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
to->file = (char *) xmlStrdup(baseptr->doc->URL);
|
||||
if ((to->file == NULL) && (node != NULL) && (node->doc != NULL)) {
|
||||
to->file = (char *) xmlStrdup(node->doc->URL);
|
||||
|
|
|
@ -960,7 +960,7 @@ XMLPUBFUN xmlNsPtr XMLCALL
|
|||
/*
|
||||
* Changing the content.
|
||||
*/
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlSetProp (xmlNodePtr node,
|
||||
const xmlChar *name,
|
||||
|
@ -970,7 +970,7 @@ XMLPUBFUN xmlAttrPtr XMLCALL
|
|||
xmlNsPtr ns,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
|
||||
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlGetNoNsProp (xmlNodePtr node,
|
||||
const xmlChar *name);
|
||||
|
@ -1041,7 +1041,7 @@ XMLPUBFUN void XMLCALL
|
|||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNodeGetBase (xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED)
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNodeSetBase (xmlNodePtr cur,
|
||||
const xmlChar *uri);
|
||||
|
|
|
@ -16,114 +16,5 @@
|
|||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* XINCLUDE_NS:
|
||||
*
|
||||
* Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
|
||||
*/
|
||||
#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
|
||||
/**
|
||||
* XINCLUDE_OLD_NS:
|
||||
*
|
||||
* Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
|
||||
*/
|
||||
#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
|
||||
/**
|
||||
* XINCLUDE_NODE:
|
||||
*
|
||||
* Macro defining "include"
|
||||
*/
|
||||
#define XINCLUDE_NODE (const xmlChar *) "include"
|
||||
/**
|
||||
* XINCLUDE_FALLBACK:
|
||||
*
|
||||
* Macro defining "fallback"
|
||||
*/
|
||||
#define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
|
||||
/**
|
||||
* XINCLUDE_HREF:
|
||||
*
|
||||
* Macro defining "href"
|
||||
*/
|
||||
#define XINCLUDE_HREF (const xmlChar *) "href"
|
||||
/**
|
||||
* XINCLUDE_PARSE:
|
||||
*
|
||||
* Macro defining "parse"
|
||||
*/
|
||||
#define XINCLUDE_PARSE (const xmlChar *) "parse"
|
||||
/**
|
||||
* XINCLUDE_PARSE_XML:
|
||||
*
|
||||
* Macro defining "xml"
|
||||
*/
|
||||
#define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
|
||||
/**
|
||||
* XINCLUDE_PARSE_TEXT:
|
||||
*
|
||||
* Macro defining "text"
|
||||
*/
|
||||
#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
|
||||
/**
|
||||
* XINCLUDE_PARSE_ENCODING:
|
||||
*
|
||||
* Macro defining "encoding"
|
||||
*/
|
||||
#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
|
||||
/**
|
||||
* XINCLUDE_PARSE_XPOINTER:
|
||||
*
|
||||
* Macro defining "xpointer"
|
||||
*/
|
||||
#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
|
||||
|
||||
typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
|
||||
typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
|
||||
|
||||
/*
|
||||
* standalone processing
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcess (xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessFlags (xmlDocPtr doc,
|
||||
int flags);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessFlagsData(xmlDocPtr doc,
|
||||
int flags,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
|
||||
int flags,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessTree (xmlNodePtr tree);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
|
||||
int flags);
|
||||
/*
|
||||
* contextual processing
|
||||
*/
|
||||
XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL
|
||||
xmlXIncludeNewContext (xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
|
||||
int flags);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
|
||||
xmlNodePtr tree);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_XINCLUDE_ENABLED */
|
||||
|
||||
#endif /* __XML_XINCLUDE_H__ */
|
||||
|
|
|
@ -178,15 +178,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||
#define LIBXML_C14N_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_XINCLUDE_ENABLED:
|
||||
*
|
||||
* Whether XInclude is configured in
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_XINCLUDE_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ICONV_ENABLED:
|
||||
*
|
||||
|
|
|
@ -844,11 +844,7 @@ xmlHasFeature(xmlFeature feature)
|
|||
case XML_WITH_XPTR:
|
||||
return(0);
|
||||
case XML_WITH_XINCLUDE:
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
return(1);
|
||||
#else
|
||||
return(0);
|
||||
#endif
|
||||
case XML_WITH_ICONV:
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
return(1);
|
||||
|
|
|
@ -5033,7 +5033,7 @@ xmlNodeSetName(xmlNodePtr cur, const xmlChar *name) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED)
|
||||
/**
|
||||
* xmlNodeSetBase:
|
||||
* @cur: the node being changed
|
||||
|
@ -6618,7 +6618,7 @@ xmlUnsetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
/**
|
||||
* xmlSetProp:
|
||||
* @node: the node
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -77,9 +77,6 @@
|
|||
#include <libxml/xpath.h>
|
||||
#include <libxml/debugXML.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
#include <libxml/xinclude.h>
|
||||
#endif
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/xmlreader.h>
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
|
@ -150,9 +147,6 @@ static int memory = 0;
|
|||
#endif
|
||||
static int testIO = 0;
|
||||
static char *encoding = NULL;
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
static int xinclude = 0;
|
||||
#endif
|
||||
static int dtdattrs = 0;
|
||||
static int loaddtd = 0;
|
||||
static xmllintReturnCode progresult = XMLLINT_RETURN_OK;
|
||||
|
@ -2039,18 +2033,6 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
if (xinclude) {
|
||||
if ((timing) && (!repeat)) {
|
||||
startTimer();
|
||||
}
|
||||
if (xmlXIncludeProcessFlags(doc, options) < 0)
|
||||
progresult = XMLLINT_ERR_UNCLASS;
|
||||
if ((timing) && (!repeat)) {
|
||||
endTimer("Xinclude processing");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
/*
|
||||
|
@ -2536,11 +2518,6 @@ static void usage(const char *name) {
|
|||
printf("\t--nsclean : remove redundant namespace declarations\n");
|
||||
printf("\t--testIO : test user I/O support\n");
|
||||
printf("\t--auto : generate a small doc on the fly\n");
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
printf("\t--xinclude : do XInclude processing\n");
|
||||
printf("\t--noxincludenode : same but do not generate XInclude nodes\n");
|
||||
printf("\t--nofixup-base-uris : do not fixup xml:base uris\n");
|
||||
#endif
|
||||
printf("\t--loaddtd : fetch external DTD\n");
|
||||
printf("\t--dtdattr : loaddtd + populate the tree with inherited attributes \n");
|
||||
#ifdef LIBXML_READER_ENABLED
|
||||
|
@ -2714,25 +2691,6 @@ main(int argc, char **argv) {
|
|||
else if ((!strcmp(argv[i], "-testIO")) ||
|
||||
(!strcmp(argv[i], "--testIO")))
|
||||
testIO++;
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
else if ((!strcmp(argv[i], "-xinclude")) ||
|
||||
(!strcmp(argv[i], "--xinclude"))) {
|
||||
xinclude++;
|
||||
options |= XML_PARSE_XINCLUDE;
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-noxincludenode")) ||
|
||||
(!strcmp(argv[i], "--noxincludenode"))) {
|
||||
xinclude++;
|
||||
options |= XML_PARSE_XINCLUDE;
|
||||
options |= XML_PARSE_NOXINCNODE;
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-nofixup-base-uris")) ||
|
||||
(!strcmp(argv[i], "--nofixup-base-uris"))) {
|
||||
xinclude++;
|
||||
options |= XML_PARSE_XINCLUDE;
|
||||
options |= XML_PARSE_NOBASEFIX;
|
||||
}
|
||||
#endif
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
#ifdef HAVE_ZLIB_H
|
||||
else if ((!strcmp(argv[i], "-compress")) ||
|
||||
|
|
|
@ -37,9 +37,6 @@
|
|||
#include <libxml/xmlschemas.h>
|
||||
#endif
|
||||
#include <libxml/uri.h>
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
#include <libxml/xinclude.h>
|
||||
#endif
|
||||
|
||||
#define MAX_ERR_MSG_SIZE 64000
|
||||
|
||||
|
@ -157,13 +154,6 @@ struct _xmlTextReader {
|
|||
int xsdPreserveCtxt; /* 1 if the context was provided by the user */
|
||||
int xsdValidErrors;/* The number of errors detected */
|
||||
xmlSchemaSAXPlugPtr xsdPlug; /* the schemas plug in SAX pipeline */
|
||||
#endif
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
/* Handling of XInclude processing */
|
||||
int xinclude; /* is xinclude asked for */
|
||||
const xmlChar * xinclude_name; /* the xinclude name from dict */
|
||||
xmlXIncludeCtxtPtr xincctxt; /* the xinclude context */
|
||||
int in_xinclude; /* counts for xinclude */
|
||||
#endif
|
||||
int preserves; /* level of preserves */
|
||||
int parserFlags; /* the set of options set */
|
||||
|
@ -1353,9 +1343,6 @@ get_next_node:
|
|||
(reader->node->type == XML_ELEMENT_NODE) &&
|
||||
(reader->node->children == NULL) &&
|
||||
((reader->node->extra & NODE_IS_EMPTY) == 0)
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
&& (reader->in_xinclude <= 0)
|
||||
#endif
|
||||
) {
|
||||
reader->state = XML_TEXTREADER_END;
|
||||
goto node_found;
|
||||
|
@ -1375,9 +1362,6 @@ get_next_node:
|
|||
* Cleanup of the old node
|
||||
*/
|
||||
if ((reader->preserves == 0) &&
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
(reader->in_xinclude == 0) &&
|
||||
#endif
|
||||
(reader->entNr == 0) &&
|
||||
(reader->node->prev != NULL) &&
|
||||
(reader->node->prev->type != XML_DTD_NODE) &&
|
||||
|
@ -1422,9 +1406,6 @@ get_next_node:
|
|||
* Cleanup of the old node
|
||||
*/
|
||||
if ((oldnode != NULL) && (reader->preserves == 0) &&
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
(reader->in_xinclude == 0) &&
|
||||
#endif
|
||||
(reader->entNr == 0) &&
|
||||
(oldnode->type != XML_DTD_NODE) &&
|
||||
((oldnode->extra & NODE_IS_PRESERVED) == 0) &&
|
||||
|
@ -1436,9 +1417,6 @@ get_next_node:
|
|||
goto node_end;
|
||||
}
|
||||
if ((reader->preserves == 0) &&
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
(reader->in_xinclude == 0) &&
|
||||
#endif
|
||||
(reader->entNr == 0) &&
|
||||
(reader->node->last != NULL) &&
|
||||
((reader->node->last->extra & NODE_IS_PRESERVED) == 0)) {
|
||||
|
@ -1463,36 +1441,6 @@ node_found:
|
|||
return -1;
|
||||
}
|
||||
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
/*
|
||||
* Handle XInclude if asked for
|
||||
*/
|
||||
if ((reader->xinclude) && (reader->node != NULL) &&
|
||||
(reader->node->type == XML_ELEMENT_NODE) &&
|
||||
(reader->node->ns != NULL) &&
|
||||
((xmlStrEqual(reader->node->ns->href, XINCLUDE_NS)) ||
|
||||
(xmlStrEqual(reader->node->ns->href, XINCLUDE_OLD_NS)))) {
|
||||
if (reader->xincctxt == NULL) {
|
||||
reader->xincctxt = xmlXIncludeNewContext(reader->ctxt->myDoc);
|
||||
xmlXIncludeSetFlags(reader->xincctxt,
|
||||
reader->parserFlags & (~XML_PARSE_NOXINCNODE));
|
||||
}
|
||||
/*
|
||||
* expand that node and process it
|
||||
*/
|
||||
if (xmlTextReaderExpand(reader) == NULL)
|
||||
return -1;
|
||||
xmlXIncludeProcessNode(reader->xincctxt, reader->node);
|
||||
}
|
||||
if ((reader->node != NULL) && (reader->node->type == XML_XINCLUDE_START)) {
|
||||
reader->in_xinclude++;
|
||||
goto get_next_node;
|
||||
}
|
||||
if ((reader->node != NULL) && (reader->node->type == XML_XINCLUDE_END)) {
|
||||
reader->in_xinclude--;
|
||||
goto get_next_node;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Handle entities enter and exit when in entity replacement mode
|
||||
*/
|
||||
|
@ -2102,9 +2050,6 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
|
|||
*/
|
||||
ret->ctxt->docdict = 1;
|
||||
ret->dict = ret->ctxt->dict;
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
ret->xinclude = 0;
|
||||
#endif
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
@ -2172,10 +2117,6 @@ xmlFreeTextReader(xmlTextReaderPtr reader) {
|
|||
xmlSchemaFree(reader->xsdSchemas);
|
||||
reader->xsdSchemas = NULL;
|
||||
}
|
||||
#endif
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
if (reader->xincctxt != NULL)
|
||||
xmlXIncludeFreeContext(reader->xincctxt);
|
||||
#endif
|
||||
if (reader->faketext != NULL) {
|
||||
xmlFreeNode(reader->faketext);
|
||||
|
@ -3011,10 +2952,6 @@ xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader) {
|
|||
return(0);
|
||||
if (reader->doc != NULL)
|
||||
return(1);
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
if (reader->in_xinclude > 0)
|
||||
return(1);
|
||||
#endif
|
||||
return((reader->node->extra & NODE_IS_EMPTY) != 0);
|
||||
}
|
||||
|
||||
|
@ -4974,20 +4911,6 @@ xmlTextReaderSetup(xmlTextReaderPtr reader,
|
|||
reader->ctxt->docdict = 1;
|
||||
reader->ctxt->parseMode = XML_PARSE_READER;
|
||||
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
if (reader->xincctxt != NULL) {
|
||||
xmlXIncludeFreeContext(reader->xincctxt);
|
||||
reader->xincctxt = NULL;
|
||||
}
|
||||
if (options & XML_PARSE_XINCLUDE) {
|
||||
reader->xinclude = 1;
|
||||
reader->xinclude_name = xmlDictLookup(reader->dict, XINCLUDE_NODE, -1);
|
||||
options -= XML_PARSE_XINCLUDE;
|
||||
} else
|
||||
reader->xinclude = 0;
|
||||
reader->in_xinclude = 0;
|
||||
#endif
|
||||
|
||||
if (options & XML_PARSE_DTDVALID)
|
||||
reader->validate = XML_TEXTREADER_VALIDATE_DTD;
|
||||
|
||||
|
|
Loading…
Reference in New Issue