|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE: String manipulation in XSLT
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








