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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -