xml - Formatting a string in XSLT 1.0 -
i have string fi234567. , want format 23456-7.
i have using xsl 1.0. trying functions substring, translate & received output 234567. need output 23456-7 suggestions!
i performed , worked.
<xsl:variable name="formatcode_first"> <xsl:value-of select="substring(inputstring,1,string-length(inputstring)-1)"/> </xsl:variable> <xsl:variable name="formatcode_second"> <xsl:value-of select="substring(inputstring,string-length(inputstring))"/> </xsl:variable> <xsl:value-of select="normalize-space($formatcode_first)"/> <xsl:text>-</xsl:text> <xsl:value-of select="normalize-space($formatcode_second)"/>
xml xslt xslt-1.0
No comments:
Post a Comment