summaryrefslogtreecommitdiff
path: root/SAX2.c
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2010-03-18 07:40:32 +0100
committerMike Hommey <glandium@debian.org>2010-03-18 07:40:32 +0100
commiteb5d521a2df72fa829a7f8196b957c696e7ccc58 (patch)
tree224599e18a48f87e82aa8a32456563277c68ae58 /SAX2.c
parent8a10e02b2f4971d3fdacab7dc7baecced34056fb (diff)
downloadlibxml2-eb5d521a2df72fa829a7f8196b957c696e7ccc58.tar.gz
Import upstream version 2.7.7upstream/2.7.7.dfsg
Diffstat (limited to 'SAX2.c')
-rw-r--r--SAX2.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/SAX2.c b/SAX2.c
index 1ed148f..84c1f00 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -1105,24 +1105,33 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
return;
}
+#ifdef LIBXML_HTML_ENABLED
+ if ((ctxt->html) &&
+ (value == NULL) && (htmlIsBooleanAttr(fullname))) {
+ nval = xmlStrdup(fullname);
+ value = (const xmlChar *) nval;
+ } else
+#endif
+ {
#ifdef LIBXML_VALID_ENABLED
- /*
- * Do the last stage of the attribute normalization
- * Needed for HTML too:
- * http://www.w3.org/TR/html4/types.html#h-6.2
- */
- ctxt->vctxt.valid = 1;
- nval = xmlValidCtxtNormalizeAttributeValue(&ctxt->vctxt,
- ctxt->myDoc, ctxt->node,
- fullname, value);
- if (ctxt->vctxt.valid != 1) {
- ctxt->valid = 0;
- }
- if (nval != NULL)
- value = nval;
+ /*
+ * Do the last stage of the attribute normalization
+ * Needed for HTML too:
+ * http://www.w3.org/TR/html4/types.html#h-6.2
+ */
+ ctxt->vctxt.valid = 1;
+ nval = xmlValidCtxtNormalizeAttributeValue(&ctxt->vctxt,
+ ctxt->myDoc, ctxt->node,
+ fullname, value);
+ if (ctxt->vctxt.valid != 1) {
+ ctxt->valid = 0;
+ }
+ if (nval != NULL)
+ value = nval;
#else
- nval = NULL;
+ nval = NULL;
#endif /* LIBXML_VALID_ENABLED */
+ }
/*
* Check whether it's a namespace definition