|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] What is the best way to cast integer to string in XSLT
Hi Mike and Jeni,
With Saxon 7.5 I'm getting an error on the following:
<xsl:value-of select="concat(position(), '. ', ., '
')"/>
"Type error in first argument of call to concat():
Required type is xs:string; supplied value has type xs:integer"
1. Why doesn't the XSLT processor perform an implicit cast from integer to
string? This is quite natural, as any atomic type has a string
representation and can be converted to string.
2. My current solution is to use
string(position())
Is this the best/recommended solution?
Thanks in advance,
=====
Cheers,
Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








