Subject: Re: [xsl] EXSLT replace to XSLT 2.0 replace From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx> Date: Wed, 14 Apr 2010 11:07:49 +0200 |
On Wed, Apr 14, 2010 at 10:52 AM, Szabo, Patrick (LNG-VIE) <patrick.szabo@xxxxxxxxxxxxx> wrote: > Thx for your response. > > I think grouping is important here because the 4th argument is the string that should be replaced with. > In this argument are references to regex-groups...i'm not sure about that but i think so. > If i remove the (?: the group numbers will change won't they ?! > I wrote "uncounted group", so it does not influence group numbers $1, $2,... An uncounted group surrounding the entire pattern isn't useful. -W > regards > > > Patrick Szabo > XSLT-Entwickler > > Tel.: +43 (1) 534 52 - 1573 > Fax: +43 (1) 534 52 - 146 > > Patrick.Szabo@xxxxxxxxxxxxx > > LexisNexis Verlag ARD Orac GmbH & Co KG > Marxergasse 25, 1030 Wien > FN 8333f, Handelsgericht Wien > http://www.lexisnexis.at/ > > -----Urspr|ngliche Nachricht----- > > Von: Wolfgang Laun [mailto:wolfgang.laun@xxxxxxxxx] > Gesendet: Mittwoch, 14. April 2010 10:48 > An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Betreff: Re: [xsl] EXSLT replace to XSLT 2.0 replace > > 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 [] > > -W > > On Wed, Apr 14, 2010 at 9:48 AM, Szabo, Patrick (LNG-VIE) > <patrick.szabo@xxxxxxxxxxxxx> wrote: >> Hi, >> >> 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', >> '$1$2$3')"/> >> >> 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 >> XSLT-Entwickler >> >> Tel.: +43 (1) 534 52 - 1573 >> Fax: +43 (1) 534 52 - 146 >> >> Patrick.Szabo@xxxxxxxxxxxxx >> >> LexisNexis Verlag ARD Orac GmbH & Co KG >> Marxergasse 25, 1030 Wien >> FN 8333f, Handelsgericht Wien >> http://www.lexisnexis.at/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
AW: [xsl] EXSLT replace to XSLT 2.0, Szabo, Patrick \(LNG | Thread | Re: [xsl] EXSLT replace to XSLT 2.0, Imsieke, Gerrit, le- |
AW: [xsl] EXSLT replace to XSLT 2.0, Szabo, Patrick \(LNG | Date | [xsl] Strange Saxon error, Stephen Arbour |
Month |