Re: [xslt] regexp extension?

On Fri, Nov 30, 2001 at 11:01:40AM -0500, Bruce Miller wrote:
> Hi all;
>    Has anyone thought about implementing the regexp extension?
> (or already started !?!)

  Not that I know,

> I'd be willing to try my hand at writing the glue (presumably
> libexslt/regexp.c) providing there were an acceptable regexp
> library to base it on. (I'm not in the mood to implement a
> regexp library :>)

  Oh, really ;-) ?

> It doesn't appear that there already is such a library being
> used in libxml or libxslt, unless I'm missing it.  Using one

  Exact, so far I avoided depending on one, this makes the validation
code ... interesting :-)

> would add an additional dependence, but someone handy with
> configure could probably make the regexp extension enabled
> only if an appropriate library is present?

  Yep sounds doable and reasonable in the framework of EXSLT.

> At any rate, unless there's already such an extension in the
> works, does anyone have a recommendation for which regexp
> library would be best to use?

I have a strong bias toward POSIX regexps

REGCOMP(3)          Linux Programmer's Manual          REGCOMP(3)

       regcomp,  regexec,  regerror,  regfree - POSIX regex func­

       #include <regex.h>

       int regcomp(regex_t *preg, const char *regex, int cflags);
       int regexec(const   regex_t  *preg,  const  char  *string,
                   size_t  nmatch,   regmatch_t   pmatch[],   int
       size_t regerror(int  errcode,  const  regex_t  *preg, char
                       *errbuf, size_t errbuf_size);
       void regfree(regex_t *preg);

  I think one can find a free implementation of those in any sane
Operating system, plus it's standard on the main ones.


Daniel Veillard      | Red Hat Network  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]