Commit f0244cea authored by Daniel Veillard's avatar Daniel Veillard
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
parent a90de5ef
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
......
<?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>
<?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>
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
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()
<?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>
......@@ -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 ?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment