Subject: Re: Re: String Trouble
From: Abhijit Junnare <mavlaabhi@xxxxxxxxx>
Date: Thu, 30 Oct 2003 12:19:38 -0800 (PST)
|
If the portion of the string you wanna strip always
gonna be alphabets (A to Z) or underscore (_) and the
substring you want WILL NOT contain numbers or
underscores then try this
<xsl:value-of
select="translate(@title,'ABCDEFGHIJKLMNOPQRSTUVZXYZ_','')/>
Good Luck!
abhi:)
> =====
> Cheers,
>
> Dimitre Novatchev.
> http://fxsl.sourceforge.net/ -- the home of FXSL
>
>
> "karthikeyan.balasubramanian"
> <karthikeyan.balasubramanian@xxxxxxxxxxxxx>
> wrote in message
> news:016d01c39f1a$479c5660$2c00a8c0@xxxxxxxxxxxxxxxx
> > Hi,
> >
> > I wrote xsl to get the following output
> >
> > INDEX_TOC_C79_R
> > INDEX_U79-31-15_R
> > INDEX_F79-31-15-01_R
> > INDEX_F79-31-15-02_R
> > INDEX_U79-31-40_R
> > INDEX_F79-31-40-01_R
> > INDEX_U79-33-15_R
> > INDEX_F79-33-15-01_R
> > INDEX_U79-34-15_R
> > INDEX_F79-34-15-01_R
> >
> >
> > expected output
> > -----------------
> >
> > 79
> > 79-31-15
> > 79-31-15-01
> > 79-31-15-02
> > 79-31-40-01
> > 79-33-15
> > 79-33-15-01
> > 79-34-15
> > 79-34-15-01
> >
> > Now this order varies so much, how do i
> > apply substring to get the above output :(
> >
> > xsl content
> > ----------
> > <xsl:variable name="lep_data"
> > select="document('e:\enigma\output\lep.xml')"/>
> > <table>
> > <tbody>
> > <tr>
> > <th>data1</th>
> >
> > </tr>
> > <xsl:for-each
> select="$lep_data/index-root/index-node">
> > <tr>
> > <td>
> > <xsl:value-of select="@title" />
> > </td>
> >
> > </tr>
> > </xsl:for-each>
> > </tbody>
> > </table>
> >
> >
> >
> > XSL-List info and archive:
> http://www.mulberrytech.com/xsl/xsl-list
> >
> >
>
>
>
>
> XSL-List info and archive:
> http://www.mulberrytech.com/xsl/xsl-list
>
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|