Re: [xsl] RE: String manipulation in XSLT

Subject: Re: [xsl] RE: String manipulation in XSLT
From: "Roger Chi" <roger.xslt@xxxxxxxxxxxx>
Date: Thu, 20 Oct 2005 12:40:13 -0400
substring-after(substring-after(str,'.'),'.') = 'ghi'
substring-before(value,concat('.',substring-after(substring-after(value,'.'),
'.')))
= 'abc.def'

The second line fails if the last term is not unique, however.

I guess you could do:

substring(str,1,string-length(str)-string-length(substring-after(substring-af
ter(str,'.'),'.'))
- 1)

On 10/20/2005, "Arun Manta" <arunm@xxxxxxxxxxxxxx> wrote:

>I have a string of the form babc.def.ghib (java namespace ) where
babc.defb is the package name and bghib is the class name.
>I need to extract these two from the complete string : babc.def.ghibB
-------b babc.defbB  + bghib
>
>In java this would take about 1-2 lines of code, but in XSLT I cannot figure
out a way to do it without writing tons of code.
>Why is the support for string manipulation and regular expressions
non-existent in XSLT, when XML is all about text ( more than java etc.. )??
>
>Ibm constantly frustrated by trying to write little templates to do these
simple things like splitting a string etc.
>
>TIA

Current Thread