http://zorba.io/warnings

Description

Before using any of the functions below please remember to import the module namespace:

import module namespace zwarn = "http://zorba.io/warnings";

This module contains one variable declaration for each diagnostic of the http://zorba.io/warnings namespace. The variables serves as documentation for the errors but can also be used in the code. For example, one useful scenario is to compare an error caught in the catch clause of a try-catch expression with one of the variables.

Module code

Here is the actual XQuery module code.

Authors

Carlos Lopez

Version Declaration

xquery version "1.0" encoding "utf-8";

Namespaces

zwarnhttp://zorba.io/warnings

Variables

zwarn:NS

zwarn:ZWST0002 as xs:QName

This warning is reported if the declaration of a function, variable, collection, or index contains an annotation that is not in the http://zorba.io/annotations namespace and Zorba doesn't know how to handle.

zwarn:ZWST0003

zwarn:ZWST0004

zwarn:ZWST0005 as xs:QName

This warning is raised if the user explicitly enables caching of function results (using the %an:cache annotation) but the function is updating or its parameter and return types are not subtypes of xs:anyAtomicType.

zwarn:ZWST0006 as xs:QName

This warning is raised if the user explicitly enables caching of function results (using the %an:cache annotation) and the function is annotated as sequential or nondeterministic.

zwarn:ZWST0007

zwarn:ZWST0008

zwarn:ZWST0009 as xs:QName

This warning is enabled when the "common-language" option is employed. It will raise warnings for language features that are not supported by both XQuery and JSONiq grammars.