xsl-list
[Top] [All Lists]

Re: XSLT 2.0 matches function (Saxon)

2005-08-08 01:28:51
Michael Kay wrote:

Well, if you can't spot the error with the diagnostics in front of you, then
it's unlikely other people will be able to spot it without...

I'm just a newbie to XSLT. But you're of course right.


<?xml version="1.0" encoding="UTF-8"?>[\.\?!]+[\.\?!]+[\xff61\x3002\xff0e\xff1f\xff01]+

Does this sound like evidence?



Absolutely. You said that $before contained "[\.\?!]+" and this shows that
it doesn't.

It does, but only twice. There are three elements here, so $before gets three values:

[\.\?!]+

[\.\?!]+

and

[\xff61\x3002\xff0e\xff1f\xff01]+

which is a ICU regular expression, and this seems to make Saxon complain (rightly).

There's some garbage in here, you need to find out where it came
from. \xff61 is not valid in an XPath regular expression.

Thanks for pointing this out. I thought Saxon was evaluating the first expression when it complained about the escaped sequence.

I'll need to build a Java API to use ICU regexps from the icu.jar library. But at first I wanted to check the design of the template with XPath regexps. Seems like I'd have to tweak the test data to build the first version of the template.

Thanks again,
        Marcin

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>