[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:

Subject: Re: testing for string and number in XSLT 2.0 was Re: Test For Numeric Values?
From: James Fuller <jim.fuller@xxxxxxxxxxxxxx>
Date: Fri, 08 Apr 2005 13:45:17 +0200
Re:  testing for string and number in XSLT 2.0 was Re:
Dimitre Novatchev wrote:

>>In fact, I think the function you want is:
>>
>><xsl:function name="type:is-number" as="xs:boolean">
>> <xsl:param name="arg" as="xs:string"/>
>> <xsl:sequence select="matches($arg, '\d+')"/>
>></xsl:function>
>>    
>>
>
>This does not say what the type of the argument, originally passed to
>the function was.
>  
>
*absolutely*

>It might have been a string that is the string representation of a number:
>
>   "3.1415" (is a string)
>
>but this is completely different from:
>
>     3.1415 (is a number).
>
>What will really be useful is a function with an argument of item(),
>that returns the real type of the argument.
>  
>
agreed

>This would be trivial to achieve if same-arity function overloading was allowed.
>
>Does anybody know of another way?
>
>Or shall we propose an exslt:type-of()  ?
>  
>
dont know....I would like to think that the XSLT 2.0 draft is still open
to some last minute changes...

cheers, Jim Fuller

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.