-16005   AN XQUERY EXPRESSION REFERENCES AN ELEMENT NAME, ATTRIBUTE NAME, TYPE NAME, FUNCTION NAME, NAMESPACE PREFIX, OR VARIABLE NAME undefined-name THAT IS NOT DEFINED WITHIN THE STATIC CONTEXT. ERROR QNAME= ERR:XPST0008

Explanation

During the static analysis phase, the static context is used to resolve element names, attribute names, type names, function name, namespace prefixes, and variable names. If an expression uses an undefined-name that is not found in the static context, a static error is raised.

System action

The XQuery expression cannot be processed.

Programmer response

Use a name that is defined within the static context. If the QName includes a prefix, verify that the namespace prefix has been bound to a namespace through a namespace declaration. If the error resulted from a variable reference, verify that the variable is in-scope for the expression.

SQLSTATE

10506