xml - XSL: how to convert this 004 to just 4 -
i have xml looks following:
<vteam id="004">visiting team</vteam> i attempting retrieve value 4 using following in xslt (1.0):
<xsl:apply-templates select="number(vteam/@id)"/> this giving me compilation error. what's right way of going it?
you can this...
<xsl:value-of select="number(vteam/@id)"/> or, depending on else doing, this...
<xsl:apply-templates select="vteam"/> <xsl:template match="vteam"> <xsl:value-of select="number(@id)"/> </xsl:template> (of course, xsl:apply-templates have inside separate template)
Comments
Post a Comment