Thanks for reporting it. If you're prepared to apply a fix, change line 761 of from
return new URL(value.toString());
return new URL(value.getStringValue());
Michael Kay

From: [] On Behalf Of Rademacher, Gunther
Sent: 15 May 2008 10:45
Subject: [saxon] Saxon on Java URLs

When I ran some XQuery code that calls Java, I came across a problem with
Java URLs being passed around in the query. Here is a small example:

        declare namespace url="";

This returns:

        The anyURI value '""' is not an acceptable Java URL

with a call stack of

        at net.sf.saxon.expr.PJConverter$AnyURIValueToURL.convert(
        at net.sf.saxon.functions.ExtensionFunctionCall.getTargetInstance(
        at net.sf.saxon.functions.ExtensionFunctionCall.iterate(
        at net.sf.saxon.expr.Expression.evaluateItem(
        at net.sf.saxon.expr.Expression.process(
        at net.sf.saxon.Query.runQuery(
        at net.sf.saxon.Query.doQuery(
        at net.sf.saxon.Query.main(

Best regards,

Software AG – Sitz/Registered office: Uhlandstraße 12, 64297 Darmstadt, Germany, – Registergericht/Commercial register: Darmstadt HRB 1562 - Vorstand/ Management Board: Karl-Heinz Streibich (Vorsitzender/Chairman), David Broadbent, Mark Edwards, Dr. Peter Kürpick,Arnd Zinnhardt; - Aufsichtsratsvorsitzender/ Chairman of the Supervisory Board: Frank F. Beelitz -