xsl-list
[Top] [All Lists]

Re: [xsl] how to cast a sequence (e.g. strings to integers)

2012-02-29 09:21:30
Robby Pelssers wrote:

I have the use case where I need to cast a sequence of strings to a sequence of 
numbers

Considering I get this input :  ('0', '1, '2') I would like to return following 
sequence (0,1,2)

<xsl:function name="nxp:toIntegers" as="xs:integer*">
     <xsl:param name="numbers" as="xs:string*"/>
     TODO: return sequence of integers
       <xsl:sequence
         select="for $s in $numbers return xs:integer($s)"/>


--

        Martin Honnen --- MVP Data Platform Development
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--