[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: EXSLT replace to XSLT 2.0 replace

Subject: Re: EXSLT replace to XSLT 2.0 replace
From: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@xxxxxxxxx>
Date: Wed, 14 Apr 2010 10:56:36 +0200
Re:  EXSLT replace to XSLT 2.0 replace
Dear Patrick,

in addition to what Wolfgang said:

- There is an undocumented feature in Saxon that will allow you to preserve the passive group (?: ... ): http://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/201002/msg00365.html
- If you change (?: ... ) to ordinary groups, you'll have to increment the backreference numbers to '$2$3$4'

So either: <xsl:value-of select="replace( .,

    <xsl:value-of select="replace(



On 14.04.2010 10:48, Wolfgang Laun wrote:
Omit the 'g', which replace() does anyway.

Omit the '(?: ... )" from the regular expression. (This is uncounted
grouping, which isn't important here.

The | in  (\p{Lu}|\p{Ll}]  looks suspicious. These are alternatives,
anyway, within []


On Wed, Apr 14, 2010 at 9:48 AM, Szabo, Patrick (LNG-VIE)
<patrick.szabo@xxxxxxxxxxxxx>  wrote:

I'm using Saxon 9 and XSLT 2.0

I'm currently updateing a few 1.0 Stylesheets to 2.0.
In one of those Stylesheets i've found this:

<xsl:value-of select="regexp:replace(.,
'(?:(.+@.+\.[a-zA-Z]+)|([\p{Lu}|\p{Ll}]\p{Ll}+)-([\p{Ll}]+))', 'g',

Is there a way to to that in 2.0 without EXSLT ?!
I - of course - wanted to try it with replace() but i cant seem to
figure it out.

best regards...

Patrick Szabo

Tel.: +43 (1) 534 52 - 1573
Fax: +43 (1) 534 52 - 146


LexisNexis Verlag ARD Orac GmbH&  Co KG
Marxergasse 25, 1030 Wien
FN 8333f, Handelsgericht Wien

-- Gerrit Imsieke Geschdftsf|hrer / Managing Director le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 110, Fax +49 341 355356 510 gerrit.imsieke@xxxxxxxxx, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschdftsf|hrer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vvckler

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.