public interface FnExpr
Builds expressions to call functions in the fn server library for a row pipeline.
| Modifier and Type | Method and Description |
|---|---|
XsNumericExpr |
abs(XsNumericExpr arg)
Returns the absolute value of arg.
|
XsDateTimeExpr |
adjustDateTimeToTimezone(XsDateTimeExpr arg)
Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all.
|
XsDateTimeExpr |
adjustDateTimeToTimezone(XsDateTimeExpr arg,
String timezone)
Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all.
|
XsDateTimeExpr |
adjustDateTimeToTimezone(XsDateTimeExpr arg,
XsDayTimeDurationExpr timezone)
Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all.
|
XsDateExpr |
adjustDateToTimezone(XsDateExpr arg)
Adjusts an xs:date value to a specific timezone, or to no timezone at all.
|
XsDateExpr |
adjustDateToTimezone(XsDateExpr arg,
String timezone)
Adjusts an xs:date value to a specific timezone, or to no timezone at all.
|
XsDateExpr |
adjustDateToTimezone(XsDateExpr arg,
XsDayTimeDurationExpr timezone)
Adjusts an xs:date value to a specific timezone, or to no timezone at all.
|
XsTimeExpr |
adjustTimeToTimezone(XsTimeExpr arg)
Adjusts an xs:time value to a specific timezone, or to no timezone at all.
|
XsTimeExpr |
adjustTimeToTimezone(XsTimeExpr arg,
String timezone)
Adjusts an xs:time value to a specific timezone, or to no timezone at all.
|
XsTimeExpr |
adjustTimeToTimezone(XsTimeExpr arg,
XsDayTimeDurationExpr timezone)
Adjusts an xs:time value to a specific timezone, or to no timezone at all.
|
ElementNodeExpr |
analyzeString(String in,
String regex)
The result of the function is a new element node whose string value is the original string, but which contains markup to show which parts of the input match the regular expression.
|
ElementNodeExpr |
analyzeString(String in,
String regex,
String flags)
The result of the function is a new element node whose string value is the original string, but which contains markup to show which parts of the input match the regular expression.
|
ElementNodeExpr |
analyzeString(XsStringExpr in,
XsStringExpr regex)
The result of the function is a new element node whose string value is the original string, but which contains markup to show which parts of the input match the regular expression.
|
ElementNodeExpr |
analyzeString(XsStringExpr in,
XsStringExpr regex,
XsStringExpr flags)
The result of the function is a new element node whose string value is the original string, but which contains markup to show which parts of the input match the regular expression.
|
XsAnyAtomicTypeExpr |
avg(XsAnyAtomicTypeSeqExpr arg)
Returns the average of the values in the input sequence arg, that is, the sum of the values divided by the number of values.
|
XsAnyURIExpr |
baseUri(NodeExpr arg)
Returns the value of the base-uri property for the specified node.
|
XsBooleanExpr |
booleanExpr(ItemSeqExpr arg)
Computes the effective boolean value of the sequence arg.
|
XsNumericExpr |
ceiling(XsNumericExpr arg)
Returns the smallest (closest to negative infinity) number with no fractional part that is not less than the value of arg.
|
XsBooleanExpr |
codepointEqual(XsStringExpr comparand1,
String comparand2)
Returns
true if the specified parameters are the same Unicode code point, otherwise returns false. |
XsBooleanExpr |
codepointEqual(XsStringExpr comparand1,
XsStringExpr comparand2)
Returns
true if the specified parameters are the same Unicode code point, otherwise returns false. |
XsStringExpr |
codepointsToString(XsIntegerSeqExpr arg)
Creates an
xs:string from a sequence of Unicode code points. |
XsIntegerExpr |
compare(XsStringExpr comparand1,
String comparand2)
Returns -1, 0, or 1, depending on whether the value of the comparand1 is respectively less than, equal to, or greater than the value of comparand2, according to the rules of the collation that is used.
|
XsIntegerExpr |
compare(XsStringExpr comparand1,
String comparand2,
String collation)
Returns -1, 0, or 1, depending on whether the value of the comparand1 is respectively less than, equal to, or greater than the value of comparand2, according to the rules of the collation that is used.
|
XsIntegerExpr |
compare(XsStringExpr comparand1,
XsStringExpr comparand2)
Returns -1, 0, or 1, depending on whether the value of the comparand1 is respectively less than, equal to, or greater than the value of comparand2, according to the rules of the collation that is used.
|
XsIntegerExpr |
compare(XsStringExpr comparand1,
XsStringExpr comparand2,
XsStringExpr collation)
Returns -1, 0, or 1, depending on whether the value of the comparand1 is respectively less than, equal to, or greater than the value of comparand2, according to the rules of the collation that is used.
|
XsStringExpr |
concat(XsAnyAtomicTypeExpr... parameter1)
Returns the
xs:string that is the concatenation of the values of the specified parameters. |
XsBooleanExpr |
contains(XsStringExpr parameter1,
String parameter2)
Returns
true if the first parameter contains the string from the second parameter, otherwise returns false. |
XsBooleanExpr |
contains(XsStringExpr parameter1,
String parameter2,
String collation)
Returns
true if the first parameter contains the string from the second parameter, otherwise returns false. |
XsBooleanExpr |
contains(XsStringExpr parameter1,
XsStringExpr parameter2)
Returns
true if the first parameter contains the string from the second parameter, otherwise returns false. |
XsBooleanExpr |
contains(XsStringExpr parameter1,
XsStringExpr parameter2,
XsStringExpr collation)
Returns
true if the first parameter contains the string from the second parameter, otherwise returns false. |
XsIntegerExpr |
count(ItemSeqExpr arg)
Returns the number of items in the value of arg.
|
XsIntegerExpr |
count(ItemSeqExpr arg,
double maximum)
Returns the number of items in the value of arg.
|
XsIntegerExpr |
count(ItemSeqExpr arg,
XsDoubleExpr maximum)
Returns the number of items in the value of arg.
|
XsDateExpr |
currentDate()
Returns
xs:date(fn:current-dateTime()). |
XsDateTimeExpr |
currentDateTime()
Returns the current dateTime value (with timezone) from the dynamic context.
|
XsTimeExpr |
currentTime()
Returns
xs:time(fn:current-dateTime()). |
XsIntegerExpr |
dayFromDate(XsDateExpr arg)
Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of arg.
|
XsIntegerExpr |
dayFromDateTime(XsDateTimeExpr arg)
Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of arg.
|
XsIntegerExpr |
daysFromDuration(XsDurationExpr arg)
Returns an xs:integer representing the days component in the canonical lexical representation of the value of arg.
|
XsBooleanExpr |
deepEqual(ItemSeqExpr parameter1,
ItemSeqExpr parameter2)
This function assesses whether two sequences are deep-equal to each other.
|
XsBooleanExpr |
deepEqual(ItemSeqExpr parameter1,
ItemSeqExpr parameter2,
String collation)
This function assesses whether two sequences are deep-equal to each other.
|
XsBooleanExpr |
deepEqual(ItemSeqExpr parameter1,
ItemSeqExpr parameter2,
XsStringExpr collation)
This function assesses whether two sequences are deep-equal to each other.
|
XsStringExpr |
defaultCollation()
Returns the value of the default collation property from the static context.
|
XsAnyAtomicTypeSeqExpr |
distinctValues(XsAnyAtomicTypeSeqExpr arg)
Returns the sequence that results from removing from arg all but one of a set of values that are eq to one other.
|
XsAnyAtomicTypeSeqExpr |
distinctValues(XsAnyAtomicTypeSeqExpr arg,
String collation)
Returns the sequence that results from removing from arg all but one of a set of values that are eq to one other.
|
XsAnyAtomicTypeSeqExpr |
distinctValues(XsAnyAtomicTypeSeqExpr arg,
XsStringExpr collation)
Returns the sequence that results from removing from arg all but one of a set of values that are eq to one other.
|
XsAnyURIExpr |
documentUri(NodeExpr arg)
Returns the value of the document-uri property for the specified node.
|
XsBooleanExpr |
empty(ItemSeqExpr arg)
If the value of arg is the empty sequence, the function returns true; otherwise, the function returns false.
|
XsStringExpr |
encodeForUri(XsStringExpr uriPart)
Invertible function that escapes characters required to be escaped inside path segments of URIs.
|
XsBooleanExpr |
endsWith(XsStringExpr parameter1,
String parameter2)
Returns
true if the first parameter ends with the string from the second parameter, otherwise returns false. |
XsBooleanExpr |
endsWith(XsStringExpr parameter1,
String parameter2,
String collation)
Returns
true if the first parameter ends with the string from the second parameter, otherwise returns false. |
XsBooleanExpr |
endsWith(XsStringExpr parameter1,
XsStringExpr parameter2)
Returns
true if the first parameter ends with the string from the second parameter, otherwise returns false. |
XsBooleanExpr |
endsWith(XsStringExpr parameter1,
XsStringExpr parameter2,
XsStringExpr collation)
Returns
true if the first parameter ends with the string from the second parameter, otherwise returns false. |
XsStringExpr |
escapeHtmlUri(XsStringExpr uriPart)
%-escapes everything except printable ASCII characters.
|
XsBooleanExpr |
exists(ItemSeqExpr arg)
If the value of arg is not the empty sequence, the function returns true; otherwise, the function returns false.
|
XsBooleanExpr |
falseExpr()
Returns the
xs:boolean value false. |
XsNumericExpr |
floor(XsNumericExpr arg)
Returns the largest (closest to positive infinity) number with no fractional part that is not greater than the value of arg.
|
XsStringExpr |
formatDate(XsDateExpr value,
String picture)
Returns a formatted date value based on the picture argument.
|
XsStringExpr |
formatDate(XsDateExpr value,
String picture,
String language)
Returns a formatted date value based on the picture argument.
|
XsStringExpr |
formatDate(XsDateExpr value,
String picture,
String language,
String calendar)
Returns a formatted date value based on the picture argument.
|
XsStringExpr |
formatDate(XsDateExpr value,
String picture,
String language,
String calendar,
String country)
Returns a formatted date value based on the picture argument.
|
XsStringExpr |
formatDate(XsDateExpr value,
XsStringExpr picture)
Returns a formatted date value based on the picture argument.
|
XsStringExpr |
formatDate(XsDateExpr value,
XsStringExpr picture,
XsStringExpr language)
Returns a formatted date value based on the picture argument.
|
XsStringExpr |
formatDate(XsDateExpr value,
XsStringExpr picture,
XsStringExpr language,
XsStringExpr calendar)
Returns a formatted date value based on the picture argument.
|
XsStringExpr |
formatDate(XsDateExpr value,
XsStringExpr picture,
XsStringExpr language,
XsStringExpr calendar,
XsStringExpr country)
Returns a formatted date value based on the picture argument.
|
XsStringExpr |
formatDateTime(XsDateTimeExpr value,
String picture)
Returns a formatted dateTime value based on the picture argument.
|
XsStringExpr |
formatDateTime(XsDateTimeExpr value,
String picture,
String language)
Returns a formatted dateTime value based on the picture argument.
|
XsStringExpr |
formatDateTime(XsDateTimeExpr value,
String picture,
String language,
String calendar)
Returns a formatted dateTime value based on the picture argument.
|
XsStringExpr |
formatDateTime(XsDateTimeExpr value,
String picture,
String language,
String calendar,
String country)
Returns a formatted dateTime value based on the picture argument.
|
XsStringExpr |
formatDateTime(XsDateTimeExpr value,
XsStringExpr picture)
Returns a formatted dateTime value based on the picture argument.
|
XsStringExpr |
formatDateTime(XsDateTimeExpr value,
XsStringExpr picture,
XsStringExpr language)
Returns a formatted dateTime value based on the picture argument.
|
XsStringExpr |
formatDateTime(XsDateTimeExpr value,
XsStringExpr picture,
XsStringExpr language,
XsStringExpr calendar)
Returns a formatted dateTime value based on the picture argument.
|
XsStringExpr |
formatDateTime(XsDateTimeExpr value,
XsStringExpr picture,
XsStringExpr language,
XsStringExpr calendar,
XsStringExpr country)
Returns a formatted dateTime value based on the picture argument.
|
XsStringExpr |
formatNumber(XsNumericSeqExpr value,
String picture)
Returns a formatted string representation of value argument based on the supplied picture.
|
XsStringExpr |
formatNumber(XsNumericSeqExpr value,
String picture,
String decimalFormatName)
Returns a formatted string representation of value argument based on the supplied picture.
|
XsStringExpr |
formatNumber(XsNumericSeqExpr value,
XsStringExpr picture)
Returns a formatted string representation of value argument based on the supplied picture.
|
XsStringExpr |
formatNumber(XsNumericSeqExpr value,
XsStringExpr picture,
XsStringExpr decimalFormatName)
Returns a formatted string representation of value argument based on the supplied picture.
|
XsStringExpr |
formatTime(XsTimeExpr value,
String picture)
Returns a formatted time value based on the picture argument.
|
XsStringExpr |
formatTime(XsTimeExpr value,
String picture,
String language)
Returns a formatted time value based on the picture argument.
|
XsStringExpr |
formatTime(XsTimeExpr value,
String picture,
String language,
String calendar)
Returns a formatted time value based on the picture argument.
|
XsStringExpr |
formatTime(XsTimeExpr value,
String picture,
String language,
String calendar,
String country)
Returns a formatted time value based on the picture argument.
|
XsStringExpr |
formatTime(XsTimeExpr value,
XsStringExpr picture)
Returns a formatted time value based on the picture argument.
|
XsStringExpr |
formatTime(XsTimeExpr value,
XsStringExpr picture,
XsStringExpr language)
Returns a formatted time value based on the picture argument.
|
XsStringExpr |
formatTime(XsTimeExpr value,
XsStringExpr picture,
XsStringExpr language,
XsStringExpr calendar)
Returns a formatted time value based on the picture argument.
|
XsStringExpr |
formatTime(XsTimeExpr value,
XsStringExpr picture,
XsStringExpr language,
XsStringExpr calendar,
XsStringExpr country)
Returns a formatted time value based on the picture argument.
|
XsStringExpr |
generateId(NodeExpr node)
Returns a string that uniquely identifies a given node.
|
ItemExpr |
head(ItemSeqExpr seq)
Returns the first item in a sequence.
|
XsIntegerExpr |
hoursFromDateTime(XsDateTimeExpr arg)
Returns an xs:integer between 0 and 23, both inclusive, representing the hours component in the localized value of arg.
|
XsIntegerExpr |
hoursFromDuration(XsDurationExpr arg)
Returns an xs:integer representing the hours component in the canonical lexical representation of the value of arg.
|
XsIntegerExpr |
hoursFromTime(XsTimeExpr arg)
Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of arg.
|
XsDayTimeDurationExpr |
implicitTimezone()
Returns the value of the implicit timezone property from the dynamic context.
|
XsIntegerSeqExpr |
indexOf(XsAnyAtomicTypeSeqExpr seqParam,
String srchParam)
Returns a sequence of positive integers giving the positions within the sequence seqParam of items that are equal to srchParam.
|
XsIntegerSeqExpr |
indexOf(XsAnyAtomicTypeSeqExpr seqParam,
String srchParam,
String collationLiteral)
Returns a sequence of positive integers giving the positions within the sequence seqParam of items that are equal to srchParam.
|
XsIntegerSeqExpr |
indexOf(XsAnyAtomicTypeSeqExpr seqParam,
XsAnyAtomicTypeExpr srchParam)
Returns a sequence of positive integers giving the positions within the sequence seqParam of items that are equal to srchParam.
|
XsIntegerSeqExpr |
indexOf(XsAnyAtomicTypeSeqExpr seqParam,
XsAnyAtomicTypeExpr srchParam,
XsStringExpr collationLiteral)
Returns a sequence of positive integers giving the positions within the sequence seqParam of items that are equal to srchParam.
|
XsStringSeqExpr |
inScopePrefixes(ElementNodeExpr element)
Returns the prefixes of the in-scope namespaces for element.
|
ItemSeqExpr |
insertBefore(ItemSeqExpr target,
long position,
ItemSeqExpr inserts)
Returns a new sequence constructed from the value of target with the value of inserts inserted at the position specified by the value of position.
|
ItemSeqExpr |
insertBefore(ItemSeqExpr target,
XsIntegerExpr position,
ItemSeqExpr inserts)
Returns a new sequence constructed from the value of target with the value of inserts inserted at the position specified by the value of position.
|
XsStringExpr |
iriToUri(XsStringExpr uriPart)
Idempotent function that escapes non-URI characters.
|
XsBooleanExpr |
lang(XsStringExpr testlang,
NodeExpr node)
This function tests whether the language of node, or the context node if the second argument is omitted, as specified by xml:lang attributes is the same as, or is a sublanguage of, the language specified by testlang.
|
XsStringExpr |
localName(NodeExpr arg)
Returns the local part of the name of arg as an xs:string that will either be the zero-length string or will have the lexical form of an xs:NCName.
|
XsNCNameExpr |
localNameFromQName(XsQNameExpr arg)
Returns an
xs:NCName representing the local part of arg. |
XsStringExpr |
lowerCase(XsStringExpr string)
Returns the specified string converting all of the characters to lower-case characters.
|
XsBooleanExpr |
matches(XsStringExpr input,
String pattern)
Returns
true if the specified input matches the specified pattern, otherwise returns false. |
XsBooleanExpr |
matches(XsStringExpr input,
String pattern,
String flags)
Returns
true if the specified input matches the specified pattern, otherwise returns false. |
XsBooleanExpr |
matches(XsStringExpr input,
XsStringExpr pattern)
Returns
true if the specified input matches the specified pattern, otherwise returns false. |
XsBooleanExpr |
matches(XsStringExpr input,
XsStringExpr pattern,
XsStringExpr flags)
Returns
true if the specified input matches the specified pattern, otherwise returns false. |
XsAnyAtomicTypeExpr |
max(XsAnyAtomicTypeSeqExpr arg)
Selects an item from the input sequence arg whose value is greater than or equal to the value of every other item in the input sequence.
|
XsAnyAtomicTypeExpr |
max(XsAnyAtomicTypeSeqExpr arg,
String collation)
Selects an item from the input sequence arg whose value is greater than or equal to the value of every other item in the input sequence.
|
XsAnyAtomicTypeExpr |
max(XsAnyAtomicTypeSeqExpr arg,
XsStringExpr collation)
Selects an item from the input sequence arg whose value is greater than or equal to the value of every other item in the input sequence.
|
XsAnyAtomicTypeExpr |
min(XsAnyAtomicTypeSeqExpr arg)
Selects an item from the input sequence arg whose value is less than or equal to the value of every other item in the input sequence.
|
XsAnyAtomicTypeExpr |
min(XsAnyAtomicTypeSeqExpr arg,
String collation)
Selects an item from the input sequence arg whose value is less than or equal to the value of every other item in the input sequence.
|
XsAnyAtomicTypeExpr |
min(XsAnyAtomicTypeSeqExpr arg,
XsStringExpr collation)
Selects an item from the input sequence arg whose value is less than or equal to the value of every other item in the input sequence.
|
XsIntegerExpr |
minutesFromDateTime(XsDateTimeExpr arg)
Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of arg.
|
XsIntegerExpr |
minutesFromDuration(XsDurationExpr arg)
Returns an xs:integer representing the minutes component in the canonical lexical representation of the value of arg.
|
XsIntegerExpr |
minutesFromTime(XsTimeExpr arg)
Returns an xs:integer value between 0 to 59, both inclusive, representing the value of the minutes component in the localized value of arg.
|
XsIntegerExpr |
monthFromDate(XsDateExpr arg)
Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of arg.
|
XsIntegerExpr |
monthFromDateTime(XsDateTimeExpr arg)
Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of arg.
|
XsIntegerExpr |
monthsFromDuration(XsDurationExpr arg)
Returns an xs:integer representing the months component in the canonical lexical representation of the value of arg.
|
XsStringExpr |
name(NodeExpr arg)
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. |
XsAnyURIExpr |
namespaceUri(NodeExpr arg)
Returns the namespace URI of the xs:QName of the node specified by arg.
|
XsAnyURIExpr |
namespaceUriForPrefix(XsStringExpr prefix,
ElementNodeExpr element)
Returns the namespace URI of one of the in-scope namespaces for element, identified by its namespace prefix.
|
XsAnyURIExpr |
namespaceUriFromQName(XsQNameExpr arg)
Returns the namespace URI for arg as an
xs:string. |
XsBooleanExpr |
nilled(NodeExpr arg)
Summary: Returns an xs:boolean indicating whether the argument node is “nilled”.
|
XsQNameExpr |
nodeName(NodeExpr arg)
Returns an expanded-QName for node kinds that can have names.
|
XsStringExpr |
normalizeSpace(XsStringExpr input)
Returns the specified string with normalized whitespace, which strips off any leading or trailing whitespace and replaces any other sequences of more than one whitespace characters with a single space character (#x20).
|
XsStringExpr |
normalizeUnicode(XsStringExpr arg)
Return the argument normalized according to the normalization criteria for a normalization form identified by the value of normalizationForm.
|
XsStringExpr |
normalizeUnicode(XsStringExpr arg,
String normalizationForm)
Return the argument normalized according to the normalization criteria for a normalization form identified by the value of normalizationForm.
|
XsStringExpr |
normalizeUnicode(XsStringExpr arg,
XsStringExpr normalizationForm)
Return the argument normalized according to the normalization criteria for a normalization form identified by the value of normalizationForm.
|
XsBooleanExpr |
not(ItemSeqExpr arg)
Returns
true if the effective boolean value is false, and false if the effective boolean value is true. |
XsDoubleExpr |
number(XsAnyAtomicTypeExpr arg)
Returns the value indicated by arg or, if arg is not specified, the context item after atomization, converted to an xs:double.
|
XsNCNameExpr |
prefixFromQName(XsQNameExpr arg)
Returns an
xs:NCName representing the prefix of arg. |
XsQNameExpr |
QName(XsStringExpr paramURI,
String paramQName)
Returns an
xs:QName with the namespace URI given in paramURI. |
XsQNameExpr |
QName(XsStringExpr paramURI,
XsStringExpr paramQName)
Returns an
xs:QName with the namespace URI given in paramURI. |
ItemSeqExpr |
remove(ItemSeqExpr target,
long position)
Returns a new sequence constructed from the value of target with the item at the position specified by the value of position removed.
|
ItemSeqExpr |
remove(ItemSeqExpr target,
XsIntegerExpr position)
Returns a new sequence constructed from the value of target with the item at the position specified by the value of position removed.
|
XsStringExpr |
replace(XsStringExpr input,
String pattern,
String replacement)
Returns a string constructed by replacing the specified pattern on the input string with the specified replacement string.
|
XsStringExpr |
replace(XsStringExpr input,
String pattern,
String replacement,
String flags)
Returns a string constructed by replacing the specified pattern on the input string with the specified replacement string.
|
XsStringExpr |
replace(XsStringExpr input,
XsStringExpr pattern,
XsStringExpr replacement)
Returns a string constructed by replacing the specified pattern on the input string with the specified replacement string.
|
XsStringExpr |
replace(XsStringExpr input,
XsStringExpr pattern,
XsStringExpr replacement,
XsStringExpr flags)
Returns a string constructed by replacing the specified pattern on the input string with the specified replacement string.
|
XsQNameExpr |
resolveQName(XsStringExpr qname,
ElementNodeExpr element)
Returns an
xs:QName value (that is, an expanded QName) by taking an xs:string that has the lexical form of an xs:QName (a string in the form “prefix:local-name” or “local-name”) and resolving it using the in-scope namespaces for a given element. |
XsAnyURIExpr |
resolveUri(XsStringExpr relative,
String base)
Resolves a relative URI against an absolute URI.
|
XsAnyURIExpr |
resolveUri(XsStringExpr relative,
XsStringExpr base)
Resolves a relative URI against an absolute URI.
|
ItemSeqExpr |
reverse(ItemSeqExpr target)
Reverses the order of items in a sequence.
|
NodeExpr |
root(NodeExpr arg)
Returns the root of the tree to which arg belongs.
|
XsNumericExpr |
round(XsNumericExpr arg)
Returns the number with no fractional part that is closest to the argument.
|
XsNumericExpr |
roundHalfToEven(XsNumericExpr arg)
The value returned is the nearest (that is, numerically closest) numeric to arg that is a multiple of ten to the power of minus precision.
|
XsNumericExpr |
roundHalfToEven(XsNumericExpr arg,
long precision)
The value returned is the nearest (that is, numerically closest) numeric to arg that is a multiple of ten to the power of minus precision.
|
XsNumericExpr |
roundHalfToEven(XsNumericExpr arg,
XsIntegerExpr precision)
The value returned is the nearest (that is, numerically closest) numeric to arg that is a multiple of ten to the power of minus precision.
|
XsDecimalExpr |
secondsFromDateTime(XsDateTimeExpr arg)
Returns an xs:decimal value between 0 and 60.999…, both inclusive representing the seconds and fractional seconds in the localized value of arg.
|
XsDecimalExpr |
secondsFromDuration(XsDurationExpr arg)
Returns an xs:decimal representing the seconds component in the canonical lexical representation of the value of arg.
|
XsDecimalExpr |
secondsFromTime(XsTimeExpr arg)
Returns an xs:decimal value between 0 and 60.999…, both inclusive, representing the seconds and fractional seconds in the localized value of arg.
|
XsBooleanExpr |
startsWith(XsStringExpr parameter1,
String parameter2)
Returns
true if the first parameter starts with the string from the second parameter, otherwise returns false. |
XsBooleanExpr |
startsWith(XsStringExpr parameter1,
String parameter2,
String collation)
Returns
true if the first parameter starts with the string from the second parameter, otherwise returns false. |
XsBooleanExpr |
startsWith(XsStringExpr parameter1,
XsStringExpr parameter2)
Returns
true if the first parameter starts with the string from the second parameter, otherwise returns false. |
XsBooleanExpr |
startsWith(XsStringExpr parameter1,
XsStringExpr parameter2,
XsStringExpr collation)
Returns
true if the first parameter starts with the string from the second parameter, otherwise returns false. |
XsStringExpr |
string(ItemExpr arg)
Returns the value of arg represented as an
xs:string. |
XsStringExpr |
stringJoin(XsStringSeqExpr parameter1,
String parameter2)
Returns an
xs:string created by concatenating the members of the parameter1 sequence using parameter2 as a separator. |
XsStringExpr |
stringJoin(XsStringSeqExpr parameter1,
XsStringExpr parameter2)
Returns an
xs:string created by concatenating the members of the parameter1 sequence using parameter2 as a separator. |
XsIntegerExpr |
stringLength(XsStringExpr sourceString)
Returns an integer representing the length of the specified string.
|
XsIntegerSeqExpr |
stringToCodepoints(XsStringExpr arg)
Returns the sequence of Unicode code points that constitute an xs:string.
|
ItemSeqExpr |
subsequence(ItemSeqExpr sourceSeq,
double startingLoc)
Returns the contiguous sequence of items in the value of sourceSeq beginning at the position indicated by the value of startingLoc and continuing for the number of items indicated by the value of length.
|
ItemSeqExpr |
subsequence(ItemSeqExpr sourceSeq,
double startingLoc,
double length)
Returns the contiguous sequence of items in the value of sourceSeq beginning at the position indicated by the value of startingLoc and continuing for the number of items indicated by the value of length.
|
ItemSeqExpr |
subsequence(ItemSeqExpr sourceSeq,
XsNumericExpr startingLoc)
Returns the contiguous sequence of items in the value of sourceSeq beginning at the position indicated by the value of startingLoc and continuing for the number of items indicated by the value of length.
|
ItemSeqExpr |
subsequence(ItemSeqExpr sourceSeq,
XsNumericExpr startingLoc,
XsNumericExpr length)
Returns the contiguous sequence of items in the value of sourceSeq beginning at the position indicated by the value of startingLoc and continuing for the number of items indicated by the value of length.
|
XsStringExpr |
substring(XsStringExpr sourceString,
double startingLoc)
Returns a substring starting from the startingLoc and continuing for length characters.
|
XsStringExpr |
substring(XsStringExpr sourceString,
double startingLoc,
double length)
Returns a substring starting from the startingLoc and continuing for length characters.
|
XsStringExpr |
substring(XsStringExpr sourceString,
XsNumericExpr startingLoc)
Returns a substring starting from the startingLoc and continuing for length characters.
|
XsStringExpr |
substring(XsStringExpr sourceString,
XsNumericExpr startingLoc,
XsNumericExpr length)
Returns a substring starting from the startingLoc and continuing for length characters.
|
XsStringExpr |
substringAfter(XsStringExpr input,
String after)
Returns the substring created by taking all of the input characters that occur after the specified after characters.
|
XsStringExpr |
substringAfter(XsStringExpr input,
String after,
String collation)
Returns the substring created by taking all of the input characters that occur after the specified after characters.
|
XsStringExpr |
substringAfter(XsStringExpr input,
XsStringExpr after)
Returns the substring created by taking all of the input characters that occur after the specified after characters.
|
XsStringExpr |
substringAfter(XsStringExpr input,
XsStringExpr after,
XsStringExpr collation)
Returns the substring created by taking all of the input characters that occur after the specified after characters.
|
XsStringExpr |
substringBefore(XsStringExpr input,
String before)
Returns the substring created by taking all of the input characters that occur before the specified before characters.
|
XsStringExpr |
substringBefore(XsStringExpr input,
String before,
String collation)
Returns the substring created by taking all of the input characters that occur before the specified before characters.
|
XsStringExpr |
substringBefore(XsStringExpr input,
XsStringExpr before)
Returns the substring created by taking all of the input characters that occur before the specified before characters.
|
XsStringExpr |
substringBefore(XsStringExpr input,
XsStringExpr before,
XsStringExpr collation)
Returns the substring created by taking all of the input characters that occur before the specified before characters.
|
XsAnyAtomicTypeExpr |
sum(XsAnyAtomicTypeSeqExpr arg)
Returns a value obtained by adding together the values in arg.
|
XsAnyAtomicTypeExpr |
sum(XsAnyAtomicTypeSeqExpr arg,
String zero)
Returns a value obtained by adding together the values in arg.
|
XsAnyAtomicTypeExpr |
sum(XsAnyAtomicTypeSeqExpr arg,
XsAnyAtomicTypeExpr zero)
Returns a value obtained by adding together the values in arg.
|
ItemSeqExpr |
tail(ItemSeqExpr seq)
Returns all but the first item in a sequence.
|
XsDayTimeDurationExpr |
timezoneFromDate(XsDateExpr arg)
Returns the timezone component of arg if any.
|
XsDayTimeDurationExpr |
timezoneFromDateTime(XsDateTimeExpr arg)
Returns the timezone component of arg if any.
|
XsDayTimeDurationExpr |
timezoneFromTime(XsTimeExpr arg)
Returns the timezone component of arg if any.
|
XsStringSeqExpr |
tokenize(XsStringExpr input,
String pattern)
Returns a sequence of strings contructed by breaking the specified input into substrings separated by the specified pattern.
|
XsStringSeqExpr |
tokenize(XsStringExpr input,
String pattern,
String flags)
Returns a sequence of strings contructed by breaking the specified input into substrings separated by the specified pattern.
|
XsStringSeqExpr |
tokenize(XsStringExpr input,
XsStringExpr pattern)
Returns a sequence of strings contructed by breaking the specified input into substrings separated by the specified pattern.
|
XsStringSeqExpr |
tokenize(XsStringExpr input,
XsStringExpr pattern,
XsStringExpr flags)
Returns a sequence of strings contructed by breaking the specified input into substrings separated by the specified pattern.
|
XsStringExpr |
translate(XsStringExpr src,
String mapString,
String transString)
Returns a string where every character in src that occurs in some position in the mapString is translated into the transString character in the corresponding location of the mapString character.
|
XsStringExpr |
translate(XsStringExpr src,
XsStringExpr mapString,
XsStringExpr transString)
Returns a string where every character in src that occurs in some position in the mapString is translated into the transString character in the corresponding location of the mapString character.
|
XsBooleanExpr |
trueExpr()
Returns the
xs:boolean value true. |
ItemSeqExpr |
unordered(ItemSeqExpr sourceSeq)
Returns the items of sourceSeq in an implementation dependent order.
|
XsStringExpr |
upperCase(XsStringExpr string)
Returns the specified string converting all of the characters to upper-case characters.
|
XsIntegerExpr |
yearFromDate(XsDateExpr arg)
Returns an xs:integer representing the year component in the localized value of arg.
|
XsIntegerExpr |
yearFromDateTime(XsDateTimeExpr arg)
Returns an xs:integer representing the year component in the localized value of arg.
|
XsIntegerExpr |
yearsFromDuration(XsDurationExpr arg)
Returns an xs:integer representing the years component in the canonical lexical representation of the value of arg.
|
XsNumericExpr abs(XsNumericExpr arg)
Returns the absolute value of arg. If arg is negative returns -arg otherwise returns arg. If type of arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of arg. If the type of arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.
For xs:float and xs:double arguments, if the argument is positive zero (+0) or negative zero (-0), then positive zero (+0) is returned. If the argument is positive or negative infinity, positive infinity is returned.
For detailed type semantics, see Section 7.2.1 The fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions of [XQuery 1.0 and XPath 2.0 Formal Semantics].
Provides a client interface to a server function. See fn:abs
arg - A numeric value.XsDateExpr adjustDateToTimezone(XsDateExpr arg)
Adjusts an xs:date value to a specific timezone, or to no timezone at all. If timezone is the empty sequence, returns an xs:date without a timezone. Otherwise, returns an xs:date with a timezone. For purposes of timezone adjustment, an xs:date is treated as an xs:dateTime with time 00:00:00.
If timezone is not specified, then timezone is the value of the implicit timezone in the dynamic context.
If arg is the empty sequence, then the result is the empty sequence.
A dynamic error is raised [err:FODT0003] if timezone is less than -PT14H or greater than PT14H or if does not contain an integral number of minutes.
If arg does not have a timezone component and timezone is the empty sequence, then the result is arg.
If arg does not have a timezone component and timezone is not the empty sequence, then the result is arg with timezone as the timezone component.
If arg has a timezone component and timezone is the empty sequence, then the result is the localized value of arg without its timezone component.
If arg has a timezone component and timezone is not the empty sequence, then:
Let $srcdt be an xs:dateTime value, with 00:00:00 for the time component and date and timezone components that are the same as the date and timezone components of arg.
Let $r be the result of evaluating fn:adjust-dateTime-to-timezone($srcdt, timezone)
The result of this function will be a date value that has date and timezone components that are the same as the date and timezone components of $r.
Provides a client interface to a server function. See fn:adjust-date-to-timezone
arg - The date to adjust to the new timezone.XsDateExpr adjustDateToTimezone(XsDateExpr arg, String timezone)
Adjusts an xs:date value to a specific timezone, or to no timezone at all. If timezone is the empty sequence, returns an xs:date without a timezone. Otherwise, returns an xs:date with a timezone. For purposes of timezone adjustment, an xs:date is treated as an xs:dateTime with time 00:00:00.
If timezone is not specified, then timezone is the value of the implicit timezone in the dynamic context.
If arg is the empty sequence, then the result is the empty sequence.
A dynamic error is raised [err:FODT0003] if timezone is less than -PT14H or greater than PT14H or if does not contain an integral number of minutes.
If arg does not have a timezone component and timezone is the empty sequence, then the result is arg.
If arg does not have a timezone component and timezone is not the empty sequence, then the result is arg with timezone as the timezone component.
If arg has a timezone component and timezone is the empty sequence, then the result is the localized value of arg without its timezone component.
If arg has a timezone component and timezone is not the empty sequence, then:
Let $srcdt be an xs:dateTime value, with 00:00:00 for the time component and date and timezone components that are the same as the date and timezone components of arg.
Let $r be the result of evaluating fn:adjust-dateTime-to-timezone($srcdt, timezone)
The result of this function will be a date value that has date and timezone components that are the same as the date and timezone components of $r.
Provides a client interface to a server function. See fn:adjust-date-to-timezone
arg - The date to adjust to the new timezone.timezone - The new timezone for the date.XsDateExpr adjustDateToTimezone(XsDateExpr arg, XsDayTimeDurationExpr timezone)
Adjusts an xs:date value to a specific timezone, or to no timezone at all. If timezone is the empty sequence, returns an xs:date without a timezone. Otherwise, returns an xs:date with a timezone. For purposes of timezone adjustment, an xs:date is treated as an xs:dateTime with time 00:00:00.
If timezone is not specified, then timezone is the value of the implicit timezone in the dynamic context.
If arg is the empty sequence, then the result is the empty sequence.
A dynamic error is raised [err:FODT0003] if timezone is less than -PT14H or greater than PT14H or if does not contain an integral number of minutes.
If arg does not have a timezone component and timezone is the empty sequence, then the result is arg.
If arg does not have a timezone component and timezone is not the empty sequence, then the result is arg with timezone as the timezone component.
If arg has a timezone component and timezone is the empty sequence, then the result is the localized value of arg without its timezone component.
If arg has a timezone component and timezone is not the empty sequence, then:
Let $srcdt be an xs:dateTime value, with 00:00:00 for the time component and date and timezone components that are the same as the date and timezone components of arg.
Let $r be the result of evaluating fn:adjust-dateTime-to-timezone($srcdt, timezone)
The result of this function will be a date value that has date and timezone components that are the same as the date and timezone components of $r.
Provides a client interface to a server function. See fn:adjust-date-to-timezone
arg - The date to adjust to the new timezone.timezone - The new timezone for the date.XsDateTimeExpr adjustDateTimeToTimezone(XsDateTimeExpr arg)
Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all. If timezone is the empty sequence, returns an xs:dateTime without a timezone. Otherwise, returns an xs:dateTime with a timezone.
If timezone is not specified, then timezone is the value of the implicit timezone in the dynamic context.
If arg is the empty sequence, then the result is the empty sequence.
A dynamic error is raised [err:FODT0003] if timezone is less than -PT14H or greater than PT14H or if does not contain an integral number of minutes.
If arg does not have a timezone component and timezone is the empty sequence, then the result is arg.
If arg does not have a timezone component and timezone is not the empty sequence, then the result is arg with timezone as the timezone component.
If arg has a timezone component and timezone is the empty sequence, then the result is the localized value of arg without its timezone component.
If arg has a timezone component and timezone is not the empty sequence, then the result is an xs:dateTime value with a timezone component of timezone that is equal to arg.
Provides a client interface to a server function. See fn:adjust-dateTime-to-timezone
arg - The dateTime to adjust to the new timezone.XsDateTimeExpr adjustDateTimeToTimezone(XsDateTimeExpr arg, String timezone)
Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all. If timezone is the empty sequence, returns an xs:dateTime without a timezone. Otherwise, returns an xs:dateTime with a timezone.
If timezone is not specified, then timezone is the value of the implicit timezone in the dynamic context.
If arg is the empty sequence, then the result is the empty sequence.
A dynamic error is raised [err:FODT0003] if timezone is less than -PT14H or greater than PT14H or if does not contain an integral number of minutes.
If arg does not have a timezone component and timezone is the empty sequence, then the result is arg.
If arg does not have a timezone component and timezone is not the empty sequence, then the result is arg with timezone as the timezone component.
If arg has a timezone component and timezone is the empty sequence, then the result is the localized value of arg without its timezone component.
If arg has a timezone component and timezone is not the empty sequence, then the result is an xs:dateTime value with a timezone component of timezone that is equal to arg.
Provides a client interface to a server function. See fn:adjust-dateTime-to-timezone
arg - The dateTime to adjust to the new timezone.timezone - The new timezone for the dateTime.XsDateTimeExpr adjustDateTimeToTimezone(XsDateTimeExpr arg, XsDayTimeDurationExpr timezone)
Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all. If timezone is the empty sequence, returns an xs:dateTime without a timezone. Otherwise, returns an xs:dateTime with a timezone.
If timezone is not specified, then timezone is the value of the implicit timezone in the dynamic context.
If arg is the empty sequence, then the result is the empty sequence.
A dynamic error is raised [err:FODT0003] if timezone is less than -PT14H or greater than PT14H or if does not contain an integral number of minutes.
If arg does not have a timezone component and timezone is the empty sequence, then the result is arg.
If arg does not have a timezone component and timezone is not the empty sequence, then the result is arg with timezone as the timezone component.
If arg has a timezone component and timezone is the empty sequence, then the result is the localized value of arg without its timezone component.
If arg has a timezone component and timezone is not the empty sequence, then the result is an xs:dateTime value with a timezone component of timezone that is equal to arg.
Provides a client interface to a server function. See fn:adjust-dateTime-to-timezone
arg - The dateTime to adjust to the new timezone.timezone - The new timezone for the dateTime.XsTimeExpr adjustTimeToTimezone(XsTimeExpr arg)
Adjusts an xs:time value to a specific timezone, or to no timezone at all. If timezone is the empty sequence, returns an xs:time without a timezone. Otherwise, returns an xs:time with a timezone.
If timezone is not specified, then timezone is the value of the implicit timezone in the dynamic context.
If arg is the empty sequence, then the result is the empty sequence.
A dynamic error is raised [err:FODT0003] if timezone is less than -PT14H or greater than PT14H or if does not contain an integral number of minutes.
If arg does not have a timezone component and timezone is the empty sequence, then the result is arg.
If arg does not have a timezone component and timezone is not the empty sequence, then the result is arg with timezone as the timezone component.
If arg has a timezone component and timezone is the empty sequence, then the result is the localized value of arg without its timezone component.
If arg has a timezone component and timezone is not the empty sequence, then:
Let $srcdt be an xs:dateTime value, with an arbitrary date for the date component and time and timezone components that are the same as the time and timezone components of arg.
Let $r be the result of evaluating fn:adjust-dateTime-to-timezone($srcdt, timezone)
The result of this function will be a time value that has time and timezone components that are the same as the time and timezone components of $r.
Provides a client interface to a server function. See fn:adjust-time-to-timezone
arg - The time to adjust to the new timezone.XsTimeExpr adjustTimeToTimezone(XsTimeExpr arg, String timezone)
Adjusts an xs:time value to a specific timezone, or to no timezone at all. If timezone is the empty sequence, returns an xs:time without a timezone. Otherwise, returns an xs:time with a timezone.
If timezone is not specified, then timezone is the value of the implicit timezone in the dynamic context.
If arg is the empty sequence, then the result is the empty sequence.
A dynamic error is raised [err:FODT0003] if timezone is less than -PT14H or greater than PT14H or if does not contain an integral number of minutes.
If arg does not have a timezone component and timezone is the empty sequence, then the result is arg.
If arg does not have a timezone component and timezone is not the empty sequence, then the result is arg with timezone as the timezone component.
If arg has a timezone component and timezone is the empty sequence, then the result is the localized value of arg without its timezone component.
If arg has a timezone component and timezone is not the empty sequence, then:
Let $srcdt be an xs:dateTime value, with an arbitrary date for the date component and time and timezone components that are the same as the time and timezone components of arg.
Let $r be the result of evaluating fn:adjust-dateTime-to-timezone($srcdt, timezone)
The result of this function will be a time value that has time and timezone components that are the same as the time and timezone components of $r.
Provides a client interface to a server function. See fn:adjust-time-to-timezone
arg - The time to adjust to the new timezone.timezone - The new timezone for the date.XsTimeExpr adjustTimeToTimezone(XsTimeExpr arg, XsDayTimeDurationExpr timezone)
Adjusts an xs:time value to a specific timezone, or to no timezone at all. If timezone is the empty sequence, returns an xs:time without a timezone. Otherwise, returns an xs:time with a timezone.
If timezone is not specified, then timezone is the value of the implicit timezone in the dynamic context.
If arg is the empty sequence, then the result is the empty sequence.
A dynamic error is raised [err:FODT0003] if timezone is less than -PT14H or greater than PT14H or if does not contain an integral number of minutes.
If arg does not have a timezone component and timezone is the empty sequence, then the result is arg.
If arg does not have a timezone component and timezone is not the empty sequence, then the result is arg with timezone as the timezone component.
If arg has a timezone component and timezone is the empty sequence, then the result is the localized value of arg without its timezone component.
If arg has a timezone component and timezone is not the empty sequence, then:
Let $srcdt be an xs:dateTime value, with an arbitrary date for the date component and time and timezone components that are the same as the time and timezone components of arg.
Let $r be the result of evaluating fn:adjust-dateTime-to-timezone($srcdt, timezone)
The result of this function will be a time value that has time and timezone components that are the same as the time and timezone components of $r.
Provides a client interface to a server function. See fn:adjust-time-to-timezone
arg - The time to adjust to the new timezone.timezone - The new timezone for the date.ElementNodeExpr analyzeString(String in, String regex)
The result of the function is a new element node whose string value is the original string, but which contains markup to show which parts of the input match the regular expression.
Provides a client interface to a server function. See fn:analyze-string
in - The string to start with.regex - The regular expression pattern to match.ElementNodeExpr analyzeString(XsStringExpr in, XsStringExpr regex)
The result of the function is a new element node whose string value is the original string, but which contains markup to show which parts of the input match the regular expression.
Provides a client interface to a server function. See fn:analyze-string
in - The string to start with.regex - The regular expression pattern to match.ElementNodeExpr analyzeString(String in, String regex, String flags)
The result of the function is a new element node whose string value is the original string, but which contains markup to show which parts of the input match the regular expression.
Provides a client interface to a server function. See fn:analyze-string
in - The string to start with.regex - The regular expression pattern to match.flags - The flag representing how to interpret the regular expression. One of “s”, “m”, “i”, or “x”, as defined in http://www.w3.org/TR/xpath-functions/#flags.ElementNodeExpr analyzeString(XsStringExpr in, XsStringExpr regex, XsStringExpr flags)
The result of the function is a new element node whose string value is the original string, but which contains markup to show which parts of the input match the regular expression.
Provides a client interface to a server function. See fn:analyze-string
in - The string to start with.regex - The regular expression pattern to match.flags - The flag representing how to interpret the regular expression. One of “s”, “m”, “i”, or “x”, as defined in http://www.w3.org/TR/xpath-functions/#flags.XsAnyAtomicTypeExpr avg(XsAnyAtomicTypeSeqExpr arg)
Returns the average of the values in the input sequence arg, that is, the sum of the values divided by the number of values.
If arg is the empty sequence, the empty sequence is returned.
If arg contains values of type xs:untypedAtomic they are cast to xs:double.
Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values. For numeric values, the numeric promotion rules defined in 6.2 Operators on Numeric Values are used to promote all values to a single common type. After these operations, arg must contain items of a single type, which must be one of the four numeric types,xs:yearMonthDuration or xs:dayTimeDuration or one if its subtypes.
If the above conditions are not met, then a type error is raised [err:FORG0006].
Otherwise, returns the average of the values computed as sum(arg) div count(arg).
For detailed type semantics, see Section 7.2.10 The fn:min, fn:max, fn:avg, and fn:sum functions[FS].
Provides a client interface to a server function. See fn:avg
arg - The sequence of values to average.XsAnyURIExpr baseUri(NodeExpr arg)
Returns the value of the base-uri property for the specified node. If the node is part of a document and does not have a base-uri attribute explicitly set, fn:base-uri typically returns the URI of the document in which the node resides.
Provides a client interface to a server function. See fn:base-uri
arg - The node whose base-uri is to be returned.XsBooleanExpr booleanExpr(ItemSeqExpr arg)
Computes the effective boolean value of the sequence arg. See Section 2.4.3 Effective Boolean Value[XP].
NOTE: NEW 1.0 SEMANTICS NOT IMPLEMENTED: STILL USES MAY 2003 SEMANTICS.
If arg is the empty sequence, fn:boolean returns false.
If arg is a sequence whose first item is a node, fn:boolean returns true.
If arg is a singleton value of type xs:boolean or a derived from xs:boolean, fn:boolean returns arg.
If arg is a singleton value of type xs:string or a type derived from xs:string or xs:untypedAtomic, fn:boolean returns false if the operand value has zero length; otherwise it returns true.
If arg is a singleton value of any numeric type or a type derived from a numeric type, fn:boolean returns false if the operand value is NaN or is numerically equal to zero; otherwise it returns true.
In all other cases, fn:boolean raises a type error [err:FORG0006] when run in XQuery strict mode (1.0).
The static semantics of this function are described in Section 7.2.4 The fn:boolean function[FS].
Note:
The result of this function is not necessarily the same as “ arg cast as xs:boolean ”. For example, fn:boolean(“false”) returns the value “true” whereas “false” cast as xs:boolean returns false.
Provides a client interface to a server function. See fn:boolean
arg - A sequence of items.XsNumericExpr ceiling(XsNumericExpr arg)
Returns the smallest (closest to negative infinity) number with no fractional part that is not less than the value of arg. If type of arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of arg. If the type of arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.
For xs:float and xs:double arguments, if the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned. If the argument is less than zero and greater than -1, negative zero is returned.
For detailed type semantics, see Section 7.2.3 The fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions[FS].
Provides a client interface to a server function. See fn:ceiling
arg - A numeric value.XsBooleanExpr codepointEqual(XsStringExpr comparand1, String comparand2)
Returns true if the specified parameters are the same Unicode code point, otherwise returns false. The codepoints are compared according to the Unicode code point collation (http://www.w3.org/2005/xpath-functions/collation/codepoint).
If either argument is the empty sequence, the result is the empty sequence.
Provides a client interface to a server function. See fn:codepoint-equal
comparand1 - A string to be compared.comparand2 - A string to be compared.XsBooleanExpr codepointEqual(XsStringExpr comparand1, XsStringExpr comparand2)
Returns true if the specified parameters are the same Unicode code point, otherwise returns false. The codepoints are compared according to the Unicode code point collation (http://www.w3.org/2005/xpath-functions/collation/codepoint).
If either argument is the empty sequence, the result is the empty sequence.
Provides a client interface to a server function. See fn:codepoint-equal
comparand1 - A string to be compared.comparand2 - A string to be compared.XsStringExpr codepointsToString(XsIntegerSeqExpr arg)
Creates an xs:string from a sequence of Unicode code points. Returns the zero-length string if arg is the empty sequence. If any of the code points in arg is not a legal XML character, an error is raised.
Provides a client interface to a server function. See fn:codepoints-to-string
arg - A sequence of Unicode code points.XsIntegerExpr compare(XsStringExpr comparand1, String comparand2)
Returns -1, 0, or 1, depending on whether the value of the comparand1 is respectively less than, equal to, or greater than the value of comparand2, according to the rules of the collation that is used.
Provides a client interface to a server function. See fn:compare
comparand1 - A string to be compared.comparand2 - A string to be compared.XsIntegerExpr compare(XsStringExpr comparand1, XsStringExpr comparand2)
Returns -1, 0, or 1, depending on whether the value of the comparand1 is respectively less than, equal to, or greater than the value of comparand2, according to the rules of the collation that is used.
Provides a client interface to a server function. See fn:compare
comparand1 - A string to be compared.comparand2 - A string to be compared.XsIntegerExpr compare(XsStringExpr comparand1, String comparand2, String collation)
Returns -1, 0, or 1, depending on whether the value of the comparand1 is respectively less than, equal to, or greater than the value of comparand2, according to the rules of the collation that is used.
Provides a client interface to a server function. See fn:compare
comparand1 - A string to be compared.comparand2 - A string to be compared.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsIntegerExpr compare(XsStringExpr comparand1, XsStringExpr comparand2, XsStringExpr collation)
Returns -1, 0, or 1, depending on whether the value of the comparand1 is respectively less than, equal to, or greater than the value of comparand2, according to the rules of the collation that is used.
Provides a client interface to a server function. See fn:compare
comparand1 - A string to be compared.comparand2 - A string to be compared.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsStringExpr concat(XsAnyAtomicTypeExpr... parameter1)
Returns the xs:string that is the concatenation of the values of the specified parameters. Accepts two or more xs:anyAtomicType arguments and casts them to xs:string. If any of the parameters is the empty sequence, the parameter is treated as the zero-length string.
Provides a client interface to a server function. See fn:concat
parameter1 - A value.XsBooleanExpr contains(XsStringExpr parameter1, String parameter2)
Returns true if the first parameter contains the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:contains
parameter1 - The string from which to test.parameter2 - The string to test for existence in the first parameter.XsBooleanExpr contains(XsStringExpr parameter1, XsStringExpr parameter2)
Returns true if the first parameter contains the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:contains
parameter1 - The string from which to test.parameter2 - The string to test for existence in the first parameter.XsBooleanExpr contains(XsStringExpr parameter1, String parameter2, String collation)
Returns true if the first parameter contains the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:contains
parameter1 - The string from which to test.parameter2 - The string to test for existence in the first parameter.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsBooleanExpr contains(XsStringExpr parameter1, XsStringExpr parameter2, XsStringExpr collation)
Returns true if the first parameter contains the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:contains
parameter1 - The string from which to test.parameter2 - The string to test for existence in the first parameter.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsIntegerExpr count(ItemSeqExpr arg)
Returns the number of items in the value of arg.
Returns 0 if arg is the empty sequence.
Provides a client interface to a server function. See fn:count
arg - The sequence of items to count.XsIntegerExpr count(ItemSeqExpr arg, double maximum)
Returns the number of items in the value of arg.
Returns 0 if arg is the empty sequence.
Provides a client interface to a server function. See fn:count
arg - The sequence of items to count.maximum - The maximum value of the count to return. MarkLogic Server will stop count when the $maximum value is reached and return the $maximum value. This is an extension to the W3C standard fn:count function.XsIntegerExpr count(ItemSeqExpr arg, XsDoubleExpr maximum)
Returns the number of items in the value of arg.
Returns 0 if arg is the empty sequence.
Provides a client interface to a server function. See fn:count
arg - The sequence of items to count.maximum - The maximum value of the count to return. MarkLogic Server will stop count when the $maximum value is reached and return the $maximum value. This is an extension to the W3C standard fn:count function.XsDateExpr currentDate()
Returns xs:date(fn:current-dateTime()). This is an xs:date (with timezone) that is current at some time during the evaluation of a query or transformation in which fn:current-date() is executed. This function is stable. The precise instant during the query or transformation represented by the value of fn:current-date() is implementation dependent.
Provides a client interface to a server function. See fn:current-date
XsDateTimeExpr currentDateTime()
Returns the current dateTime value (with timezone) from the dynamic context. (See Section C.2 Dynamic Context Components[XP].) This is an xs:dateTime that is current at some time during the evaluation of a query or transformation in which fn:current-dateTime() is executed. This function is stable. The precise instant during the query or transformation represented by the value of fn:current-dateTime() is implementation dependent.
Provides a client interface to a server function. See fn:current-dateTime
XsTimeExpr currentTime()
Returns xs:time(fn:current-dateTime()). This is an xs:time (with timezone) that is current at some time during the evaluation of a query or transformation in which fn:current-time() is executed. This function is stable. The precise instant during the query or transformation represented by the value of fn:current-time() is implementation dependent.
Provides a client interface to a server function. See fn:current-time
XsIntegerExpr dayFromDate(XsDateExpr arg)
Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of arg.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:day-from-date
arg - The date whose day component will be returned.XsIntegerExpr dayFromDateTime(XsDateTimeExpr arg)
Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of arg.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:day-from-dateTime
arg - The dateTime whose day component will be returned.XsIntegerExpr daysFromDuration(XsDurationExpr arg)
Returns an xs:integer representing the days component in the canonical lexical representation of the value of arg. The result may be negative.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:days-from-duration
arg - The duration whose day component will be returned.XsBooleanExpr deepEqual(ItemSeqExpr parameter1, ItemSeqExpr parameter2)
This function assesses whether two sequences are deep-equal to each other. To be deep-equal, they must contain items that are pairwise deep-equal; and for two items to be deep-equal, they must either be atomic values that compare equal, or nodes of the same kind, with the same name, whose children are deep-equal. This is defined in more detail below. The collation argument identifies a collation which is used at all levels of recursion when strings are compared (but not when names are compared), according to the rules in 7.3.1 Collations.
If the two sequences are both empty, the function returns true.
If the two sequences are of different lengths, the function returns false.
If the two sequences are of the same length, the function returns true if and only if every item in the sequence parameter1 is deep-equal to the item at the same position in the sequence parameter2. The rules for deciding whether two items are deep-equal follow.
Call the two items $i1 and $i2 respectively.
If $i1 and $i2 are both atomic values, they are deep-equal if and only if ($i1 eq $i2) is true. Or if both values are NaN. If the eq operator is not defined for $i1 and $i2, the function returns false.
If one of the pair $i1 or $i2 is an atomic value and the other is a node, the function returns false.
If $i1 and $i2 are both nodes, they are compared as described below:
If the two nodes are of different kinds, the result is false.
If the two nodes are both document nodes then they are deep-equal if and only if the sequence $i1/(*|text()) is deep-equal to the sequence $i2/(*|text()).
If the two nodes are both element nodes then they are deep-equal if and only if all of the following conditions are satisfied:
If the two nodes are both attribute nodes then they are deep-equal if and only if both the following conditions are satisfied:
If the two nodes are both processing instruction nodes or namespace bindings, then they are deep-equal if and only if both the following conditions are satisfied:
If the two nodes are both text nodes and their parent nodes are not object nodes, then they are deep-equal if and only if their string-values are both equal.
If the two nodes are both text nodes and their parent nodes are both object nodes, then they are deep-equal if and only if their keys and string-values are both equal.
If the two nodes are both comment nodes, then they are deep-equal if and only if their string-values are equal.
If the two nodes are both object nodes, then they are deep-equal if and only if all of the following conditions are satisfied:
If the two nodes are both boolean nodes, then they are deep-equal if and only if their keys and boolean values are equal.
If the two nodes are both number nodes, then they are deep-equal if and only if their keys and values are equal.
If the two nodes are both null nodes, they are deep-equal.
Notes:
The two nodes are not required to have the same type annotation, and they are not required to have the same in-scope namespaces. They may also differ in their parent, their base URI, and the values returned by the is-id and is-idrefs accesors (see Section 5.5 is-id Accessor[DM] and Section 5.6 is-idrefs Accessor[DM]). The order of children is significant, but the order of attributes is insignificant.
The following note applies to the Jan 2007 XQuery specification, but not to the May 2003 XQuery specification: The contents of comments and processing instructions are significant only if these nodes appear directly as items in the two sequences being compared. The content of a comment or processing instruction that appears as a descendant of an item in one of the sequences being compared does not affect the result. However, the presence of a comment or processing instruction, if it causes a text node to be split into two text nodes, may affect the result.
The result of fn:deep-equal(1, current-dateTime()) is false; it does not raise an error.
Provides a client interface to a server function. See fn:deep-equal
parameter1 - The first sequence of items, each item should be an atomic value or node.parameter2 - The sequence of items to compare to the first sequence of items, again each item should be an atomic value or node.XsBooleanExpr deepEqual(ItemSeqExpr parameter1, ItemSeqExpr parameter2, String collation)
This function assesses whether two sequences are deep-equal to each other. To be deep-equal, they must contain items that are pairwise deep-equal; and for two items to be deep-equal, they must either be atomic values that compare equal, or nodes of the same kind, with the same name, whose children are deep-equal. This is defined in more detail below. The collation argument identifies a collation which is used at all levels of recursion when strings are compared (but not when names are compared), according to the rules in 7.3.1 Collations.
If the two sequences are both empty, the function returns true.
If the two sequences are of different lengths, the function returns false.
If the two sequences are of the same length, the function returns true if and only if every item in the sequence parameter1 is deep-equal to the item at the same position in the sequence parameter2. The rules for deciding whether two items are deep-equal follow.
Call the two items $i1 and $i2 respectively.
If $i1 and $i2 are both atomic values, they are deep-equal if and only if ($i1 eq $i2) is true. Or if both values are NaN. If the eq operator is not defined for $i1 and $i2, the function returns false.
If one of the pair $i1 or $i2 is an atomic value and the other is a node, the function returns false.
If $i1 and $i2 are both nodes, they are compared as described below:
If the two nodes are of different kinds, the result is false.
If the two nodes are both document nodes then they are deep-equal if and only if the sequence $i1/(*|text()) is deep-equal to the sequence $i2/(*|text()).
If the two nodes are both element nodes then they are deep-equal if and only if all of the following conditions are satisfied:
If the two nodes are both attribute nodes then they are deep-equal if and only if both the following conditions are satisfied:
If the two nodes are both processing instruction nodes or namespace bindings, then they are deep-equal if and only if both the following conditions are satisfied:
If the two nodes are both text nodes and their parent nodes are not object nodes, then they are deep-equal if and only if their string-values are both equal.
If the two nodes are both text nodes and their parent nodes are both object nodes, then they are deep-equal if and only if their keys and string-values are both equal.
If the two nodes are both comment nodes, then they are deep-equal if and only if their string-values are equal.
If the two nodes are both object nodes, then they are deep-equal if and only if all of the following conditions are satisfied:
If the two nodes are both boolean nodes, then they are deep-equal if and only if their keys and boolean values are equal.
If the two nodes are both number nodes, then they are deep-equal if and only if their keys and values are equal.
If the two nodes are both null nodes, they are deep-equal.
Notes:
The two nodes are not required to have the same type annotation, and they are not required to have the same in-scope namespaces. They may also differ in their parent, their base URI, and the values returned by the is-id and is-idrefs accesors (see Section 5.5 is-id Accessor[DM] and Section 5.6 is-idrefs Accessor[DM]). The order of children is significant, but the order of attributes is insignificant.
The following note applies to the Jan 2007 XQuery specification, but not to the May 2003 XQuery specification: The contents of comments and processing instructions are significant only if these nodes appear directly as items in the two sequences being compared. The content of a comment or processing instruction that appears as a descendant of an item in one of the sequences being compared does not affect the result. However, the presence of a comment or processing instruction, if it causes a text node to be split into two text nodes, may affect the result.
The result of fn:deep-equal(1, current-dateTime()) is false; it does not raise an error.
Provides a client interface to a server function. See fn:deep-equal
parameter1 - The first sequence of items, each item should be an atomic value or node.parameter2 - The sequence of items to compare to the first sequence of items, again each item should be an atomic value or node.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsBooleanExpr deepEqual(ItemSeqExpr parameter1, ItemSeqExpr parameter2, XsStringExpr collation)
This function assesses whether two sequences are deep-equal to each other. To be deep-equal, they must contain items that are pairwise deep-equal; and for two items to be deep-equal, they must either be atomic values that compare equal, or nodes of the same kind, with the same name, whose children are deep-equal. This is defined in more detail below. The collation argument identifies a collation which is used at all levels of recursion when strings are compared (but not when names are compared), according to the rules in 7.3.1 Collations.
If the two sequences are both empty, the function returns true.
If the two sequences are of different lengths, the function returns false.
If the two sequences are of the same length, the function returns true if and only if every item in the sequence parameter1 is deep-equal to the item at the same position in the sequence parameter2. The rules for deciding whether two items are deep-equal follow.
Call the two items $i1 and $i2 respectively.
If $i1 and $i2 are both atomic values, they are deep-equal if and only if ($i1 eq $i2) is true. Or if both values are NaN. If the eq operator is not defined for $i1 and $i2, the function returns false.
If one of the pair $i1 or $i2 is an atomic value and the other is a node, the function returns false.
If $i1 and $i2 are both nodes, they are compared as described below:
If the two nodes are of different kinds, the result is false.
If the two nodes are both document nodes then they are deep-equal if and only if the sequence $i1/(*|text()) is deep-equal to the sequence $i2/(*|text()).
If the two nodes are both element nodes then they are deep-equal if and only if all of the following conditions are satisfied:
If the two nodes are both attribute nodes then they are deep-equal if and only if both the following conditions are satisfied:
If the two nodes are both processing instruction nodes or namespace bindings, then they are deep-equal if and only if both the following conditions are satisfied:
If the two nodes are both text nodes and their parent nodes are not object nodes, then they are deep-equal if and only if their string-values are both equal.
If the two nodes are both text nodes and their parent nodes are both object nodes, then they are deep-equal if and only if their keys and string-values are both equal.
If the two nodes are both comment nodes, then they are deep-equal if and only if their string-values are equal.
If the two nodes are both object nodes, then they are deep-equal if and only if all of the following conditions are satisfied:
If the two nodes are both boolean nodes, then they are deep-equal if and only if their keys and boolean values are equal.
If the two nodes are both number nodes, then they are deep-equal if and only if their keys and values are equal.
If the two nodes are both null nodes, they are deep-equal.
Notes:
The two nodes are not required to have the same type annotation, and they are not required to have the same in-scope namespaces. They may also differ in their parent, their base URI, and the values returned by the is-id and is-idrefs accesors (see Section 5.5 is-id Accessor[DM] and Section 5.6 is-idrefs Accessor[DM]). The order of children is significant, but the order of attributes is insignificant.
The following note applies to the Jan 2007 XQuery specification, but not to the May 2003 XQuery specification: The contents of comments and processing instructions are significant only if these nodes appear directly as items in the two sequences being compared. The content of a comment or processing instruction that appears as a descendant of an item in one of the sequences being compared does not affect the result. However, the presence of a comment or processing instruction, if it causes a text node to be split into two text nodes, may affect the result.
The result of fn:deep-equal(1, current-dateTime()) is false; it does not raise an error.
Provides a client interface to a server function. See fn:deep-equal
parameter1 - The first sequence of items, each item should be an atomic value or node.parameter2 - The sequence of items to compare to the first sequence of items, again each item should be an atomic value or node.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsStringExpr defaultCollation()
Returns the value of the default collation property from the static context. Components of the static context are discussed in Section C.1 Static Context Components[XP].
The default collation property can never be undefined. If it is not explicitly defined, a system defined default codepoint is used. In the 1.0 XQuery dialect, if this is not provided, the Unicode code point collation (http://www.w3.org/2005/xpath-functions/collation/codepoint) is used. In the 1.0-ml and 0.9-ml XQuery dialects, the MarkLogic-defined codepoint URI is used (http://marklogic.com/collation/codepoint).
Provides a client interface to a server function. See fn:default-collation
XsAnyAtomicTypeSeqExpr distinctValues(XsAnyAtomicTypeSeqExpr arg)
Returns the sequence that results from removing from arg all but one of a set of values that are eq to one other. Values that cannot be compared, i.e. the eq operator is not defined for their types, are considered to be distinct. Values of type xs:untypedAtomic are compared as if they were of type xs:string. The order in which the sequence of values is returned is implementation dependent.
The static type of the result is a sequence of prime types as defined in Section 7.2.7 The fn:distinct-values function[FS].
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations. The collation is used when string comparison is required.
If arg is the empty sequence, the empty sequence is returned.
For xs:float and xs:double values, positive zero is equal to negative zero and, although NaN does not equal itself, if arg contains multiple NaN values a single NaN is returned.
If xs:dateTime, xs:date or xs:time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for the purpose of comparison. Note that xs:dateTime, xs:date or xs:time values can compare equal even if their timezones are different.
Which value of a set of values that compare equal is returned is implementation dependent.
Provides a client interface to a server function. See fn:distinct-values
arg - A sequence of items.XsAnyAtomicTypeSeqExpr distinctValues(XsAnyAtomicTypeSeqExpr arg, String collation)
Returns the sequence that results from removing from arg all but one of a set of values that are eq to one other. Values that cannot be compared, i.e. the eq operator is not defined for their types, are considered to be distinct. Values of type xs:untypedAtomic are compared as if they were of type xs:string. The order in which the sequence of values is returned is implementation dependent.
The static type of the result is a sequence of prime types as defined in Section 7.2.7 The fn:distinct-values function[FS].
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations. The collation is used when string comparison is required.
If arg is the empty sequence, the empty sequence is returned.
For xs:float and xs:double values, positive zero is equal to negative zero and, although NaN does not equal itself, if arg contains multiple NaN values a single NaN is returned.
If xs:dateTime, xs:date or xs:time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for the purpose of comparison. Note that xs:dateTime, xs:date or xs:time values can compare equal even if their timezones are different.
Which value of a set of values that compare equal is returned is implementation dependent.
Provides a client interface to a server function. See fn:distinct-values
arg - A sequence of items.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsAnyAtomicTypeSeqExpr distinctValues(XsAnyAtomicTypeSeqExpr arg, XsStringExpr collation)
Returns the sequence that results from removing from arg all but one of a set of values that are eq to one other. Values that cannot be compared, i.e. the eq operator is not defined for their types, are considered to be distinct. Values of type xs:untypedAtomic are compared as if they were of type xs:string. The order in which the sequence of values is returned is implementation dependent.
The static type of the result is a sequence of prime types as defined in Section 7.2.7 The fn:distinct-values function[FS].
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations. The collation is used when string comparison is required.
If arg is the empty sequence, the empty sequence is returned.
For xs:float and xs:double values, positive zero is equal to negative zero and, although NaN does not equal itself, if arg contains multiple NaN values a single NaN is returned.
If xs:dateTime, xs:date or xs:time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for the purpose of comparison. Note that xs:dateTime, xs:date or xs:time values can compare equal even if their timezones are different.
Which value of a set of values that compare equal is returned is implementation dependent.
Provides a client interface to a server function. See fn:distinct-values
arg - A sequence of items.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsAnyURIExpr documentUri(NodeExpr arg)
Returns the value of the document-uri property for the specified node. If the node is a document node, then the value returned is the URI of the document. If the node is not a document node, then fn:document-uri returns the empty sequence.
Provides a client interface to a server function. See fn:document-uri
arg - The node whose document-uri is to be returned.XsBooleanExpr empty(ItemSeqExpr arg)
If the value of arg is the empty sequence, the function returns true; otherwise, the function returns false.
Provides a client interface to a server function. See fn:empty
arg - A sequence to test.XsStringExpr encodeForUri(XsStringExpr uriPart)
Invertible function that escapes characters required to be escaped inside path segments of URIs.
Provides a client interface to a server function. See fn:encode-for-uri
uriPart - A string representing an unescaped URI.XsBooleanExpr endsWith(XsStringExpr parameter1, String parameter2)
Returns true if the first parameter ends with the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:ends-with
parameter1 - The parameter from which to test.parameter2 - The string to test whether it is at the end of the first parameter.XsBooleanExpr endsWith(XsStringExpr parameter1, XsStringExpr parameter2)
Returns true if the first parameter ends with the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:ends-with
parameter1 - The parameter from which to test.parameter2 - The string to test whether it is at the end of the first parameter.XsBooleanExpr endsWith(XsStringExpr parameter1, String parameter2, String collation)
Returns true if the first parameter ends with the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:ends-with
parameter1 - The parameter from which to test.parameter2 - The string to test whether it is at the end of the first parameter.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsBooleanExpr endsWith(XsStringExpr parameter1, XsStringExpr parameter2, XsStringExpr collation)
Returns true if the first parameter ends with the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:ends-with
parameter1 - The parameter from which to test.parameter2 - The string to test whether it is at the end of the first parameter.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsStringExpr escapeHtmlUri(XsStringExpr uriPart)
%-escapes everything except printable ASCII characters.
Provides a client interface to a server function. See fn:escape-html-uri
uriPart - A string representing an unescaped URI.XsBooleanExpr exists(ItemSeqExpr arg)
If the value of arg is not the empty sequence, the function returns true; otherwise, the function returns false.
Provides a client interface to a server function. See fn:exists
arg - A sequence to test.XsBooleanExpr falseExpr()
Returns the xs:boolean value false. Equivalent to xs:boolean(“0”).
Provides a client interface to a server function. See fn:false
XsNumericExpr floor(XsNumericExpr arg)
Returns the largest (closest to positive infinity) number with no fractional part that is not greater than the value of arg. If type of arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of arg. If the type of arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.
For float and double arguments, if the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned.
For detailed type semantics, see Section 7.2.3 The fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions[FS].
Provides a client interface to a server function. See fn:floor
arg - A numeric value.XsStringExpr formatDate(XsDateExpr value, String picture)
Returns a formatted date value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-date
value - The given date $value that needs to be formatted.picture - The desired string representation of the given date $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.XsStringExpr formatDate(XsDateExpr value, XsStringExpr picture)
Returns a formatted date value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-date
value - The given date $value that needs to be formatted.picture - The desired string representation of the given date $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.XsStringExpr formatDate(XsDateExpr value, String picture, String language)
Returns a formatted date value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-date
value - The given date $value that needs to be formatted.picture - The desired string representation of the given date $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.language - The desired language for string representation of the date $value.XsStringExpr formatDate(XsDateExpr value, XsStringExpr picture, XsStringExpr language)
Returns a formatted date value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-date
value - The given date $value that needs to be formatted.picture - The desired string representation of the given date $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.language - The desired language for string representation of the date $value.XsStringExpr formatDate(XsDateExpr value, String picture, String language, String calendar)
Returns a formatted date value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-date
value - The given date $value that needs to be formatted.picture - The desired string representation of the given date $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.language - The desired language for string representation of the date $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.XsStringExpr formatDate(XsDateExpr value, XsStringExpr picture, XsStringExpr language, XsStringExpr calendar)
Returns a formatted date value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-date
value - The given date $value that needs to be formatted.picture - The desired string representation of the given date $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.language - The desired language for string representation of the date $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.XsStringExpr formatDate(XsDateExpr value, String picture, String language, String calendar, String country)
Returns a formatted date value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-date
value - The given date $value that needs to be formatted.picture - The desired string representation of the given date $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.language - The desired language for string representation of the date $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.country - $country is used the specification to take into account country specific string representation.XsStringExpr formatDate(XsDateExpr value, XsStringExpr picture, XsStringExpr language, XsStringExpr calendar, XsStringExpr country)
Returns a formatted date value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-date
value - The given date $value that needs to be formatted.picture - The desired string representation of the given date $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.language - The desired language for string representation of the date $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.country - $country is used the specification to take into account country specific string representation.XsStringExpr formatDateTime(XsDateTimeExpr value, String picture)
Returns a formatted dateTime value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-dateTime
value - The given dateTime $value that needs to be formatted.picture - The desired string representation of the given dateTime $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.XsStringExpr formatDateTime(XsDateTimeExpr value, XsStringExpr picture)
Returns a formatted dateTime value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-dateTime
value - The given dateTime $value that needs to be formatted.picture - The desired string representation of the given dateTime $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.XsStringExpr formatDateTime(XsDateTimeExpr value, String picture, String language)
Returns a formatted dateTime value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-dateTime
value - The given dateTime $value that needs to be formatted.picture - The desired string representation of the given dateTime $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.language - The desired language for string representation of the dateTime $value.XsStringExpr formatDateTime(XsDateTimeExpr value, XsStringExpr picture, XsStringExpr language)
Returns a formatted dateTime value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-dateTime
value - The given dateTime $value that needs to be formatted.picture - The desired string representation of the given dateTime $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.language - The desired language for string representation of the dateTime $value.XsStringExpr formatDateTime(XsDateTimeExpr value, String picture, String language, String calendar)
Returns a formatted dateTime value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-dateTime
value - The given dateTime $value that needs to be formatted.picture - The desired string representation of the given dateTime $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.language - The desired language for string representation of the dateTime $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.XsStringExpr formatDateTime(XsDateTimeExpr value, XsStringExpr picture, XsStringExpr language, XsStringExpr calendar)
Returns a formatted dateTime value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-dateTime
value - The given dateTime $value that needs to be formatted.picture - The desired string representation of the given dateTime $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.language - The desired language for string representation of the dateTime $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.XsStringExpr formatDateTime(XsDateTimeExpr value, String picture, String language, String calendar, String country)
Returns a formatted dateTime value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-dateTime
value - The given dateTime $value that needs to be formatted.picture - The desired string representation of the given dateTime $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.language - The desired language for string representation of the dateTime $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.country - $country is used the specification to take into account country specific string representation.XsStringExpr formatDateTime(XsDateTimeExpr value, XsStringExpr picture, XsStringExpr language, XsStringExpr calendar, XsStringExpr country)
Returns a formatted dateTime value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-dateTime
value - The given dateTime $value that needs to be formatted.picture - The desired string representation of the given dateTime $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.language - The desired language for string representation of the dateTime $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.country - $country is used the specification to take into account country specific string representation.XsStringExpr formatNumber(XsNumericSeqExpr value, String picture)
Returns a formatted string representation of value argument based on the supplied picture. An optional decimal format name may also be supplied for interpretation of the picture string. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-number
value - The given numeric $value that needs to be formatted.picture - The desired string representation of the given number $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 format-number picture string, see http://www.w3.org/TR/xslt20/#function-format-number.XsStringExpr formatNumber(XsNumericSeqExpr value, XsStringExpr picture)
Returns a formatted string representation of value argument based on the supplied picture. An optional decimal format name may also be supplied for interpretation of the picture string. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-number
value - The given numeric $value that needs to be formatted.picture - The desired string representation of the given number $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 format-number picture string, see http://www.w3.org/TR/xslt20/#function-format-number.XsStringExpr formatNumber(XsNumericSeqExpr value, String picture, String decimalFormatName)
Returns a formatted string representation of value argument based on the supplied picture. An optional decimal format name may also be supplied for interpretation of the picture string. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-number
value - The given numeric $value that needs to be formatted.picture - The desired string representation of the given number $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 format-number picture string, see http://www.w3.org/TR/xslt20/#function-format-number.decimalFormatName - Represents a named <xsl:decimal-format> instruction. It is used to assign values to the variables mentioned above based on the picture string.XsStringExpr formatNumber(XsNumericSeqExpr value, XsStringExpr picture, XsStringExpr decimalFormatName)
Returns a formatted string representation of value argument based on the supplied picture. An optional decimal format name may also be supplied for interpretation of the picture string. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-number
value - The given numeric $value that needs to be formatted.picture - The desired string representation of the given number $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 format-number picture string, see http://www.w3.org/TR/xslt20/#function-format-number.decimalFormatName - Represents a named <xsl:decimal-format> instruction. It is used to assign values to the variables mentioned above based on the picture string.XsStringExpr formatTime(XsTimeExpr value, String picture)
Returns a formatted time value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-time
value - The given time $value that needs to be formatted.picture - The desired string representation of the given time $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.XsStringExpr formatTime(XsTimeExpr value, XsStringExpr picture)
Returns a formatted time value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-time
value - The given time $value that needs to be formatted.picture - The desired string representation of the given time $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.XsStringExpr formatTime(XsTimeExpr value, String picture, String language)
Returns a formatted time value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-time
value - The given time $value that needs to be formatted.picture - The desired string representation of the given time $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.language - The desired language for string representation of the time $value.XsStringExpr formatTime(XsTimeExpr value, XsStringExpr picture, XsStringExpr language)
Returns a formatted time value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-time
value - The given time $value that needs to be formatted.picture - The desired string representation of the given time $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.language - The desired language for string representation of the time $value.XsStringExpr formatTime(XsTimeExpr value, String picture, String language, String calendar)
Returns a formatted time value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-time
value - The given time $value that needs to be formatted.picture - The desired string representation of the given time $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.language - The desired language for string representation of the time $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.XsStringExpr formatTime(XsTimeExpr value, XsStringExpr picture, XsStringExpr language, XsStringExpr calendar)
Returns a formatted time value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-time
value - The given time $value that needs to be formatted.picture - The desired string representation of the given time $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.language - The desired language for string representation of the time $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.XsStringExpr formatTime(XsTimeExpr value, String picture, String language, String calendar, String country)
Returns a formatted time value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-time
value - The given time $value that needs to be formatted.picture - The desired string representation of the given time $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.language - The desired language for string representation of the time $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.country - $country is used the specification to take into account country specific string representation.XsStringExpr formatTime(XsTimeExpr value, XsStringExpr picture, XsStringExpr language, XsStringExpr calendar, XsStringExpr country)
Returns a formatted time value based on the picture argument. This is an XSLT function, and it is available in XSLT, XQuery 1.0-ml, and Server-Side JavaScript.
Provides a client interface to a server function. See fn:format-time
value - The given time $value that needs to be formatted.picture - The desired string representation of the given time $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.language - The desired language for string representation of the time $value.calendar - The only calendar supported at this point is “Gregorian” or “AD”.country - $country is used the specification to take into account country specific string representation.XsStringExpr generateId(NodeExpr node)
Returns a string that uniquely identifies a given node.
If node is the empty sequence, the zero-length string is returned.
If the function is called without an argument, the context item is used as the default argument. The behavior of the function when the argument is omitted is the same as if the context item is passed as an argument.
If the context item is undefined an error is raised: [err:XPDY0002]. If the context item is not a node an error is raised: [err:XPTY0004].
Provides a client interface to a server function. See fn:generate-id
node - The node whose ID will be generated.ItemExpr head(ItemSeqExpr seq)
Returns the first item in a sequence. For more details, see XPath 3.0 Functions and Operators.
Provides a client interface to a server function. See fn:head
seq - A sequence of items.XsIntegerExpr hoursFromDateTime(XsDateTimeExpr arg)
Returns an xs:integer between 0 and 23, both inclusive, representing the hours component in the localized value of arg.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:hours-from-dateTime
arg - The dateTime whose hours component will be returned.XsIntegerExpr hoursFromDuration(XsDurationExpr arg)
Returns an xs:integer representing the hours component in the canonical lexical representation of the value of arg. The result may be negative.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:hours-from-duration
arg - The duration whose hour component will be returned.XsIntegerExpr hoursFromTime(XsTimeExpr arg)
Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of arg.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:hours-from-time
arg - The time whose hours component will be returned.XsDayTimeDurationExpr implicitTimezone()
Returns the value of the implicit timezone property from the dynamic context. Components of the dynamic context are discussed in Section C.2 Dynamic Context Components[XP].
Provides a client interface to a server function. See fn:implicit-timezone
XsStringSeqExpr inScopePrefixes(ElementNodeExpr element)
Returns the prefixes of the in-scope namespaces for element. For namespaces that have a prefix, it returns the prefix as an xs:NCName. For the default namespace, which has no prefix, it returns the zero-length string.
Provides a client interface to a server function. See fn:in-scope-prefixes
element - The element whose in-scope prefixes will be returned.XsIntegerSeqExpr indexOf(XsAnyAtomicTypeSeqExpr seqParam, String srchParam)
Returns a sequence of positive integers giving the positions within the sequence seqParam of items that are equal to srchParam.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations. The collation is used when string comparison is required.
The items in the sequence seqParam are compared with srchParam under the rules for the eq operator. Values that cannot be compared, i.e. the eq operator is not defined for their types, are considered to be distinct. If an item compares equal, then the position of that item in the sequence srchParam is included in the result.
If the value of seqParam is the empty sequence, or if no item in seqParam matches srchParam, then the empty sequence is returned.
The first item in a sequence is at position 1, not position 0.
The result sequence is in ascending numeric order.
Provides a client interface to a server function. See fn:index-of
seqParam - A sequence of values.srchParam - A value to find on the list.XsIntegerSeqExpr indexOf(XsAnyAtomicTypeSeqExpr seqParam, XsAnyAtomicTypeExpr srchParam)
Returns a sequence of positive integers giving the positions within the sequence seqParam of items that are equal to srchParam.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations. The collation is used when string comparison is required.
The items in the sequence seqParam are compared with srchParam under the rules for the eq operator. Values that cannot be compared, i.e. the eq operator is not defined for their types, are considered to be distinct. If an item compares equal, then the position of that item in the sequence srchParam is included in the result.
If the value of seqParam is the empty sequence, or if no item in seqParam matches srchParam, then the empty sequence is returned.
The first item in a sequence is at position 1, not position 0.
The result sequence is in ascending numeric order.
Provides a client interface to a server function. See fn:index-of
seqParam - A sequence of values.srchParam - A value to find on the list.XsIntegerSeqExpr indexOf(XsAnyAtomicTypeSeqExpr seqParam, String srchParam, String collationLiteral)
Returns a sequence of positive integers giving the positions within the sequence seqParam of items that are equal to srchParam.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations. The collation is used when string comparison is required.
The items in the sequence seqParam are compared with srchParam under the rules for the eq operator. Values that cannot be compared, i.e. the eq operator is not defined for their types, are considered to be distinct. If an item compares equal, then the position of that item in the sequence srchParam is included in the result.
If the value of seqParam is the empty sequence, or if no item in seqParam matches srchParam, then the empty sequence is returned.
The first item in a sequence is at position 1, not position 0.
The result sequence is in ascending numeric order.
Provides a client interface to a server function. See fn:index-of
seqParam - A sequence of values.srchParam - A value to find on the list.collationLiteral - A collation identifier.XsIntegerSeqExpr indexOf(XsAnyAtomicTypeSeqExpr seqParam, XsAnyAtomicTypeExpr srchParam, XsStringExpr collationLiteral)
Returns a sequence of positive integers giving the positions within the sequence seqParam of items that are equal to srchParam.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations. The collation is used when string comparison is required.
The items in the sequence seqParam are compared with srchParam under the rules for the eq operator. Values that cannot be compared, i.e. the eq operator is not defined for their types, are considered to be distinct. If an item compares equal, then the position of that item in the sequence srchParam is included in the result.
If the value of seqParam is the empty sequence, or if no item in seqParam matches srchParam, then the empty sequence is returned.
The first item in a sequence is at position 1, not position 0.
The result sequence is in ascending numeric order.
Provides a client interface to a server function. See fn:index-of
seqParam - A sequence of values.srchParam - A value to find on the list.collationLiteral - A collation identifier.ItemSeqExpr insertBefore(ItemSeqExpr target, long position, ItemSeqExpr inserts)
Returns a new sequence constructed from the value of target with the value of inserts inserted at the position specified by the value of position. (The value of target is not affected by the sequence construction.)
If target is the empty sequence, inserts is returned. If inserts is the empty sequence, target is returned.
The value returned by the function consists of all items of target whose index is less than position, followed by all items of inserts, followed by the remaining elements of target, in that sequence.
If position is less than one (1), the first position, the effective value of position is one (1). If position is greater than the number of items in target, then the effective value of position is equal to the number of items in target plus 1.
For detailed semantics see, Section 7.2.15 The fn:insert-before function[FS].
Provides a client interface to a server function. See fn:insert-before
target - The sequence of items into which new items will be inserted.position - The position in the target sequence at which the new items will be added.inserts - The items to insert into the target sequence.ItemSeqExpr insertBefore(ItemSeqExpr target, XsIntegerExpr position, ItemSeqExpr inserts)
Returns a new sequence constructed from the value of target with the value of inserts inserted at the position specified by the value of position. (The value of target is not affected by the sequence construction.)
If target is the empty sequence, inserts is returned. If inserts is the empty sequence, target is returned.
The value returned by the function consists of all items of target whose index is less than position, followed by all items of inserts, followed by the remaining elements of target, in that sequence.
If position is less than one (1), the first position, the effective value of position is one (1). If position is greater than the number of items in target, then the effective value of position is equal to the number of items in target plus 1.
For detailed semantics see, Section 7.2.15 The fn:insert-before function[FS].
Provides a client interface to a server function. See fn:insert-before
target - The sequence of items into which new items will be inserted.position - The position in the target sequence at which the new items will be added.inserts - The items to insert into the target sequence.XsStringExpr iriToUri(XsStringExpr uriPart)
Idempotent function that escapes non-URI characters.
Provides a client interface to a server function. See fn:iri-to-uri
uriPart - A string representing an unescaped URI.XsBooleanExpr lang(XsStringExpr testlang, NodeExpr node)
This function tests whether the language of node, or the context node if the second argument is omitted, as specified by xml:lang attributes is the same as, or is a sublanguage of, the language specified by testlang. The language of the argument node, or the context node if the second argument is omitted, is determined by the value of the xml:lang attribute on the node, or, if the node has no such attribute, by the value of the xml:lang attribute on the nearest ancestor of the node that has an xml:lang attribute. If there is no such ancestor, then the function returns false
If the second argument is omitted and the context item is undefined an error is raised: [err:XPDY0002]. If the context item is not a node an error is raised [err:XPTY0004].
If testlang is the empty sequence it is interpreted as the zero-length string.
The relevant xml:lang attribute is determined by the value of the XPath expression: (ancestor-or-self::* /@xml:lang)[last()]
If this expression returns an empty sequence, the function returns false.
Otherwise, the function returns true if and only if the string-value of the relevant xml:lang attribute is equal to testlang based on a caseless default match as specified in section 3.13 of [The Unicode Standard], or if the string-value of the relevant testlang attribute contains a hyphen, “-” (The character “-” is HYPHEN-MINUS, #x002D) such that the part of the string-value preceding that hyphen is equal to testlang, using caseless matching.
Provides a client interface to a server function. See fn:lang
testlang - The language against which to test the node.node - The node to test.XsStringExpr localName(NodeExpr arg)
Returns the local part of the name of arg as an xs:string that will either be the zero-length string or will have the lexical form of an xs:NCName.
If the argument is omitted, it defaults to the context node. If the context item is undefined an error is raised: [err:XPDY0002]. If the context item is not a node an error is raised: [err:XPTY0004].
If the argument is supplied and is the empty sequence, the function returns the zero-length string.
If the target node has no name (that is, if it is a document node, a comment, a text node, or a namespace node having no name), the function returns the zero-length string.
Otherwise, the value returned will be the local part of the expanded-QName of the target node (as determined by the dm:node-name accessor in Section 5.11 node-name Accessor[DM]. This will be an xs:string whose lexical form is an xs:NCName.
Provides a client interface to a server function. See fn:local-name
arg - The node whose local name is to be returned.XsNCNameExpr localNameFromQName(XsQNameExpr arg)
Returns an xs:NCName representing the local part of arg. If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:local-name-from-QName
arg - A qualified name.XsStringExpr lowerCase(XsStringExpr string)
Returns the specified string converting all of the characters to lower-case characters. If a character does not have a corresponding lower-case character, then the original character is returned. The lower-case characters are determined using the Unicode Case Mappings.
Provides a client interface to a server function. See fn:lower-case
string - The string to convert.XsBooleanExpr matches(XsStringExpr input, String pattern)
Returns true if the specified input matches the specified pattern, otherwise returns false.
Provides a client interface to a server function. See fn:matches
input - The input from which to match.pattern - The regular expression to match.XsBooleanExpr matches(XsStringExpr input, XsStringExpr pattern)
Returns true if the specified input matches the specified pattern, otherwise returns false.
Provides a client interface to a server function. See fn:matches
input - The input from which to match.pattern - The regular expression to match.XsBooleanExpr matches(XsStringExpr input, String pattern, String flags)
Returns true if the specified input matches the specified pattern, otherwise returns false.
Provides a client interface to a server function. See fn:matches
input - The input from which to match.pattern - The regular expression to match.flags - The flag representing how to interpret the regular expression. One of “s”, “m”, “i”, or “x”, as defined in http://www.w3.org/TR/xpath-functions/#flags.XsBooleanExpr matches(XsStringExpr input, XsStringExpr pattern, XsStringExpr flags)
Returns true if the specified input matches the specified pattern, otherwise returns false.
Provides a client interface to a server function. See fn:matches
input - The input from which to match.pattern - The regular expression to match.flags - The flag representing how to interpret the regular expression. One of “s”, “m”, “i”, or “x”, as defined in http://www.w3.org/TR/xpath-functions/#flags.XsAnyAtomicTypeExpr max(XsAnyAtomicTypeSeqExpr arg)
Selects an item from the input sequence arg whose value is greater than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is implementation dependent.
The following rules are applied to the input sequence:
The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.This function returns an item from the converted sequence rather than the input sequence.
If the converted sequence is empty, the empty sequence is returned.
All items in arg must be numeric or derived from a single base type for which the ge operator is defined. In addition, the values in the sequence must have a total order. If date/time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for purposes of comparison. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values.
If any of these conditions is not met, then a type error is raised [err:FORG0006].
If the converted sequence contains the value NaN, the value NaN is returned.
If the items in the value of arg are of type xs:string or types derived by restriction from xs:string, then the determination of the item with the largest value is made according to the collation that is used. If the type of the items in arg is not xs:string and collation is specified, the collation is ignored.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations.
Otherwise, the result of the function is the result of the expression:
if (every $v in $c satisfies $c[1] ge $v) then $c[1] else fn:max(fn:subsequence($c, 2))
evaluated with collation as the default collation if specified, and with $c as the converted sequence.
For detailed type semantics, see Section 7.2.10 The fn:min, fn:max, fn:avg, and fn:sum functions[FS].
Notes:
If the converted sequence contains exactly one value then that value is returned.
The default type when the fn:max function is applied to xs:untypedAtomic values is xs:double. This differs from the default type for operators such as gt, and for sorting in XQuery and XSLT, which is xs:string.
Provides a client interface to a server function. See fn:max
arg - The sequence of values whose maximum will be returned.XsAnyAtomicTypeExpr max(XsAnyAtomicTypeSeqExpr arg, String collation)
Selects an item from the input sequence arg whose value is greater than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is implementation dependent.
The following rules are applied to the input sequence:
The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.This function returns an item from the converted sequence rather than the input sequence.
If the converted sequence is empty, the empty sequence is returned.
All items in arg must be numeric or derived from a single base type for which the ge operator is defined. In addition, the values in the sequence must have a total order. If date/time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for purposes of comparison. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values.
If any of these conditions is not met, then a type error is raised [err:FORG0006].
If the converted sequence contains the value NaN, the value NaN is returned.
If the items in the value of arg are of type xs:string or types derived by restriction from xs:string, then the determination of the item with the largest value is made according to the collation that is used. If the type of the items in arg is not xs:string and collation is specified, the collation is ignored.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations.
Otherwise, the result of the function is the result of the expression:
if (every $v in $c satisfies $c[1] ge $v) then $c[1] else fn:max(fn:subsequence($c, 2))
evaluated with collation as the default collation if specified, and with $c as the converted sequence.
For detailed type semantics, see Section 7.2.10 The fn:min, fn:max, fn:avg, and fn:sum functions[FS].
Notes:
If the converted sequence contains exactly one value then that value is returned.
The default type when the fn:max function is applied to xs:untypedAtomic values is xs:double. This differs from the default type for operators such as gt, and for sorting in XQuery and XSLT, which is xs:string.
Provides a client interface to a server function. See fn:max
arg - The sequence of values whose maximum will be returned.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsAnyAtomicTypeExpr max(XsAnyAtomicTypeSeqExpr arg, XsStringExpr collation)
Selects an item from the input sequence arg whose value is greater than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is implementation dependent.
The following rules are applied to the input sequence:
The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.This function returns an item from the converted sequence rather than the input sequence.
If the converted sequence is empty, the empty sequence is returned.
All items in arg must be numeric or derived from a single base type for which the ge operator is defined. In addition, the values in the sequence must have a total order. If date/time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for purposes of comparison. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values.
If any of these conditions is not met, then a type error is raised [err:FORG0006].
If the converted sequence contains the value NaN, the value NaN is returned.
If the items in the value of arg are of type xs:string or types derived by restriction from xs:string, then the determination of the item with the largest value is made according to the collation that is used. If the type of the items in arg is not xs:string and collation is specified, the collation is ignored.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations.
Otherwise, the result of the function is the result of the expression:
if (every $v in $c satisfies $c[1] ge $v) then $c[1] else fn:max(fn:subsequence($c, 2))
evaluated with collation as the default collation if specified, and with $c as the converted sequence.
For detailed type semantics, see Section 7.2.10 The fn:min, fn:max, fn:avg, and fn:sum functions[FS].
Notes:
If the converted sequence contains exactly one value then that value is returned.
The default type when the fn:max function is applied to xs:untypedAtomic values is xs:double. This differs from the default type for operators such as gt, and for sorting in XQuery and XSLT, which is xs:string.
Provides a client interface to a server function. See fn:max
arg - The sequence of values whose maximum will be returned.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsAnyAtomicTypeExpr min(XsAnyAtomicTypeSeqExpr arg)
Selects an item from the input sequence arg whose value is less than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is implementation dependent.
The following rules are applied to the input sequence:
The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.This function returns an item from the converted sequence rather than the input sequence.
If the converted sequence is empty, the empty sequence is returned.
All items in arg must be numeric or derived from a single base type for which the le operator is defined. In addition, the values in the sequence must have a total order. If date/time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for purposes of comparison. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values.
If any of these conditions is not met, then a type error is raised [err:FORG0006].
If the converted sequence contains the value NaN, the value NaN is returned.
If the items in the value of arg are of type xs:string or types derived by restriction from xs:string, then the determination of the item with the largest value is made according to the collation that is used. If the type of the items in arg is not xs:string and collation is specified, the collation is ignored.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations.
Otherwise, the result of the function is the result of the expression:
if (every $v in $c satisfies $c[1] le $v) then $c[1] else fn:min(fn:subsequence($c, 2))
evaluated with collation as the default collation if specified, and with $c as the converted sequence.
For detailed type semantics, see Section 7.2.10 The fn:min, fn:max, fn:avg, and fn:sum functions[FS].
Notes:
If the converted sequence contains exactly one value then that value is returned.
The default type when the fn:min function is applied to xs:untypedAtomic values is xs:double. This differs from the default type for operators such as gt, and for sorting in XQuery and XSLT, which is xs:string.
Provides a client interface to a server function. See fn:min
arg - The sequence of values whose minimum will be returned.XsAnyAtomicTypeExpr min(XsAnyAtomicTypeSeqExpr arg, String collation)
Selects an item from the input sequence arg whose value is less than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is implementation dependent.
The following rules are applied to the input sequence:
The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.This function returns an item from the converted sequence rather than the input sequence.
If the converted sequence is empty, the empty sequence is returned.
All items in arg must be numeric or derived from a single base type for which the le operator is defined. In addition, the values in the sequence must have a total order. If date/time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for purposes of comparison. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values.
If any of these conditions is not met, then a type error is raised [err:FORG0006].
If the converted sequence contains the value NaN, the value NaN is returned.
If the items in the value of arg are of type xs:string or types derived by restriction from xs:string, then the determination of the item with the largest value is made according to the collation that is used. If the type of the items in arg is not xs:string and collation is specified, the collation is ignored.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations.
Otherwise, the result of the function is the result of the expression:
if (every $v in $c satisfies $c[1] le $v) then $c[1] else fn:min(fn:subsequence($c, 2))
evaluated with collation as the default collation if specified, and with $c as the converted sequence.
For detailed type semantics, see Section 7.2.10 The fn:min, fn:max, fn:avg, and fn:sum functions[FS].
Notes:
If the converted sequence contains exactly one value then that value is returned.
The default type when the fn:min function is applied to xs:untypedAtomic values is xs:double. This differs from the default type for operators such as gt, and for sorting in XQuery and XSLT, which is xs:string.
Provides a client interface to a server function. See fn:min
arg - The sequence of values whose minimum will be returned.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsAnyAtomicTypeExpr min(XsAnyAtomicTypeSeqExpr arg, XsStringExpr collation)
Selects an item from the input sequence arg whose value is less than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is implementation dependent.
The following rules are applied to the input sequence:
The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.This function returns an item from the converted sequence rather than the input sequence.
If the converted sequence is empty, the empty sequence is returned.
All items in arg must be numeric or derived from a single base type for which the le operator is defined. In addition, the values in the sequence must have a total order. If date/time values do not have a timezone, they are considered to have the implicit timezone provided by the dynamic context for purposes of comparison. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values.
If any of these conditions is not met, then a type error is raised [err:FORG0006].
If the converted sequence contains the value NaN, the value NaN is returned.
If the items in the value of arg are of type xs:string or types derived by restriction from xs:string, then the determination of the item with the largest value is made according to the collation that is used. If the type of the items in arg is not xs:string and collation is specified, the collation is ignored.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations.
Otherwise, the result of the function is the result of the expression:
if (every $v in $c satisfies $c[1] le $v) then $c[1] else fn:min(fn:subsequence($c, 2))
evaluated with collation as the default collation if specified, and with $c as the converted sequence.
For detailed type semantics, see Section 7.2.10 The fn:min, fn:max, fn:avg, and fn:sum functions[FS].
Notes:
If the converted sequence contains exactly one value then that value is returned.
The default type when the fn:min function is applied to xs:untypedAtomic values is xs:double. This differs from the default type for operators such as gt, and for sorting in XQuery and XSLT, which is xs:string.
Provides a client interface to a server function. See fn:min
arg - The sequence of values whose minimum will be returned.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsIntegerExpr minutesFromDateTime(XsDateTimeExpr arg)
Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of arg.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:minutes-from-dateTime
arg - The dateTime whose minutes component will be returned.XsIntegerExpr minutesFromDuration(XsDurationExpr arg)
Returns an xs:integer representing the minutes component in the canonical lexical representation of the value of arg. The result may be negative.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:minutes-from-duration
arg - The duration whose minute component will be returned.XsIntegerExpr minutesFromTime(XsTimeExpr arg)
Returns an xs:integer value between 0 to 59, both inclusive, representing the value of the minutes component in the localized value of arg.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:minutes-from-time
arg - The time whose minutes component will be returned.XsIntegerExpr monthFromDate(XsDateExpr arg)
Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of arg.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:month-from-date
arg - The date whose month component will be returned.XsIntegerExpr monthFromDateTime(XsDateTimeExpr arg)
Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of arg.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:month-from-dateTime
arg - The dateTime whose month component will be returned.XsIntegerExpr monthsFromDuration(XsDurationExpr arg)
Returns an xs:integer representing the months component in the canonical lexical representation of the value of arg. The result may be negative.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:months-from-duration
arg - The duration whose month component will be returned.XsStringExpr name(NodeExpr arg)
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.
If the argument is omitted, it defaults to the context node. If the context item is undefined an error is raised: [err:XPDY002]. If the context item is not a node an error is raised: [err:XPTY0004].
If the argument is supplied and is the empty sequence, the function returns the zero-length string.
If the target node has no name (that is, if it is a document node, a comment, a text node, or a namespace node having no name), the function returns the zero-length string.
If the specified node was created with a namespace prefix, that namespace prefix is returned with the element localname (for example, a:hello). Note that the namespace prefix is not always the same prefix that would be returned if you serialized the QName of the node, as the serialized QName will use the namespace from the XQuery context in which it was serialized.
Provides a client interface to a server function. See fn:name
arg - The node whose name is to be returned.XsAnyURIExpr namespaceUri(NodeExpr arg)
Returns the namespace URI of the xs:QName of the node specified by arg.
If the argument is omitted, it defaults to the context node. If the context item is undefined an error is raised: [err:XPDY0002]. If the context item is not a node an error is raised: [err:XPTY0004].
If arg is the empty sequence, the xs:anyURI corresponding to the zero-length string is returned.
If arg is neither an element nor an attribute node, or if it is an element or attribute node whose expanded-QName (as determined by the dm:node-name accessor in the Section 5.11 node-name Accessor[DM]) is in no namespace, then the function returns the xs:anyURI corresponding to the zero-length string.
Provides a client interface to a server function. See fn:namespace-uri
arg - The node whose namespace URI is to be returned.XsAnyURIExpr namespaceUriForPrefix(XsStringExpr prefix, ElementNodeExpr element)
Returns the namespace URI of one of the in-scope namespaces for element, identified by its namespace prefix.
If element has an in-scope namespace whose namespace prefix is equal to prefix, it returns the namespace URI of that namespace. If prefix 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.
Prefixes are equal only if their Unicode code points match exactly.
Provides a client interface to a server function. See fn:namespace-uri-for-prefix
prefix - A namespace prefix to look up.element - An element node providing namespace context.XsAnyURIExpr namespaceUriFromQName(XsQNameExpr arg)
Returns the namespace URI for arg as an xs:string. If arg is the empty sequence, the empty sequence is returned. If arg is in no namespace, the zero-length string is returned.
Provides a client interface to a server function. See fn:namespace-uri-from-QName
arg - A qualified name.XsBooleanExpr nilled(NodeExpr arg)
Summary: Returns an xs:boolean indicating whether the argument node is “nilled”. If the argument is not an element node, returns the empty sequence. If the argument is the empty sequence, returns the empty sequence. For element nodes, true() is returned if the element is nilled, otherwise false().
Elements may be defined in a schema as nillable, which allows an empty instance of an element to a appear in a document even though its type requires that it always have some content. Nilled elements should always be empty but an element is not considered nilled just because it’s empty. It must also have the type annotation attribute xsi:nil=“true”.
Provides a client interface to a server function. See fn:nilled
arg - The node to test for nilled status.XsQNameExpr nodeName(NodeExpr arg)
Returns an expanded-QName for node kinds that can have names. For other kinds of nodes it returns the empty sequence. If arg is the empty sequence, the empty sequence is returned.
Provides a client interface to a server function. See fn:node-name
arg - The node whose name is to be returned.XsStringExpr normalizeSpace(XsStringExpr input)
Returns the specified string with normalized whitespace, which strips off any leading or trailing whitespace and replaces any other sequences of more than one whitespace characters with a single space character (#x20).
Provides a client interface to a server function. See fn:normalize-space
input - The string from which to normalize whitespace.XsStringExpr normalizeUnicode(XsStringExpr arg)
Return the argument normalized according to the normalization criteria for a normalization form identified by the value of normalizationForm. The effective value of the normalizationForm is computed by removing leading and trailing blanks, if present, and converting to upper case.
Provides a client interface to a server function. See fn:normalize-unicode
arg - The string to normalize.XsStringExpr normalizeUnicode(XsStringExpr arg, String normalizationForm)
Return the argument normalized according to the normalization criteria for a normalization form identified by the value of normalizationForm. The effective value of the normalizationForm is computed by removing leading and trailing blanks, if present, and converting to upper case.
Provides a client interface to a server function. See fn:normalize-unicode
arg - The string to normalize.normalizationForm - The form under which to normalize the specified string: NFC, NFD, NFKC, or NFKD.XsStringExpr normalizeUnicode(XsStringExpr arg, XsStringExpr normalizationForm)
Return the argument normalized according to the normalization criteria for a normalization form identified by the value of normalizationForm. The effective value of the normalizationForm is computed by removing leading and trailing blanks, if present, and converting to upper case.
Provides a client interface to a server function. See fn:normalize-unicode
arg - The string to normalize.normalizationForm - The form under which to normalize the specified string: NFC, NFD, NFKC, or NFKD.XsBooleanExpr not(ItemSeqExpr arg)
Returns true if the effective boolean value is false, and false if the effective boolean value is true. The arg parameter is first reduced to an effective boolean value by applying the fn:boolean function.
Provides a client interface to a server function. See fn:not
arg - The expression to negate.XsDoubleExpr number(XsAnyAtomicTypeExpr arg)
Returns the value indicated by arg or, if arg is not specified, the context item after atomization, converted to an xs:double. If arg is the empty sequence or if arg or the context item cannot be converted to an xs:double, the xs:double value NaN is returned. If the context item is undefined an error is raised: [err:XPDY0002].
Calling the zero-argument version of the function is defined to give the same result as calling the single-argument version with an argument of “.”. That is, fn:number() is equivalent to fn:number(.).
If arg is the empty sequence, NaN is returned. Otherwise, arg, or the context item after atomization, is converted to an xs:double following the rules of 17.1.3.2 Casting to xs:double. If the conversion to xs:double fails, the xs:double value NaN is returned.
Provides a client interface to a server function. See fn:number
arg - The value to be returned as an xs:double value.XsNCNameExpr prefixFromQName(XsQNameExpr arg)
Returns an xs:NCName representing the prefix of arg. The empty sequence is returned if arg is the empty sequence or if the value of arg contains no prefix.
Provides a client interface to a server function. See fn:prefix-from-QName
arg - A qualified name.XsQNameExpr QName(XsStringExpr paramURI, String paramQName)
Returns an xs:QName with the namespace URI given in paramURI. If paramURI is the zero-length string or the empty sequence, it represents “no namespace”; in this case, if the value of paramQName contains a colon (:), an error is raised [err:FOCA0002]. The prefix (or absence of a prefix) in paramQName is retained in the returned xs:QName value. The local name in the result is taken from the local part of paramQName.
Provides a client interface to a server function. See fn:QName
paramURI - A namespace URI, as a string.paramQName - A lexical qualified name (xs:QName), a string of the form “prefix:localname” or “localname”.XsQNameExpr QName(XsStringExpr paramURI, XsStringExpr paramQName)
Returns an xs:QName with the namespace URI given in paramURI. If paramURI is the zero-length string or the empty sequence, it represents “no namespace”; in this case, if the value of paramQName contains a colon (:), an error is raised [err:FOCA0002]. The prefix (or absence of a prefix) in paramQName is retained in the returned xs:QName value. The local name in the result is taken from the local part of paramQName.
Provides a client interface to a server function. See fn:QName
paramURI - A namespace URI, as a string.paramQName - A lexical qualified name (xs:QName), a string of the form “prefix:localname” or “localname”.ItemSeqExpr remove(ItemSeqExpr target, long position)
Returns a new sequence constructed from the value of target with the item at the position specified by the value of position removed.
If position is less than 1 or greater than the number of items in target, target is returned. Otherwise, the value returned by the function consists of all items of target whose index is less than position, followed by all items of target whose index is greater than position. If target is the empty sequence, the empty sequence is returned.
For detailed type semantics, see Section 7.2.11 The fn:remove function[FS].
Provides a client interface to a server function. See fn:remove
target - The sequence of items from which items will be removed.position - The position in the target sequence from which the items will be removed.ItemSeqExpr remove(ItemSeqExpr target, XsIntegerExpr position)
Returns a new sequence constructed from the value of target with the item at the position specified by the value of position removed.
If position is less than 1 or greater than the number of items in target, target is returned. Otherwise, the value returned by the function consists of all items of target whose index is less than position, followed by all items of target whose index is greater than position. If target is the empty sequence, the empty sequence is returned.
For detailed type semantics, see Section 7.2.11 The fn:remove function[FS].
Provides a client interface to a server function. See fn:remove
target - The sequence of items from which items will be removed.position - The position in the target sequence from which the items will be removed.XsStringExpr replace(XsStringExpr input, String pattern, String replacement)
Returns a string constructed by replacing the specified pattern on the input string with the specified replacement string.
Provides a client interface to a server function. See fn:replace
input - The string to start with.pattern - The regular expression pattern to match. If the pattern does not match the $input string, the function will return the $input string unchanged.replacement - The regular expression pattern to replace the $pattern with. It can also be a capture expression (for more details, see http://www.w3.org/TR/xpath-functions/#func-replace).XsStringExpr replace(XsStringExpr input, XsStringExpr pattern, XsStringExpr replacement)
Returns a string constructed by replacing the specified pattern on the input string with the specified replacement string.
Provides a client interface to a server function. See fn:replace
input - The string to start with.pattern - The regular expression pattern to match. If the pattern does not match the $input string, the function will return the $input string unchanged.replacement - The regular expression pattern to replace the $pattern with. It can also be a capture expression (for more details, see http://www.w3.org/TR/xpath-functions/#func-replace).XsStringExpr replace(XsStringExpr input, String pattern, String replacement, String flags)
Returns a string constructed by replacing the specified pattern on the input string with the specified replacement string.
Provides a client interface to a server function. See fn:replace
input - The string to start with.pattern - The regular expression pattern to match. If the pattern does not match the $input string, the function will return the $input string unchanged.replacement - The regular expression pattern to replace the $pattern with. It can also be a capture expression (for more details, see http://www.w3.org/TR/xpath-functions/#func-replace).flags - The flag representing how to interpret the regular expression. One of “s”, “m”, “i”, or “x”, as defined in http://www.w3.org/TR/xpath-functions/#flags.XsStringExpr replace(XsStringExpr input, XsStringExpr pattern, XsStringExpr replacement, XsStringExpr flags)
Returns a string constructed by replacing the specified pattern on the input string with the specified replacement string.
Provides a client interface to a server function. See fn:replace
input - The string to start with.pattern - The regular expression pattern to match. If the pattern does not match the $input string, the function will return the $input string unchanged.replacement - The regular expression pattern to replace the $pattern with. It can also be a capture expression (for more details, see http://www.w3.org/TR/xpath-functions/#func-replace).flags - The flag representing how to interpret the regular expression. One of “s”, “m”, “i”, or “x”, as defined in http://www.w3.org/TR/xpath-functions/#flags.XsQNameExpr resolveQName(XsStringExpr qname, ElementNodeExpr element)
Returns an xs:QName value (that is, an expanded QName) by taking an xs:string that has the lexical form of an xs:QName (a string in the form “prefix:local-name” or “local-name”) and resolving it using the in-scope namespaces for a given element.
Provides a client interface to a server function. See fn:resolve-QName
qname - A string of the form “prefix:local-name”.element - An element providing the in-scope namespaces to use to resolve the qualified name.XsAnyURIExpr resolveUri(XsStringExpr relative, String base)
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 fn:resolve-uri
relative - A URI reference to resolve against the base.base - An absolute URI to use as the base of the resolution.XsAnyURIExpr resolveUri(XsStringExpr relative, XsStringExpr base)
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 fn:resolve-uri
relative - A URI reference to resolve against the base.base - An absolute URI to use as the base of the resolution.ItemSeqExpr reverse(ItemSeqExpr target)
Reverses the order of items in a sequence. If $arg is the empty sequence, the empty sequence is returned.
For detailed type semantics, see Section 7.2.12 The fn:reverse function[FS].
Provides a client interface to a server function. See fn:reverse
target - The sequence of items to be reversed.NodeExpr root(NodeExpr arg)
Returns the root of the tree to which arg belongs. This will usually, but not necessarily, be a document node.
If arg is the empty sequence, the empty sequence is returned.
If arg is a document node, arg is returned.
If the function is called without an argument, the context item is used as the default argument. If the context item is undefined an error is raised: [err:XPDY0002]. If the context item is not a node an error is raised: [err:XPTY0004].
Provides a client interface to a server function. See fn:root
arg - The node whose root node will be returned.XsNumericExpr round(XsNumericExpr arg)
Returns the number with no fractional part that is closest to the argument. If there are two such numbers, then the one that is closest to positive infinity is returned. If type of arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of arg. If the type of arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.
For xs:float and xs:double arguments, if the argument is positive infinity, then positive infinity is returned. If the argument is negative infinity, then negative infinity is returned. If the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned. If the argument is less than zero, but greater than or equal to -0.5, then negative zero is returned. In the cases where positive zero or negative zero is returned, negative zero or positive zero may be returned as [XML Schema Part 2: Datatypes Second Edition] does not distinguish between the values positive zero and negative zero.
For the last two cases, note that the result is not the same as fn:floor(x+0.5).
For detailed type semantics, see Section 7.2.3 The fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions[FS].
Provides a client interface to a server function. See fn:round
arg - A numeric value to round.XsNumericExpr roundHalfToEven(XsNumericExpr arg)
The value returned is the nearest (that is, numerically closest) numeric to arg that is a multiple of ten to the power of minus precision. If two such values are equally near (e.g. if the fractional part in arg is exactly .500…), returns the one whose least significant digit is even. If type of arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of arg. If the type of arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.
If no precision is specified, the result produces is the same as with precision=0.
For arguments of type xs:float and xs:double, if the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned. If the argument is less than zero, but greater than or equal o -0.5, then negative zero is returned.
If arg is of type xs:float or xs:double, rounding occurs on the value of the mantissa computed with exponent = 0.
For detailed type semantics, see Section 7.2.3 The fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions[FS].
Provides a client interface to a server function. See fn:round-half-to-even
arg - A numeric value to round.XsNumericExpr roundHalfToEven(XsNumericExpr arg, long precision)
The value returned is the nearest (that is, numerically closest) numeric to arg that is a multiple of ten to the power of minus precision. If two such values are equally near (e.g. if the fractional part in arg is exactly .500…), returns the one whose least significant digit is even. If type of arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of arg. If the type of arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.
If no precision is specified, the result produces is the same as with precision=0.
For arguments of type xs:float and xs:double, if the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned. If the argument is less than zero, but greater than or equal o -0.5, then negative zero is returned.
If arg is of type xs:float or xs:double, rounding occurs on the value of the mantissa computed with exponent = 0.
For detailed type semantics, see Section 7.2.3 The fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions[FS].
Provides a client interface to a server function. See fn:round-half-to-even
arg - A numeric value to round.precision - The precision to which to round the value.XsNumericExpr roundHalfToEven(XsNumericExpr arg, XsIntegerExpr precision)
The value returned is the nearest (that is, numerically closest) numeric to arg that is a multiple of ten to the power of minus precision. If two such values are equally near (e.g. if the fractional part in arg is exactly .500…), returns the one whose least significant digit is even. If type of arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of arg. If the type of arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.
If no precision is specified, the result produces is the same as with precision=0.
For arguments of type xs:float and xs:double, if the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned. If the argument is less than zero, but greater than or equal o -0.5, then negative zero is returned.
If arg is of type xs:float or xs:double, rounding occurs on the value of the mantissa computed with exponent = 0.
For detailed type semantics, see Section 7.2.3 The fn:abs, fn:ceiling, fn:floor, fn:round, and fn:round-half-to-even functions[FS].
Provides a client interface to a server function. See fn:round-half-to-even
arg - A numeric value to round.precision - The precision to which to round the value.XsDecimalExpr secondsFromDateTime(XsDateTimeExpr arg)
Returns an xs:decimal value between 0 and 60.999…, both inclusive representing the seconds and fractional seconds in the localized value of arg. Note that the value can be greater than 60 seconds to accommodate occasional leap seconds used to keep human time synchronized with the rotation of the planet.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:seconds-from-dateTime
arg - The dateTime whose seconds component will be returned.XsDecimalExpr secondsFromDuration(XsDurationExpr arg)
Returns an xs:decimal representing the seconds component in the canonical lexical representation of the value of arg. The result may be negative.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:seconds-from-duration
arg - The duration whose minute component will be returned.XsDecimalExpr secondsFromTime(XsTimeExpr arg)
Returns an xs:decimal value between 0 and 60.999…, both inclusive, representing the seconds and fractional seconds in the localized value of arg. Note that the value can be greater than 60 seconds to accommodate occasional leap seconds used to keep human time synchronized with the rotation of the planet.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:seconds-from-time
arg - The time whose seconds component will be returned.XsBooleanExpr startsWith(XsStringExpr parameter1, String parameter2)
Returns true if the first parameter starts with the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:starts-with
parameter1 - The string from which to test.parameter2 - The string to test whether it is at the beginning of the first parameter.XsBooleanExpr startsWith(XsStringExpr parameter1, XsStringExpr parameter2)
Returns true if the first parameter starts with the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:starts-with
parameter1 - The string from which to test.parameter2 - The string to test whether it is at the beginning of the first parameter.XsBooleanExpr startsWith(XsStringExpr parameter1, String parameter2, String collation)
Returns true if the first parameter starts with the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:starts-with
parameter1 - The string from which to test.parameter2 - The string to test whether it is at the beginning of the first parameter.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsBooleanExpr startsWith(XsStringExpr parameter1, XsStringExpr parameter2, XsStringExpr collation)
Returns true if the first parameter starts with the string from the second parameter, otherwise returns false.
Provides a client interface to a server function. See fn:starts-with
parameter1 - The string from which to test.parameter2 - The string to test whether it is at the beginning of the first parameter.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsStringExpr string(ItemExpr arg)
Returns the value of arg represented as an xs:string. If no argument is supplied, this function returns the string value of the context item (.).
Provides a client interface to a server function. See fn:string
arg - The item to be rendered as a string.XsStringExpr stringJoin(XsStringSeqExpr parameter1, String parameter2)
Returns an xs:string created by concatenating the members of the parameter1 sequence using parameter2 as a separator. If the value of $arg2 is the zero-length string, then the members of parameter1 are concatenated without a separator.
If the value of parameter1 is the empty sequence, the zero-length string is returned.
Provides a client interface to a server function. See fn:string-join
parameter1 - A sequence of strings.parameter2 - A separator string to concatenate between the items in $parameter1.XsStringExpr stringJoin(XsStringSeqExpr parameter1, XsStringExpr parameter2)
Returns an xs:string created by concatenating the members of the parameter1 sequence using parameter2 as a separator. If the value of $arg2 is the zero-length string, then the members of parameter1 are concatenated without a separator.
If the value of parameter1 is the empty sequence, the zero-length string is returned.
Provides a client interface to a server function. See fn:string-join
parameter1 - A sequence of strings.parameter2 - A separator string to concatenate between the items in $parameter1.XsIntegerExpr stringLength(XsStringExpr sourceString)
Returns an integer representing the length of the specified string. The length is 1-based, so a string that is one character long returns a value of 1.
Provides a client interface to a server function. See fn:string-length
sourceString - The string to calculate the length.XsIntegerSeqExpr stringToCodepoints(XsStringExpr arg)
Returns the sequence of Unicode code points that constitute an xs:string. If arg is a zero-length string or the empty sequence, the empty sequence is returned.
Provides a client interface to a server function. See fn:string-to-codepoints
arg - A string.ItemSeqExpr subsequence(ItemSeqExpr sourceSeq, double startingLoc)
Returns the contiguous sequence of items in the value of sourceSeq beginning at the position indicated by the value of startingLoc and continuing for the number of items indicated by the value of length.
In the two-argument case, returns:
sourceSeq[fn:round(startingLoc) le $p]
In the three-argument case, returns:
sourceSeq[fn:round(startingLoc) le $p and $p lt fn:round(startingLoc) + fn:round(length)]
Notes:
If sourceSeq is the empty sequence, the empty sequence is returned.
If startingLoc is zero or negative, the subsequence includes items from the beginning of the sourceSeq.
If length is not specified, the subsequence includes items to the end of sourceSeq.
If length is greater than the number of items in the value of sourceSeq following startingLoc, the subsequence includes items to the end of sourceSeq.
The first item of a sequence is located at position 1, not position 0.
For detailed type semantics, see Section 7.2.13 The fn:subsequence functionFS.
The reason the function accepts arguments of type xs:double is that many computations on untyped data return an xs:double result; and the reason for the rounding rules is to compensate for any imprecision in these floating-point computations.
Provides a client interface to a server function. See fn:subsequence
sourceSeq - The sequence of items from which a subsequence will be selected.startingLoc - The starting position of the start of the subsequence.ItemSeqExpr subsequence(ItemSeqExpr sourceSeq, XsNumericExpr startingLoc)
Returns the contiguous sequence of items in the value of sourceSeq beginning at the position indicated by the value of startingLoc and continuing for the number of items indicated by the value of length.
In the two-argument case, returns:
sourceSeq[fn:round(startingLoc) le $p]
In the three-argument case, returns:
sourceSeq[fn:round(startingLoc) le $p and $p lt fn:round(startingLoc) + fn:round(length)]
Notes:
If sourceSeq is the empty sequence, the empty sequence is returned.
If startingLoc is zero or negative, the subsequence includes items from the beginning of the sourceSeq.
If length is not specified, the subsequence includes items to the end of sourceSeq.
If length is greater than the number of items in the value of sourceSeq following startingLoc, the subsequence includes items to the end of sourceSeq.
The first item of a sequence is located at position 1, not position 0.
For detailed type semantics, see Section 7.2.13 The fn:subsequence functionFS.
The reason the function accepts arguments of type xs:double is that many computations on untyped data return an xs:double result; and the reason for the rounding rules is to compensate for any imprecision in these floating-point computations.
Provides a client interface to a server function. See fn:subsequence
sourceSeq - The sequence of items from which a subsequence will be selected.startingLoc - The starting position of the start of the subsequence.ItemSeqExpr subsequence(ItemSeqExpr sourceSeq, double startingLoc, double length)
Returns the contiguous sequence of items in the value of sourceSeq beginning at the position indicated by the value of startingLoc and continuing for the number of items indicated by the value of length.
In the two-argument case, returns:
sourceSeq[fn:round(startingLoc) le $p]
In the three-argument case, returns:
sourceSeq[fn:round(startingLoc) le $p and $p lt fn:round(startingLoc) + fn:round(length)]
Notes:
If sourceSeq is the empty sequence, the empty sequence is returned.
If startingLoc is zero or negative, the subsequence includes items from the beginning of the sourceSeq.
If length is not specified, the subsequence includes items to the end of sourceSeq.
If length is greater than the number of items in the value of sourceSeq following startingLoc, the subsequence includes items to the end of sourceSeq.
The first item of a sequence is located at position 1, not position 0.
For detailed type semantics, see Section 7.2.13 The fn:subsequence functionFS.
The reason the function accepts arguments of type xs:double is that many computations on untyped data return an xs:double result; and the reason for the rounding rules is to compensate for any imprecision in these floating-point computations.
Provides a client interface to a server function. See fn:subsequence
sourceSeq - The sequence of items from which a subsequence will be selected.startingLoc - The starting position of the start of the subsequence.length - The length of the subsequence.ItemSeqExpr subsequence(ItemSeqExpr sourceSeq, XsNumericExpr startingLoc, XsNumericExpr length)
Returns the contiguous sequence of items in the value of sourceSeq beginning at the position indicated by the value of startingLoc and continuing for the number of items indicated by the value of length.
In the two-argument case, returns:
sourceSeq[fn:round(startingLoc) le $p]
In the three-argument case, returns:
sourceSeq[fn:round(startingLoc) le $p and $p lt fn:round(startingLoc) + fn:round(length)]
Notes:
If sourceSeq is the empty sequence, the empty sequence is returned.
If startingLoc is zero or negative, the subsequence includes items from the beginning of the sourceSeq.
If length is not specified, the subsequence includes items to the end of sourceSeq.
If length is greater than the number of items in the value of sourceSeq following startingLoc, the subsequence includes items to the end of sourceSeq.
The first item of a sequence is located at position 1, not position 0.
For detailed type semantics, see Section 7.2.13 The fn:subsequence functionFS.
The reason the function accepts arguments of type xs:double is that many computations on untyped data return an xs:double result; and the reason for the rounding rules is to compensate for any imprecision in these floating-point computations.
Provides a client interface to a server function. See fn:subsequence
sourceSeq - The sequence of items from which a subsequence will be selected.startingLoc - The starting position of the start of the subsequence.length - The length of the subsequence.XsStringExpr substring(XsStringExpr sourceString, double startingLoc)
Returns a substring starting from the startingLoc and continuing for length characters.
Provides a client interface to a server function. See fn:substring
sourceString - The string from which to create a substring.startingLoc - The number of characters from the start of the $sourceString.XsStringExpr substring(XsStringExpr sourceString, XsNumericExpr startingLoc)
Returns a substring starting from the startingLoc and continuing for length characters.
Provides a client interface to a server function. See fn:substring
sourceString - The string from which to create a substring.startingLoc - The number of characters from the start of the $sourceString.XsStringExpr substring(XsStringExpr sourceString, double startingLoc, double length)
Returns a substring starting from the startingLoc and continuing for length characters.
Provides a client interface to a server function. See fn:substring
sourceString - The string from which to create a substring.startingLoc - The number of characters from the start of the $sourceString.length - The number of characters beyond the $startingLoc.XsStringExpr substring(XsStringExpr sourceString, XsNumericExpr startingLoc, XsNumericExpr length)
Returns a substring starting from the startingLoc and continuing for length characters.
Provides a client interface to a server function. See fn:substring
sourceString - The string from which to create a substring.startingLoc - The number of characters from the start of the $sourceString.length - The number of characters beyond the $startingLoc.XsStringExpr substringAfter(XsStringExpr input, String after)
Returns the substring created by taking all of the input characters that occur after the specified after characters.
Provides a client interface to a server function. See fn:substring-after
input - The string from which to create the substring.after - The string after which the substring is created.XsStringExpr substringAfter(XsStringExpr input, XsStringExpr after)
Returns the substring created by taking all of the input characters that occur after the specified after characters.
Provides a client interface to a server function. See fn:substring-after
input - The string from which to create the substring.after - The string after which the substring is created.XsStringExpr substringAfter(XsStringExpr input, String after, String collation)
Returns the substring created by taking all of the input characters that occur after the specified after characters.
Provides a client interface to a server function. See fn:substring-after
input - The string from which to create the substring.after - The string after which the substring is created.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsStringExpr substringAfter(XsStringExpr input, XsStringExpr after, XsStringExpr collation)
Returns the substring created by taking all of the input characters that occur after the specified after characters.
Provides a client interface to a server function. See fn:substring-after
input - The string from which to create the substring.after - The string after which the substring is created.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsStringExpr substringBefore(XsStringExpr input, String before)
Returns the substring created by taking all of the input characters that occur before the specified before characters.
Provides a client interface to a server function. See fn:substring-before
input - The string from which to create the substring.before - The string before which the substring is created.XsStringExpr substringBefore(XsStringExpr input, XsStringExpr before)
Returns the substring created by taking all of the input characters that occur before the specified before characters.
Provides a client interface to a server function. See fn:substring-before
input - The string from which to create the substring.before - The string before which the substring is created.XsStringExpr substringBefore(XsStringExpr input, String before, String collation)
Returns the substring created by taking all of the input characters that occur before the specified before characters.
Provides a client interface to a server function. See fn:substring-before
input - The string from which to create the substring.before - The string before which the substring is created.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsStringExpr substringBefore(XsStringExpr input, XsStringExpr before, XsStringExpr collation)
Returns the substring created by taking all of the input characters that occur before the specified before characters.
Provides a client interface to a server function. See fn:substring-before
input - The string from which to create the substring.before - The string before which the substring is created.collation - The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer’s Guide.XsAnyAtomicTypeExpr sum(XsAnyAtomicTypeSeqExpr arg)
Returns a value obtained by adding together the values in arg. If zero is not specified, then the value returned for an empty sequence is the xs:integer value 0. If zero is specified, then the value returned for an empty sequence is zero.
Any values of type xs:untypedAtomic in arg are cast to xs:double. The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.
If the converted sequence is empty, then the single-argument form of the function returns the xs:integer value 0; the two-argument form returns the value of the argument zero.
If the converted sequence contains the value NaN, NaN is returned.
All items in arg must be numeric or derived from a single base type. In addition, the type must support addition. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values. For numeric values, the numeric promotion rules defined in 6.2 Operators on Numeric Values are used to promote all values to a single common type. The sum of a sequence of integers will therefore be an integer, while the sum of a numeric sequence that includes at least one xs:double will be an xs:double.
If the above conditions are not met, a type error is raised [err:FORG0006].
Otherwise, the result of the function, using the second signature, is the result of the expression:
if (fn:count($c) eq 0) then zero else if (fn:count($c) eq 1) then $c[1] else $c[1] + fn:sum(subsequence($c, 2))
where $c is the converted sequence.
The result of the function, using the first signature, is the result of the expression:fn:sum(arg, 0).
For detailed type semantics, see Section 7.2.10 The fn:min, fn:max, fn:avg, and fn:sum functions[FS].
Notes:
The second argument allows an appropriate value to be defined to represent the sum of an empty sequence. For example, when summing a sequence of durations it would be appropriate to return a zero-length duration of the appropriate type. This argument is necessary because a system that does dynamic typing cannot distinguish “an empty sequence of integers”, for example, from “an empty sequence of durations”.
If the converted sequence contains exactly one value then that value is returned.
Provides a client interface to a server function. See fn:sum
arg - The sequence of values to be summed.XsAnyAtomicTypeExpr sum(XsAnyAtomicTypeSeqExpr arg, String zero)
Returns a value obtained by adding together the values in arg. If zero is not specified, then the value returned for an empty sequence is the xs:integer value 0. If zero is specified, then the value returned for an empty sequence is zero.
Any values of type xs:untypedAtomic in arg are cast to xs:double. The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.
If the converted sequence is empty, then the single-argument form of the function returns the xs:integer value 0; the two-argument form returns the value of the argument zero.
If the converted sequence contains the value NaN, NaN is returned.
All items in arg must be numeric or derived from a single base type. In addition, the type must support addition. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values. For numeric values, the numeric promotion rules defined in 6.2 Operators on Numeric Values are used to promote all values to a single common type. The sum of a sequence of integers will therefore be an integer, while the sum of a numeric sequence that includes at least one xs:double will be an xs:double.
If the above conditions are not met, a type error is raised [err:FORG0006].
Otherwise, the result of the function, using the second signature, is the result of the expression:
if (fn:count($c) eq 0) then zero else if (fn:count($c) eq 1) then $c[1] else $c[1] + fn:sum(subsequence($c, 2))
where $c is the converted sequence.
The result of the function, using the first signature, is the result of the expression:fn:sum(arg, 0).
For detailed type semantics, see Section 7.2.10 The fn:min, fn:max, fn:avg, and fn:sum functions[FS].
Notes:
The second argument allows an appropriate value to be defined to represent the sum of an empty sequence. For example, when summing a sequence of durations it would be appropriate to return a zero-length duration of the appropriate type. This argument is necessary because a system that does dynamic typing cannot distinguish “an empty sequence of integers”, for example, from “an empty sequence of durations”.
If the converted sequence contains exactly one value then that value is returned.
Provides a client interface to a server function. See fn:sum
arg - The sequence of values to be summed.zero - The value to return as zero if the input sequence is the empty sequence. This parameter is not available in the 0.9-ml XQuery dialect.XsAnyAtomicTypeExpr sum(XsAnyAtomicTypeSeqExpr arg, XsAnyAtomicTypeExpr zero)
Returns a value obtained by adding together the values in arg. If zero is not specified, then the value returned for an empty sequence is the xs:integer value 0. If zero is specified, then the value returned for an empty sequence is zero.
Any values of type xs:untypedAtomic in arg are cast to xs:double. The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.
If the converted sequence is empty, then the single-argument form of the function returns the xs:integer value 0; the two-argument form returns the value of the argument zero.
If the converted sequence contains the value NaN, NaN is returned.
All items in arg must be numeric or derived from a single base type. In addition, the type must support addition. Duration values must either all be xs:yearMonthDuration values or must all be xs:dayTimeDuration values. For numeric values, the numeric promotion rules defined in 6.2 Operators on Numeric Values are used to promote all values to a single common type. The sum of a sequence of integers will therefore be an integer, while the sum of a numeric sequence that includes at least one xs:double will be an xs:double.
If the above conditions are not met, a type error is raised [err:FORG0006].
Otherwise, the result of the function, using the second signature, is the result of the expression:
if (fn:count($c) eq 0) then zero else if (fn:count($c) eq 1) then $c[1] else $c[1] + fn:sum(subsequence($c, 2))
where $c is the converted sequence.
The result of the function, using the first signature, is the result of the expression:fn:sum(arg, 0).
For detailed type semantics, see Section 7.2.10 The fn:min, fn:max, fn:avg, and fn:sum functions[FS].
Notes:
The second argument allows an appropriate value to be defined to represent the sum of an empty sequence. For example, when summing a sequence of durations it would be appropriate to return a zero-length duration of the appropriate type. This argument is necessary because a system that does dynamic typing cannot distinguish “an empty sequence of integers”, for example, from “an empty sequence of durations”.
If the converted sequence contains exactly one value then that value is returned.
Provides a client interface to a server function. See fn:sum
arg - The sequence of values to be summed.zero - The value to return as zero if the input sequence is the empty sequence. This parameter is not available in the 0.9-ml XQuery dialect.ItemSeqExpr tail(ItemSeqExpr seq)
Returns all but the first item in a sequence. For more details, see XPath 3.0 Functions and Operators.
Provides a client interface to a server function. See fn:tail
seq - The function value.XsDayTimeDurationExpr timezoneFromDate(XsDateExpr arg)
Returns the timezone component of arg if any. If arg has a timezone component, then the result is an xs:dayTimeDuration that indicates deviation from UTC; its value may range from +14:00 to -14:00 hours, both inclusive. Otherwise, the result is the empty sequence.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:timezone-from-date
arg - The date whose timezone component will be returned.XsDayTimeDurationExpr timezoneFromDateTime(XsDateTimeExpr arg)
Returns the timezone component of arg if any. If arg has a timezone component, then the result is an xs:dayTimeDuration that indicates deviation from UTC; its value may range from +14:00 to -14:00 hours, both inclusive. Otherwise, the result is the empty sequence.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:timezone-from-dateTime
arg - The dateTime whose timezone component will be returned.XsDayTimeDurationExpr timezoneFromTime(XsTimeExpr arg)
Returns the timezone component of arg if any. If arg has a timezone component, then the result is an xs:dayTimeDuration that indicates deviation from UTC; its value may range from +14:00 to -14:00 hours, both inclusive. Otherwise, the result is the empty sequence.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:timezone-from-time
arg - The time whose timezone component will be returned.XsStringSeqExpr tokenize(XsStringExpr input, String pattern)
Returns a sequence of strings contructed by breaking the specified input into substrings separated by the specified pattern. The specified pattern is not returned as part of the returned items.
Provides a client interface to a server function. See fn:tokenize
input - The string to tokenize.pattern - The regular expression pattern from which to separate the tokens.XsStringSeqExpr tokenize(XsStringExpr input, XsStringExpr pattern)
Returns a sequence of strings contructed by breaking the specified input into substrings separated by the specified pattern. The specified pattern is not returned as part of the returned items.
Provides a client interface to a server function. See fn:tokenize
input - The string to tokenize.pattern - The regular expression pattern from which to separate the tokens.XsStringSeqExpr tokenize(XsStringExpr input, String pattern, String flags)
Returns a sequence of strings contructed by breaking the specified input into substrings separated by the specified pattern. The specified pattern is not returned as part of the returned items.
Provides a client interface to a server function. See fn:tokenize
input - The string to tokenize.pattern - The regular expression pattern from which to separate the tokens.flags - The flag representing how to interpret the regular expression. One of “s”, “m”, “i”, or “x”, as defined in http://www.w3.org/TR/xpath-functions/#flags.XsStringSeqExpr tokenize(XsStringExpr input, XsStringExpr pattern, XsStringExpr flags)
Returns a sequence of strings contructed by breaking the specified input into substrings separated by the specified pattern. The specified pattern is not returned as part of the returned items.
Provides a client interface to a server function. See fn:tokenize
input - The string to tokenize.pattern - The regular expression pattern from which to separate the tokens.flags - The flag representing how to interpret the regular expression. One of “s”, “m”, “i”, or “x”, as defined in http://www.w3.org/TR/xpath-functions/#flags.XsStringExpr translate(XsStringExpr src, String mapString, String transString)
Returns a string where every character in src that occurs in some position in the mapString is translated into the transString character in the corresponding location of the mapString character.
Provides a client interface to a server function. See fn:translate
src - The string to translate characters.mapString - The string representing characters to be translated.transString - The string representing the characters to which the $mapString characters are translated.XsStringExpr translate(XsStringExpr src, XsStringExpr mapString, XsStringExpr transString)
Returns a string where every character in src that occurs in some position in the mapString is translated into the transString character in the corresponding location of the mapString character.
Provides a client interface to a server function. See fn:translate
src - The string to translate characters.mapString - The string representing characters to be translated.transString - The string representing the characters to which the $mapString characters are translated.XsBooleanExpr trueExpr()
Returns the xs:boolean value true. Equivalent to xs:boolean(“1”).
Provides a client interface to a server function. See fn:true
ItemSeqExpr unordered(ItemSeqExpr sourceSeq)
Returns the items of sourceSeq in an implementation dependent order.
Note:
Query optimizers may be able to do a better job if the order of the output sequence is not specified. For example, when retrieving prices from a purchase order, if an index exists on prices, it may be more efficient to return the prices in index order rather than in document order.
Provides a client interface to a server function. See fn:unordered
sourceSeq - The sequence of items.XsStringExpr upperCase(XsStringExpr string)
Returns the specified string converting all of the characters to upper-case characters. If a character does not have a corresponding upper-case character, then the original character is returned. The upper-case characters are determined using the Unicode Case Mappings.
Provides a client interface to a server function. See fn:upper-case
string - The string to upper-case.XsIntegerExpr yearFromDate(XsDateExpr arg)
Returns an xs:integer representing the year component in the localized value of arg. The result may be negative.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:year-from-date
arg - The date whose year component will be returned.XsIntegerExpr yearFromDateTime(XsDateTimeExpr arg)
Returns an xs:integer representing the year component in the localized value of arg. The result may be negative.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:year-from-dateTime
arg - The dateTime whose year component will be returned.XsIntegerExpr yearsFromDuration(XsDurationExpr arg)
Returns an xs:integer representing the years component in the canonical lexical representation of the value of arg. The result may be negative.
If arg is the empty sequence, returns the empty sequence.
Provides a client interface to a server function. See fn:years-from-duration
arg - The duration whose year component will be returned.Copyright © 2013-2017 MarkLogic Corporation.