mirror of
https://github.com/darlinghq/darling-libxml2.git
synced 2025-01-21 01:14:32 +00:00
trying to fix #104934 about some XHTML1 serialization issues. Daniel
* tree.c: trying to fix #104934 about some XHTML1 serialization issues. Daniel
This commit is contained in:
parent
809faa5237
commit
fd7ce5f7e1
@ -1,3 +1,8 @@
|
||||
Mon Feb 10 17:11:22 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* tree.c: trying to fix #104934 about some XHTML1 serialization
|
||||
issues.
|
||||
|
||||
Mon Feb 10 16:41:13 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* encoding.c xmlIO.c: fixing bug #104646 about iconv based
|
||||
|
21
tree.c
21
tree.c
@ -6670,7 +6670,7 @@ xmlNodeDumpOutputInternal(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
return;
|
||||
}
|
||||
if (cur->type == XML_NAMESPACE_DECL) {
|
||||
xmlNsDumpOutput(buf, cur);
|
||||
xmlNsDumpOutput(buf, (xmlNsPtr) cur);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -6980,6 +6980,7 @@ xhtmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
xmlAttrPtr lang = NULL;
|
||||
xmlAttrPtr name = NULL;
|
||||
xmlAttrPtr id = NULL;
|
||||
xmlNodePtr parent;
|
||||
|
||||
if (cur == NULL) {
|
||||
#ifdef DEBUG_TREE
|
||||
@ -6988,6 +6989,7 @@ xhtmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
parent = cur->parent;
|
||||
while (cur != NULL) {
|
||||
if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "id")))
|
||||
id = cur;
|
||||
@ -7019,9 +7021,20 @@ xhtmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
* C.8
|
||||
*/
|
||||
if ((name != NULL) && (id == NULL)) {
|
||||
xmlOutputBufferWriteString(buf, " id=\"");
|
||||
xmlAttrSerializeContent(buf->buffer, doc, name);
|
||||
xmlOutputBufferWriteString(buf, "\"");
|
||||
if ((parent != NULL) && (parent->name != NULL) &&
|
||||
((xmlStrEqual(parent->name, BAD_CAST "a")) ||
|
||||
(xmlStrEqual(parent->name, BAD_CAST "p")) ||
|
||||
(xmlStrEqual(parent->name, BAD_CAST "div")) ||
|
||||
(xmlStrEqual(parent->name, BAD_CAST "img")) ||
|
||||
(xmlStrEqual(parent->name, BAD_CAST "map")) ||
|
||||
(xmlStrEqual(parent->name, BAD_CAST "applet")) ||
|
||||
(xmlStrEqual(parent->name, BAD_CAST "form")) ||
|
||||
(xmlStrEqual(parent->name, BAD_CAST "frame")) ||
|
||||
(xmlStrEqual(parent->name, BAD_CAST "iframe")))) {
|
||||
xmlOutputBufferWriteString(buf, " id=\"");
|
||||
xmlAttrSerializeContent(buf->buffer, doc, name);
|
||||
xmlOutputBufferWriteString(buf, "\"");
|
||||
}
|
||||
}
|
||||
/*
|
||||
* C.7.
|
||||
|
Loading…
x
Reference in New Issue
Block a user