[libxml2] Compile out use of xmlValidateNCName() when not available.



commit 52010c639a5da3d40ef73d9aff5c43c3a642661c
Author: Nicolas Le Cam <niko lecam gmail com>
Date:   Sun Jun 16 08:55:08 2013 +0200

    Compile out use of xmlValidateNCName() when not available.
    
    Fix compilation with minimum and valid.

 SAX2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/SAX2.c b/SAX2.c
index ec105b6..2a22318 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -2145,6 +2145,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
             */
            if (dup == NULL)
                dup = xmlStrndup(value, valueend - value);
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || 
defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
 #ifdef LIBXML_VALID_ENABLED
            if (xmlValidateNCName(dup, 1) != 0) {
                xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
@@ -2152,6 +2153,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
                            (const char *) dup, NULL);
            }
 #endif
+#endif
            xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
        } else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) {
            /* might be worth duplicate entry points and not copy */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]