MarkLogic Server 11.0 Product Documentation
xdmp and sem functions (Extension)

The extension functions provide miscellaneous extensions to JavaScript.

71 functions
Function name Description
sem.resolveIri Resolves a relative URI against an absolute URI.
xdmp.add64 Add two 64-bit integer values, discarding overflow.
xdmp.and64 AND two 64-bit integer values.
xdmp.atomizable Returns true if a value could be atomized without error.
xdmp.awsRegion Returns the current Amazon Web Services region.
xdmp.awsServicesDomain Returns the current Amazon Web Services services domain.
xdmp.awsServicesPartition Returns the current Amazon Web Services services partition.
xdmp.azureEnvironment Returns the current Microsoft Azure Environment.
xdmp.azureRegion Returns the current Microsoft Azure Region.
xdmp.base64Decode Converts base64-encoded string to plaintext.
xdmp.base64Encode Converts plaintext into base64-encoded string.
xdmp.binaryDecode Converts an encoded byte sequence, passed in as a binary node, from the specified encoding to a unicode string.
xdmp.binaryToInteger Parses a binary string, returning an integer.
xdmp.callerDialect Returns the dialect (e.g., "javascript", "1.0-ml", etc) of the caller or the empty sequence if no dialect information is available.
xdmp.castableAs Returns true if a value is castable.
xdmp.crypt Calculates the password hash for the given password and salt.
xdmp.crypt2 Calculates the password hash for the given plain-text password.
xdmp.decodeFromNCName Invertible function that decodes characters an NCName produced by xdmp.encodeForNCName.
xdmp.documentGetCollections Returns the collections to which a given document belongs.
xdmp.documentGetMetadata Returns the metadata value of a given document.
xdmp.documentGetMetadataValue Returns the metadata value of a given document.
xdmp.elementContentType Returns the schema-defined content-type of an element ("empty", "simple", "element-only", or "mixed").
xdmp.email Send an email in a JavasCript program.
xdmp.encodeForNCName Invertible function that escapes characters required to be part of an NCName.
xdmp.encodingLanguageDetect Analyzes binary, text, or XML data and suggests possible pairs of encoding and language, with a confidence score for each pair.
xdmp.hash32 Returns the 32-bit hash of a string.
xdmp.hash64 Returns the 64-bit hash of a string.
xdmp.hexToInteger Parses a hexadecimal string, returning an integer.
xdmp.hmacMd5 Calculates the Hash-based Message Authentication Code (HMAC) using the md5 hash function of the given secret key and message arguments.
xdmp.hmacSha1 Calculates the Hash-based Message Authentication Code (HMAC) using the SHA1 hash function of the given secret key and message arguments.
xdmp.hmacSha256 Calculates the Hash-based Message Authentication Code (HMAC) using the SHA256 hash function of the given secret key and message arguments.
xdmp.hmacSha512 Calculates the Hash-based Message Authentication Code (HMAC) using the SHA512 hash function of the given secret key and message arguments.
xdmp.initcap Returns the string where the first letter of each token has been uppercased.
xdmp.integerToBinary Returns a binary representation of an integer.
xdmp.integerToHex Returns a hexadecimal representation of an integer.
xdmp.integerToOctal Returns an octal representation of an integer.
xdmp.isWhitespaceNode Returns true if the node is a text node containing only whitespace.
xdmp.keyFromQName Construct a context-independent string from a QName.
xdmp.ldapLookup Returns an ldap entry.
xdmp.ldapSearch Returns ldap search result.
xdmp.lshift64 Left-shift a 64-bit integer value.
xdmp.md5 Calculates the md5 hash of the given argument.
xdmp.mul64 Multiply two 64-bit integer values, discarding overflow.
xdmp.multipartDecode Extract the parts from a multipart encoding.
xdmp.multipartEncode Create a multipart encoding of the specified node.
xdmp.nodeKind Returns an String representing the node's kind: either "document", "element", "attribute", "text", "namespace", "processing-instruction", "binary", or "comment".
xdmp.nodeMetadata Returns the metadata value of a given node.
xdmp.nodeMetadataValue Returns the metadata value of a node for a particular key.
xdmp.not64 NOT a 64-bit integer value.
xdmp.octalToInteger Parses an octal string, returning an integer.
xdmp.or64 OR two 64-bit integer values.
xdmp.parseDateTime Parses a string containing date, time or dateTime using the supplied picture argument and returns a dateTime value.
xdmp.parseYymmdd Parses a string containing date, time or dateTime using the supplied picture argument and returns a dateTime value.
xdmp.position Returns an integer value representing the starting position of a string within the search string.
xdmp.QNameFromKey Construct a QName from a string of the form "{namespaceURI}localname".
xdmp.random Returns a random unsigned integer between 0 and a number up to 64 bits long.
xdmp.resolveUri Resolves a relative URI against an absolute URI.
xdmp.rshift64 Right-shift a 64-bit integer value.
xdmp.setResponseOutputMethod Sets the serialization method.
xdmp.sha1 Calculates the SHA1 hash of the given argument.
xdmp.sha256 Calculates the SHA256 hash of the given argument.
xdmp.sha384 Calculates the SHA384 hash of the given argument.
xdmp.sha512 Calculates the SHA512 hash of the given argument.
xdmp.sleep Delays for a specific amount of time.
xdmp.step64 Combines an initial hash with a subsequent hash.
xdmp.strftime Formats a dateTime value using POSIX strftime.
xdmp.timestampToWallclock Converts a 64 bit timestamp value to an xs:dateTime.
xdmp.type Returns the name of the simple type of the atomic value argument as an xs:QName.
xdmp.userLastLogin Returns the last-login node for the current user.
xdmp.wallclockToTimestamp Converts an xs:dateTime to a 64 bit timestamp value.
xdmp.xor64 XOR two 64-bit integer values.
Powered by MarkLogic Server | Terms of Use | Privacy Policy