while (child != NULL) {
xmlNodeDumpOutput(buf, result, child, 0, (indent == 1),
(const char *) encoding);
- if ((child->type == XML_DTD_NODE) ||
+ if (indent && ((child->type == XML_DTD_NODE) ||
((child->type == XML_COMMENT_NODE) &&
- (child->next != NULL)))
+ (child->next != NULL))))
xmlOutputBufferWriteString(buf, "\n");
child = child->next;
}
- xmlOutputBufferWriteString(buf, "\n");
+ if (indent)
+ xmlOutputBufferWriteString(buf, "\n");
}
xmlOutputBufferFlush(buf);
}
bug-170.out bug-170.xsl \
bug-171.out bug-171.xsl \
bug-172.out bug-172.xsl \
+ bug-173.out bug-173.xsl \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
--- /dev/null
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output indent="no" omit-xml-declaration="yes"/>
+
+<xsl:template match="/">
+ <!-- Output should not include extraneous newlines when indent is off -->
+ <xsl:comment>Comment</xsl:comment>
+ <root/>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file