I'm using XSLT and would like to transform this:
<attr>
<header name="UpdateInformation1">
<detail name="info">blah</detail>
</header>
<header name="UpdateInformation2">
<detail name="info">blah2</detail>
</header>
...other headers with different names...
</attr>
To this:
<UpdateInformation>
<info>blah</info>
</UpdateInformation>
<UpdateInformation>
<info>blah2</info>
</UpdateInformation>
...
I've been trying to do this using a foreach, but I'm not having much success. Heres what I currently have, but wildcards don't work in this type of context:
* WRONG *
<xsl:for-each select="attr/header[@name='UpdateInformation*']">
<UpdateInformation>
<Info>
<xsl:value-of select="detail[@name='info']"/>
</info>
</UpdateInformation>
</xsl:for-each>
* WRONG *
Any suggestions? Thanks!