Difference between revisions of "XQuery Errors"
Jump to navigation
Jump to search
m (moved Error Codes to XQuery Errors) |
|
(No difference)
|
Revision as of 12:12, 29 January 2011
This article is part of the Query Portal. It summarizes all error codes that may be thrown by the BaseX XQuery processor.
As the official specifications are written too formal to be easily understood, we tried our best to make this article comprehensible to everyone. The following tables include the error code that is raised by BaseX, a description, and examples of queries raising that error.
XPST: Static Errors
Code | Description | Examples |
---|---|---|
XPST0003
|
An error occurred while parsing the query string (i.e., before the query could be compiled and executed). This error is the most common one, and may be accompanied by a variety of different error messages. | 1+
|
XPST0005
|
An expression will never results, no matter what input will be processed. | doc('input')/..
|
XPST0008
|
A variable or type name is used that has not been defined in the current scope. | $a---
|
XPST0017
|
• The specified function is unknown, or • it uses the wrong number of arguments. |
fn:unknown()
|
XPST0051
|
An unknown QName is used in a sequence type (e.g. in the target type of the cast expression).
|
1 instance of x
|
XPST0080
|
xs:NOTATION or xs:anyAtomicType is used as target type of cast or castable .
|
1 castable as xs:NOTATION
|
XPST0081
|
• A QName uses a prefix that has not been bound to any namespace, or • A pragma or option declaration has not been prefixed. |
unknown:x
|
XPTY: Type Errors
Code | Description | Examples |
---|---|---|
XPTY0004
|
This error is raised if an expression has the wrong type, or cannot be cast into the specified type. It may be raised both statically (during query compilation) or dynamically (at runtime). | 1 + "A"
|
XPTY0018
|
The result of the last step in a path expression contains both nodes and atomic values. | doc('input.xml')/(*, 1)
|
XPTY0019
|
The result of a step (other than the last step) in a path expression contains an atomic values. | (1 to 10)/*
|
In progress...
Code | Description | Examples |
---|---|---|
|
|