I have the following XML:
<?xml version="1.0"?>
<products>
<product at1="a"
at2="b"
at3="c">
</product>
</products>
and the following XSLT:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
In theory, the xslt should leave the input xml unchanged. However, the output I get after processing is:
<?xml version="1.0"?>
<products>
<product at1="a" at2="b" at3="c">
</product>
</products>
Is there I way I can prevent the transformer from reformatting the spacing between the attributes. I understand that both the input and output xml are functionally equivalent but I would like to preserve the attribute per line format for human-readability purposes. If it matters, I'm using ubuntu's xsltproc to do this transformation:
xsltproc -o test2.xml test.xslt test.xml