XQST0048

One of the functions and variables declared in a library module is not in the target namespace. Every function and prolog variable declared in a library module must be qualified with the target namespace of that module. Generally, this means that they use the prefix that is mapped to the target namespace in the module declaration. For example, the following is not permitted because the variable maxStringLength is not in the target namespace:

module namespace strings = "http://datypic.com/strings";
declare variable $maxStringLength := 32;
declare function strings:trim($arg as xs:string?) as xs:string? {
  "function body here"
};

Instead, it must be prefixed with strings: to put it in the target namespace http://datypic.com/strings.

Get XQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.