Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Invalid
-
2.7.1
-
None
-
None
-
Windows XP professional, Intel Celeron M, Xalan-J 2.7.1, JRE 1.4.2_05
Description
I think, there is scope of improvement to the Xalan-J 2.7.1 serializer.
I tried this sample XSLT stylesheet with Xalan-J 2.7.1.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<x>
<y/>
</x>
</xsl:template>
</xsl:stylesheet>
The output produced by Xalan is:
<?xml version="1.0" encoding="UTF-8"?><x>
<y/>
</x>
Please note that top most element tag, <x> is not indented properly.
I wish the output in this case should be:
<?xml version="1.0" encoding="UTF-8"?>
<x>
<y/>
</x>
This problem seems to happen with any XML output.