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-after(str,'.'),'.'))
- 1)
On 10/20/2005, "Arun Manta" <arunm(_at_)softwarefx(_dot_)com> wrote:
I have a string of the form â??abc.def.ghiâ?? (java namespace ) where
â??abc.defâ?? is the package name and â??ghiâ?? is the class name.
I need to extract these two from the complete string : â??abc.def.ghiâ??Â
-------â?? â??abc.defâ?? + â??ghiâ??
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.. )??
Iâ??m constantly frustrated by trying to write little templates to do these
simple things like splitting a string etc.
TIA
--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--