[Xml-compile] Possible problem with regex compilation?

Dan Lyke dlyke at corp.sonic.net
Fri Mar 29 22:12:38 GMT 2013


On Fri, 29 Mar 2013 21:20:04 +0100
Mark Overmeer <mark at overmeer.net> wrote:
> XML regexes are slightly different from XML pattern.  Those are
> directly handled by XML::LibXML, not in XML::Compile.
[snip]
>   my $compiled = XML::LibXML::RegExp->new($regex);
>   print $compiled->matches($string) ? "Success\n" : "Fail\n";
> 
> Does this Fail?

Yep. And a bunch of mucking around with it and a quick look at
the code in XML::LibXML::RegExp suggests that the bug is in libxml2.

I'll write some C code later to test and see about submitting the bug
to them, but for now since I have control of the XSD and the error is
being thrown on my end, I'll change it to <pattern value=".*"/>

Thanks!

Dan
(Some days, I wish I were just writing Java or C#...)



More information about the Xml-compile mailing list