Changes

Jump to navigation Jump to search
1,096 bytes added ,  15:41, 29 May 2012
no edit summary
! width="35%"|Examples
|- valign="top" scope="row"
|{{Code|<code>BASX0000}}</code>
| Generic error, which is used for exceptions in [[Java Bindings#Context-Awareness|context-aware Java bindings]].
|
|- valign="top" scope="row"
|{{Code|<code>BASX0001}}</code>
| The current user has insufficient [[User Management|permissions]] to execute an expression.
|{{Code|<code>file:delete('file.txt')}}</code>: ''Create'' rights needed.
|- valign="top" scope="row"
|{{Code|<code>BASX0002}}</code>
| The specified database option is unknown.
| {{Code|<code>declare option db:xyz "no"; 1}}</code>
|}
! width="45%"|Examples
|- valign="top" scope="row"
|{{Code|<code>XPST0003}}</code>
|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.
|{{Code|<code>1+<hr/>for i in //* return $i}}</code>
|- valign="top" scope="row"
|{{Code|<code>XPST0005}}</code>
|An expression will never results, no matter what input will be processed.
|{{Code|<code>doc('input')/..}}</code>
|- valign="top" scope="row"
|{{Code|<code>XPST0008}}</code>
|A variable or type name is used that has not been defined in the current scope.
|{{Code|<code>$a---<hr/>element(*, x)}}</code>
|- valign="top" scope="row"
|{{Code|<code>XPST0017}}</code>
| • The specified function is unknown, or<br />• it uses the wrong number of arguments.
|{{Code|<code>unknown()<hr/>count(1,2,3)}}</code>
|- valign="top" scope="row"
|{{Code|<code>XPST0051}}</code>
| An unknown QName is used in a ''sequence type'' (e.g. in the target type of the {{Code|cast}} expression).
|{{Code|<code>1 instance of x<hr/>"test"&nbsp;cast&nbsp;as&nbsp;xs:itr}}</code>
|- valign="top" scope="row"
|{{Code|<code>XPST0080}}</code>| {{Code|<code>xs:NOTATION}} </code> or {{Code|xs:anyAtomicType}} is used as target type of {{Code|cast}} or {{Code|castable}}.|{{Code|<code>1 castable as xs:NOTATION}}</code>
|- valign="top" scope="row"
|{{Code|<code>XPST0081}}</code>
| • A QName uses a prefix that has not been bound to any namespace, or<br />• a pragma or option declaration has not been prefixed.
|<code>unknown:x<hr/>(# pragma #) { 1 }</code>
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>XQST0009}}</code>
| The query imports a schema (schema import is not supported by BaseX).
|{{Code|<code>import schema "x"; ()}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0022}}</code>
| Namespace values must be constant strings.
|<code><elem xmlns="{ 'dynamic' }"/></code>
|- valign="top" scope="row"
|{{Code|<code>XQST0031}}</code>
| The specified XQuery version is not specified.
|{{Code|<code>xquery version "9.9"; ()}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0032}}</code>
| The base URI was declared more than once.
|{{Code|<code>declare base-uri ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0033}}</code>
| A namespace prefix was declared more than once.
|{{Code|<code>declare namespace a="a";<br/>declare namespace a="b"; ()}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0034}}</code>
| A function was declared more than once.
|<code>declare function local:a() { 1 };<br/>declare function local:a() { 2 }; local:a()</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0038}}</code>
| The default collation was declared more than once.
|{{Code|<code>declare default collation ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0039}}</code>
| Two or more parameters in a user-defined function have the same name.
|<code>declare function local:fun($a, $a) { $a * $a };<br/>local:fun(1,2)</code>
|- valign="top" scope="row"
|{{Code|<code>XQDY0040}}</code>
| Two or more attributes in an element have the same node name.
|{{Code|<code><elem a="1" a="12"/>}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQDY0045}}</code>
| A user-defined function uses a reserved namespace.
|<code>declare function fn:fun() { 1 }; ()</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0047}}</code>
| A module was defined more than once.
|{{Code|<code>import module ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0048}}</code>
| A module declaration does not match the namespace of the specified module.
|{{Code|<code>import module namespace invalid="uri"; 1}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0049}}</code>
| A global variable was declared more than once.
|{{Code|<code>declare variable $a := 1;<br/>declare variable $a := 1; $a}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0054}}</code>
| A global variable depends on itself. This may be triggered by a circular variable definition.
|<code>declare variable $a := local:a();<br/>declare function local:a() { $a }; $a</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0055}}</code>
| The mode for copying namespaces was declared more than once.
|{{Code|<code>declare copy-namespaces ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0057}}</code>
| The namespace of a schema import may not be empty.
|{{Code|<code>import schema ""; ()}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0059}}</code>
| The schema or module with the specified namespace cannot be found or processed.
|{{Code|<code>import module "unknown"; ()}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0060}}</code>
| A user-defined function has no namespace.
|<code>declare default function namespace "";<br/>declare function x() { 1 }; 1</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0065}}</code>
| The ordering mode was declared more than once.
|{{Code|<code>declare ordering ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0065}}</code>
| The default namespace mode for elements or functions was declared more than once.
|{{Code|<code>declare default element namespace ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0067}}</code>
| The construction mode was declared more than once.
|{{Code|<code>declare construction ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0068}}</code>
| The mode for handling boundary spaces was declared more than once.
|{{Code|<code>declare boundary-space ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0069}}</code>
| The default order for empty sequences was declared more than once.
|{{Code|<code>declare default order empty ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0070}}</code>
| A namespace declaration overwrites a reserved namespace.
|{{Code|<code>declare namespace xml=""; ()}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0071}}</code>
| A namespace is declared more than once in an element constructor.
|{{Code|<code><a xmlns="uri1" xmlns="uri2"/>}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0075}}</code>
| The query contains a validate expression (validation is not supported by BaseX).
|<code>validate strict { () }</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0076}}</code>
| A {{Code|group by}} or {{Code|order by}} clause specifies an unknown collation.
|{{Code|<code>for $i in 1 to 10<br/>order by $i collation "unknown"<br/>return $i}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0079}}</code>
| A pragma was specified without the expression that is to be evaluated.
|<code>(# xml:a #) {}</code>
|- valign="top" scope="row"
|- valign="top" scope="row"
|{{Code|<code>XQST0085}}</code>
| An empty namespace URI was specified.
|{{Code|<code><pref:elem xmlns:pref=""/>}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0087}}</code>
| An unknown encoding was specified. Note that the encoding declaration is currently ignored in BaseX.
|{{Code|<code>xquery version "1.0" encoding "a b"; ()}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0088}}</code>
| An empty module namespace was specified.
|{{Code|<code>import module ""; ()}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0089}}</code>
| Two variables in a {{Code|for}} or {{Code|let}} clause have the same name.
|{{Code|<code>for $a at $a in 1 return $i}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0090}}</code>
| A character reference specifies an invalid character.
|{{Code|<code>"&#0;"}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0093}}</code>
| A module depends on itself. This may be triggered by a circular module definition.
|{{Code|<code>import module ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0094}}</code>| {{Code|<code>group by}} </code> references a variable that has not been declared before.|{{Code|<code>for $a in 1 group by $b return $a}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0097}}</code>
| A {{Code|decimal-format}} property is invalid.
|{{Code|<code>declare default decimal-format digit = "xxx"; 1}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0098}}</code>
| A single {{Code|decimal-format}} character was assigned to multiple properties.
|{{Code|<code>declare default decimal-format digit = "%"; 1}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0099}}</code>
| The context item was declared more than once.
|{{Code|<code>declare context item ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0107}}</code>
| The initializer of the context item depends on itself.
|{{Code|<code>declare context item := .; ()}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0108}}</code>
| Output declarations may only be specified in the main module.
|Module: {{Code|<code>declare output ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0109}}</code>
| The specified serialization parameter is unknown.
|{{Code|<code>declare option output:unknown "..."; 1}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0110}}</code>
| A serialization parameter was specified more than once in the output declarations.
|{{Code|<code>declare option output:indent "no";<br/>declare option output:indent "no"; 1}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0111}}</code>
| A decimal format was declared more than once.
|{{Code|<code>declare decimal-format ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQST0113}}</code>
| Context item values may only be in the main module.
|Module: {{Code|declare context item := 1;}}
|- valign="top" scope="row"
|{{Code|<code>XQST0114}}</code>
| A decimal-format property has been specified more than once.
|{{Code|<code>declare decimal-format EN NaN="!" NaN="?"; ()}}</code>
|}
! width="45%"|Examples
|- valign="top" scope="row"
|{{Code|<code>XPTY0004}}</code>
| 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).
|{{Code|<code>1 + "A"<hr/>abs("a")<hr/>1 cast as xs:gYear}}</code>
|- valign="top" scope="row"
|{{Code|<code>XPTY0018}}</code>
| The result of the last step in a path expression contains both nodes and atomic values.
|{{Code|<code>doc('input.xml')/(*, 1)}}</code>
|- valign="top" scope="row"
|{{Code|<code>XPTY0019}}</code>
| The result of a step (other than the last step) in a path expression contains an atomic values.
|{{Code|<code>(1 to 10)/*}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>XQTY0024}}</code>
| An attribute node cannot be bound to its parent element, as other nodes of a different type were specified before.
|<code><elem>text { attribute a { "val" } }</elem></code>
! width="35%"|Examples
|- valign="top" scope="row"
|{{Code|<code>XPDY0002}}</code>
| • No value has been defined for an external variable, or<br />• no context item has been set before the query was executed.
|{{Code|<code>declare variable $x external; $x<hr/>descendant::*}}</code>
|- valign="top" scope="row"
|{{Code|<code>XPDY0050}}</code>
| • The operand type of a {{Code|treat}} expression does not match the type of the argument, or<br/>• the root of the context item must be a document node.
|{{Code|<code>"string" treat as xs:int<hr/>"string"[/]}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>XQDY0025}}</code>
| Two or more attributes in a constructed element have the same node name.
|<code>element x { attribute a { "" } attribute a { "" } }</code>
|- valign="top" scope="row"
|{{Code|<code>XQDY0026}}</code>
| The content of a computed processing instruction contains "?>".
|<code>processing-instruction pi { "?>" }</code>
|- valign="top" scope="row"
|{{Code|<code>XQDY0041}}</code>
| The name of a processing instruction is invalid.
|<code>processing-instruction { "1" } { "" }</code>
|- valign="top" scope="row"
|{{Code|<code>XQDY0043}}</code>
| The node name of an attribute uses reserved prefixes or namespaces.
|<code>attribute xmlns { "etc" }</code>
|- valign="top" scope="row"
|{{Code|<code>XQDY0064}}</code>
| The name of a processing instruction equals "XML" (case insensitive).
|<code>processing-instruction xml { "etc" }</code>
|- valign="top" scope="row"
|{{Code|<code>XQDY0072}}</code>
| The content of a computed comment contains "--" or ends with "-".
|<code>comment { "one -- two" }</code>
|- valign="top" scope="row"
|{{Code|<code>XQDY0074}}</code>
| The name of a computed attribute or element is invalid, or uses an unbound prefix.
|<code>element { "x y" } { "" }</code>
|- valign="top" scope="row"
|{{Code|<code>XQDY0095}}</code>
| A sequence with more than one item was bound to a {{Code|group by}} clause.
|{{Code|<code>let $a := (1,2) group by $a return $a}}</code>
|- valign="top" scope="row"
|{{Code|<code>XQDY0096}}</code>
| The node name of an element uses reserved prefixes or namespaces.
|<code>element { QName("uri", "xml:n") } {}</code>
! width="45%"|Examples
|- valign="top" scope="row"
|{{Code|<code>FOAR0001}}</code>
| A value was divided by zero.
|{{Code|<code>1 div 0}}</code>
|- valign="top" scope="row"
|{{Code|<code>FOAR0002}}</code>
| A numeric declaration or operation causes an over- or underflow.
|{{Code|<code>12345678901234567890<hr/>xs:double("-INF") idiv 1}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FOCA0002}}</code>
| • A float number cannot be converted to a decimal or integer value, or<br />• a function argument cannot be converted to a valid QName.
|{{Code|<code>xs:int(xs:double("INF"))<hr/>QName("", "el em")}}</code>
|- valign="top" scope="row"
|{{Code|<code>FOCA0003}}</code>
| A value is too large to be represented as integer.
|{{Code|<code>xs:integer(99e100)}}</code>
|- valign="top" scope="row"
|{{Code|<code>FOCA0005}}</code>| {{Code|<code>"NaN"}} </code> is supplied to duration operations.|{{Code|<code>xs:yearMonthDuration("P1Y") * xs:double("NaN")}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FOCH0001}}</code>
| A codepoint was specified that does not represent a valid XML character.
|{{Code|<code>codepoints-to-string(0)}}</code>
|- valign="top" scope="row"
|{{Code|<code>FOCH0002}}</code>
| A unsupported collation was specified in a function.
|{{Code|<code>compare('a', 'a', 'unknown')}}</code>
|- valign="top" scope="row"
|{{Code|<code>FOCH0003}}</code>
| A unsupported normalization form was specified in a function.
|{{Code|<code>normalize-unicode('a', 'unknown')}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FODC0001}}</code>
| The argument specified in {{Code|fn:id()}} or {{Code|fn:idref()}} must have a document node as root.
|{{Code|<code>id("id0", <xml/>)}}</code>
|- valign="top" scope="row"
|{{Code|<code>FODC0002}}</code>
| The specified document resource cannot be retrieved.
|{{Code|<code>doc("unknown.xml")}}</code>
|- valign="top" scope="row"
|{{Code|<code>FODC0004}}</code>
| The specified collection cannot be retrieved.
|{{Code|<code>collection("unknown")}}</code>
|- valign="top" scope="row"
|{{Code|<code>FODC0005}}</code>
| The specified URI to a document resource is invalid.
|{{Code|<code>doc("<xml/>")}}</code>
|- valign="top" scope="row"
|{{Code|<code>FODC0006}}</code>
| The string passed to {{Code|fn:parse-xml()}} is not well-formed.
|{{Code|<code>parse-xml("<x/")}}</code>
|- valign="top" scope="row"
|{{Code|<code>FODC0007}}</code>
| The base URI passed to {{Code|fn:parse-xml()}} is invalid.
|{{Code|<code>parse-xml("<x/>", ":")}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FODF1280}}</code>
| The name of the decimal format passed to {{Code|fn:format-number()}} is invalid.
|{{Code|<code>format-number(1, "0", "invalid")}}</code>
|- valign="top" scope="row"
|{{Code|<code>FODF1310}}</code>
| The picture string passed to {{Code|fn:format-number()}} is invalid.
|{{Code|<code>format-number(1, "invalid")}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FODT0002}}</code>
| A duration declaration or operation causes an over- or underflow.
|{{Code|<code>implicit-timezone() div 0}}</code>
|- valign="top" scope="row"
|{{Code|<code>FODT0003}}</code>
| An invalid timezone was specified.
|{{Code|<code>adjust-time-to-timezone(xs:time("01:01:01"), xs:dayTimeDuration("PT20H"))}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FOER0000}}</code>
| Error triggered by the {{Code|fn:error()}} function.
|{{Code|<code>error()}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FOFD1340}}</code>
| The picture string passed to {{Code|fn:format-date()}}, {{Code|fn:format-time()}} or {{Code|fn:format-dateTime()}} is invalid.
|{{Code|<code>format-date(current-date(), "[]")}}</code>
|- valign="top" scope="row"
|{{Code|<code>FOFD1350}}</code>
| The picture string passed to {{Code|fn:format-date()}}, {{Code|fn:format-time()}} or {{Code|fn:format-dateTime()}} specifies an non-available component.
|{{Code|<code>format-time(current-time(), "[Y2]")}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FONS0004}}</code>
| A function has a QName as argument that specifies an unbound prefix.
|{{Code|<code>resolve-QName("x:e", <e/>)}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FORG0001}}</code>
| A value cannot be cast to the required target type.
|{{Code|<code>xs:integer("A")<hr/>1 + <x>a</x>}}</code>
|- valign="top" scope="row"
|{{Code|<code>FORG0002}}</code>
| The URI passed to {{Code|fn:resolve-URI()}} is invalid.
|{{Code|<code>resolve-URI(":")}}</code>
|- valign="top" scope="row"
|{{Code|<code>FORG0003}}</code>| {{Code|<code>fn:zero-or-one()}} </code> was called with more than one item.|{{Code|<code>zero-or-one((1, 2))}}</code>
|- valign="top" scope="row"
|{{Code|<code>FORG0004}}</code>| {{Code|<code>fn:one-or-more()}} </code> was called with zero items.|{{Code|<code>one-or-more(())}}</code>
|- valign="top" scope="row"
|{{Code|<code>FORG0005}}</code>| {{Code|<code>fn:exactly-one()}} </code> was called with zero or more than one item.|{{Code|<code>exactly-one((1, 2))}}</code>
|- valign="top" scope="row"
|{{Code|<code>FORG0006}}</code>
| A wrong argument type was specified in a function call.
|{{Code|<code>sum((1, "string"))}}</code>
|- valign="top" scope="row"
|{{Code|<code>FORG0008}}</code>
| The arguments passed to {{Code|fn:dateTime()}} have different timezones.
|{{Code|<code>dateTime(xs:date("2001-01-01+01:01"), current-time())}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FORX0001}}</code>
| A function specifies an invalid regular expression flag.
|{{Code|<code>matches('input', 'query', 'invalid')}}</code>
|- valign="top" scope="row"
|{{Code|<code>FORX0002}}</code>
| A function specifies an invalid regular expression.
|{{Code|<code>matches('input', '[')}}</code>
|- valign="top" scope="row"
|{{Code|<code>FORX0003}}</code>
| A regular expression matches an empty string.
|{{Code|<code>tokenize('input', '.?')}}</code>
|- valign="top" scope="row"
|{{Code|<code>FORX0004}}</code>
| The replacement string of a regular expression is invalid.
|{{Code|<code>replace("input", "match", "\")}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FOTY0012}}</code>
| An item has no typed value.
|{{Code|}}<code></code>
|- valign="top" scope="row"
|{{Code|<code>FOTY0013}}</code>
| Functions items cannot be atomized, have no defined equality, and have no string representation.
|{{Code|}}<code></code>
|- valign="top" scope="row"
|{{Code|<code>FOTY0014}}</code>
| Function items have no string representation.
|{{Code|}}<code></code>
|- valign="top" scope="row"
|{{Code|<code>FOTY0015}}</code>
| Function items cannot be compared.
|{{Code|}}<code></code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FOUT1170}}</code>
| Function argument cannot be used to retrieve a text resource.
|{{Code|}}<code></code>
|- valign="top" scope="row"
|{{Code|<code>FOUT1170}}</code>
| Encoding to retrieve a text resource is invalid or not supported.
|{{Code|<code>unparsed-text('file.txt', 'InvalidEncoding')}}</code>
|}
! width="45%"|Examples
|- valign="top" scope="row"
|{{Code|<code>SESU0007}}</code>
| The specified encoding is not supported.
|{{Code|<code>declare option output:encoding "xyz"; 1}}</code>
|- valign="top" scope="row"
|{{Code|<code>SEPM0009}}</code>| {{Code|<code>omit-xml-declaration}} </code> is set to {{Code|yes}}, and {{Code|standalone}} has a value other than {{Code|omit}}.
|
|- valign="top" scope="row"
|{{Code|<code>SEPM0010}}</code>| {{Code|<code>method}} </code> is set to {{Code|xml}}, {{Code|undeclare-prefixes}} is set to {{Code|yes}}, and {{Code|version}} is set to {{Code|1.0}}.
|
|- valign="top" scope="row"
|{{Code|<code>SERE0014}}</code>| {{Code|<code>method}} </code> is set to {{Code|html}}, and an invalid HTML character is found.
|
|- valign="top" scope="row"
|{{Code|<code>SERE0015}}</code>| {{Code|<code>method}} </code> is set to {{Code|html}}, and a closing bracket (&gt;) appears inside a processing instruction.
|
|- valign="top" scope="row"
|{{Code|<code>SEPM0016}}</code>
| A specified parameter is unknown or has an invalid value.
| {{Code|<code>declare option output:indent "nope"; 1}}</code>
|
|- valign="top" scope="row"
|{{Code|<code>SEPM0017}}</code>
| The definition of serialization parameter is invalid.
|
! width="45%"|Examples
|- valign="top" scope="row"
|{{Code|<code>FOUP0001}}</code>
| The first argument of {{Code|fn:put()}} must be a document node or element.
|<code>fn:put(text { 1 }, 'file.txt')</code>
|- valign="top" scope="row"
|{{Code|<code>FOUP0002}}</code>
| The second argument of {{Code|fn:put()}} is not a valid URI.
|{{Code|<code>fn:put(<a/>, '//')}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>XUDY0009}}</code>
| The target node of a replace expression needs a parent in order to be replaced.
|{{Code|<code>replace node <target/> with <new/>}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0014}}</code>
| The expression updated by the {{Code|modify}} clause was not created by the {{Code|copy}} clause.
|{{Code|<code>let $a := doc('a') return copy $b := $a modify delete node $a/* return $b}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0015}}</code>
| In a {{Code|rename}} expression, a target is renamed more than once.
|{{Code|<code>let $a := <xml/> return (rename node $a as 'a', rename node $a as 'b')}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0016}}</code>
| In a {{Code|replace}} expression, a target is replaced more than once.
|{{Code|<code>let $a := <x>x</x>/node() return (replace node $a with <a/>, replace node $a with <b/>)}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0017}}</code>
| In a {{Code|replace value of}} expression, a target is replaced more than once.
|{{Code|<code>let $a := <x/> return (replace value of node $a with 'a', replace value of node $a with 'a')}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0021}}</code>
| The resulting update expression contains duplicate attributes.
|<code>copy $c := <x a='a'/> modify insert node attribute a {""} into $c return $c</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0023}}</code>
| The resulting update expression conflicts with existing namespaces.
|{{Code|<code>rename node <a:ns xmlns:a='uri'/> as QName('URI', 'a:ns')}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0024}}</code>
| New namespaces conflict with each other.
|<code>copy $n := <x/> modify (insert node attribute { QName('uri1', 'a') } { "" } into $n, insert node attribute { QName('uri2', 'a') } { "" } into $n) return $n</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0027}}</code>
| Target of an update expression is an empty sequence.
|{{Code|<code>insert node <x/> into ()}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0029}}</code>
| The target of an update expression has no parent node.
|{{Code|<code>insert node <new/> before <target/>}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0030}}</code>
| Attributes cannot be inserted before or after the child of a document node.
|<code>insert node <e a='a'/>/@a after document { <e/> }/*</code>
|- valign="top" scope="row"
|{{Code|<code>XUDY0031}}</code>
| Multiple calls to {{Code|fn:put()}} address the same URI.
|{{Code|<code>for $i in 1 to 3 return put(<a/>, 'file.txt')}}</code>
|-
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>XUST0001}}</code>
| No updating expression is allowed here.
|{{Code|<code>delete node /, "finished."}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUST0002}}</code>
| An updating expression is expected in the {{Code|modify}} clause or an updating function.
|{{Code|<code>copy $a := <x/> modify 1 return $a}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUST0003}}</code>
| The revalidation mode was declared more than once.
|{{Code|<code>declare revalidation ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUST0026}}</code>
| The query contains a revalidate expression (revalidation is not supported by BaseX).
|{{Code|<code>declare revalidation ...}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUST0028}}</code>
| no return type may be specified in an updating function.
|<code>declare updating function local:x() as item() { () }; ()</code>
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>XUTY0004}}</code>
| New attributes to be inserted must directly follow the root node.
|<code>insert node (<a/>, attribute a {""}) into <a/></code>
|- valign="top" scope="row"
|{{Code|<code>XUTY0005}}</code>
| A single element or document node is expected as target of an {{Code|insert}} expression.
|<code>insert node <new/> into attribute a { "" }</code>
|- valign="top" scope="row"
|{{Code|<code>XUTY0006}}</code>
| A single element, text, comment or processing instruction is expected as target of an {{Code|insert before/after}} expression.
|<code>insert node <new/> after attribute a { "" }</code>
|- valign="top" scope="row"
|{{Code|<code>XUTY0007}}</code>
| Only nodes can be deleted.
|{{Code|<code>delete node "string"}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUTY0008}}</code>
| A single element, text, attribute, comment or processing instruction is expected as target of a {{Code|replace}} expression.
|<code>replace node document { <a/> } with <b/></code>
|- valign="top" scope="row"
|{{Code|<code>XUTY0010}}</code>
| In a {{Code|replace}} expression, in which no attributes are targeted, the replacing nodes must not be attributes as well.
|<code>replace node <a><b/></a>/b with attribute size { 1 }</code>
|- valign="top" scope="row"
|{{Code|<code>XUTY0011}}</code>
| In the {{Code|replace}} expression, in which attributes are targeted, the replacing nodes must be attributes as well.
|{{Code|<code>replace node <e a=""/>/@a with <a/>}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUTY0012}}</code>
| In a {{Code|rename}} expression, the target nodes must be an element, attribute or processing instruction.
|<code>rename node text { 1 } as <x/></code>
|- valign="top" scope="row"
|{{Code|<code>XUTY0013}}</code>
| An expression in the {{Code|copy}} clause must return a single node.
|{{Code|<code>copy $c := (<a/>, <b/>) modify () return $c}}</code>
|- valign="top" scope="row"
|{{Code|<code>XUTY0022}}</code>
| An attribute must not be inserted into a document node.
|<code>insert node <e a=""/>/@a into document {'a'}</code>
! width="45%"|Examples
|- valign="top" scope="row"
|{{Code|<code>FTDY0016}}</code>
| The specified weight value is out of range.
|<code>'a' contains text 'a' weight { 1001 }</code>
|- valign="top" scope="row"
|{{Code|<code>FTDY0017}}</code>
| The {{Code|not in}} operator contains a ''string exclude''.
|{{Code|<code>'a' contains text 'a' not in (ftnot 'a')}}</code>
|- valign="top" scope="row"
|{{Code|<code>FTDY0020}}</code>
| The search term uses an invalid wildcard syntax.
|<code>'a' contains text '.{}' using wildcards</code>
| colspan=3 style="background-color:white;"|
|- valign="top" scope="row"
|{{Code|<code>FTST0007}}</code>
| The full-text expression contains an ignore option (the {{Code|ignore option}} is not supported by BaseX).
|{{Code|<code>'a' contains text 'a' without content 'x'}}</code>
|- valign="top" scope="row"
|{{Code|<code>FTST0008}}</code>
| The specified stop word file could not be opened or processed.
|{{Code|<code>'a' contains text 'a' using stop words at 'unknown.txt'}}</code>
|- valign="top" scope="row"
|{{Code|<code>FTST0009}}</code>
| The specified language is not supported.
|{{Code|<code>'a' contains text 'a' using language 'aaa'}}</code>
|- valign="top" scope="row"
|{{Code|<code>FTST0018}}</code>
| The specified thesaurus file could not be opened or processed.
|{{Code|<code>'a' contains text 'a' using thesaurus at 'aaa'}}</code>
|- valign="top" scope="row"
|{{Code|<code>FTST0019}}</code>
| A match option was specified more than once.
|{{Code|<code>'a' contains text 'a' using stemming using stemming}}</code>
|}
[[Category:XQuery]]
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu