XSLT Question (I know it's very simple ,just cant figure out)

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I am not a XSLT expert and i am not able to figure out that i believe very simple .here are the details.
I have following.
<root>

<Detail>
<URI>0900093.0025458607</URI>
<HumanR>00009000930254586070</HumanR>
</Detail>

</root>
I have to produce following XML.
<core:altId serialnumber="id:serial:0900093.0025458607 00009000930254586070</core:altId>

i have tried it but i am not able to get the right output.here what i have done so far.
<xsl:variable name="var1_root" select="root"/>

<core:altId>
<xsl:for-each select="$var1_root
<xsl:attribute name="serialnumber
<xsl:value-of select="string(Detail/URI)"/><xsl:text>> </xsl:text>
<xsl:value-of select="string(Detail/HumanR)"/>
</xsl:attribute>
</xsl:for-each>
</core:altId>



View the full article
 
Back
Top