1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-14 20:01:04 +03:00

Don't use xmlValidateName() when not available.

Fix compilation with minimum and debug.
This commit is contained in:
Nicolas Le Cam
2013-06-14 21:11:27 +02:00
committed by Daniel Veillard
parent c9ecf45d1b
commit 3313d14f9d

View File

@ -254,10 +254,12 @@ xmlCtxtCheckName(xmlDebugCtxtPtr ctxt, const xmlChar * name)
xmlDebugErr(ctxt, XML_CHECK_NO_NAME, "Name is NULL"); xmlDebugErr(ctxt, XML_CHECK_NO_NAME, "Name is NULL");
return; return;
} }
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
if (xmlValidateName(name, 0)) { if (xmlValidateName(name, 0)) {
xmlDebugErr3(ctxt, XML_CHECK_NOT_NCNAME, xmlDebugErr3(ctxt, XML_CHECK_NOT_NCNAME,
"Name is not an NCName '%s'", (const char *) name); "Name is not an NCName '%s'", (const char *) name);
} }
#endif
if ((ctxt->dict != NULL) && if ((ctxt->dict != NULL) &&
(!xmlDictOwns(ctxt->dict, name)) && (!xmlDictOwns(ctxt->dict, name)) &&
((ctxt->doc == NULL) || ((ctxt->doc == NULL) ||