Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

apply fix for XHTML1 formating from Nick Wellnhofer fixes bug #141266

* xmlsave.c: apply fix for XHTML1 formating from Nick Wellnhofer
  fixes bug #141266
* test/xhtmlcomp result//xhtmlcomp*: added the specific regression
  test
Daniel
  • Loading branch information...
commit f0244cea968f14bbc7cf93e480ae8fec3e74d217 1 parent a90de5e
Daniel Veillard authored
View
7 ChangeLog
@@ -1,3 +1,10 @@
+Sun May 9 19:46:13 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: apply fix for XHTML1 formating from Nick Wellnhofer
+ fixes bug #141266
+ * test/xhtmlcomp result//xhtmlcomp*: added the specific regression
+ test
+
Sun May 9 14:07:21 CEST 2004 Daniel Veillard <daniel@veillard.com>
* Makefile.am: fix for a pedantic make check without make all request
View
7 result/noent/xhtmlcomp
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <h1><abbr>a</abbr> b</h1>
+ </body>
+</html>
View
7 result/xhtmlcomp
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <h1><abbr>a</abbr> b</h1>
+ </body>
+</html>
View
19 result/xhtmlcomp.rdr
@@ -0,0 +1,19 @@
+0 10 html 0 0
+0 1 html 0 0
+1 14 #text 0 1
+
+1 1 body 0 0
+2 14 #text 0 1
+
+2 1 h1 0 0
+3 1 abbr 0 0
+4 3 #text 0 1 a
+3 15 abbr 0 0
+3 3 #text 0 1 b
+2 15 h1 0 0
+2 14 #text 0 1
+
+1 15 body 0 0
+1 14 #text 0 1
+
+0 15 html 0 0
View
23 result/xhtmlcomp.sax
@@ -0,0 +1,23 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.internalSubset(html, -//W3C//DTD XHTML 1.0 Strict//EN, http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd)
+SAX.externalSubset(html, -//W3C//DTD XHTML 1.0 Strict//EN, http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd)
+SAX.startElement(html)
+SAX.characters(
+ , 3)
+SAX.startElement(body)
+SAX.characters(
+ , 5)
+SAX.startElement(h1)
+SAX.startElement(abbr)
+SAX.characters(a, 1)
+SAX.endElement(abbr)
+SAX.characters( b, 2)
+SAX.endElement(h1)
+SAX.characters(
+ , 3)
+SAX.endElement(body)
+SAX.characters(
+, 1)
+SAX.endElement(html)
+SAX.endDocument()
View
8 test/xhtmlcomp
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <body>
+ <h1><abbr>a</abbr> b</h1>
+ </body>
+</html>
View
4 xmlsave.c
@@ -1127,10 +1127,14 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
child = child->next;
}
} else if (cur->children != NULL) {
+ int indent = ctxt->format;
+
if (format) xmlOutputBufferWriteString(buf, "\n");
if (ctxt->level >= 0) ctxt->level++;
+ ctxt->format = format;
xhtmlNodeListDumpOutput(ctxt, cur->children);
if (ctxt->level > 0) ctxt->level--;
+ ctxt->format = indent;
if ((xmlIndentTreeOutput) && (format))
xmlOutputBufferWrite(buf, ctxt->indent_size *
(ctxt->level > ctxt->indent_nr ?
Please sign in to comment.
Something went wrong with that request. Please try again.