This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Regular expression functions (Was: Re: comments on December F&O draft)


> And the XML Schema regexp syntax would need to be
> amended so that it can match the start/end of strings.
>
> Yes. The latter is needed in anycase, fuly anchored regexp's
> make sense
> for schema validating content models of elements but are not
> really what
> you want for a general search/replace system.
>
Just for clarity: although the xf:match() function reuses the syntax and
semantics of regular expressions as defined in schema, the regexp is not
anchored in the case of xf:match(). This is because although schema
specifies that the regexp must match the whole string, xf:match() in effect
tests the regexp against every substring of the supplied string and returns
a list of those substrings that match. I guess this raises the question as
to whether we need an anchored match as well. I think that we've been trying
(perhaps a bit too hard) to avoid making any modification at all to the
regexp syntax and semantics defined in Schema.

I'm interested in your exploration of the use-cases for regexp matching and
possible XSLT constructs to support those use cases, though so far I've had
difficulty following the "make-it-up-as-you-go-along" style of
specification!

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]