Project

Profile

Help

XQuery: 9.1 build causes XPST0017 error

Added by Anonymous almost 16 years ago

Legacy ID: #5114981 Legacy Poster: Patrick Oosterveld (poosterveld)

Since build 9.1 we are facing errors (like XPST0017) when compiling XQuery with java extension. Here below you find an example of an extension: An XQuery: declare namespace sp105 = "nl.firm.referentiecode.SP105"; let $categoryID := sp005:convertToString(sp005:CAT_CONFIRMED()) The used Enum class SP105: public enum SP005 implements RefCodeEnum{ //notInitializedRefcode is declared in interface RefCodeEnum as a default status NULL(null), CAT_ALLOWED(notInitializedRefcode), CAT_CONFIRMED(notInitializedRefcode), Status status; SP005(Status status) { this.status = status; } public String convertToString() { return Status.getValue(status); } } The error: When initializing variable $categoryID an exception occured, namely: Error on line 11 XPST0017: Cannot find a matching 0-argument function named {nl.firm.referentiecode.SP105}CAT_CONFIRMED() In Saxon version 9.0 and previous versions the above XQuery works fine.


Replies (2)

RE: XQuery: 9.1 build causes XPST0017 error - Added by Anonymous almost 16 years ago

Legacy ID: #5115262 Legacy Poster: Michael Kay (mhkay)

Prior to release 9.1, Saxon supported a number of undocumented formats for the namespace URI for extension functions, largely for compatibility with older XSLT releases including the long-withdrawn XSLT 1.1 draft specification from W3C. Support for these formats was withdrawn in 9.1 because it led to poor diagnostics - any unrecognized URI was assumed to refer to a Java class, which meant that errors in naming user-written functions were often poorly reported. You must now use the documented URI format starting with "java:", for example "java:com.acme.widgets.MyClass". Michael Kay Saxonica

RE: XQuery: 9.1 build causes XPST0017 error - Added by Anonymous almost 16 years ago

Legacy ID: #5117139 Legacy Poster: Patrick Oosterveld (poosterveld)

Thanks Micheal. That was indeed the missing part of the namespace.

    (1-2/2)

    Please register to reply