Subject: Re: [xsl] Getting text from string From: Mandar Jagtap <mandar.jagtap@xxxxxxxxxxx> Date: Wed, 2 Nov 2011 17:36:17 +0530 (IST) |
Actually, I didn't see Andrew's & Michael's response on original message (those messages got moved to particular folder in mailbox). My fault! Sorry about redundant response! Mandar Jagtap ----- Original Message ----- > From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Cc: > Sent: Wednesday, 2 November 2011 9:27 AM > Subject: Re: [xsl] Getting text from string > > you're using the same mechanism what Andrew, used but perhaps in > significantly expensive ways (the complexity of your XSLT fragment is > unnecessary high -- logical as well as computational). > > I would go for Andrew's solution. > > On Tue, Nov 1, 2011 at 11:21 PM, Mandar Jagtap > <mandar.jagtap@xxxxxxxxxxx> wrote: >> Try using tokenize() function. You can try something like this: >> >> <xsl:for-each select="tokenize($path, '/')"> >> <xsl:if test="position() = last()"> >> <xsl:value-of select="."/> >> </xsl:if> >> </xsl:for-each> >> >> This should return you "filename" as per your example string. >> >> Hope this helps! >> >> Mandar Jagtap > > > > > -- > Regards, > Mukul Gandhi > > --~------------------------------------------------------------------ > 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@xxxxxxxxxxxxxxxxxxxxxx> > --~--
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Getting text from string, Mukul Gandhi | Thread | Re: [xsl] Getting text from string, Mukul Gandhi |
Re: [xsl] Getting text from string, Mukul Gandhi | Date | Re: [xsl] Getting text from string, Mukul Gandhi |
Month |