This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Regular expression functions (Was: Re: comments on December F&O draft)
- From: "Steven Noels" <stevenn at outerthought dot org>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 10 Jan 2002 11:45:22 +0100
- Subject: RE: Regular expression functions (Was: Re: [xsl] comments on December F&O draft)
- Reply-to: xsl-list at lists dot mulberrytech dot com
> -----Original Message-----
> From: Jeni Tennison [mailto:jeni@jenitennison.com]
> Sent: donderdag 10 januari 2002 11:22
> To: Steven Noels
> Cc: xsl-list@lists.mulberrytech.com; Marc Portier
> Subject: Re: Regular expression functions (Was: Re: [xsl] comments on
> December F&O draft)
>
>
> Hi Steven,
>
> > I like all parameters to a certain action to be contained in the
> > same area, and storing the regexes inside 'global variables' would
> > conflict with that
>
> I can see the advantages to having the regular expressions close to
> the code that's generated from the regular expression - it makes it a
> lot easier to understand what's going on, especially if you're
> addressing sub-expressions.
that was the idea, yeah
> On the other hand, if you have a standard regular expression, perhaps
> something that you use in a lot of other regular expressions, it would
> be handy to have that regular expression stored somewhere separate.
> As a simple example, say I had a regular expression that matched
> numbers in scientific notation:
>
> [0-9]+(\.[0-9]+)?([Ee][+-][0-9]+)?
a very good case and something we should consider
> As I say, the problem with doing that is those ()s - I need to know
> what ()s are used where in order to tell what subexpressions I'm
> matching.
>
> This could be solved in two ways:
>
> - introducing a syntax (to XML Schema regular expressions - perhaps
> you already have it) for non-capturing matches
> - introducing a syntax for naming the subexpressions rather than
> numbering them
case 2 will eventually be what we are aiming for, I guess
and I better should look up the XML Schema regex spec, too - for now we
are using 'whatever is supported by Jakarta-ORO' ;-)
anyway, thanks for your suggestions!
regards,
</Steven>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list