RE: [xsl] Is there a direct phrase to access to the string of the last ','

Subject: RE: [xsl] Is there a direct phrase to access to the string of the last ','
From: "Robert C. Lyons" <boblyons@xxxxxxxxxx>
Date: Fri, 23 Mar 2001 09:58:21 -0500
Sun-fu,

If there are always three tokens in the strings,
then you can do the following:

  <xsl:template match="/doc/data">
    <xsl:value-of select="substring-after( substring-after( ., '.' ), '.' )
"/>
    <xsl:text>&#xA;</xsl:text>
  </xsl:template>

If the number of tokens varies and you don't want
to write a recursive function, then you could use
the SAXON tokenize function, which is proprietary
(i.e., not part of the XPath standard).

Best regards,

Bob

<sig name    = 'Bob Lyons'
     title   = 'B2B Integration Consultant'
     company = 'Unidex, Inc.'
     phone   = '+1-732-975-9877'
     email   = 'boblyons@xxxxxxxxxx'
     url     = 'http://www.unidex.com/'
     product = 'XML Convert: transforms flat files to XML and vice versa' />

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Yang
Sent: Thursday, March 22, 2001 8:26 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Is there a direct phrase to access to the string of the last
','


Hi,

I have to filter out  the string after the last ','  from a  set input
string data ,

for example <data>a.b.abc</data>
                   <data>c.de.f</data>
                    <data>st.uvw.xy</data>
                   ...

results:  abc , f,xy...
                  ..

I can use substring-after and substring-before function  with recursive
procedures to get this job done.

However I wonder is there an intelligent way to get
what I am trying to achieve?

Thanks in advance.

Sun-fu Yang

sfyang@xxxxxxxxxxxxx
UniSvr Information Co.




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread