|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: format % issue
> What is the workaround to just print the % number ? > > Fatal Error! Required item type of first argument of > format-number() is numeric; supplied value has item type xs:string The message looks pretty clear to me: $value is a string, when it should be a number. So convert it to a number, using the number() function. Better still, declare the parameter as <xsl:param name="value" as="xs:double"/> and make sure that $successPercent is computed as a number, not as a string. Michael Kay http://www.saxonica.com/ > > > <xsl:template name="display-percent"> > <xsl:param name="value" /> > < xsl:value-of select="format-number($value,'0.00%')" /> > </xsl:template> > > > <xsl:if test="$testcase=1"> > <xsl:call-template name="display-percent"> > <xsl:with-param name="value" select="$successPercent" /> > </xsl:call-template> > </xsl:if> > <xsl:if test="$testcase=3"> > <xsl:call-template name="display-percent"> > <xsl:with-param name="value" select="$successPercent" /> > </xsl:call-template> > </xsl:if >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






