mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-07 06:43:02 +03:00
Adding a configure option to remove tree manipulation code which is not
* configure.in entities.c tree.c valid.c xmllint.c include/libxml/tree.h include/libxml/xmlversion.h.in: Adding a configure option to remove tree manipulation code which is not strictly needed by the parser. Daniel
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
Mon Sep 29 19:58:26 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* configure.in entities.c tree.c valid.c xmllint.c
|
||||||
|
include/libxml/tree.h include/libxml/xmlversion.h.in:
|
||||||
|
Adding a configure option to remove tree manipulation
|
||||||
|
code which is not strictly needed by the parser.
|
||||||
|
|
||||||
Mon Sep 29 15:23:41 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
Mon Sep 29 15:23:41 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* nanoftp.c nanohttp.c: last finishing touch to the BeOS
|
* nanoftp.c nanohttp.c: last finishing touch to the BeOS
|
||||||
|
18
configure.in
18
configure.in
@@ -528,7 +528,7 @@ if test "$with_history" = "yes" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH(output,
|
AC_ARG_WITH(output,
|
||||||
[ --with-output add the serialization support (on)])
|
[ --with-output add the serialization support (on)])
|
||||||
if test "$with_minimum" = "yes" -a "$with_output" = ""
|
if test "$with_minimum" = "yes" -a "$with_output" = ""
|
||||||
then
|
then
|
||||||
with_output=no
|
with_output=no
|
||||||
@@ -541,6 +541,20 @@ else
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(WITH_OUTPUT)
|
AC_SUBST(WITH_OUTPUT)
|
||||||
|
|
||||||
|
AC_ARG_WITH(tree,
|
||||||
|
[ --with-tree add the DOM like tree manipulation APIs (on)])
|
||||||
|
if test "$with_minimum" = "yes" -a "$with_tree" = ""
|
||||||
|
then
|
||||||
|
with_tree=no
|
||||||
|
fi
|
||||||
|
if test "$with_tree" = "no" ; then
|
||||||
|
echo Disabling DOM like tree manipulation APIs
|
||||||
|
WITH_TREE=0
|
||||||
|
else
|
||||||
|
WITH_TREE=1
|
||||||
|
fi
|
||||||
|
AC_SUBST(WITH_TREE)
|
||||||
|
|
||||||
AC_ARG_WITH(ftp,
|
AC_ARG_WITH(ftp,
|
||||||
[ --with-ftp add the FTP support (on)])
|
[ --with-ftp add the FTP support (on)])
|
||||||
if test "$with_minimum" = "yes" -a "$with_ftp" = ""
|
if test "$with_minimum" = "yes" -a "$with_ftp" = ""
|
||||||
@@ -596,7 +610,7 @@ AC_SUBST(HTML_OBJ)
|
|||||||
AC_SUBST(TEST_HTML)
|
AC_SUBST(TEST_HTML)
|
||||||
|
|
||||||
AC_ARG_WITH(legacy,
|
AC_ARG_WITH(legacy,
|
||||||
[ --with-legacy add deprecated APIs for compatibility (on)])
|
[ --with-legacy add deprecated APIs for compatibility (on)])
|
||||||
if test "$with_minimum" = "yes" -a "$with_legacy" = ""
|
if test "$with_minimum" = "yes" -a "$with_legacy" = ""
|
||||||
then
|
then
|
||||||
with_legacy=no
|
with_legacy=no
|
||||||
|
@@ -704,6 +704,7 @@ xmlFreeEntitiesTable(xmlEntitiesTablePtr table) {
|
|||||||
xmlHashFree(table, (xmlHashDeallocator) xmlFreeEntityWrapper);
|
xmlHashFree(table, (xmlHashDeallocator) xmlFreeEntityWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlCopyEntity:
|
* xmlCopyEntity:
|
||||||
* @ent: An entity
|
* @ent: An entity
|
||||||
@@ -753,6 +754,7 @@ xmlEntitiesTablePtr
|
|||||||
xmlCopyEntitiesTable(xmlEntitiesTablePtr table) {
|
xmlCopyEntitiesTable(xmlEntitiesTablePtr table) {
|
||||||
return(xmlHashCopy(table, (xmlHashCopier) xmlCopyEntity));
|
return(xmlHashCopy(table, (xmlHashCopier) xmlCopyEntity));
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
/**
|
/**
|
||||||
|
@@ -677,11 +677,13 @@ XMLPUBFUN xmlAttrPtr XMLCALL
|
|||||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||||
xmlCopyPropList (xmlNodePtr target,
|
xmlCopyPropList (xmlNodePtr target,
|
||||||
xmlAttrPtr cur);
|
xmlAttrPtr cur);
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||||
xmlCopyDtd (xmlDtdPtr dtd);
|
xmlCopyDtd (xmlDtdPtr dtd);
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlCopyDoc (xmlDocPtr doc,
|
xmlCopyDoc (xmlDocPtr doc,
|
||||||
int recursive);
|
int recursive);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Creating new nodes.
|
* Creating new nodes.
|
||||||
@@ -756,16 +758,20 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||||||
int recursive);
|
int recursive);
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlCopyNodeList (const xmlNodePtr node);
|
xmlCopyNodeList (const xmlNodePtr node);
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlNewDocFragment (xmlDocPtr doc);
|
xmlNewDocFragment (xmlDocPtr doc);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Navigating.
|
* Navigating.
|
||||||
*/
|
*/
|
||||||
XMLPUBFUN long XMLCALL
|
XMLPUBFUN long XMLCALL
|
||||||
xmlGetLineNo (xmlNodePtr node);
|
xmlGetLineNo (xmlNodePtr node);
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlGetNodePath (xmlNodePtr node);
|
xmlGetNodePath (xmlNodePtr node);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlDocGetRootElement (xmlDocPtr doc);
|
xmlDocGetRootElement (xmlDocPtr doc);
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
@@ -775,6 +781,7 @@ XMLPUBFUN int XMLCALL
|
|||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlIsBlankNode (xmlNodePtr node);
|
xmlIsBlankNode (xmlNodePtr node);
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/*
|
/*
|
||||||
* Changing the structure.
|
* Changing the structure.
|
||||||
*/
|
*/
|
||||||
@@ -784,21 +791,24 @@ XMLPUBFUN xmlNodePtr XMLCALL
|
|||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlNodeSetName (xmlNodePtr cur,
|
xmlNodeSetName (xmlNodePtr cur,
|
||||||
const xmlChar *name);
|
const xmlChar *name);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlAddChild (xmlNodePtr parent,
|
xmlAddChild (xmlNodePtr parent,
|
||||||
xmlNodePtr cur);
|
xmlNodePtr cur);
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlAddChildList (xmlNodePtr parent,
|
xmlAddChildList (xmlNodePtr parent,
|
||||||
xmlNodePtr cur);
|
xmlNodePtr cur);
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlReplaceNode (xmlNodePtr old,
|
xmlReplaceNode (xmlNodePtr old,
|
||||||
xmlNodePtr cur);
|
xmlNodePtr cur);
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
|
||||||
xmlAddSibling (xmlNodePtr cur,
|
|
||||||
xmlNodePtr elem);
|
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlAddPrevSibling (xmlNodePtr cur,
|
xmlAddPrevSibling (xmlNodePtr cur,
|
||||||
xmlNodePtr elem);
|
xmlNodePtr elem);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
|
xmlAddSibling (xmlNodePtr cur,
|
||||||
|
xmlNodePtr elem);
|
||||||
XMLPUBFUN xmlNodePtr XMLCALL
|
XMLPUBFUN xmlNodePtr XMLCALL
|
||||||
xmlAddNextSibling (xmlNodePtr cur,
|
xmlAddNextSibling (xmlNodePtr cur,
|
||||||
xmlNodePtr elem);
|
xmlNodePtr elem);
|
||||||
@@ -821,7 +831,6 @@ XMLPUBFUN void XMLCALL
|
|||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSetListDoc (xmlNodePtr list,
|
xmlSetListDoc (xmlNodePtr list,
|
||||||
xmlDocPtr doc);
|
xmlDocPtr doc);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Namespaces.
|
* Namespaces.
|
||||||
*/
|
*/
|
||||||
@@ -833,9 +842,12 @@ XMLPUBFUN xmlNsPtr XMLCALL
|
|||||||
xmlSearchNsByHref (xmlDocPtr doc,
|
xmlSearchNsByHref (xmlDocPtr doc,
|
||||||
xmlNodePtr node,
|
xmlNodePtr node,
|
||||||
const xmlChar *href);
|
const xmlChar *href);
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN xmlNsPtr * XMLCALL
|
XMLPUBFUN xmlNsPtr * XMLCALL
|
||||||
xmlGetNsList (xmlDocPtr doc,
|
xmlGetNsList (xmlDocPtr doc,
|
||||||
xmlNodePtr node);
|
xmlNodePtr node);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSetNs (xmlNodePtr node,
|
xmlSetNs (xmlNodePtr node,
|
||||||
xmlNsPtr ns);
|
xmlNsPtr ns);
|
||||||
@@ -847,16 +859,18 @@ XMLPUBFUN xmlNsPtr XMLCALL
|
|||||||
/*
|
/*
|
||||||
* Changing the content.
|
* Changing the content.
|
||||||
*/
|
*/
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||||
xmlSetProp (xmlNodePtr node,
|
xmlSetProp (xmlNodePtr node,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
const xmlChar *value);
|
const xmlChar *value);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
xmlGetProp (xmlNodePtr node,
|
|
||||||
const xmlChar *name);
|
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlGetNoNsProp (xmlNodePtr node,
|
xmlGetNoNsProp (xmlNodePtr node,
|
||||||
const xmlChar *name);
|
const xmlChar *name);
|
||||||
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
|
xmlGetProp (xmlNodePtr node,
|
||||||
|
const xmlChar *name);
|
||||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||||
xmlHasProp (xmlNodePtr node,
|
xmlHasProp (xmlNodePtr node,
|
||||||
const xmlChar *name);
|
const xmlChar *name);
|
||||||
@@ -864,11 +878,13 @@ XMLPUBFUN xmlAttrPtr XMLCALL
|
|||||||
xmlHasNsProp (xmlNodePtr node,
|
xmlHasNsProp (xmlNodePtr node,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
const xmlChar *nameSpace);
|
const xmlChar *nameSpace);
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||||
xmlSetNsProp (xmlNodePtr node,
|
xmlSetNsProp (xmlNodePtr node,
|
||||||
xmlNsPtr ns,
|
xmlNsPtr ns,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
const xmlChar *value);
|
const xmlChar *value);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlGetNsProp (xmlNodePtr node,
|
xmlGetNsProp (xmlNodePtr node,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
@@ -884,17 +900,21 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||||||
xmlNodeListGetString (xmlDocPtr doc,
|
xmlNodeListGetString (xmlDocPtr doc,
|
||||||
xmlNodePtr list,
|
xmlNodePtr list,
|
||||||
int inLine);
|
int inLine);
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlNodeListGetRawString (xmlDocPtr doc,
|
xmlNodeListGetRawString (xmlDocPtr doc,
|
||||||
xmlNodePtr list,
|
xmlNodePtr list,
|
||||||
int inLine);
|
int inLine);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlNodeSetContent (xmlNodePtr cur,
|
xmlNodeSetContent (xmlNodePtr cur,
|
||||||
const xmlChar *content);
|
const xmlChar *content);
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlNodeSetContentLen (xmlNodePtr cur,
|
xmlNodeSetContentLen (xmlNodePtr cur,
|
||||||
const xmlChar *content,
|
const xmlChar *content,
|
||||||
int len);
|
int len);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlNodeAddContent (xmlNodePtr cur,
|
xmlNodeAddContent (xmlNodePtr cur,
|
||||||
const xmlChar *content);
|
const xmlChar *content);
|
||||||
@@ -906,17 +926,20 @@ XMLPUBFUN xmlChar * XMLCALL
|
|||||||
xmlNodeGetContent (xmlNodePtr cur);
|
xmlNodeGetContent (xmlNodePtr cur);
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlNodeGetLang (xmlNodePtr cur);
|
xmlNodeGetLang (xmlNodePtr cur);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlNodeGetSpacePreserve (xmlNodePtr cur);
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlNodeSetLang (xmlNodePtr cur,
|
xmlNodeSetLang (xmlNodePtr cur,
|
||||||
const xmlChar *lang);
|
const xmlChar *lang);
|
||||||
XMLPUBFUN int XMLCALL
|
|
||||||
xmlNodeGetSpacePreserve (xmlNodePtr cur);
|
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlNodeSetSpacePreserve (xmlNodePtr cur,
|
xmlNodeSetSpacePreserve (xmlNodePtr cur,
|
||||||
int val);
|
int val);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
XMLPUBFUN xmlChar * XMLCALL
|
XMLPUBFUN xmlChar * XMLCALL
|
||||||
xmlNodeGetBase (xmlDocPtr doc,
|
xmlNodeGetBase (xmlDocPtr doc,
|
||||||
xmlNodePtr cur);
|
xmlNodePtr cur);
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlNodeSetBase (xmlNodePtr cur,
|
xmlNodeSetBase (xmlNodePtr cur,
|
||||||
const xmlChar *uri);
|
const xmlChar *uri);
|
||||||
@@ -933,6 +956,7 @@ XMLPUBFUN int XMLCALL
|
|||||||
xmlUnsetNsProp (xmlNodePtr node,
|
xmlUnsetNsProp (xmlNodePtr node,
|
||||||
xmlNsPtr ns,
|
xmlNsPtr ns,
|
||||||
const xmlChar *name);
|
const xmlChar *name);
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Internal, don't use.
|
* Internal, don't use.
|
||||||
|
@@ -83,6 +83,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LIBXML_TREE_ENABLED:
|
||||||
|
*
|
||||||
|
* Whether the DOM like tree manipulation API support is configured in
|
||||||
|
*/
|
||||||
|
#if @WITH_TREE@
|
||||||
|
#define LIBXML_TREE_ENABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LIBXML_OUTPUT_ENABLED:
|
* LIBXML_OUTPUT_ENABLED:
|
||||||
*
|
*
|
||||||
|
61
tree.c
61
tree.c
@@ -82,6 +82,7 @@ static int xmlCheckDTD = 1;
|
|||||||
************************************************************************/
|
************************************************************************/
|
||||||
#include <libxml/hash.h>
|
#include <libxml/hash.h>
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlGetEntityFromDtd:
|
* xmlGetEntityFromDtd:
|
||||||
* @dtd: A pointer to the DTD to search
|
* @dtd: A pointer to the DTD to search
|
||||||
@@ -124,6 +125,7 @@ xmlGetParameterEntityFromDtd(xmlDtdPtr dtd, const xmlChar *name) {
|
|||||||
}
|
}
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
@@ -273,6 +275,7 @@ xmlSplitQName3(const xmlChar *name, int *len) {
|
|||||||
return(&name[l+1]);
|
return(&name[l+1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
* Check Name, NCName and QName strings *
|
* Check Name, NCName and QName strings *
|
||||||
@@ -582,6 +585,7 @@ try_complex:
|
|||||||
return(1);
|
return(1);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
@@ -1542,6 +1546,8 @@ xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine)
|
|||||||
}
|
}
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlNodeListGetRawString:
|
* xmlNodeListGetRawString:
|
||||||
* @doc: the document
|
* @doc: the document
|
||||||
@@ -1623,7 +1629,9 @@ xmlNodeListGetRawString(xmlDocPtr doc, xmlNodePtr list, int inLine)
|
|||||||
}
|
}
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlNewProp:
|
* xmlNewProp:
|
||||||
* @node: the holding node
|
* @node: the holding node
|
||||||
@@ -1703,6 +1711,7 @@ xmlNewProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) {
|
|||||||
xmlRegisterNodeDefaultValue((xmlNodePtr)cur);
|
xmlRegisterNodeDefaultValue((xmlNodePtr)cur);
|
||||||
return(cur);
|
return(cur);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNewNsProp:
|
* xmlNewNsProp:
|
||||||
@@ -1965,6 +1974,7 @@ xmlFreeProp(xmlAttrPtr cur) {
|
|||||||
xmlFree(cur);
|
xmlFree(cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlRemoveProp:
|
* xmlRemoveProp:
|
||||||
* @cur: an attribute
|
* @cur: an attribute
|
||||||
@@ -2013,6 +2023,7 @@ xmlRemoveProp(xmlAttrPtr cur) {
|
|||||||
#endif
|
#endif
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNewPI:
|
* xmlNewPI:
|
||||||
@@ -2204,7 +2215,7 @@ xmlNewDocNodeEatName(xmlDocPtr doc, xmlNsPtr ns,
|
|||||||
return(cur);
|
return(cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlNewDocRawNode:
|
* xmlNewDocRawNode:
|
||||||
* @doc: the document
|
* @doc: the document
|
||||||
@@ -2262,6 +2273,7 @@ xmlNewDocFragment(xmlDocPtr doc) {
|
|||||||
xmlRegisterNodeDefaultValue(cur);
|
xmlRegisterNodeDefaultValue(cur);
|
||||||
return(cur);
|
return(cur);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNewText:
|
* xmlNewText:
|
||||||
@@ -2296,6 +2308,7 @@ xmlNewText(const xmlChar *content) {
|
|||||||
return(cur);
|
return(cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlNewTextChild:
|
* xmlNewTextChild:
|
||||||
* @parent: the parent node
|
* @parent: the parent node
|
||||||
@@ -2357,6 +2370,7 @@ xmlNewTextChild(xmlNodePtr parent, xmlNsPtr ns,
|
|||||||
|
|
||||||
return(cur);
|
return(cur);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNewCharRef:
|
* xmlNewCharRef:
|
||||||
@@ -2657,7 +2671,7 @@ xmlSetListDoc(xmlNodePtr list, xmlDocPtr doc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlNewChild:
|
* xmlNewChild:
|
||||||
* @parent: the parent node
|
* @parent: the parent node
|
||||||
@@ -2735,6 +2749,7 @@ xmlNewChild(xmlNodePtr parent, xmlNsPtr ns,
|
|||||||
|
|
||||||
return(cur);
|
return(cur);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlAddNextSibling:
|
* xmlAddNextSibling:
|
||||||
@@ -2814,6 +2829,7 @@ xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) {
|
|||||||
return(elem);
|
return(elem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlAddPrevSibling:
|
* xmlAddPrevSibling:
|
||||||
* @cur: the child node
|
* @cur: the child node
|
||||||
@@ -2900,6 +2916,7 @@ xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) {
|
|||||||
}
|
}
|
||||||
return(elem);
|
return(elem);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlAddSibling:
|
* xmlAddSibling:
|
||||||
@@ -3363,6 +3380,7 @@ xmlUnlinkNode(xmlNodePtr cur) {
|
|||||||
cur->next = cur->prev = NULL;
|
cur->next = cur->prev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlReplaceNode:
|
* xmlReplaceNode:
|
||||||
* @old: the old node
|
* @old: the old node
|
||||||
@@ -3428,6 +3446,7 @@ xmlReplaceNode(xmlNodePtr old, xmlNodePtr cur) {
|
|||||||
old->parent = NULL;
|
old->parent = NULL;
|
||||||
return(old);
|
return(old);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
@@ -3517,15 +3536,7 @@ xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) {
|
|||||||
|
|
||||||
if ((cur->ns != NULL) && (target != NULL)) {
|
if ((cur->ns != NULL) && (target != NULL)) {
|
||||||
xmlNsPtr ns;
|
xmlNsPtr ns;
|
||||||
/*
|
|
||||||
* if (target->doc)
|
|
||||||
* ns = xmlSearchNs(target->doc, target, cur->ns->prefix);
|
|
||||||
* else if (cur->doc) / * target may not yet have a doc : KPI * /
|
|
||||||
* ns = xmlSearchNs(cur->doc, target, cur->ns->prefix);
|
|
||||||
* else
|
|
||||||
* ns = NULL;
|
|
||||||
* ret->ns = ns;
|
|
||||||
*/
|
|
||||||
ns = xmlSearchNs(target->doc, target, cur->ns->prefix);
|
ns = xmlSearchNs(target->doc, target, cur->ns->prefix);
|
||||||
if (ns == NULL) {
|
if (ns == NULL) {
|
||||||
/*
|
/*
|
||||||
@@ -3672,7 +3683,9 @@ xmlStaticCopyNode(const xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent,
|
|||||||
#ifdef LIBXML_DOCB_ENABLED
|
#ifdef LIBXML_DOCB_ENABLED
|
||||||
case XML_DOCB_DOCUMENT_NODE:
|
case XML_DOCB_DOCUMENT_NODE:
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
return((xmlNodePtr) xmlCopyDoc((xmlDocPtr) node, recursive));
|
return((xmlNodePtr) xmlCopyDoc((xmlDocPtr) node, recursive));
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
case XML_DOCUMENT_TYPE_NODE:
|
case XML_DOCUMENT_TYPE_NODE:
|
||||||
case XML_NOTATION_NODE:
|
case XML_NOTATION_NODE:
|
||||||
case XML_DTD_NODE:
|
case XML_DTD_NODE:
|
||||||
@@ -3793,6 +3806,7 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
|
|||||||
xmlNodePtr p = NULL,q;
|
xmlNodePtr p = NULL,q;
|
||||||
|
|
||||||
while (node != NULL) {
|
while (node != NULL) {
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
if (node->type == XML_DTD_NODE ) {
|
if (node->type == XML_DTD_NODE ) {
|
||||||
if (doc == NULL) {
|
if (doc == NULL) {
|
||||||
node = node->next;
|
node = node->next;
|
||||||
@@ -3809,6 +3823,7 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
|
|||||||
xmlAddChild(parent, q);
|
xmlAddChild(parent, q);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
q = xmlStaticCopyNode(node, doc, parent, 1);
|
q = xmlStaticCopyNode(node, doc, parent, 1);
|
||||||
if (ret == NULL) {
|
if (ret == NULL) {
|
||||||
q->prev = NULL;
|
q->prev = NULL;
|
||||||
@@ -3872,6 +3887,7 @@ xmlNodePtr xmlCopyNodeList(const xmlNodePtr node) {
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlCopyDtd:
|
* xmlCopyDtd:
|
||||||
* @dtd: the dtd
|
* @dtd: the dtd
|
||||||
@@ -4007,6 +4023,7 @@ xmlCopyDoc(xmlDocPtr doc, int recursive) {
|
|||||||
}
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
@@ -4044,6 +4061,7 @@ xmlGetLineNo(xmlNodePtr node)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlGetNodePath:
|
* xmlGetNodePath:
|
||||||
* @node: a node
|
* @node: a node
|
||||||
@@ -4250,6 +4268,7 @@ xmlGetNodePath(xmlNodePtr node)
|
|||||||
xmlFree(buf);
|
xmlFree(buf);
|
||||||
return (buffer);
|
return (buffer);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlDocGetRootElement:
|
* xmlDocGetRootElement:
|
||||||
@@ -4274,6 +4293,7 @@ xmlDocGetRootElement(xmlDocPtr doc) {
|
|||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlDocSetRootElement:
|
* xmlDocSetRootElement:
|
||||||
* @doc: the document
|
* @doc: the document
|
||||||
@@ -4358,6 +4378,7 @@ xmlNodeSetLang(xmlNodePtr cur, const xmlChar *lang) {
|
|||||||
return;
|
return;
|
||||||
xmlSetNsProp(cur, ns, BAD_CAST "lang", lang);
|
xmlSetNsProp(cur, ns, BAD_CAST "lang", lang);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNodeGetLang:
|
* xmlNodeGetLang:
|
||||||
@@ -4383,6 +4404,7 @@ xmlNodeGetLang(xmlNodePtr cur) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlNodeSetSpacePreserve:
|
* xmlNodeSetSpacePreserve:
|
||||||
* @cur: the node being changed
|
* @cur: the node being changed
|
||||||
@@ -4435,6 +4457,7 @@ xmlNodeSetSpacePreserve(xmlNodePtr cur, int val) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNodeGetSpacePreserve:
|
* xmlNodeGetSpacePreserve:
|
||||||
@@ -4468,6 +4491,7 @@ xmlNodeGetSpacePreserve(xmlNodePtr cur) {
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlNodeSetName:
|
* xmlNodeSetName:
|
||||||
* @cur: the node being changed
|
* @cur: the node being changed
|
||||||
@@ -4566,6 +4590,7 @@ xmlNodeSetBase(xmlNodePtr cur, const xmlChar* uri) {
|
|||||||
return;
|
return;
|
||||||
xmlSetNsProp(cur, ns, BAD_CAST "base", uri);
|
xmlSetNsProp(cur, ns, BAD_CAST "base", uri);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNodeGetBase:
|
* xmlNodeGetBase:
|
||||||
@@ -4845,6 +4870,7 @@ xmlNodeGetContent(xmlNodePtr cur)
|
|||||||
}
|
}
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNodeSetContent:
|
* xmlNodeSetContent:
|
||||||
* @cur: the node being modified
|
* @cur: the node being modified
|
||||||
@@ -4912,6 +4938,7 @@ xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlNodeSetContentLen:
|
* xmlNodeSetContentLen:
|
||||||
* @cur: the node being modified
|
* @cur: the node being modified
|
||||||
@@ -4976,6 +5003,7 @@ xmlNodeSetContentLen(xmlNodePtr cur, const xmlChar *content, int len) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNodeAddContentLen:
|
* xmlNodeAddContentLen:
|
||||||
@@ -5087,6 +5115,7 @@ xmlTextMerge(xmlNodePtr first, xmlNodePtr second) {
|
|||||||
return(first);
|
return(first);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlGetNsList:
|
* xmlGetNsList:
|
||||||
* @doc: the document
|
* @doc: the document
|
||||||
@@ -5150,6 +5179,7 @@ xmlGetNsList(xmlDocPtr doc ATTRIBUTE_UNUSED, xmlNodePtr node)
|
|||||||
}
|
}
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlSearchNs:
|
* xmlSearchNs:
|
||||||
@@ -5288,7 +5318,6 @@ xmlNsInScope(xmlDocPtr doc ATTRIBUTE_UNUSED, xmlNodePtr node,
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlSearchNsByHref:
|
* xmlSearchNsByHref:
|
||||||
* @doc: the document
|
* @doc: the document
|
||||||
@@ -5444,6 +5473,7 @@ xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) {
|
|||||||
return(def);
|
return(def);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlReconciliateNs:
|
* xmlReconciliateNs:
|
||||||
* @doc: the document
|
* @doc: the document
|
||||||
@@ -5641,6 +5671,7 @@ xmlReconciliateNs(xmlDocPtr doc, xmlNodePtr tree) {
|
|||||||
xmlFree(newNs);
|
xmlFree(newNs);
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlHasProp:
|
* xmlHasProp:
|
||||||
@@ -5710,7 +5741,9 @@ xmlHasProp(xmlNodePtr node, const xmlChar *name) {
|
|||||||
xmlAttrPtr
|
xmlAttrPtr
|
||||||
xmlHasNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
|
xmlHasNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
|
||||||
xmlAttrPtr prop;
|
xmlAttrPtr prop;
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
xmlDocPtr doc;
|
xmlDocPtr doc;
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
@@ -5732,6 +5765,7 @@ xmlHasNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
|
|||||||
}
|
}
|
||||||
if (!xmlCheckDTD) return(NULL);
|
if (!xmlCheckDTD) return(NULL);
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/*
|
/*
|
||||||
* Check if there is a default declaration in the internal
|
* Check if there is a default declaration in the internal
|
||||||
* or external subsets
|
* or external subsets
|
||||||
@@ -5774,6 +5808,7 @@ xmlHasNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
|
|||||||
return((xmlAttrPtr) attrDecl);
|
return((xmlAttrPtr) attrDecl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5964,6 +5999,7 @@ xmlGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlSetProp:
|
* xmlSetProp:
|
||||||
* @node: the node
|
* @node: the node
|
||||||
@@ -6145,6 +6181,7 @@ xmlUnsetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name) {
|
|||||||
}
|
}
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlNodeIsText:
|
* xmlNodeIsText:
|
||||||
|
10
valid.c
10
valid.c
@@ -1266,6 +1266,7 @@ xmlFreeElementTable(xmlElementTablePtr table) {
|
|||||||
xmlHashFree(table, (xmlHashDeallocator) xmlFreeElement);
|
xmlHashFree(table, (xmlHashDeallocator) xmlFreeElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlCopyElement:
|
* xmlCopyElement:
|
||||||
* @elem: An element
|
* @elem: An element
|
||||||
@@ -1314,6 +1315,7 @@ xmlCopyElementTable(xmlElementTablePtr table) {
|
|||||||
return((xmlElementTablePtr) xmlHashCopy(table,
|
return((xmlElementTablePtr) xmlHashCopy(table,
|
||||||
(xmlHashCopier) xmlCopyElement));
|
(xmlHashCopier) xmlCopyElement));
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
/**
|
/**
|
||||||
@@ -1430,6 +1432,7 @@ xmlFreeEnumeration(xmlEnumerationPtr cur) {
|
|||||||
xmlFree(cur);
|
xmlFree(cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlCopyEnumeration:
|
* xmlCopyEnumeration:
|
||||||
* @cur: the tree to copy.
|
* @cur: the tree to copy.
|
||||||
@@ -1451,6 +1454,7 @@ xmlCopyEnumeration(xmlEnumerationPtr cur) {
|
|||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
/**
|
/**
|
||||||
@@ -1818,6 +1822,7 @@ xmlFreeAttributeTable(xmlAttributeTablePtr table) {
|
|||||||
xmlHashFree(table, (xmlHashDeallocator) xmlFreeAttribute);
|
xmlHashFree(table, (xmlHashDeallocator) xmlFreeAttribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlCopyAttribute:
|
* xmlCopyAttribute:
|
||||||
* @attr: An attribute
|
* @attr: An attribute
|
||||||
@@ -1865,6 +1870,7 @@ xmlCopyAttributeTable(xmlAttributeTablePtr table) {
|
|||||||
return((xmlAttributeTablePtr) xmlHashCopy(table,
|
return((xmlAttributeTablePtr) xmlHashCopy(table,
|
||||||
(xmlHashCopier) xmlCopyAttribute));
|
(xmlHashCopier) xmlCopyAttribute));
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
/**
|
/**
|
||||||
@@ -2087,6 +2093,7 @@ xmlFreeNotationTable(xmlNotationTablePtr table) {
|
|||||||
xmlHashFree(table, (xmlHashDeallocator) xmlFreeNotation);
|
xmlHashFree(table, (xmlHashDeallocator) xmlFreeNotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlCopyNotation:
|
* xmlCopyNotation:
|
||||||
* @nota: A notation
|
* @nota: A notation
|
||||||
@@ -2133,6 +2140,7 @@ xmlCopyNotationTable(xmlNotationTablePtr table) {
|
|||||||
return((xmlNotationTablePtr) xmlHashCopy(table,
|
return((xmlNotationTablePtr) xmlHashCopy(table,
|
||||||
(xmlHashCopier) xmlCopyNotation));
|
(xmlHashCopier) xmlCopyNotation));
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
/**
|
/**
|
||||||
@@ -3530,7 +3538,7 @@ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
|||||||
* trailing space (#x20) characters, and by replacing sequences of space
|
* trailing space (#x20) characters, and by replacing sequences of space
|
||||||
* (#x20) characters by single space (#x20) character.
|
* (#x20) characters by single space (#x20) character.
|
||||||
*
|
*
|
||||||
* returns a new normalized string if normalization is needed, NULL otherwise
|
* Returns a new normalized string if normalization is needed, NULL otherwise
|
||||||
* the caller must free the returned value.
|
* the caller must free the returned value.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
18
xmllint.c
18
xmllint.c
@@ -99,7 +99,9 @@ static int shell = 0;
|
|||||||
static int debugent = 0;
|
static int debugent = 0;
|
||||||
#endif
|
#endif
|
||||||
static int debug = 0;
|
static int debug = 0;
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
static int copy = 0;
|
static int copy = 0;
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
static int recovery = 0;
|
static int recovery = 0;
|
||||||
static int noent = 0;
|
static int noent = 0;
|
||||||
static int noblanks = 0;
|
static int noblanks = 0;
|
||||||
@@ -733,12 +735,16 @@ static void streamFile(char *filename) {
|
|||||||
* *
|
* *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
||||||
xmlDocPtr doc = NULL, tmp;
|
xmlDocPtr doc = NULL;
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
|
xmlDocPtr tmp;
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
if ((timing) && (!repeat))
|
if ((timing) && (!repeat))
|
||||||
startTimer();
|
startTimer();
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
if (filename == NULL) {
|
if (filename == NULL) {
|
||||||
if (generate) {
|
if (generate) {
|
||||||
xmlNodePtr n;
|
xmlNodePtr n;
|
||||||
@@ -749,6 +755,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
|||||||
xmlDocSetRootElement(doc, n);
|
xmlDocSetRootElement(doc, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
#ifdef LIBXML_HTML_ENABLED
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
else if ((html) && (push)) {
|
else if ((html) && (push)) {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
@@ -950,6 +957,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
|||||||
xmlShell(doc, filename, xmlShellReadline, stdout);
|
xmlShell(doc, filename, xmlShellReadline, stdout);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
/*
|
/*
|
||||||
* test intermediate copy if needed.
|
* test intermediate copy if needed.
|
||||||
*/
|
*/
|
||||||
@@ -958,6 +966,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
|||||||
doc = xmlCopyDoc(doc, 1);
|
doc = xmlCopyDoc(doc, 1);
|
||||||
xmlFreeDoc(tmp);
|
xmlFreeDoc(tmp);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
#ifdef LIBXML_VALID_ENABLED
|
#ifdef LIBXML_VALID_ENABLED
|
||||||
if ((insert) && (!html)) {
|
if ((insert) && (!html)) {
|
||||||
@@ -1295,7 +1304,9 @@ static void usage(const char *name) {
|
|||||||
#else
|
#else
|
||||||
printf("\t--debug : dump the nodes content when using --stream\n");
|
printf("\t--debug : dump the nodes content when using --stream\n");
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
printf("\t--copy : used to test the internal copy implementation\n");
|
printf("\t--copy : used to test the internal copy implementation\n");
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
printf("\t--recover : output what was parsable on broken XML documents\n");
|
printf("\t--recover : output what was parsable on broken XML documents\n");
|
||||||
printf("\t--noent : substitute entity references by their value\n");
|
printf("\t--noent : substitute entity references by their value\n");
|
||||||
printf("\t--noout : don't output the result tree\n");
|
printf("\t--noout : don't output the result tree\n");
|
||||||
@@ -1397,9 +1408,12 @@ main(int argc, char **argv) {
|
|||||||
noout = 1;
|
noout = 1;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef LIBXML_TREE_ENABLED
|
||||||
if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy")))
|
if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy")))
|
||||||
copy++;
|
copy++;
|
||||||
else if ((!strcmp(argv[i], "-recover")) ||
|
else
|
||||||
|
#endif /* LIBXML_TREE_ENABLED */
|
||||||
|
if ((!strcmp(argv[i], "-recover")) ||
|
||||||
(!strcmp(argv[i], "--recover"))) {
|
(!strcmp(argv[i], "--recover"))) {
|
||||||
recovery++;
|
recovery++;
|
||||||
options |= XML_PARSE_RECOVER;
|
options |= XML_PARSE_RECOVER;
|
||||||
|
Reference in New Issue
Block a user