Here's my data structure in XML:
<MyFile>
<Body>
<Data>
<row AW="1" AX="SPC" AY="011" AZ="" BA="5" BB="38.482" />
<row AW="2" AX="CDR" AY="011" AZ="" BA="8" BB="39.812" />
<row AW="3" AX="FFD" AY="011" AZ="" BA="9" BB="41.115" />
</Data>
</Body>
Actually there're not only AW~BB, but A~Z+AA~AZ+BA~BZ....more then 100 attribute, If I want select all attribute start with B, that is B+BA~BZ, In this case, there're only BA & BB, with newline after every row ends that is:
5;38.482;
8;39.812;
9;41.115;
how do I do that? Here's how I got so far:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes"/>
<xsl:template match="/">
<xsl:variable name="headers1"
select="MPIFile/Body/Data/row/@*
[starts-with(name(), 'B')]"/>
<xsl:for-each select='$headers1'>
<xsl:value-of select="."/>
<xsl:text>;</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
But It output as
5;38.482;8;39.812;9;41.115;
It's not right, how to fix this? thanks a lot