mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
oops broke automatic defaulting of namespaces attributes. Daniel
* SAX.c: oops broke automatic defaulting of namespaces attributes. Daniel
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
Tue Feb 19 22:49:36 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* SAX.c: oops broke automatic defaulting of namespaces attributes.
|
||||||
|
|
||||||
Tue Feb 19 22:01:35 CET 2002 Daniel Veillard <daniel@veillard.com>
|
Tue Feb 19 22:01:35 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* include/libxml/parserInternals.h parser.c: had to change
|
* include/libxml/parserInternals.h parser.c: had to change
|
||||||
|
17
SAX.c
17
SAX.c
@@ -1069,24 +1069,26 @@ process_external_subset:
|
|||||||
* internal subset are not overriden by definitions in the
|
* internal subset are not overriden by definitions in the
|
||||||
* external subset.
|
* external subset.
|
||||||
*/
|
*/
|
||||||
if ((attr->defaultValue != NULL) &&
|
if (attr->defaultValue != NULL) {
|
||||||
(xmlGetDtdQAttrDesc(ctxt->myDoc->extSubset,
|
|
||||||
attr->elem, attr->name,
|
|
||||||
attr->prefix) == attr) &&
|
|
||||||
(xmlGetDtdQAttrDesc(ctxt->myDoc->intSubset,
|
|
||||||
attr->elem, attr->name,
|
|
||||||
attr->prefix) == NULL)) {
|
|
||||||
/*
|
/*
|
||||||
* the element should be instantiated in the tree if:
|
* the element should be instantiated in the tree if:
|
||||||
* - this is a namespace prefix
|
* - this is a namespace prefix
|
||||||
* - the user required for completion in the tree
|
* - the user required for completion in the tree
|
||||||
* like XSLT
|
* like XSLT
|
||||||
|
* - there isn't already an attribute definition
|
||||||
|
* in the internal subset overriding it.
|
||||||
*/
|
*/
|
||||||
if (((attr->prefix != NULL) &&
|
if (((attr->prefix != NULL) &&
|
||||||
(xmlStrEqual(attr->prefix, BAD_CAST "xmlns"))) ||
|
(xmlStrEqual(attr->prefix, BAD_CAST "xmlns"))) ||
|
||||||
((attr->prefix == NULL) &&
|
((attr->prefix == NULL) &&
|
||||||
(xmlStrEqual(attr->name, BAD_CAST "xmlns"))) ||
|
(xmlStrEqual(attr->name, BAD_CAST "xmlns"))) ||
|
||||||
(ctxt->loadsubset & XML_COMPLETE_ATTRS)) {
|
(ctxt->loadsubset & XML_COMPLETE_ATTRS)) {
|
||||||
|
xmlAttributePtr tst;
|
||||||
|
|
||||||
|
tst = xmlGetDtdQAttrDesc(ctxt->myDoc->intSubset,
|
||||||
|
attr->elem, attr->name,
|
||||||
|
attr->prefix);
|
||||||
|
if ((tst == attr) || (tst == NULL)) {
|
||||||
xmlChar *fulln;
|
xmlChar *fulln;
|
||||||
|
|
||||||
if (attr->prefix != NULL) {
|
if (attr->prefix != NULL) {
|
||||||
@@ -1118,6 +1120,7 @@ process_external_subset:
|
|||||||
xmlFree(fulln);
|
xmlFree(fulln);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
attr = attr->nexth;
|
attr = attr->nexth;
|
||||||
}
|
}
|
||||||
if (internal == 1) {
|
if (internal == 1) {
|
||||||
|
Reference in New Issue
Block a user