Namespace: xdmp
planBuilder. xdmp
Builds expressions to call functions in
the xdmp server library for a row pipeline.
- Since:
-
- 2.1.1
Methods
-
-
QNameFromKey(key) → {XsQName}
-
Construct a QName from a string of the form "{namespaceURI}localname". This function is useful for constructing Clark notation parameters for the xdmp:xslt-eval and xdmp:xslt-invoke functions. Provides a client interface to a server function. See xdmp.QNameFromKey
Parameters:
Name Type Argument Description key
XsString <optional>
The string from which to construct a QName. - Since:
-
- 2.1.1
Returns:
- Type
- XsQName
-
-
add64(x, y) → {XsUnsignedLong}
-
Add two 64-bit integer values, discarding overflow. Provides a client interface to a server function. See xdmp.add64
Parameters:
Name Type Argument Description x
XsUnsignedLong <optional>
The first value. y
XsUnsignedLong <optional>
The second value. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
and64(x, y) → {XsUnsignedLong}
-
AND two 64-bit integer values. Provides a client interface to a server function. See xdmp.and64
Parameters:
Name Type Argument Description x
XsUnsignedLong <optional>
The first value. y
XsUnsignedLong <optional>
The second value. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
base64Decode(encoded) → {XsString}
-
Converts base64-encoded string to plaintext. Provides a client interface to a server function. See xdmp.base64Decode
Parameters:
Name Type Argument Description encoded
XsString <optional>
Encoded text to be decoded. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
base64Encode(plaintext) → {XsString}
-
Converts plaintext into base64-encoded string. Provides a client interface to a server function. See xdmp.base64Encode
Parameters:
Name Type Argument Description plaintext
XsString <optional>
Plaintext to be encoded. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
castableAs(namespaceUri, localName, item) → {XsBoolean}
-
Returns true if a value is castable. This is similar to the "castable as" XQuery predicate, except that the type is determined at runtime. Provides a client interface to a server function. See xdmp.castableAs
Parameters:
Name Type Argument Description namespaceUri
XsString <optional>
The namespace URI of the type. localName
XsString <optional>
The local-name of the type. item
Item <optional>
The item to be cast. - Since:
-
- 2.1.1
Returns:
- Type
- XsBoolean
-
-
crypt(password, salt) → {XsString}
-
Calculates the password hash for the given password and salt. Provides a client interface to a server function. See xdmp.crypt
Parameters:
Name Type Argument Description password
XsString <optional>
String to be hashed. salt
XsString <optional>
Salt to avoid 1:1 mapping from passwords to hashes. Only the first 8 characters of the salt are significant; any characters beyond the eighth are ignored. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
crypt2(password) → {XsString}
-
Calculates the password hash for the given plain-text password. Provides a client interface to a server function. See xdmp.crypt2
Parameters:
Name Type Argument Description password
XsString <optional>
String to be hashed. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
daynameFromDate(arg) → {XsString}
-
Returns a string representing the dayname value in the localized value of arg. Provides a client interface to a server function. See xdmp.daynameFromDate
Parameters:
Name Type Argument Description arg
XsDate <optional>
The date whose dayname value will be returned. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
decodeFromNCName(name) → {XsString}
-
Invertible function that decodes characters an NCName produced by xdmp:encode-for-NCName. Given the NCName produced by xdmp:encode-for-NCName this function returns the original string. Provides a client interface to a server function. See xdmp.decodeFromNCName
Parameters:
Name Type Argument Description name
XsString <optional>
A string representing an NCName. This string must have been the result of a previous call to xdmp:decode-from-NCName or undefined results will occur. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
describe(item, maxSequenceLength, maxItemLength) → {XsString}
-
Returns a string representing the description of a given item sequence. If you take the output of this function and evaluate it as an XQuery program, it returns the item(s) input to the function. Provides a client interface to a server function. See xdmp.describe
Parameters:
Name Type Argument Description item
Item <optional>
The item sequence whose description is returned. maxSequenceLength
XsUnsignedInt <optional>
Represents the maximum number of items per sequence to print. The default is 3. maxItemLength
XsUnsignedInt <optional>
Represents the maximum number of characters per item to print. The default is 64. The minimum is 8. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
diacriticLess(string) → {XsString}
-
Returns the specified string, converting all of the characters with diacritics to characters without diacritics. Provides a client interface to a server function. See xdmp.diacriticLess
Parameters:
Name Type Argument Description string
XsString <optional>
The string to convert. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
elementContentType(element) → {XsString}
-
Returns the schema-defined content-type of an element ("empty", "simple", "element-only", or "mixed"). Provides a client interface to a server function. See xdmp.elementContentType
Parameters:
Name Type Argument Description element
ElementNode <optional>
An element node. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
encodeForNCName(name) → {XsString}
-
Invertible function that escapes characters required to be part of an NCName. This is useful when translating names from other representations such as JSON to XML. Given any string, the result is always a valid NCName. Providing all names are passed through this function the result is distinct NCNames so the results can be used for searching as well as name generation. The inverse function is xdmp:decode-from-NCName. Provides a client interface to a server function. See xdmp.encodeForNCName
Parameters:
Name Type Argument Description name
XsString <optional>
A string which is used as an NCName (such as the localname for an element or attribute). - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
formatNumber(value, picture, language, letterValue, ordchar, zeroPadding, groupingSeparator, groupingSize) → {XsString}
-
Returns a formatted number value based on the picture argument. The difference between this function and the W3C standards fn:format-number function is that this function imitates the XSLT xsl:number instruction, which has richer formatting options than the fn:format-number fn:format-number function. This function can be used for spelled-out and ordinal numbering in many languages. This function is available in XSLT as well as in all dialects of XQuery and Server-Side JavaScript. Provides a client interface to a server function. See xdmp.formatNumber
Parameters:
Name Type Argument Description value
XsNumeric <optional>
The given numeric $value that needs to be formatted. picture
XsString <optional>
The desired string representation of the given numeric $value. The picture string is a sequence of characters, in which the characters represent variables such as, decimal-separator-sign, grouping-sign, zero-digit-sign, digit-sign, pattern-separator, percent sign and per-mille-sign. For details on the picture string, see http://www.w3.org/TR/xslt20/#date-picture-string. Unlike fn:format-number(), here the picture string allows spelled-out (uppercase, lowercase and Capitalcase) formatting. language
XsString <optional>
The desired language for string representation of the numeric $value. An empty sequence must be passed in even if a user doesn't want to specify this argument. letterValue
XsString <optional>
Same as letter-value attribute in xsl:number. This argument is ignored during formatting as of now. It may be used in future. An empty sequence must be passed in even if a user doesn't want to specify this argument. ordchar
XsString <optional>
If $ordchar is "yes" then ordinal numbering is attempted. If this is any other string, including an empty string, then cardinal numbering is generated. An empty sequence must be passed in even if a user doesn't want to specify this argument. zeroPadding
XsString <optional>
Value of $zero-padding is used to pad integer part of a number on the left and fractional part on the right, if needed. An empty sequence must be passed in even if a user doesn't want to specify this argument. groupingSeparator
XsString <optional>
Value of $grouping-separator is a character, used to groups of digits, especially useful in making long sequence of digits more readable. For example, 10,000,000- here "," is used as a separator after each group of three digits. An empty sequence must be passed in even if a user doesn't want to specify this argument. groupingSize
XsInteger <optional>
Represents size of the group, i.e. the number of digits before after which grouping separator is inserted. An empty sequence must be passed in even if a user doesn't want to specify this argument. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
fromJson(arg) → {Item}
-
Atomizes a JSON node, returning a JSON value. Provides a client interface to a server function. See xdmp.fromJson
Parameters:
Name Type Argument Description arg
Node <optional>
A node of kind object-node(), array-node(), text(), number-node(), boolean-node(), null-node(), or document-node(). - Since:
-
- 2.1.1
Returns:
- Type
- Item
-
-
getCurrentUser() → {XsString}
-
Returns the name of the current user. Provides a client interface to a server function. See xdmp.getCurrentUser
- Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
hash32(string) → {XsUnsignedInt}
-
Returns the 32-bit hash of a string. Provides a client interface to a server function. See xdmp.hash32
Parameters:
Name Type Argument Description string
XsString <optional>
The string to be hashed. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedInt
-
-
hash64(string) → {XsUnsignedLong}
-
Returns the 64-bit hash of a string. Provides a client interface to a server function. See xdmp.hash64
Parameters:
Name Type Argument Description string
XsString <optional>
The string to be hashed. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
hexToInteger(hex) → {XsInteger}
-
Parses a hexadecimal string, returning an integer. Provides a client interface to a server function. See xdmp.hexToInteger
Parameters:
Name Type Argument Description hex
XsString <optional>
The hexadecimal string. - Since:
-
- 2.1.1
Returns:
- Type
- XsInteger
-
-
hmacMd5(secretkey, message, encoding) → {XsString}
-
Calculates the Hash-based Message Authentication Code (HMAC) using the md5 hash function of the given secret key and message arguments. Provides a client interface to a server function. See xdmp.hmacMd5
Parameters:
Name Type Argument Description secretkey
Item <optional>
The secret key. Must be xs:string or a binary node. message
Item <optional>
Message to be authenticated. Must be xs:string or a binary node. encoding
XsString <optional>
Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex". - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
hmacSha1(secretkey, message, encoding) → {XsString}
-
Calculates the Hash-based Message Authentication Code (HMAC) using the SHA1 hash function of the given secret key and message arguments. Provides a client interface to a server function. See xdmp.hmacSha1
Parameters:
Name Type Argument Description secretkey
Item <optional>
The secret key. Must be xs:string or a binary node. message
Item <optional>
Message to be authenticated. Must be xs:string or a binary node. encoding
XsString <optional>
Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex". - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
hmacSha256(secretkey, message, encoding) → {XsString}
-
Calculates the Hash-based Message Authentication Code (HMAC) using the SHA256 hash function of the given secret key and message arguments. Provides a client interface to a server function. See xdmp.hmacSha256
Parameters:
Name Type Argument Description secretkey
Item <optional>
The secret key. Must be xs:string or a binary node. message
Item <optional>
Message to be authenticated. Must be xs:string or a binary node. encoding
XsString <optional>
Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex". - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
hmacSha512(secretkey, message, encoding) → {XsString}
-
Calculates the Hash-based Message Authentication Code (HMAC) using the SHA512 hash function of the given secret key and message arguments. Provides a client interface to a server function. See xdmp.hmacSha512
Parameters:
Name Type Argument Description secretkey
Item <optional>
The secret key. Must be xs:string or a binary node. message
Item <optional>
Message to be authenticated. Must be xs:string or a binary node. encoding
XsString <optional>
Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex". - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
initcap(string) → {XsString}
-
Returns the string where the first letter of each token has been uppercased. Provides a client interface to a server function. See xdmp.initcap
Parameters:
Name Type Argument Description string
XsString <optional>
The string to modify. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
integerToHex(val) → {XsString}
-
Returns a hexadecimal representation of an integer. Provides a client interface to a server function. See xdmp.integerToHex
Parameters:
Name Type Argument Description val
XsInteger <optional>
The integer value. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
integerToOctal(val) → {XsString}
-
Returns an octal representation of an integer. Provides a client interface to a server function. See xdmp.integerToOctal
Parameters:
Name Type Argument Description val
XsInteger <optional>
The integer value. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
keyFromQName(name) → {XsString}
-
Construct a context-independent string from a QName. This string is of the form "{namespaceURI}localname" and is suitable for use as a map key. Provides a client interface to a server function. See xdmp.keyFromQName
Parameters:
Name Type Argument Description name
XsQName <optional>
The QName to compute a key for. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
lshift64(x, y) → {XsUnsignedLong}
-
Left-shift a 64-bit integer value. Provides a client interface to a server function. See xdmp.lshift64
Parameters:
Name Type Argument Description x
XsUnsignedLong <optional>
The value to shift. y
XsLong <optional>
The left shift to perform. This value may be negative. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
md5(data, encoding) → {XsString}
-
Calculates the md5 hash of the given argument. Provides a client interface to a server function. See xdmp.md5
Parameters:
Name Type Argument Description data
Item <optional>
Data to be hashed. Must be xs:string or a binary node. encoding
XsString <optional>
Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex". - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
monthNameFromDate(arg) → {XsString}
-
Returns month name, calculated from the localized value of arg. Provides a client interface to a server function. See xdmp.monthNameFromDate
Parameters:
Name Type Argument Description arg
XsDate <optional>
The date whose month-name will be returned. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
mul64(x, y) → {XsUnsignedLong}
-
Multiply two 64-bit integer values, discarding overflow. Provides a client interface to a server function. See xdmp.mul64
Parameters:
Name Type Argument Description x
XsUnsignedLong <optional>
The first value. y
XsUnsignedLong <optional>
The second value. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
nodeCollections(node) → {XsString}
-
Returns any collections for the node's document in the database. If the specified node does not come from a document in a database, then xdmp:node-collections returns an empty sequence. Provides a client interface to a server function. See xdmp.nodeCollections
Parameters:
Name Type Argument Description node
Node <optional>
The node whose collections are to be returned. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
nodeKind(node) → {XsString}
-
Returns an xs:string representing the node's kind: either "document", "element", "attribute", "text", "namespace", "processing-instruction", "binary", or "comment". Provides a client interface to a server function. See xdmp.nodeKind
Parameters:
Name Type Argument Description node
Node <optional>
The node whose kind is to be returned. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
nodeMetadata(node) → {MapMap}
-
Returns the metadata value of a given node. Provides a client interface to a server function. See xdmp.nodeMetadata
Parameters:
Name Type Argument Description node
Node <optional>
The node whose metadata are to be returned. - Since:
-
- 2.1.1
Returns:
- Type
- MapMap
-
-
nodeMetadataValue(node, keyName) → {XsString}
-
Returns the metadata value of a node for a particular key. Provides a client interface to a server function. See xdmp.nodeMetadataValue
Parameters:
Name Type Argument Description node
Node <optional>
The node whose metadata are to be returned. keyName
XsString <optional>
Name of the key for the metadata. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
nodePermissions(node, outputKind) → {Item}
-
Returns the permissions to a node's document. Provides a client interface to a server function. See xdmp.nodePermissions
Parameters:
Name Type Argument Description node
Node <optional>
The node. outputKind
XsString <optional>
The output kind. It can be either "elements" or "objects". With "elements", the built-in returns a sequence of XML elements. With "objects", the built-in returns a sequence of map:map. The default is "elements". - Since:
-
- 2.1.1
Returns:
- Type
- Item
-
-
nodeUri(node) → {XsString}
-
Returns the document-uri property of the parameter or its ancestor. Provides a client interface to a server function. See xdmp.nodeUri
Parameters:
Name Type Argument Description node
Node <optional>
The node whose URI is returned. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
not64(x) → {XsUnsignedLong}
-
NOT a 64-bit integer value. Provides a client interface to a server function. See xdmp.not64
Parameters:
Name Type Argument Description x
XsUnsignedLong <optional>
The input value. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
octalToInteger(octal) → {XsInteger}
-
Parses an octal string, returning an integer. Provides a client interface to a server function. See xdmp.octalToInteger
Parameters:
Name Type Argument Description octal
XsString <optional>
The octal string. - Since:
-
- 2.1.1
Returns:
- Type
- XsInteger
-
-
or64(x, y) → {XsUnsignedLong}
-
OR two 64-bit integer values. Provides a client interface to a server function. See xdmp.or64
Parameters:
Name Type Argument Description x
XsUnsignedLong <optional>
The first value. y
XsUnsignedLong <optional>
The second value. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
parseDateTime(picture, value, language, calendar, country) → {XsDateTime}
-
Parses a string containing date, time or dateTime using the supplied picture argument and returns a dateTime value. While this function is closely related to other XSLT functions, it is available in XSLT as well as in all XQuery dialects and in Server-Side JavaScript. Provides a client interface to a server function. See xdmp.parseDateTime
Parameters:
Name Type Argument Description picture
XsString <optional>
The desired string representation of the given $value. The picture string is a sequence of characters, in which the characters represent variables such as, decimal-separator-sign, grouping-sign, zero-digit-sign, digit-sign, pattern-separator, percent sign and per-mille-sign. For details on the picture string, see http://www.w3.org/TR/xslt20/#date-picture-string. This follows the specification of picture string in the W3C XSLT 2.0 specification for the fn:format-dateTime function. Symbol Description ----------------------------------- 'Y' year(absolute value) 'M' month in year 'D' day in month 'd' day in year 'F' day of week 'W' week in year 'w' week in month 'H' hour in day 'h' hour in half-day 'P' am/pm marker 'm' minute in hour 's' second in minute 'f' fractional seconds 'Z' timezone as a time offset from UTC for example PST 'z' timezone as an offset using GMT, for example GMT+1 value
XsString <optional>
The given string $value representing the dateTime value that needs to be formatted. language
XsString <optional>
The language used in string representation of the date, time or dateTime value. calendar
XsString <optional>
This argument is reserved for future use. The only calendar supported at this point is "Gregorian" or "AD". country
XsString <optional>
$country is used to take into account if there any country specific interpretation of the string while converting it into dateTime value. - Since:
-
- 2.1.1
Returns:
- Type
- XsDateTime
-
-
parseYymmdd(picture, value, language, calendar, country) → {XsDateTime}
-
Parses a string containing date, time or dateTime using the supplied picture argument and returns a dateTime value. While this function is closely related to other XSLT functions, it is available in XSLT as well as in all XQuery dialects and in Server-Side JavaScript. Provides a client interface to a server function. See xdmp.parseYymmdd
Parameters:
Name Type Argument Description picture
XsString <optional>
The desired string representation of the given $value. This follows the specification of picture string which is compatible to the format specification in icu. See http://icu-project.org/apiref/icu4j/com/ibm/icu/text/SimpleDateFormat.html for more details. The following is the summary of the formatting symbols: Symbol Description ---------------------------- "y" year(absolute value) "M" month in year "d" day in month "D" day in year "E" day of week "w" week in year "W" week in month "H" hour in day "K" hour in half-day "a" am/pm marker "s" second in minute "S" fractional seconds "Z" timezone as a time offset from UTC for example PST "ZZZZ" timezone as an offset using GMT, for example GMT+1 value
XsString <optional>
The given string $value that needs to be formatted. language
XsString <optional>
The language used in string representation of the date, time or dateTime value. calendar
XsString <optional>
This argument is reserved for future use. The only calendar supported at this point is "Gregorian" or "AD". country
XsString <optional>
$country is used to take into account if there any country specific interpretation of the string while converting it into dateTime value. - Since:
-
- 2.1.1
Returns:
- Type
- XsDateTime
-
-
path(node, includeDocument) → {XsString}
-
Returns a string whose value corresponds to the path of the node. Provides a client interface to a server function. See xdmp.path
Parameters:
Name Type Argument Description node
Node <optional>
The node whose path is returned. includeDocument
XsBoolean <optional>
If true, then the path is presented with a leading doc(..)/.., otherwise the path is presented as /... - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
position(test, target, collation) → {XsInteger}
-
Returns an integer value representing the starting position of a string within the search string. Note, the string starting position is 1. If the first parameter is empty, the result is the empty sequence. Provides a client interface to a server function. See xdmp.position
Parameters:
Name Type Argument Description test
XsString <optional>
The string to test for existence in the second parameter. target
XsString <optional>
The string from which to test. collation
XsString <optional>
The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer's Guide. - Since:
-
- 2.1.1
Returns:
- Type
- XsInteger
-
-
quarterFromDate(arg) → {XsInteger}
-
Returns an integer between 1 and 4, both inclusive, calculating the quarter component in the localized value of arg. Provides a client interface to a server function. See xdmp.quarterFromDate
Parameters:
Name Type Argument Description arg
XsDate <optional>
The date whose quarter component will be returned. - Since:
-
- 2.1.1
Returns:
- Type
- XsInteger
-
-
random(max) → {XsUnsignedLong}
-
Returns a random unsigned integer between 0 and a number up to 64 bits long. Provides a client interface to a server function. See xdmp.random
Parameters:
Name Type Argument Description max
XsUnsignedLong <optional>
The optional maximum value (inclusive). - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
resolveUri(relative, base) → {XsAnyURI}
-
Resolves a relative URI against an absolute URI. If base is specified, the URI is resolved relative to that base. If base is not specified, the base is set to the base-uri property from the static context, if the property exists; if it does not exist, an error is thrown. Provides a client interface to a server function. See xdmp.resolveUri
Parameters:
Name Type Argument Description relative
XsString <optional>
A URI reference to resolve against the base. base
XsString <optional>
An absolute URI to use as the base of the resolution. - Since:
-
- 2.1.1
Returns:
- Type
- XsAnyURI
-
-
rshift64(x, y) → {XsUnsignedLong}
-
Right-shift a 64-bit integer value. Provides a client interface to a server function. See xdmp.rshift64
Parameters:
Name Type Argument Description x
XsUnsignedLong <optional>
The value to shift. y
XsLong <optional>
The right shift to perform. This value may be negative. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
sha1(data, encoding) → {XsString}
-
Calculates the SHA1 hash of the given argument. Provides a client interface to a server function. See xdmp.sha1
Parameters:
Name Type Argument Description data
Item <optional>
Data to be hashed. Must be xs:string or a binary node. encoding
XsString <optional>
Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex". - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
sha256(data, encoding) → {XsString}
-
Calculates the SHA256 hash of the given argument. Provides a client interface to a server function. See xdmp.sha256
Parameters:
Name Type Argument Description data
Item <optional>
Data to be hashed. Must be xs:string or a binary node. encoding
XsString <optional>
Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex". - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
sha384(data, encoding) → {XsString}
-
Calculates the SHA384 hash of the given argument. Provides a client interface to a server function. See xdmp.sha384
Parameters:
Name Type Argument Description data
Item <optional>
Data to be hashed. Must be xs:string or a binary node. encoding
XsString <optional>
Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex". - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
sha512(data, encoding) → {XsString}
-
Calculates the SHA512 hash of the given argument. Provides a client interface to a server function. See xdmp.sha512
Parameters:
Name Type Argument Description data
Item <optional>
Data to be hashed. Must be xs:string or a binary node. encoding
XsString <optional>
Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex". - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
step64(initial, step) → {XsUnsignedLong}
-
Combines an initial hash with a subsequent hash. Provides a client interface to a server function. See xdmp.step64
Parameters:
Name Type Argument Description initial
XsUnsignedLong <optional>
An initial hash. step
XsUnsignedLong <optional>
A step hash to be combined with the initial hash. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
strftime(format, value) → {XsString}
-
Formats a dateTime value using POSIX strftime. This function uses the POSIX strftime system call in the way it is implemented on each platform. For other XQuery functions that have more functionality (for example, for things like timezones), use one or more if the various XQuery or XSLT standard functions such as fn:format-dateTime . Provides a client interface to a server function. See xdmp.strftime
Parameters:
Name Type Argument Description format
XsString <optional>
The strftime format string. value
XsDateTime <optional>
The dateTime value. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
timestampToWallclock(timestamp) → {XsDateTime}
-
Converts a 64 bit timestamp value to an xs:dateTime. Provides a client interface to a server function. See xdmp.timestampToWallclock
Parameters:
Name Type Argument Description timestamp
XsUnsignedLong <optional>
The timestamp. - Since:
-
- 2.1.1
Returns:
- Type
- XsDateTime
-
-
toJson(item) → {Node}
-
Constructs a JSON document. Provides a client interface to a server function. See xdmp.toJson
Parameters:
Name Type Argument Description item
Item <optional>
A sequence of items from which the JSON document is to be constructed. The item sequence from which the JSON document is constructed. - Since:
-
- 2.1.1
Returns:
- Type
- Node
-
-
type(value) → {XsQName}
-
Returns the name of the simple type of the atomic value argument as an xs:QName. Provides a client interface to a server function. See xdmp.type
Parameters:
Name Type Argument Description value
XsAnyAtomicType <optional>
The value to return the type of. - Since:
-
- 2.1.1
Returns:
- Type
- XsQName
-
-
unquote(arg, defaultNamespace, options) → {DocumentNode}
-
Parses a string as XML, returning one or more document nodes. Provides a client interface to a server function. See xdmp.unquote
Parameters:
Name Type Argument Description arg
XsString <optional>
Input to be unquoted. defaultNamespace
XsString <optional>
Default namespace for nodes in the first parameter. options
XsString <optional>
The options for getting this document. The default value is (). Options include: "repair-full" Specifies that malformed XML content be repaired. XML content with multiple top-level elements will be parsed as multiple documents. This option has no effect on binary or text documents. "repair-none" Specifies that malformed XML content be rejected. XML content will be parsed as a single document, so a maximum of one document node will be returned. This option has no effect on binary or text documents. "format-text" Specifies to get the document as a text document, regardless of the URI specified. "format-binary" Specifies to get the document as a binary document, regardless of the URI specified. "format-xml" Specifies to get the document as an XML document, regardless of the URI specified. "format-json" Specifies to get the document as a JSON document, regardless of the URI specified. "default-language=xx" If the root element node specified in the first parameter does not already have an xml:lang attribute, the language to specify in an xml:lang attribute on the root element node. If default-language is not specified, then nothing is added to the root element node. Some examples are default-language=en and default-language=fr. - Since:
-
- 2.1.1
Returns:
- Type
- DocumentNode
-
-
uriContentType(uri) → {XsString}
-
Returns the content type of the given URI as matched in the mimetypes configuration. xdmp:content-type continues to work too. Provides a client interface to a server function. See xdmp.uriContentType
Parameters:
Name Type Argument Description uri
XsString <optional>
The document URI. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
uriFormat(uri) → {XsString}
-
Returns the format of the given URI as matched in the mimetypes configuration. Provides a client interface to a server function. See xdmp.uriFormat
Parameters:
Name Type Argument Description uri
XsString <optional>
The document URI. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
urlDecode(encoded) → {XsString}
-
Converts URL-encoded string to plaintext. This decodes the string created with xdmp:url-encode. Provides a client interface to a server function. See xdmp.urlDecode
Parameters:
Name Type Argument Description encoded
XsString <optional>
Encoded text to be decoded. - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
urlEncode(plaintext, noSpacePlus) → {XsString}
-
Converts plaintext into URL-encoded string. To decode the string, use xdmp:url-decode. Provides a client interface to a server function. See xdmp.urlEncode
Parameters:
Name Type Argument Description plaintext
XsString <optional>
Plaintext to be encoded. noSpacePlus
XsBoolean <optional>
True to encode space as "%20" instead of "+". - Since:
-
- 2.1.1
Returns:
- Type
- XsString
-
-
wallclockToTimestamp(timestamp) → {XsUnsignedLong}
-
Converts an xs:dateTime to a 64 bit timestamp value. Provides a client interface to a server function. See xdmp.wallclockToTimestamp
Parameters:
Name Type Argument Description timestamp
XsDateTime <optional>
The xs:datetime value. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
weekFromDate(arg) → {XsInteger}
-
Returns an integer between 1 and 53, both inclusive, representing the week value in the localized value of arg. Provides a client interface to a server function. See xdmp.weekFromDate
Parameters:
Name Type Argument Description arg
XsDate <optional>
The date whose weeks of the year will be returned. - Since:
-
- 2.1.1
Returns:
- Type
- XsInteger
-
-
weekdayFromDate(arg) → {XsInteger}
-
Returns an integer in the range 1 to 7, inclusive, representing the weekday value in the localized value of arg. Monday is the first weekday value (value of 1), and Sunday is the last (value of 7). Provides a client interface to a server function. See xdmp.weekdayFromDate
Parameters:
Name Type Argument Description arg
XsDate <optional>
The date whose weekday value will be returned. - Since:
-
- 2.1.1
Returns:
- Type
- XsInteger
-
-
xor64(x, y) → {XsUnsignedLong}
-
XOR two 64-bit integer values. Provides a client interface to a server function. See xdmp.xor64
Parameters:
Name Type Argument Description x
XsUnsignedLong <optional>
The first value. y
XsUnsignedLong <optional>
The second value. - Since:
-
- 2.1.1
Returns:
- Type
- XsUnsignedLong
-
-
yeardayFromDate(arg) → {XsInteger}
-
Returns an integer between 1 and 366, both inclusive, representing the yearday value in the localized value of arg. Provides a client interface to a server function. See xdmp.yeardayFromDate
Parameters:
Name Type Argument Description arg
XsDate <optional>
The date whose days of the year will be returned. - Since:
-
- 2.1.1
Returns:
- Type
- XsInteger