fn:adjust-date-to-timezone($a as xs:date?) xs:date?
Adjusts an xs:date value to the implicit timezone of the current locale.
adjust-date-to-timezone($a as xs:date?, $b as xdt:dayTimeDuration?) xs:date?
Adjusts an xs:date value to a specific timezone, or to no timezone at all. If $b is the empty sequence, returns an xs:date without a timezone.
fn:adjust-dateTime-to-timezone($a as xs:dateTime?) xs:dateTime?
Adjusts an xs:dateTime value to the implicit timezone of the current locale.
adjust-dateTime-to-timezone($a as xs:dateTime?, $b as xdt:dayTimeDuration?) xs:dateTime?
Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all. If $b is the empty sequence, returns an xs:dateTime without a timezone.
fn:adjust-time-to-timezone($a as xs:time?) xs:time?
Adjusts an xs:time value to the implicit timezone of the current locale.
adjust-time-to-timezone($a as xs:time?, $b as xdt:dayTimeDuration?) xs:time?
Adjusts an xs:time value to a specific timezone, or to no timezone at all. If $b is the empty sequence, returns an xs:time without a timezone.
fn:contains($a as xs:string?, $b as xs:string?) xs:boolean
Returns an xs:boolean indicating whether or not the value of $arg1 contains (at the beginning, at the end, or anywhere within) at least one sequence of collation units that provides a minimal match to the collation units in the value of $arg2, according to the default collation.
contains($a as xs:string?, $b as xs:string?, $c as xs:string) xs:boolean
Returns an xs:boolean indicating whether or not the value of $arg1 contains (at the beginning, at the end, or anywhere within) at least one sequence of collation units that provides a minimal match to the collation units in the value of $arg2, according to the collation that is specified in $arg3.
fn:deep-equal($a as item()*, $b as item()*) xs:boolean
Returns true iff every item in $a is deep-equal to the item at the same position in $b, false otherwise. If both $a and $b are the empty sequence, returns true.
deep-equal($a as item()*, $b as item()*, $c as xs:string) xs:boolean
Returns true iff every item in $a is deep-equal to the item at the same position in $b, false otherwise. If both $a and $b are the empty sequence, returns true. Comparison collation is specified by $c
fn:distinct-values($a as xdt:anyAtomicType*) xdt:anyAtomicType*
Returns a sequence where duplicate values of $a, based on value equality, have been deleted.
distinct-values($a as xdt:anyAtomicType*, $b as xs:string) xdt:anyAtomicType*
Returns a sequence where duplicate values of $a, based on value equality specified by collation $b, have been deleted.
fn:ends-with($a as xs:string?, $b as xs:string?) xs:boolean
Returns true if the string value of $b is a suffix of the string value of $a, false otherwise. If either $a or $b is the empty sequence, the empty sequence is returned.
ends-with($a as xs:string?, $b as xs:string?, $c as xs:string) xs:boolean?
Returns true if the string value of $b is a suffix of the string value of $a using collation $c, false otherwise. If either $a or $b is the empty sequence, the empty sequence is returned.
fn:error() empty()
Indicates that an irrecoverable error has occurred. The script will terminate immediately with an exception.
error($a as xs:QName) empty()
Indicates that an irrecoverable error has occurred. The script will terminate immediately with an exception.
error($a as xs:QName?, $b as xs:string) empty()
Indicates that an irrecoverable error has occurred. The script will terminate immediately with an exception.
error($a as xs:QName?, $b as xs:string, $c as item()*) empty()
Indicates that an irrecoverable error has occurred. The script will terminate immediately with an exception.
fn:escape-uri($a as xs:string?, $b as xs:boolean) xs:string
This function applies the URI escaping rules defined in section 2 of [RFC 2396] as amended by [RFC 2732], with one exception, to the string supplied as $a, which typically represents all or part of a URI. The effect of the function is to escape a set of identified characters in the string. Each such character is replaced in the string by an escape sequence, which is formed by encoding the character as a sequence of octets in UTF-8, and then representing each of these octets in the form %HH, where HH is the hexadecimal representation of the octet. $b indicates whether to escape reserved characters.
fn:id($a as xs:string*) element()*
Returns the sequence of element nodes that have an ID value matching the value of one or more of the IDREF values supplied in $a. If none is matching or $a is the empty sequence, returns the empty sequence.
id($a as xs:string*, $b as node()) element()*
Returns the sequence of element nodes that have an ID value matching the value of one or more of the IDREF values supplied in $a. If none is matching or $a is the empty sequence, returns the empty sequence.
fn:idref($a as xs:string*) node()*
Returns the sequence of element or attributes nodes with an IDREF value matching the value of one or more of the ID values supplied in $a. If none is matching or $a is the empty sequence, returns the empty sequence.
idref($a as xs:string*, $b as node()) node()*
Returns the sequence of element or attributes nodes with an IDREF value matching the value of one or more of the ID values supplied in $a. If none is matching or $a is the empty sequence, returns the empty sequence.
fn:index-of($a as xdt:anyAtomicType*, $b as xdt:anyAtomicType) xs:integer?
Returns a sequence of positive integers giving the positions within the sequence $a of items that are equal to $b. If the value of $a is the empty sequence, or if no item in $a matches $b, then the empty sequence is returned.
index-of($a as xdt:anyAtomicType*, $b as xdt:anyAtomicType, $c as xs:string) xs:integer?
Returns a sequence of positive integers giving the positions within the sequence $a of items that are equal to $b. If the value of $a is the empty sequence, or if no item in $a matches $b, then the empty sequence is returned. Values are compared according to the collation specified in $c.
fn:lang($a as xs:string?) xs:boolean
Returns true if the context items xml:lang attribute is equal to the value of $a, false otherwise.
lang($a as xs:string?, $b as node()) xs:boolean
Returns true if the context items xml:lang attribute is equal to the value of $a, false otherwise.
fn:local-name() xs:string
Returns the local part of the name of the context item as an xs:string that will either be the zero-length string or will have the lexical form of an xs:NCName.
local-name($a as node()?) xs:string
Returns the local part of the name of the value of $a as an xs:string that will either be the zero-length string or will have the lexical form of an xs:NCName.
fn:matches($a as xs:string*, $b as xs:string) xs:boolean
Returns true if the first argument string matches the regular expression specified by the second argument. This function is optimized internally if a range index of type xs:string is defined on the nodes passed to the first argument. Please note that - in contrast - with the specification - this method allows zero or more items for the string argument.
matches($a as xs:string*, $b as xs:string, $c as xs:string) xs:boolean
Returns true if the first argument string matches the regular expression specified by the second argument. This function is optimized internally if a range index of type xs:string is defined on the nodes passed to the first argument. Please note that - in contrast - with the specification - this method allows zero or more items for the string argument.
fn:max($a as xdt:anyAtomicType*) xdt:anyAtomicType?
Selects an item from the input sequence $a whose value is greater than or equal to the value of every other item in the input sequence.
max($a as xdt:anyAtomicType*, $b as xs:string) xdt:anyAtomicType?
Selects an item from the input sequence $a whose value is greater than or equal to the value of every other item in the input sequence. The collation URI specified in $b will be used for string comparisons.
fn:min($a as xdt:anyAtomicType*) xdt:anyAtomicType?
Selects an item from the input sequence $a whose value is less than or equal to the value of every other item in the input sequence.
min($a as xdt:anyAtomicType*, $b as xs:string) xdt:anyAtomicType?
Selects an item from the input sequence $a whose value is less than or equal to the value of every other item in the input sequence. The collation specified in $b is used for string comparisons.
fn:name() xs:string?
Returns the name of a node, as an xs:string that is either the zero-length string, or has the lexical form of an xs:QName
name($a as node()?) xs:string?
Returns the name of a node, as an xs:string that is either the zero-length string, or has the lexical form of an xs:QName
fn:namespace-uri() xs:anyURI
Returns the namespace URI of the xs:QName of the context item. If the context item is in no namespace or is neither an element nor attribute node, returns the xs:anyURI equivalent to the zero-length string. Raises an error if the context item is undefined or not a node.
namespace-uri($a as node()?) xs:anyURI
Returns the namespace URI of the xs:QName value of $a. If $a is in no namespace or is neither an element nor attribute node, returns the xs:anyURI eqvivalent to the zero-length string. Raises an error if the context item is undefined or not a node.
fn:namespace-uri-for-prefix($a as xs:string?, $b as element()) xs:anyURI?
Returns the namespace URI of one of the in-scope namespaces for $b, identified by its namespace prefix. If $b has an in-scope namespace whose namespace prefix is equal to $a, it returns the namespace URI of that namespace. If $b is the zero-length string or the empty sequence, it returns the namespace URI of the default (unnamed) namespace. Otherwise, it returns the empty sequence.
fn:normalize-space() xs:string
Returns the value of the context item with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of one or more whitespace character with a single space.
normalize-space($a as xs:string?) xs:string
Returns the value of $a with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of one or more whitespace character with a single space.If the value of $a is the empty sequence, returns the zero-length string. If no argument is supplied $a defaults to the string value of the context item.
fn:normalize-unicode($a as xs:string?) xs:boolean
Returns the value of $a normalized according to the normalization form NFC.
normalize-unicode($a as xs:string?, $b as xs:string) xs:boolean
Returns the value of $a normalized according to the normalization criteria for a normalization form identified by the value of $b.
fn:number() xs:double
Returns the value of the context item as a xs:double. If the context item cannot be converted to a xs:double, NaN is returned.
number($a as xdt:anyAtomicType?) xs:double
Returns the value of $a as a xs:double. If the value of $a is the empty sequence or cannot be converted to a xs:double, NaN is returned.
fn:replace($a as xs:string?, $b as xs:string, $c as xs:string) xs:string?
The function returns the xs:string that is obtained by replacing all non-overlapping substrings of $a that match the given pattern $b with an occurrence of the $c replacement string.
replace($a as xs:string?, $b as xs:string, $c as xs:string, $d as xs:string) xs:string?
The function returns the xs:string that is obtained by replacing all non-overlapping substrings of $a that match the given pattern $b with an occurrence of the $c replacement string.
fn:resolve-uri($a as xs:string?) xs:anyURI?
The purpose of this function is to enable a relative URI $a to be resolved against the static context's base URI.
resolve-uri($a as xs:string?, $b as xs:string) xs:anyURI?
The purpose of this function is to enable a relative URI $a to be resolved against the absolute URI $b. If $a is the empty sequence, the empty sequence is returned.
fn:root() node()
Returns the root of the tree to which the context node belongs. This will usually, but not necessarily, be a document node.
root($a as node()?) node()?
Returns the root of the tree to which $arg belongs. This will usually, but not necessarily, be a document node.
fn:round-half-to-even($a as numeric?) numeric
The first signature of this function produces the same result as the second signature with $b=0.
round-half-to-even($a as numeric?, $b as numeric?) numeric
The value returned is the nearest (that is, numerically closest) numeric to $a that is a multiple of ten to the power of minus $b. If two such values are equally near (e.g. if the fractional part in $a is exactly .500...), returns the one whose least significant digit is even.
fn:starts-with($a as xs:string?, $b as xs:string?) xs:boolean?
Returns true if the string value of $b is a prefix of the string value of $a, false otherwise. If either $a or $b is the empty sequence, the empty sequence is returned.
starts-with($a as xs:string?, $b as xs:string?, $c as xs:string) xs:boolean?
Returns true if the string value of $b is a prefix of the string value of $a using collation $c, false otherwise. If either $a or $b is the empty sequence, the empty sequence is returned.
fn:string() xs:string
Returns the value of the context item as xs:string. If the context item is undefined, an error is raised.
string($a as item()?) xs:string
Returns the value of $a as xs:string. If the value of $ is the empty sequence, the zero-length string is returned. If the context item of $a is undefined, an error is raised.
fn:subsequence($a as item()*, $b as xs:double) item()*
Returns a subsequence of the values in the first argument sequence, starting at the position indicated by the value of the second argument and including the number of items indicated by the value of the optional thirdargument. If the third argument is missing, all items up to the end of the sequence are included.
subsequence($a as item()*, $b as xs:double, $c as xs:double) item()*
Returns a subsequence of the values in the first argument sequence, starting at the position indicated by the value of the second argument and including the number of items indicated by the value of the optional thirdargument. If the third argument is missing, all items up to the end of the sequence are included.
fn:substring($a as xs:string?, $b as xs:double) xs:string?
Returns the portion of the value of $a beginning at the position indicated by the value of $b and continuing to the end of $a. The characters returned do not extend beyond the end of $a. If $b is zero or negative, only those characters in positions greater than zero are returned. If the value of $a is the empty sequence, the zero-length string is returned.
substring($a as xs:string?, $b as xs:double, $c as xs:double) xs:string?
Returns the portion of the value of $a beginning at the position indicated by the value of $b and continuing for the number of characters indicated by the value of $c. The characters returned do not extend beyond the end of $a. If $b is zero or negative, only those characters in positions greater than zero are returned. If the value of $a is the empty sequence, the zero-length string is returned.
fn:substring-after($a as xs:string?, $b as xs:string?) xs:string?
Returns the substring of the value of $a that follows the first occurrence of a sequence of the value of $b. If the value of $a or $b is the empty sequence it is interpreted as the zero-length string. If the value of $b is the zero-length string, the zero-length string is returned. If the value of $a does not contain a string that is equal to the value of $b, the zero-length string is returned.
substring-after($a as xs:string?, $b as xs:string?, $c as xs:string) xs:string?
Returns the substring of the value of $a that follows the first occurrence of a sequence of the value of $b in the collation $c. If the value of $a or $b is the empty sequence it is interpreted as the zero-length string. If the value of $b is the zero-length string, the zero-length string is returned. If the value of $a does not contain a string that is equal to the value of $b, the zero-length string is returned.
fn:substring-before($a as xs:string?, $b as xs:string?) xs:string?
Returns the substring of the value of $a that precedes the first occurrence of a sequence of the value of $b. If the value of $a or $b is the empty sequence it is interpreted as the zero-length string. If the value of $b is the zero-length string, the zero-length string is returned. If the value of $a does not contain a string that is equal to the value of $b, the zero-length string is returned.
substring-before($a as xs:string?, $b as xs:string?, $c as xs:string) xs:string?
Returns the substring of the value of $a that precedes the first occurrence of a sequence of the value of $b in the collation $c. If the value of $a or $b is the empty sequence it is interpreted as the zero-length string. If the value of $b is the zero-length string, the zero-length string is returned. If the value of $a does not contain a string that is equal to the value of $b, the zero-length string is returned.
fn:sum($a as xdt:anyAtomicType*) xdt:anyAtomicType
Returns a value obtained by adding together the values in $a. If the single-argument form of the function is used, then the value returned for an empty sequence is the xs:double value 0.0e0.
sum($a as xdt:anyAtomicType*, $b as xdt:anyAtomicType?) xdt:anyAtomicType?
Returns a value obtained by adding together the values in $a. If the single-argument form of the function is used, then the value returned for an empty sequence is the xs:double value 0.0e0. If the two-argument form is used, then the value returned for an empty sequence is the value of the $b argument.
fn:tokenize($a as xs:string?, $b as xs:string) xs:string+
This function breaks the input string $a into a sequence of strings, treating any substring that matches pattern $b as a separator. The separators themselves are not returned.
tokenize($a as xs:string?, $b as xs:string, $c as xs:string) xs:string+
This function breaks the input string $a into a sequence of strings, treating any substring that matches pattern $b as a separator. The separators themselves are not returned.
fn:trace($a as item()*, $b as xs:string) item()*
This function is intended to be used in debugging queries by providing a trace of their execution. The input $a is returned, unchanged, as the result of the function. In addition, the inputs $a, converted to an xs:string, and $b is directed to a trace data set in the eXist log files.
xmldb:authenticate($a as xs:string, $b as xs:string?, $c as xs:string?) xs:boolean
Check if a user is registered as database user. The function simply tries to read the database collection specified in the first parameter $a, using the supplied username in $b and password in $c. It returns true if the attempt succeeds, false otherwise.
xmldb:change-user($a as xs:string, $b as xs:string?, $c as xs:string*, $d as xs:string?) empty()
Change properties of an existing user, you must have appropriate permissions to do this. $a is the username, $b is the password, $c is the sequence of group memberships, $d is the home collection. The username is mandatory but other values are optional, where if empty the existing value is used.
xmldb:chmod-resource($a as xs:string, $b as xs:string, $c as xs:integer) empty()
Sets the mode of the specified Resource. $a is the collection path, $b is the resource name, $c is the mode (as xs:integer). PLEASE REMEMBER that 0755 is 7*64+5*8+5, NOT decimal 755.
xmldb:copy($a as xs:string, $b as xs:string) empty()
Copy a collection $a to the collection $b. The collections can be specified either as a simple collection path or an XMLDB URI.
xmldb:copy($a as xs:string, $b as xs:string, $c as xs:string) empty()
Copy a resource $c from the collection specified in $a to collection in $b. The collections can be either specified as a simple collection path or an XMLDB URI.
xmldb:created($a as xs:string) xs:dateTime
Returns the creation date of a collection $a. The collection can be passed as a simple collection path or an XMLDB URI.
xmldb:created($a as xs:string, $b as xs:string) xs:dateTime
Returns the creation date of a resource $b in the collection specified by $a. The collection can be passed as a simple collection path or an XMLDB URI.
xmldb:get-group($a as xs:string) xs:string?
Returns the owner group of the collection $a. The collection can be passed as a simple collection path or an XMLDB URI.
xmldb:get-group($a as xs:string, $b as xs:string) xs:string?
Returns the owner group of a resource in the collection specified by $a. The collection can be passed as a simple collection path or an XMLDB URI.
xmldb:get-owner($a as item()) xs:string?
Returns the owner of a collection. The collection can be passed as a simple collection path or an XMLDB URI.
xmldb:get-owner($a as item(), $b as xs:string) xs:string?
Returns the owner of the specified resource $b in collection $a. The collection can be passed as a simple collection path or an XMLDB URI.
xmldb:get-permissions($a as xs:string) xs:int?
Returns the permissions assigned to the collection $a. The collection can be specified as a simple collection path or an XMLDB URI.
xmldb:get-permissions($a as xs:string, $b as xs:string) xs:int?
Returns the permissions assigned to the resource specified in $b which is a child of the collection $a. The collection can be specified as a simple collection path or an XMLDB URI.
xmldb:login($a as xs:string, $b as xs:string?, $c as xs:string?) xs:boolean
Check if a user is registered as database user and change the user identity for the current XQuery script. The function simply tries to read the database collection specified in the first parameter $a, using the supplied username in $b and password in $c. Contrary to the authenticate function,login will set the current user for the xquery script to the authenticated user. It returns true if the attempt succeeds, false otherwise. If called from a HTTP contextthen the login is cached for the lifetime of the HTTP session and may be used for all XQueryscripts in that session.
xmldb:move($a as xs:string, $b as xs:string) empty()
Move a collection $a. The collection can be specified either as a simple collection path or an XMLDB URI.
xmldb:move($a as xs:string, $b as xs:string, $c as xs:string) empty()
Move a resource $c from the collection specified in $a to collection in $b. The collection can be either specified as a simple collection path or an XMLDB URI.
xmldb:permissions-to-string($a as xs:integer) xs:string?
Format the resource or collection permissions passed as an integer value into a string. The returned string shows the permissions following the usual Unix conventions, i.e. all permissions set is returned as rwurwurwu, where the first three chars are for user permissions, followed by group and world. 'r' denotes read, 'w' write and 'u' update permissions
xmldb:remove($a as xs:string) empty()
Remove a collection $a. The collection can be specified either as a simple collection path or an XMLDB URI.
xmldb:remove($a as xs:string, $b as xs:string) empty()
Remove a resource from the collection specified in $a. The collection can be either specified as a simple collection path or an XMLDB URI.
xmldb:rename($a as xs:string, $b as xs:string) empty()
Rename a collection $a. The collection can be specified either as a simple collection path or an XMLDB URI.
xmldb:rename($a as xs:string, $b as xs:string, $c as xs:string) empty()
Rename a resource $b in the collection specified in $a with name in $c. The collection can be either specified as a simple collection path or an XMLDB URI.
xmldb:set-collection-permissions($a as xs:string, $b as xs:string, $c as xs:string, $d as xs:integer) empty()
Sets the permissions of the specified collection. $a is the collection, which can be specified as a simple collection path or an XMLDB URI. $b specifies the user which will become the owner of the resource, $c the group. The final argument contains the permissions, specified as an xs:integer value. PLEASE REMEMBER that 0755 is 7*64+5*8+5, NOT decimal 755.
xmldb:set-resource-permissions($a as xs:string, $b as xs:string, $c as xs:string, $d as xs:string, $e as xs:integer) empty()
Sets the permissions of the specified resource. $a is the collection, which can be specified as a simple collection path or an XMLDB URI. $b denotes the resource tochange. $c specifies the user which will become the owner of the resource, $d the group. The final argument contains the permissions, specified as an xs:integer value. PLEASE REMEMBER that 0755 is 7*64+5*8+5, NOT decimal 755.
xmldb:size($a as xs:string, $b as xs:string) xs:long
Returns the estimated size of a resource $b (in bytes) in the collection specified by $a. The estimation is based on the number of pages occupied by a resource. If the document is serialized back to a string, it's size may be different, as parts of the structural information are stored in compressed form. The collection can be passed as a simple collection path or an XMLDB URI.
xmldb:store($a as xs:string, $b as xs:string?, $c as item()) xs:string?
Store a new resource into the database. The first argument denotes the collection where the resource should be stored. The collection can be either specified as a simple collection path or an XMLDB URI. The second argument is the name of the new resource. The third argument is either a node, an xs:string, a Java file object or an xs:anyURI. A node will be serialized to SAX. It becomes the root node of the new document. If the argument is of type xs:anyURI, the resource is loaded from that URI. The functions returns the path to the new document as an xs:string or - if the document could not be stored - the empty sequence.
xmldb:store($a as xs:string, $b as xs:string?, $c as item(), $d as xs:string) xs:string?
Store a new resource into the database. The first argument denotes the collection where the resource should be stored. The collection can be either specified as a simple collection path or an XMLDB URI. The second argument is the name of the new resource. The third argument is either a node, an xs:string, a Java file object or an xs:anyURI. A node will be serialized to SAX. It becomes the root node of the new document. If the argument is of type xs:anyURI, the resource is loaded from that URI. The final argument $d is used to specify a mime-type. If the mime-type is something other than 'text/xml' or 'application/xml', the resource will be stored as a binary resource. The functions returns the path to the new document as an xs:string or - if the document could not be stored - the empty sequence.
xmldb:store-files-from-pattern($a as xs:string, $b as xs:string, $c as xs:string+) xs:string*
Store new resources into the database. Resources are read from the server's file system, using file patterns. The first argument denotes the collection where resources should be stored. The collection can be either specified as a simple collection path or an XMLDB URI. The second argument is the directory in the file system wherefrom the files are read.The third argument is the file pattern. File pattern matching is based on code from Apache's Ant, thus following the same conventions. For example: *.xml matches any file ending with .xml in the current directory, **/*.xml matches files in any directory below the current one. The function returns a sequence of all document paths added to the db. These can be directly passed to fn:doc() to retrieve the document.
xmldb:store-files-from-pattern($a as xs:string, $b as xs:string, $c as xs:string+, $d as xs:string) xs:string*
Store new resources into the database. Resources are read from the server's file system, using file patterns. The first argument denotes the collection where resources should be stored. The collection can be either specified as a simple collection path or an XMLDB URI. The second argument is the directory in the file system wherefrom the files are read.The third argument is the file pattern. File pattern matching is based on code from Apache's Ant, thus following the same conventions. For example: *.xml matches any file ending with .xml in the current directory, **/*.xml matches files in any directory below the current one. The fourth argument $d is used to specify a mime-type. If the mime-type is something other than 'text/xml' or 'application/xml', the resource will be stored as a binary resource.The function returns a sequence of all document paths added to the db. These can be directly passed to fn:doc() to retrieve the document.
xmldb:store-files-from-pattern($a as xs:string, $b as xs:string, $c as xs:string+, $d as xs:string, $e as xs:boolean) xs:string*
Store new resources into the database. Resources are read from the server's file system, using file patterns. The first argument denotes the collection where resources should be stored. The collection can be either specified as a simple collection path or an XMLDB URI. The second argument is the directory in the file system wherefrom the files are read.The third argument is the file pattern. File pattern matching is based on code from Apache's Ant, thus following the same conventions. For example: *.xml matches any file ending with .xml in the current directory, **/*.xml matches files in any directory below the current one. The fourth argument $d is used to specify a mime-type. If the mime-type is something other than 'text/xml' or 'application/xml', the resource will be stored as a binary resource.If the final boolean argument is true(), the directory structure will be kept in the collection, otherwise all the matching resources, including the ones in sub-directories, will be stored in the collection given in the first argument flatly.The function returns a sequence of all document paths added to the db. These can be directly passed to fn:doc() to retrieve the document.
validation:validate($a as item()) xs:boolean
Validate document specified by $a. $a is of type xs:anyURI, or a node (element or returned by fn:doc()). The grammar files (DTD, XML Schema) are resolved using the global catalog file(s).
validation:validate($a as item(), $b as xs:anyURI) xs:boolean
Validate document specified by $a using $b. $a is of type xs:anyURI, or a node (element or returned by fn:doc()). $b can point to an OASIS catalog file (.xml), a collection (path ends with '/') or a grammar document. Supported grammar documents extensions are ".dtd" ".xsd" ".rng" ".rnc" ".sch" and ".nvdl".
validation:validate-report($a as item()) node()
Validate document specified by $a. $a is of type xs:anyURI, or a node (element or returned by fn:doc()). The grammar files (DTD, XML Schema) are resolved using the global catalog file(s). A simple report is returned.
validation:validate-report($a as item(), $b as xs:anyURI) node()
Validate document specified by $a using $b. $a is of type xs:anyURI, or a node (element or returned by fn:doc()). $b can point to an OASIS catalog file (.xml), a collection (path ends with '/') or a grammar document. Supported grammar documents extensions are ".dtd" ".xsd" ".rng" ".rnc" ".sch" and ".nvdl". A simple report is returned.
util:binary-to-string($a as xs:base64Binary?) xs:string?
Returns the contents of a binary resource as an xs:string value. The binary data is transformed into a Java string using the encoding specified in the optional second argument or UTF-8.
util:binary-to-string($a as xs:base64Binary?, $b as xs:string) xs:string?
Returns the contents of a binary resource as an xs:string value. The binary data is transformed into a Java string using the encoding specified in the optional second argument or UTF-8.
util:catch($a as xs:string+, $b as item()*, $c as item()*) item()*
This function corresponds to a try-catch statement in Java. The code block in $b will be put inside a try-catch statement. If an exception is thrown while executing $b, the function checks the name of the exception and calls $c if it matches one of the fully qualified Java class names specified in $a. A value of "*" in $a will catch all java exceptions
util:eval($a as item()) node()*
Dynamically evaluates an XPath/XQuery expression. If the first argument is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')). The query inherits the current execution context, i.e. all namespace declarations and variable declarations are visible from within the inner expression. The function returns an empty sequence if a whitespace string is passed.
util:eval($a as item(), $b as xs:boolean) node()*
Dynamically evaluates an XPath/XQuery expression. If the first argument is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')). The query inherits the current execution context, i.e. all namespace declarations and variable declarations are visible from within the inner expression. The function returns an empty sequence if a whitespace string is passed. The third argument specifies if the compiled query expression should be cached. The cached query will be globally available within the db instance.
util:eval-inline($a as item()*, $b as item()) item()*
Dynamically evaluates an XPath/XQuery expression. If the first argument is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')). The query inherits the first argument's context, i.e. all namespace declarations and variable declarations are visible from within the inner expression. The function returns an empty sequence if a whitespace string is passed.
util:eval-with-context($a as item(), $b as node()?, $c as xs:boolean) node()*
Dynamically evaluates an XPath/XQuery expression. If the first argument is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')).
The query inherits the context described by the XML fragment in the second parameter. It should have the format:
<static-context>
<output-size-limit value="-1">
<unbind-namespace uri="http://exist.sourceforge.net/NS/exist"/>
<current-dateTime value="dateTime"/>
<implicit-timezone value="duration"/>
<variable name="qname">variable value</variable>
</static-context>.
The third