diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-01-09 13:19:33 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-01-09 13:19:33 +0000 |
commit | 5ecaf7f9a7f310eb768407a21f4546bcfa29bff1 (patch) | |
tree | ddb01f2007f5d4ba719bccb65ef949b148e8212d | |
parent | e2830f1e65ddef63fc74a22addfea30d97ef8d65 (diff) | |
download | android_external_libxml2-5ecaf7f9a7f310eb768407a21f4546bcfa29bff1.tar.gz android_external_libxml2-5ecaf7f9a7f310eb768407a21f4546bcfa29bff1.tar.bz2 android_external_libxml2-5ecaf7f9a7f310eb768407a21f4546bcfa29bff1.zip |
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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | HTMLtree.c | 16 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | tree.c | 4 |
4 files changed, 25 insertions, 3 deletions
@@ -1,3 +1,9 @@ +Thu Jan 9 14:16:38 CET 2003 Daniel Veillard <daniel@veillard.com> + + * 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 + Wed Jan 8 18:32:25 CET 2003 Daniel Veillard <daniel@veillard.com> * configure.in doc/* NEWS: preparing 2.5.1 release @@ -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) && @@ -7,7 +7,7 @@ Full documentation is available on-line at This code is released under the MIT Licence see the Copyright file. To report bugs, follow the instructions at: - http://xmlsoft.org/XSLT/bug.html + http://xmlsoft.org/bugs.html A mailing-list xml@gnome.org is available, to subscribe: http://mail.gnome.org/mailman/listinfo/xml @@ -6322,6 +6322,8 @@ static void xmlNodeDumpOutputInternal(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, int format, const char *encoding); +void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur); + /** * xmlNsDumpOutput: * @buf: the XML buffer output @@ -6362,7 +6364,7 @@ xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) { * Dump a list of local Namespace definitions. * Should be called in the context of attributes dumps. */ -static void +void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) { while (cur != NULL) { xmlNsDumpOutput(buf, cur); |