How to populate id and it's value in XSL attribute? In the process of converting source xml to target xml. Need to have XSL file. Can anyone help me on this XSLT transformation?
<xsl:template match="ParentElement/Number">
<xsl:element name="ParentElement">
<xsl:value-of select="substring(.,1,15)"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
I have tried the above code snippet. Actual Output: 12345.111111.0
Hard to tell without seeing your XML but perhaps you want something like:
<xsl:template match="ParentElement/Number">
<ParentElement id="abc:efg:id:hij:{substring(.,1,15)}"/>
<xsl:apply-templates/>
</ParentElement>
</xsl:template>