[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: testing for string and number in XSLT 2.0 was Re:
> take for example xsl:sort > > <xsl:sort select="." data-type="number"/> > > what does 'number' mean here? It's retained for backwards compatibility with XSLT 1.0; the "native" way of doing this in 2.0 would be <xsl:sort select="xs:double(.)"/> if they are doubles, or more likely <xsl:sort select="xs:integer(.)"/> if they are integers. > > and if we are comfortable with this type of ambiguity of identifying > something purely as a 'number'....then why not have some fairly useful > functions such as is-number() and is-string() that exist in > this no mans land. You're welcome to write your own function is-string($x) that has the same effect as the expression ($x instance of xs:string), but the WG wants to avoid bloating the language with redundant ways of doing the same thing. Michael Kay http://www.saxonica.com/
|
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
|