summaryrefslogtreecommitdiff
path: root/SAX2.c
diff options
context:
space:
mode:
Diffstat (limited to 'SAX2.c')
-rw-r--r--SAX2.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/SAX2.c b/SAX2.c
index 781a666..cc65e0a 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -1958,11 +1958,13 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
*/
if (dup == NULL)
dup = xmlStrndup(value, valueend - value);
+#ifdef LIBXML_VALID_ENABLED
if (xmlValidateNCName(dup, 1) != 0) {
xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
"xml:id : attribute value %s is not an NCName\n",
(const char *) dup, NULL);
}
+#endif
xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
}
}
@@ -2511,9 +2513,10 @@ static int xmlSAX2DefaultVersionValue = 2;
* @version: the version, 1 or 2
*
* Set the default version of SAX used globally by the library.
- * Note that this may not be a good thing to do from a library
- * it is better to use xmlSAXVersion() to set up specifically the
- * version for a given parsing context.
+ * By default, during initialization the default is set to 2.
+ * Note that it is generally a better coding style to use
+ * xmlSAXVersion() to set up the version explicitly for a given
+ * parsing context.
*
* Returns the previous value in case of success and -1 in case of error.
*/