Permalink
Browse files

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
  • Loading branch information...
Daniel Veillard
Daniel Veillard committed Jan 9, 2003
1 parent e2830f1 commit 5ecaf7f9a7f310eb768407a21f4546bcfa29bff1
Showing with 25 additions and 3 deletions.
  1. +6 −0 ChangeLog
  2. +15 −1 HTMLtree.c
  3. +1 −1 README
  4. +3 −1 tree.c
View
@@ -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
View
@@ -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) &&
View
2 README
@@ -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
View
4 tree.c
@@ -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);

0 comments on commit 5ecaf7f

Please sign in to comment.