With Saxon-EE you could catch the error using try/catch:



Apart from that, I think the only option is to write your own extension function. (It doesn't have to be in a separate thread.)

Michael Kay

On 30/08/2010 11:45 PM, Todd Gochenour wrote:
Changing the saxon namespace URI to http://saxon.sf.net/ indeed does the trick.  The expression()  function is now properly defined.   Yet it also is throwing a java exception whereas I hoped it would at least return false to a test condition.

The path string I am building is a composite of values in an XML document that a user has submitted and I need to verify that they've not done something wrong like use backslash by mistake.  Turns out I have a custom namespace used in on the XQuery db side of things so the namespace isn't defined to XSL (yet).   This is the kind of exception that I'd like to catch with a calling to expression() or something similar.

I suppose I could write a java function to do this in a separate thread and return the syntax error.  Is this what I must do?

------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help