error.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2006-2008 The FLWOR Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #ifndef ZORBA_ERROR_API_H
00017 #define ZORBA_ERROR_API_H
00018 
00019 /** \brief The ErrorCode enum contains all error codes that can be reported by the XQuery
00020  *         processor.
00021  *
00022  * Error codes are either the error codes defined by the %XQuery 1.0 or the
00023  * XQuery 1.0 and XPath 2.0 Functions and Operators Specification or error codes
00024  * specifically related to %Zorba.
00025  */
00026 typedef enum
00027 {
00028   // no error
00029   XQ_NO_ERROR = 0,
00030 
00031   //
00032   // XPath dynamic errors
00033   //
00034   XPDY0002,
00035   // evaluation of an expression relies on some part of the dynamic context
00036   // that has not been assigned a value.
00037 
00038   XPDY0021,
00039   // (Not currently used.)
00040 
00041   XPDY0050,
00042   // the dynamic type of the operand of a treat expression does not match the
00043   // sequence type specified by the treat expression. This error might also
00044   // be raised by a path expression beginning with "/" or "// " if the context
00045   // node is not in a tree that is rooted at a document node. This is because
00046   // a leading "/" or "// " in a path expression is an abbreviation for an
00047   // initial step that includes the clause treat as document-node().
00048 
00049   //
00050   // XPath static errors
00051   //
00052 
00053   XPST0001,
00054   // analysis of an expression relies on some component of the static context
00055   // that has not been assigned a value.
00056 
00057   XPST0003,
00058   // an expression is not a valid instance of the grammar.
00059 
00060   XPST0005,
00061   // During the analysis phase, it is a static error if the static type
00062   // assigned to an expression other than the expression () or data(()) is
00063   // empty-sequence().
00064 
00065   XPST0008,
00066   // an expression refers to an element name, attribute name, schema type
00067   // name, namespace prefix, or variable name that is not defined in the
00068   // static context, except for an ElementName in an ElementTest or an
00069   // AttributeName in an AttributeTest.
00070 
00071   XPST0010,
00072   // An implementation must raise a static error if it encounters a reference
00073   // to an axis that it does not support.
00074 
00075   XPST0017,
00076   // the expanded QName and number of arguments in a function call do not
00077   // match the name and arity of a function signature in the static context.
00078 
00079   XPST0051,
00080   // a QName that is used as an AtomicType in a SequenceType is not defined
00081   // in the in-scope schema types as an atomic type.
00082 
00083   XPST0080,
00084   // the target type of a cast or castable expression is xs:NOTATION or
00085   // xs:anyAtomicType.
00086 
00087   XPST0081,
00088   // a QName used in a query contains a namespace prefix that cannot be
00089   // expanded into a namespace URI by using the statically known namespaces.
00090 
00091   XPST0083,
00092   // (Not currently used.)
00093 
00094   //
00095   // XPath type errors
00096   //
00097 
00098   XPTY0004,
00099   // during the static analysis phase, an expression is found to have a
00100   // static type that is not appropriate for the context in which the
00101   // expression occurs, or during the dynamic evaluation phase, the dynamic
00102   // type of a value does not match a required type as specified by the
00103   // matching rules in 2.5.4,  // SequenceType Matching.
00104 
00105   XPTY0006,
00106   // (Not currently used.)
00107 
00108   XPTY0007,
00109   // (Not currently used.)
00110 
00111   XPTY0018,
00112   // the result of the last step in a path expression contains both nodes
00113   // and atomic values.
00114 
00115   XPTY0019,
00116   // the result of a step (other than the last step) in a path expression
00117   // contains an atomic value.
00118 
00119   XPTY0020,
00120   // in an axis step, the context item is not a node.
00121 
00122   //
00123   // XQuery dynamic errors
00124   //
00125 
00126   XQDY0025,
00127   // any attribute of a constructed element does not have a name that is
00128   // distinct from the names of all other attributes of the constructed
00129   // element.
00130 
00131   XQDY0026,
00132   // a constructor or replace expression results in a processing instruction
00133   // node whose content includes the string "?>".
00134 
00135   XQDY0027,
00136   // In a validate expression, it is a dynamic error if the root element
00137   // information item in the PSVI resulting from validation does not have
00138   // the expected validity property: valid if validation mode is strict,
00139   // or either valid or notKnown if validation mode is lax.
00140 
00141   XQDY0029,
00142   // (Not currently used.)
00143 
00144   XQDY0041,
00145   // the value of the name expression in a computed processing instruction
00146   // constructor cannot be cast to the type xs:NCName.
00147 
00148   XQDY0044,
00149   // the node-name property of the node constructed by a computed attribute
00150   // constructor is in the namespace http:// www.w3.org/2000/xmlns/
00151   // (corresponding to namespace prefix xmlns), or is in no namespace and
00152   // has local name xmlns.
00153 
00154   XQDY0052,
00155   // (Not currently used.)
00156 
00157   XQDY0061,
00158   // the operand of a validate expression is a document node whose children
00159   // do not consist of exactly one element node and zero or more comment and
00160   // processing instruction nodes, in any order.
00161 
00162   XQDY0062,
00163   // (Not currently used.)
00164 
00165   XQDY0064,
00166   // the value of the name expression in a computed processing instruction
00167   // constructor is equal to "XML" (in any combination of upper and lower case).
00168 
00169   XQDY0072,
00170   // a constructor or replace expression results in a comment node whose
00171   // content ends with a hyphen or contains two adjacent hyphens.
00172 
00173   XQDY0074,
00174   // the value of the name expression in a computed element or attribute
00175   // constructor or rename expression cannot be converted to an expanded
00176   // QName (for example, because it contains a namespace prefix not found
00177   // in statically known namespaces.) 
00178 
00179   XQDY0084,
00180   // the element validated by a validate statement does not have a top-level
00181   // element declaration in the in-scope element declarations, if validation
00182   // mode is strict.
00183 
00184   XQDY0091,
00185   // An implementation MAY raise a dynamic error if an xml:id error, as
00186   // defined in [XML ID], is encountered during construction of an attribute
00187   // named xml:id.
00188 
00189   XQDY0092,
00190   // An implementation MAY raise a dynamic error if a constructed attribute
00191   // named xml:space has a value other than preserve or default.
00192 
00193   //
00194   // XQuery static errors
00195   //
00196 
00197   XQST0009,
00198   // An implementation that does not support the Schema Import Feature must
00199   // raise a static error if a Prolog contains a schema import.
00200 
00201   XQST0012,
00202   // the set of definitions contained in all schemas imported by a Prolog do
00203   // not satisfy the conditions for schema validity specified in Sections 3,
00204   //  // and 5,  // of [XML Schema] Part 1--i.e., each definition must be
00205   // valid, complete, and unique.
00206 
00207   XQST0013,
00208   // an implementation recognizes a pragma but determines that its content
00209   // is invalid.
00210 
00211   XQST0014,
00212   // (Not currently used.)
00213 
00214   XQST0015,
00215   // (Not currently used.)
00216 
00217   XQST0016,
00218   // An implementation that does not support the Module Feature raises a
00219   // static error if it encounters a module declaration or a module import.
00220 
00221   XQST0022,
00222   // the value of a namespace declaration attribute is not a URILiteral.
00223 
00224   XQST0031,
00225   // the version number specified in a version declaration is not supported by
00226   // the implementation.
00227 
00228   XQST0032,
00229   // A static error is raised if a Prolog contains more than one base URI
00230   // declaration.
00231 
00232   XQST0033,
00233   // a module contains multiple bindings for the same namespace prefix.
00234 
00235   XQST0034,
00236   // multiple functions declared or imported by a module have the number of
00237   // arguments and their expanded QNames are equal (as defined by the eq
00238   // operator).
00239 
00240   XQST0035,
00241   // It is a static error to import two schema components that both define
00242   // the same name in the same symbol space and in the same scope.
00243 
00244   XQST0036,
00245   // It is a static error to import a module if the importing module's in-scope
00246   // schema types do not include definitions for the schema type names that
00247   // appear in the declarations of variables and functions (whether in an
00248   // argument type or return type) that are present in the imported module and
00249   // are referenced in the importing module.
00250 
00251   XQST0037,
00252   // (Not currently used.)
00253 
00254   XQST0038,
00255   // a Prolog contains more than one default collation declaration, or the 
00256   //value specified by a default collation declaration is not present in
00257   // statically known collations.
00258 
00259   XQST0039,
00260   // It is a static error for a function declaration to have more than one
00261   // parameter with the same name.
00262 
00263   XQST0040,
00264   // the attributes specified by a direct element constructor do not have
00265   // distinct expanded QNames.
00266 
00267   XQST0042,
00268   // (Not currently used.)
00269 
00270   XQST0043,
00271   // (Not currently used.)
00272 
00273   XQST0045,
00274   // the function name in a function declaration is in one of the following
00275   // namespaces:
00276   // http://www.w3.org/XML/1998/namespace,
00277   // http://www.w3.org/2001/XMLSchema,
00278   // http:// www.w3.org/2001/XMLSchema-instance,
00279   // http://www.w3.org/2005/xpath-functions.
00280 
00281   XQST0046,
00282   // An implementation MAY raise a static error if the value of a URILiteral
00283   // is of nonzero length and is not in the lexical space of xs:anyURI.
00284 
00285   XQST0047,
00286   // multiple module imports in the same Prolog specify the same target
00287   // namespace.
00288 
00289   XQST0048,
00290   // a function or variable declared in a library module is not in the
00291   // target namespace of the library module.
00292 
00293   XQST0049,
00294   // two or more variables declared or imported by a module have equal
00295   // expanded QNames (as defined by the eq operator.)
00296 
00297   XQST0053,
00298   // (Not currently used.)
00299 
00300   XQST0054,
00301   // a variable depends on itself.
00302 
00303   XQST0055,
00304   // a Prolog contains more than one copy-namespaces declaration.
00305 
00306   XQST0056,
00307   // (Not currently used.)
00308 
00309   XQST0057,
00310   // a schema import binds a namespace prefix but does not specify a target
00311   // namespace other than a zero-length string.
00312 
00313   XQST0058,
00314   // multiple schema imports specify the same target namespace.
00315 
00316   XQST0059,
00317   // an implementation is unable to process a schema or module import by
00318   // finding a schema or module with the specified target namespace.
00319 
00320   XQST0060,
00321   // the name of a function in a function declaration is not in a namespace
00322   // (expanded QName has a null namespace URI).
00323 
00324   XQST0063,
00325   // (Not currently used.)
00326 
00327   XQST0065,
00328   // A static error is raised if a Prolog contains more than one ordering
00329   // mode declaration.
00330 
00331   XQST0066,
00332   // A static error is raised if a Prolog contains more than one default
00333   // element/type namespace declaration, or more than one default function
00334   // namespace declaration.
00335 
00336   XQST0067,
00337   // A static error is raised if a Prolog contains more than one construction declaration.
00338 
00339   XQST0068,
00340   // A static error is raised if a Prolog contains more than one boundary-space
00341   // declaration.
00342 
00343   XQST0069,
00344   // A static error is raised if a Prolog contains more than one empty order declaration.
00345 
00346   XQST0070,
00347   // A static error is raised if a namespace URI is bound to the predefined
00348   // prefix xmlns, or if a namespace URI other than
00349   // http:// www.w3.org/XML/1998/namespace is bound to the prefix xml, or if
00350   // the prefix xml is bound to a namespace URI other
00351   // than http:// www.w3.org/XML/1998/namespace.
00352 
00353   XQST0071,
00354   // A static error is raised if the namespace declaration attributes of a
00355   // direct element constructor do not have distinct names.
00356 
00357   XQST0073,
00358   // the graph of module imports contains a cycle (that is, if there exists a
00359   // sequence of modules M1,  ... Mn such that each Mi imports Mi+1, and Mn
00360   // imports M1), unless all the modules in the cycle share a common namespace.
00361 
00362   XQST0075,
00363   // An implementation that does not support the Validation Feature must raise
00364   // a static error if it encounters a validate expression.
00365 
00366   XQST0076,
00367   // a collation subclause in an order by clause of a FLWOR expression does
00368   // not identify a collation that is present in statically known collations.
00369 
00370   XQST0077,
00371   // (Not currently used.)
00372 
00373   XQST0078,
00374   // (Not currently used.)
00375 
00376   XQST0079,
00377   // an extension expression contains neither a pragma that is recognized by
00378   // the implementation nor an expression enclosed in curly braces.
00379 
00380   XQST0082,
00381   // (Not currently used.)
00382 
00383   XQST0085,
00384   // the namespace URI in a namespace declaration attribute is a zero-length
00385   // string, and the implementation does not support [XML Names 1.1].
00386 
00387   XQST0087,
00388   // the encoding specified in a Version Declaration does not conform to the
00389   // definition of EncName specified in [XML 1.0].
00390 
00391   XQST0088,
00392   // the literal that specifies the target namespace in a module import or a
00393   // module declaration is of zero length.
00394 
00395   XQST0089,
00396   // a variable bound in a for clause of a FLWOR expression, and its associated
00397   // positional variable, do not have distinct names (expanded QNames).
00398 
00399   XQST0090,
00400   // a character reference does not identify a valid character in the version
00401   // of XML that is in use.
00402 
00403   XQST0093,
00404   // It is a static error to import a module M1,  // if there exists a sequence
00405   // of modules M1, ... Mi ... M1, such that each module directly depends on
00406   // the next module in the sequence (informally, if M1, depends on itself
00407   // through some chain of module dependencies.)
00408 
00409   //
00410   // XQuery Type erros
00411   //
00412 
00413   XQTY0023,
00414   // (Not currently used.)
00415 
00416   XQTY0024,
00417   // the content sequence in an element constructor contains an attribute node
00418   // following a node that is not an attribute node.
00419 
00420   XQTY0028,
00421   // (Not currently used.)
00422 
00423   XQTY0030,
00424   // the argument of a validate expression does not evaluate to exactly one
00425   // document or element node.
00426 
00427   XQTY0086,
00428   // the typed value of a copied element or attribute node is namespace-
00429   // sensitive when construction mode is preserve and copy-namespaces mode
00430   // is no-preserve.
00431 
00432   //
00433   // XQuery Update Facility
00434   //
00435 
00436   XUST0001,
00437   // It is a static error if an updating expression is used in any position
00438   // other than one of the following:
00439   // 1. The topmost expression in the body of a query.
00440   // 2. The modify clause of a transform expression.
00441   // 3. The return clause of a FLWOR expression.
00442   // 4. The return clauses of a typeswitch expression in which every return
00443   //    clause contains an updating expression, an empty expression ( ), or
00444   //    a call to the fn:error function.
00445   // 5. The then and else clauses of a conditional statement in which both
00446   //    the then and else clauses contain either an updating expression, an
00447   //    empty expression ( ), or a call to the fn:error function.
00448   // 6. An operand of a comma expression in which each operand is either an
00449   //    updating expression, an empty expression ( ), or a call to the
00450   //    fn:error function.
00451   // 7. The content of a parenthesized expression.
00452   // 8. The body of a function declaration in which the keyword updating
00453   //    is specified.
00454 
00455   XUST0002,
00456   // It is a static error if an non-updating expression other than an
00457   // empty expression ( ) or a call to the fn:error function is used in
00458   // one of the following positions:
00459   // 1. The modify clause of a transform expression.
00460   // 2. The top-level expression in the body of a function declaration in
00461   //     which the keyword updating is specified.
00462 
00463   XUST0003,
00464   // It is a static error if a Prolog contains more than one revalidation
00465   // declaration.
00466 
00467   XUTY0004,
00468   // It is a type error if the insertion sequence of an insert expression
00469   // contains an attribute node following a node that is not an attribute node.
00470 
00471   XUTY0005,
00472   // In an insert expression where into, as first into, or as last into
00473   // is specified, it is a type error if the target expression returns a
00474   // non-empty result that does not consist of a single element or document
00475   // node.
00476 
00477   XUTY0006,
00478   // In an insert expression where before or after is specified, it is a
00479   // type error if the target expression returns a non-empty result that
00480   // does not consist of a single element, text, comment, or processing
00481   // instruction node.
00482 
00483   XUTY0007,
00484   // It is a type error if the target expression of a delete expression
00485   // does not return a sequence of zero or more nodes.
00486 
00487   XUTY0008,
00488   // In a replace expression, it is a type error if the target expression
00489   // returns a non-empty result that does not consist of a single element,
00490   // attribute, text, comment, or processing instruction node.
00491 
00492   XUDY0009,
00493   // In a replace expression where value of is not specified, it is a
00494   // dynamic error if the node returned by the target expression does not
00495   // have a parent.
00496 
00497   XUTY0010,
00498   // In a replace expression where value of is not specified and the
00499   // target is an element, text, comment, or processing instruction node,
00500   // it is a type error if the replacement sequence does not consist of
00501   // zero or more element, text, comment, or processing instruction nodes.
00502 
00503   XUTY0011,
00504   // In a replace expression where value of is not specified and the target
00505   // is an attribute node, it is a type error if the replacement sequence
00506   // does not consist of zero or more attribute nodes.
00507 
00508   XUTY0012,
00509   // In a rename expression, it is a type error if the target expression
00510   // returns a non-empty result that does not consist of a single element,
00511   // attribute, or processing instruction node.
00512 
00513   XUTY0013,
00514   // In a transform expression, it is a type error if a source expression
00515   // in the copy clause does not return a single node.
00516 
00517   XUDY0014,
00518   // In a transform expression, it is a dynamic error if the modify clause
00519   // modifies any node that was not created by the copy clause.
00520 
00521   XUDY0015,
00522   // It is a dynamic error if any node is the target of more than one
00523   // rename expression within the same query.
00524 
00525   XUDY0016,
00526   // It is a dynamic error if any node is the target of more than one
00527   // replace expression (without value of being specified) within the
00528   // same query.
00529 
00530   XUDY0017,
00531   // It is a dynamic error if any node is the target of more than one
00532   // replace value of expression within the same query.
00533 
00534   XUDY0018,
00535   // It is a dynamic error if a function that was declared to be external
00536   // but not updating returns a non-empty pending update list.
00537 
00538   XUDY0019,
00539   // It is a dynamic error if a function that was declared to be both
00540   // external and updating returns a non-empty data model instance.
00541 
00542   XUDY0020,
00543   // An implementation may (but is not required to) raise a dynamic error
00544   // if a node is deleted that had no parent before execution of the query
00545   // began.
00546 
00547   XUDY0021,
00548   // It is a dynamic error if the XDM instance that would result from
00549   // applying all the updates in a query violates any constraint specified
00550   // in [XQuery/XPath Data Model (XDM)]. In this case, none of the updates
00551   // in the query are made effective.
00552 
00553   XUTY0022,
00554   // It is a type error if an insert expression specifies the insertion
00555   // of an attribute node into a document node.
00556 
00557   XUDY0023,
00558   // It is a dynamic error if an insert, replace, or rename expression
00559   // affects an element node by introducing a new namespace binding that
00560   // conflicts with one of its existing namespace bindings.
00561 
00562   XUDY0024,
00563   // It is a dynamic error if the effect of a set of updating expressions
00564   // is to introduce conflicting namespace bindings into an element node.
00565 
00566   XUDY0025,
00567   // It is a dynamic error if the target of a rename expression is a
00568   // processing instruction node, and the new name expression returns a
00569   // QName with a non-empty namespace prefix.
00570 
00571   XUST0026,
00572   // It is a static error if a revalidation declaration in a Prolog
00573   // specifies a revalidation mode that is not supported by the current
00574   // implementation.
00575 
00576   XUDY0027,
00577   // It is a dynamic error if the target expression of an insert, replace,
00578   // or rename expression evaluates to an empty sequence.
00579 
00580   XUST0028,
00581   // It is a static error if a function declaration specifies both updating
00582   // and a return type.
00583 
00584   XUDY0029,
00585   // In an insert expression where before or after is specified, it is a
00586   // dynamic error if node returned by the target expression does not have
00587   // a parent.
00588 
00589   XUDY0030,
00590   // It is a dynamic error if an insert expression specifies the insertion
00591   // of an attribute node before or after a child of a document node.
00592 
00593   //
00594   // XQuery 1.0 and XPath 2.0 Functions and Operators
00595   //
00596 
00597   FOER0000, //Unidentified error.
00598 
00599   FOAR0001, //Division by zero.  This error is raised whenever an attempt is made to divide by zero.
00600 
00601   FOAR0002, //Numeric operation overflow/underflow.  This error is raised whenever numeric operations result in an overflow or underflow.
00602 
00603   FOCA0001, //Input value too large for decimal.
00604 
00605   FOCA0002, //Invalid lexical value.
00606 
00607   FOCA0003, //Input value too large for integer.
00608 
00609   FOCA0005, //NaN supplied as float/double value.
00610 
00611   FOCA0006, //String to be cast to decimal has too many digits of precision.
00612 
00613   FOCH0001, //Code point not valid.
00614 
00615   FOCH0002, //Unsupported collation.
00616 
00617   FOCH0003, //Unsupported normalization form.
00618 
00619   FOCH0004, //Collation does not support collation units.
00620 
00621   FODC0001, //No context document.
00622 
00623   FODC0002, //Error retrieving resource.
00624 
00625   FODC0003, //Function stability not defined.
00626 
00627   FODC0004, //Invalid argument to fn:collection.
00628 
00629   FODC0005, //Invalid argument to fn:doc or fn:doc-available.
00630 
00631   FODT0001, //Overflow/underflow in date/time operation.
00632 
00633   FODT0002, //Overflow/underflow in duration operation.
00634 
00635   FODT0003, //Invalid timezone value.
00636 
00637   FONS0004, //No namespace found for prefix.
00638 
00639   FONS0005, //Base-uri not defined in the static context.
00640 
00641   FORG0001, //Invalid value for cast/constructor.
00642 
00643   FORG0002, //Invalid argument to fn:resolve-uri().
00644 
00645   FORG0003, //fn:zero-or-one called with a sequence containing more than one item.
00646 
00647   FORG0004, //fn:one-or-more called with a sequence containing no items.
00648 
00649   FORG0005, //fn:exactly-one called with a sequence containing zero or more than one item.
00650 
00651   FORG0006, //Invalid argument type.
00652 
00653   FORG0008, //Both arguments to fn:dateTime have a specified timezone.
00654 
00655   FORG0009, //Error in resolving a relative URI against a base URI in fn:resolve-uri.
00656 
00657   FORX0001, //Invalid regular expression. flags
00658 
00659   FORX0002, //Invalid regular expression.
00660 
00661   FORX0003, //Regular expression matches zero-length string.
00662 
00663   FORX0004, //Invalid replacement string.
00664 
00665   FOTY0012, //Argument node does not have a typed value.
00666 
00667   FOUP0001,
00668   // It is a dynamic error if the first operand of fn:put is not a node of
00669   // a supported kind.
00670 
00671   FOUP0002,
00672   // It is a dynamic error if the second operand of fn:put is not a valid
00673   // lexical representation of the xs:anyURI type.
00674 
00675   //
00676   // Serialization errors
00677   //
00678   SENR0001,
00679   //  It is an error if an item in S6 in sequence normalization is an attribute node or a namespace node.
00680 
00681   SERE0003,
00682   //  It is an error if the serializer is unable to satisfy the rules for 
00683   //  either a well-formed XML document entity or a well-formed XML external 
00684   //  general parsed entity, or both, except for content modified by the 
00685   //  character expansion phase of serialization.
00686 
00687   SEPM0004,
00688   //  It is an error to specify the doctype-system parameter, or to specify 
00689   //  the standalone parameter with a value other than omit, if the instance 
00690   //  of the data model contains text nodes or multiple element nodes as 
00691   //  children of the root node.
00692 
00693   SERE0005,
00694   //  It is an error if the serialized result would contain an NCName Names
00695   //  that contains a character that is not permitted by the version of 
00696   //  Namespaces in XML specified by the version parameter.
00697 
00698   SERE0006,
00699   //  It is an error if the serialized result would contain a character 
00700   //  that is not permitted by the version of XML specified by the version
00701   //  parameter.
00702 
00703   SESU0007,
00704   //  It is an error if an output encoding other than UTF-8 or UTF-16 is requested and the serializer 
00705   //  does not support that encoding.
00706 
00707   SERE0008,
00708   //  It is an error if a character that cannot be represented in the encoding that the serializer is using 
00709   //  for output appears in a context where character references are not allowed (for example if the character
00710   //  occurs in the name of an element).
00711 
00712   SEPM0009,
00713   //  It is an error if the omit-xml-declaration parameter has the value yes, and the standalone attribute 
00714   //  has a value other than omit; or the version parameter has a value other than 1.0 and the doctype-system 
00715   //  parameter is specified.
00716 
00717   SEPM0010,
00718   //  It is an error if the output method is xml, the value of the undeclare-prefixes parameter is yes, and
00719   //  the value of the version parameter is 1.0.
00720 
00721   SESU0011,
00722   //  It is an error if the value of the normalization-form parameter specifies a normalization form that 
00723   //  is not supported by the serializer.
00724 
00725   SERE0012,
00726   //  It is an error if the value of the normalization-form parameter is fully-normalized and any relevant 
00727   //  construct of the result begins with a combining character.
00728 
00729   SESU0013,
00730   //  It is an error if the serializer does not support the version of XML or HTML specified by the version parameter.
00731 
00732   SERE0014,
00733   //  It is an error to use the HTML output method when characters which are legal in XML but not in HTML,
00734   //  specifically the control characters #x7F-#x9F, appear in the instance of the data model.
00735 
00736   SERE0015,
00737   //  It is an error to use the HTML output method when > appears within a processing instruction in the data model
00738   //  instance being serialized.
00739 
00740   SEPM0016,
00741   // It is a an error if a parameter value is invalid for the defined domain.
00742 
00743   //
00744   // ZORBA errors
00745   //
00746   XQP0000_DYNAMIC_RUNTIME_ERROR,
00747   XQP0001_DYNAMIC_ITERATOR_OVERRUN,
00748   XQP0002_DYNAMIC_ILLEGAL_NODE_CHILD,
00749   XQP0003_DYNAMIC_TARGET_NAMESPACE_NOT_FOUND,
00750   XQP0004_SYSTEM_NOT_SUPPORTED,
00751   XQP0005_SYSTEM_ASSERT_FAILED,
00752   XQP0006_SYSTEM_HASH_ERROR_KEYLEN_EXCEEDS_MAXKEYLEN,
00753   XQP0007_SYSTEM_VECTOR_OUT_OF_RANGE,
00754   XQP0008_SYSTEM_READ_LOCK_FAILED,
00755   XQP0009_SYSTEM_WRITE_LOCK_FAILED,
00756   XQP0010_SYSTEM_POP_FROM_EMPTY_LIST,
00757   XQP0011_SYSTEM_FILE_ERROR_IN_FUNCTION,
00758   XQP0012_SYSTEM_FXCHARHEAP_IOEXCEPTION,
00759   XQP0013_SYSTEM_MMFILE_IOEXCEPTION,
00760   XQP0015_SYSTEM_NOT_YET_IMPLEMENTED,
00761   XQP0016_LOADER_IO_ERROR,
00762   XQP0017_LOADER_PARSING_ERROR,
00763   XQP0018_NODEID_ERROR,
00764   XQP0019_INTERNAL_ERROR,
00765   XQP0020_INVALID_URI,
00766   XQP0021_USER_ERROR,
00767   XQP0022_GET_RESULTS_AS_DOM_FAILED,
00768   XQP0023_GET_RESULTS_AS_SAX_FAILED,
00769   XQP0024_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
00770   XQP0025_COULD_NOT_CREATE_ITEM,
00771   XQP0026_COULD_NOT_CREATE_THREAD,
00772   XQP0026_CANNOT_INIT_STORE,
00773   XQP0027_MS_DOM_ERROR,
00774   XQP0028_FUNCTION_IMPL_NOT_FOUND,
00775   XQP0029_TIDY_ERROR,
00776 
00777   //
00778   // Zorba API errors
00779   //
00780   API0001_XQUERY_STRING_IS_EMPTY,
00781   API0002_COMPILE_FAILED,
00782   API0003_XQUERY_NOT_COMPILED,
00783   API0004_XQUERY_ALREADY_COMPILED,
00784   API0005_COLLECTION_ALREADY_EXISTS,
00785   API0006_COLLECTION_NOT_FOUND,
00786   API0007_COLLECTION_ITEM_MUST_BE_A_NODE,
00787   API0009_THREAD_NOT_INITIALIZED,
00788   API0010_XQUERY_EXECUTION_NOT_STARTED,
00789   API0011_INVALID_VARIABLE_QNAME,
00790   API0012_INVALID_INDEX,
00791   API0013_INAPPROPRIATE_VARIABLE_VALUE,
00792   API0014_INVALID_ARGUMENT,
00793   API0015_CANNOT_OPEN_FILE,
00794   API0016_CANNOT_CREATE_COLLECTION,
00795   API0017_CANNOT_LOAD_DOCUMENT,
00796   API0018_CANNOT_ACCESS_FILE,
00797   API0019_FUNCTION_ALREADY_REGISTERED,
00798   API0020_DOCUMENT_ALREADY_EXISTS,
00799   API0021_ITEM_TO_LOAD_IS_NOT_NODE,
00800   API0022_QUERY_ALREADY_CLOSED,
00801   API0023_CANNOT_SERIALIZE_UPDATE_QUERY,
00802   API0024_CANNOT_ITERATE_OVER_UPDATE_QUERY,
00803   API0025_END_OF_SEQUENCE,
00804   API0026_CANNOT_CLOSE_QUERY_WITH_ITERATORS,
00805   API0027_CANNOT_UPDATE_DCTX_WITH_ITERATORS,
00806   API0028_INVALID_NODE_URI,
00807   API0029_NODE_DOES_NOT_BELONG_TO_COLLECTION,
00808   API0030_NO_NODE_AT_GIVEN_POSITION,
00809   API0031_NODE_ALREADY_IN_COLLECTION,
00810 #ifdef ZORBA_DEBUGGER
00811   API0032_QUERY_NOT_COMPILED_IN_DEBUG_MODE,
00812 #endif
00813   API0033_FILE_OR_FOLDER_DOES_NOT_EXIST,
00814   API0034_FILE_OR_FOLDER_CANNOT_BE_OPENED,
00815   API0035_COLLECTION_CANNOT_BE_SERIALIZED,
00816 
00817   MAX_ZORBA_ERROR_CODE
00818 } XQUERY_ERROR;
00819 
00820 #endif