summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Le Cam <niko.lecam@gmail.com>2013-06-16 08:55:08 +0200
committerDaniel Veillard <veillard@redhat.com>2014-02-10 10:36:20 +0800
commit52010c639a5da3d40ef73d9aff5c43c3a642661c (patch)
tree14fd2a3d28402bae15ebc701436228599bc3de59
parent1af8b7b22e3bb569b2c27642064224bc14a1924a (diff)
downloadlibxml2-52010c639a5da3d40ef73d9aff5c43c3a642661c.tar.gz
Compile out use of xmlValidateNCName() when not available.
Fix compilation with minimum and valid.
-rw-r--r--SAX2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/SAX2.c b/SAX2.c
index ec105b68..2a223186 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 */