I'm quite new to XSL and all the tutorials seem to be oriented towards XML -> HTML conversions - I want XML -> XML.
I have something like:
<name>
<first>Joe</first>
<last>Soap</last>
</name>
I want to convert this to:
<name first="Joe" last="Soap"/>
I've tried:
<xsl:text><name first="</xsl:text>
<xsl:value-of select="first"/>
<xsl:text>" last="</xsl:text>
<xsl:value-of select="last"/>
<xsl:text>"/></xsl:text>
But this gets treated as Element content as opposed to an Element. I'd be grateful for ant tips.
Thanks
I have something like:
<name>
<first>Joe</first>
<last>Soap</last>
</name>
I want to convert this to:
<name first="Joe" last="Soap"/>
I've tried:
<xsl:text><name first="</xsl:text>
<xsl:value-of select="first"/>
<xsl:text>" last="</xsl:text>
<xsl:value-of select="last"/>
<xsl:text>"/></xsl:text>
But this gets treated as Element content as opposed to an Element. I'd be grateful for ant tips.
Thanks