I have an XML file of the form:
<AAA >
<BBB>0001</BBB>
<CCC>
<DDD>0121</DDD>
</CCC>
<DDD>
<EEE>0152</EEE>
<FFF>0032</FFF>
</DDD>
<GGG>0444</GGG>
</AAA>
What I want is
<COL>0001</COL >
<COL>0121</COL >
<COL>0152</COL >
<COL>0032</COL >
<COL>0444</COL >
What I get is
<COL>
0001
0121
0152
0032
0444
<COL>
using this Transform
<xsl:template match = "/" >
<xsl:for-each select = "/" >
<xsl:text ><COL></xsl:text>
<xsl:value-of select = "." />
<xsl:text ><COL></xsl:text>
<xsl:text >
</xsl:text>
</xsl:for-each>
</xsl:template>
Shouldn't this XSL just loop for each value? And where do all those extra CRs
come from? The nodes without attributes?