1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

Re-examined the problems of configuring a "minimal" library.

Synchronized the header files with the library code in order
to assure that all the various conditionals (LIBXML_xxxx_ENABLED)
were the same in both.  Modified the API database content to more
accurately reflect the conditionals.  Enhanced the generation
of that database.  Although there was no substantial change to
any of the library code's logic, a large number of files were
modified to achieve the above, and the configuration script
was enhanced to do some automatic enabling of features (e.g.
--with-xinclude forces --with-xpath).  Additionally, all the format
errors discovered by apibuild.py were corrected.
* configure.in: enhanced cross-checking of options
* doc/apibuild.py, doc/elfgcchack.xsl, doc/libxml2-refs.xml,
  doc/libxml2-api.xml, gentest.py: changed the usage of the
  <cond> element in module descriptions
* elfgcchack.h, testapi.c: regenerated with proper conditionals
* HTMLparser.c, SAX.c, globals.c, tree.c, xmlschemas.c, xpath.c,
  testSAX.c: cleaned up conditionals
* include/libxml/[SAX.h, SAX2.h, debugXML.h, encoding.h, entities.h,
  hash.h, parser.h, parserInternals.h, schemasInternals.h, tree.h,
  valid.h, xlink.h, xmlIO.h, xmlautomata.h, xmlreader.h, xpath.h]:
  synchronized the conditionals with the corresponding module code
* doc/examples/tree2.c, doc/examples/xpath1.c, doc/examples/xpath2.c:
  added additional conditions required for compilation
* doc/*.html, doc/html/*.html: rebuilt the docs
This commit is contained in:
William M. Brack
2005-01-02 09:53:13 +00:00
parent b78757b30e
commit 21e4ef20f6
61 changed files with 4818 additions and 4497 deletions

View File

@@ -536,9 +536,13 @@ struct _xmlDoc {
/*
* Some helper functions
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
XMLPUBFUN int XMLCALL
xmlValidateNCName (const xmlChar *value,
int space);
#endif
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int XMLCALL
xmlValidateQName (const xmlChar *value,
int space);
@@ -548,6 +552,7 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateNMToken (const xmlChar *value,
int space);
#endif
XMLPUBFUN xmlChar * XMLCALL
xmlBuildQName (const xmlChar *ncname,
@@ -632,10 +637,12 @@ XMLPUBFUN xmlDtdPtr XMLCALL
xmlGetIntSubset (xmlDocPtr doc);
XMLPUBFUN void XMLCALL
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
xmlNewNs (xmlNodePtr node,
const xmlChar *href,
@@ -652,10 +659,13 @@ XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewDocProp (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *value);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
#endif
XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewNsProp (xmlNodePtr node,
xmlNsPtr ns,
@@ -679,11 +689,12 @@ XMLPUBFUN xmlAttrPtr XMLCALL
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlDtdPtr XMLCALL
xmlCopyDtd (xmlDtdPtr dtd);
#endif /* LIBXML_TREE_ENABLED */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlDocPtr XMLCALL
xmlCopyDoc (xmlDocPtr doc,
int recursive);
#endif /* LIBXML_TREE_ENABLED */
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
/*
* Creating new nodes.
*/
@@ -697,27 +708,19 @@ XMLPUBFUN xmlNodePtr XMLCALL
xmlNsPtr ns,
xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocRawNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewNode (xmlNsPtr ns,
const xmlChar *name);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewNodeEatName (xmlNsPtr ns,
xmlChar *name);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewTextChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
#endif
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocText (xmlDocPtr doc,
const xmlChar *content);
@@ -765,6 +768,16 @@ XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlCopyNodeList (const xmlNodePtr node);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewTextChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocRawNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocFragment (xmlDocPtr doc);
#endif /* LIBXML_TREE_ENABLED */
@@ -774,10 +787,10 @@ XMLPUBFUN xmlNodePtr XMLCALL
*/
XMLPUBFUN long XMLCALL
xmlGetLineNo (xmlNodePtr node);
#ifdef LIBXML_TREE_ENABLED
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
XMLPUBFUN xmlChar * XMLCALL
xmlGetNodePath (xmlNodePtr node);
#endif /* LIBXML_TREE_ENABLED */
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocGetRootElement (xmlDocPtr doc);
XMLPUBFUN xmlNodePtr XMLCALL
@@ -787,13 +800,15 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlIsBlankNode (xmlNodePtr node);
#ifdef LIBXML_TREE_ENABLED
/*
* Changing the structure.
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocSetRootElement (xmlDocPtr doc,
xmlNodePtr root);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void XMLCALL
xmlNodeSetName (xmlNodePtr cur,
const xmlChar *name);
@@ -804,14 +819,17 @@ XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddChildList (xmlNodePtr parent,
xmlNodePtr cur);
#ifdef LIBXML_TREE_ENABLED
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
xmlReplaceNode (xmlNodePtr old,
xmlNodePtr cur);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddPrevSibling (xmlNodePtr cur,
xmlNodePtr elem);
#endif /* LIBXML_TREE_ENABLED */
#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddSibling (xmlNodePtr cur,
xmlNodePtr elem);
@@ -848,11 +866,11 @@ XMLPUBFUN xmlNsPtr XMLCALL
xmlSearchNsByHref (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar *href);
#ifdef LIBXML_TREE_ENABLED
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED)
XMLPUBFUN xmlNsPtr * XMLCALL
xmlGetNsList (xmlDocPtr doc,
xmlNodePtr node);
#endif /* LIBXML_TREE_ENABLED */
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
XMLPUBFUN void XMLCALL
xmlSetNs (xmlNodePtr node,
@@ -865,12 +883,17 @@ XMLPUBFUN xmlNsPtr XMLCALL
/*
* Changing the content.
*/
#ifdef LIBXML_TREE_ENABLED
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
XMLPUBFUN xmlAttrPtr XMLCALL
xmlSetProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlAttrPtr XMLCALL
xmlSetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
XMLPUBFUN xmlChar * XMLCALL
xmlGetNoNsProp (xmlNodePtr node,
const xmlChar *name);
@@ -884,13 +907,6 @@ XMLPUBFUN xmlAttrPtr XMLCALL
xmlHasNsProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *nameSpace);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlAttrPtr XMLCALL
xmlSetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlChar * XMLCALL
xmlGetNsProp (xmlNodePtr node,
const xmlChar *name,
@@ -948,24 +964,28 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetBase (xmlDocPtr doc,
xmlNodePtr cur);
#ifdef LIBXML_TREE_ENABLED
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
XMLPUBFUN void XMLCALL
xmlNodeSetBase (xmlNodePtr cur,
const xmlChar *uri);
#endif
/*
* Removing content.
*/
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN int XMLCALL
xmlRemoveProp (xmlAttrPtr cur);
XMLPUBFUN int XMLCALL
xmlUnsetProp (xmlNodePtr node,
const xmlChar *name);
#endif /* LIBXML_TREE_ENABLED */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int XMLCALL
xmlUnsetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN int XMLCALL
xmlUnsetProp (xmlNodePtr node,
const xmlChar *name);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
/*
* Internal, don't use.
@@ -980,17 +1000,21 @@ XMLPUBFUN void XMLCALL
xmlBufferWriteQuotedString(xmlBufferPtr buf,
const xmlChar *string);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
xmlDocPtr doc,
xmlAttrPtr attr,
const xmlChar *string);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_TREE_ENABLED
/*
* Namespace handling.
*/
XMLPUBFUN int XMLCALL
xmlReconciliateNs (xmlDocPtr doc,
xmlNodePtr tree);
#endif
#ifdef LIBXML_OUTPUT_ENABLED
/*