mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
fixes #102920 about namespace handling in HTML output and section 16.2
* HTMLtree.c tree.c: fixes #102920 about namespace handling in HTML output and section 16.2 "HTML Output Method" of XSLT-1.0 * README: fixed a link Daniel
This commit is contained in:
16
HTMLtree.c
16
HTMLtree.c
@ -536,6 +536,7 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
|
||||
|
||||
/**
|
||||
* htmlDtdDumpOutput:
|
||||
@ -761,10 +762,19 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
/*
|
||||
* Get specific HTML info for that node.
|
||||
*/
|
||||
info = htmlTagLookup(cur->name);
|
||||
if (cur->ns == NULL)
|
||||
info = htmlTagLookup(cur->name);
|
||||
else
|
||||
info = NULL;
|
||||
|
||||
xmlOutputBufferWriteString(buf, "<");
|
||||
if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
|
||||
xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
|
||||
xmlOutputBufferWriteString(buf, ":");
|
||||
}
|
||||
xmlOutputBufferWriteString(buf, (const char *)cur->name);
|
||||
if (cur->nsDef)
|
||||
xmlNsListDumpOutput(buf, cur->nsDef);
|
||||
if (cur->properties != NULL)
|
||||
htmlAttrListDumpOutput(buf, doc, cur->properties, encoding);
|
||||
|
||||
@ -826,6 +836,10 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
xmlOutputBufferWriteString(buf, "\n");
|
||||
}
|
||||
xmlOutputBufferWriteString(buf, "</");
|
||||
if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
|
||||
xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
|
||||
xmlOutputBufferWriteString(buf, ":");
|
||||
}
|
||||
xmlOutputBufferWriteString(buf, (const char *)cur->name);
|
||||
xmlOutputBufferWriteString(buf, ">");
|
||||
if ((format) && (info != NULL) && (!info->isinline) &&
|
||||
|
Reference in New Issue
Block a user