[xquery-talk] XML Query Test Suite version 0.8.4

Michael Kay mhk at mhk.me.uk
Mon Jan 9 13:20:05 PST 2006


> I'm hoping
> to improve error code handling before then in the convertor. The main
> problem is not the error raised or the error message given to 
> the user,
> just the pesky error codes which are different (some of the 
> time) between
> XSLT and XQuery, and xq2xsl raises the XSLT ones, since it's 
> running on
> an XSLT engine... 

Try calling the Saxon method 

configuration.setHostLanguage(Configuration.XQUERY)

No guarantees, but this is used almost exclusively for

(a) deciding whether or not a particular condition is an error (e.g. two
attributes with the same name)

(b) deciding whether to generate the XSLT or XQuery error code

Incidentally I have the same problem with my test driver. Because the test
driver is written in XSLT, Saxon thinks it's in XSLT mode and generates XSLT
error codes. I need to fix that by making the language switch more
fine-grained. When I do that, the above trick may no longer be possible...

Michael Kay
http://www.saxonica.com/




More information about the talk mailing list