--------------------------------
The FunctX XQuery Function Library
--------------------------------
Copyright (C) 2019 Datypic
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
For more information on the FunctX XQuery library, contact contrib
version | 1.0.1 |
functx:add-attributes($elements as element()*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element()*
Adds attributes to XML elements
$elements* | the element(s) to which you wish to add the attribute |
$attrNames* | the name(s) of the attribute(s) to add |
$attrValues* | the value(s) of the attribute(s) to add |
functx:add-months($date as xs:anyAtomicType?, $months as xs:integer) as xs:date?
Adds months to a date
$date? | the date |
$months | the number of months to add |
functx:add-or-update-attributes($elements as element()*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element()*
Adds attributes to XML elements
$elements* | the element(s) to which you wish to add the attribute |
$attrNames* | the name(s) of the attribute(s) to add |
$attrValues* | the value(s) of the attribute(s) to add |
functx:all-whitespace($arg as xs:string?) as xs:boolean
Whether a value is all whitespace or a zero-length string
$arg? | the string (or node) to test |
functx:are-distinct-values($seq as xs:anyAtomicType*) as xs:boolean
Whether all the values in a sequence are distinct
$seq* | the sequence of values |
functx:atomic-type($values as xs:anyAtomicType*) as xs:string*
The built-in type of an atomic value
$values* | the value(s) whose type you want to determine |
functx:avg-empty-is-zero($values as xs:anyAtomicType*, $allNodes as node()*) as xs:double
The average, counting "empty" values as zero
$values* | the values to be averaged |
$allNodes* | the sequence of all nodes to find the average over |
functx:between-exclusive($value as xs:anyAtomicType?, $minValue as xs:anyAtomicType, $maxValue as xs:anyAtomicType) as xs:boolean
Whether a value is between two provided values
$value? | the value to be tested |
$minValue | the minimum value |
$maxValue | the maximum value |
functx:between-inclusive($value as xs:anyAtomicType?, $minValue as xs:anyAtomicType, $maxValue as xs:anyAtomicType) as xs:boolean
Whether a value is between two provided values, or equal to one of them
$value? | the value to be tested |
$minValue | the minimum value |
$maxValue | the maximum value |
functx:camel-case-to-words($arg as xs:string?, $delim as xs:string) as xs:string
Turns a camelCase string into space-separated words
$arg? | the string to modify |
$delim | the delimiter for the words (e.g. a space) |
functx:capitalize-first($arg as xs:string?) as xs:string?
Capitalizes the first character of a string
$arg? | the word or phrase to capitalize |
functx:change-element-names-deep($nodes as node()*, $oldNames as xs:QName*, $newNames as xs:QName*) as node()*
Changes the names of elements in an XML fragment
$nodes* | the element(s) to change |
$oldNames* | the sequence of names to change from |
$newNames* | the sequence of names to change to |
functx:change-element-ns($elements as element()*, $newns as xs:string, $prefix as xs:string) as element()*
Changes the namespace of XML elements
$elements* | the elements to change |
$newns | the new namespace |
$prefix | the prefix to use for the new namespace |
functx:change-element-ns-deep($nodes as node()*, $newns as xs:string, $prefix as xs:string) as node()*
Changes the namespace of XML elements and its descendants
$nodes* | the nodes to change |
$newns | the new namespace |
$prefix | the prefix to use for the new namespace |
functx:chars($arg as xs:string?) as xs:string*
Converts a string to a sequence of characters
$arg? | the string to split |
functx:contains-any-of($arg as xs:string?, $searchStrings as xs:string*) as xs:boolean
Whether a string contains any of a sequence of strings
$arg? | the string to test |
$searchStrings* | the strings to look for |
functx:contains-case-insensitive($arg as xs:string?, $substring as xs:string) as xs:boolean
Whether one string contains another, without regard to case
$arg? | the string to search |
$substring | the substring to find |
functx:contains-word($arg as xs:string?, $word as xs:string) as xs:boolean
Whether one string contains another, as a separate word
$arg? | the string to search |
$word | the word to find |
functx:copy-attributes($copyTo as element(), $copyFrom as element()) as element()
Copies attributes from one element to another
$copyTo | the element to copy attributes to |
$copyFrom | the element to copy attributes from |
functx:date($year as xs:anyAtomicType, $month as xs:anyAtomicType, $day as xs:anyAtomicType) as xs:date
Construct a date from a year, month and day
$year | the year |
$month | the month |
$day | the day |
functx:dateTime($year as xs:anyAtomicType, $month as xs:anyAtomicType, $day as xs:anyAtomicType, $hour as xs:anyAtomicType, $minute as xs:anyAtomicType, $second as xs:anyAtomicType) as xs:dateTime
Construct a date/time from individual components
$year | the year |
$month | the month |
$day | the day |
$hour | the hour |
$minute | the minute |
$second | the second |
functx:day-in-year($date as xs:anyAtomicType?) as xs:integer?
The day of the year (a number between 1 and 366)
$date? | the date |
functx:day-of-week($date as xs:anyAtomicType?) as xs:integer?
The day of the week, from a date
$date? | the date |
functx:day-of-week-abbrev-en($date as xs:anyAtomicType?) as xs:string?
The abbreviated day of the week, from a date, in English
$date? | the date |
functx:day-of-week-name-en($date as xs:anyAtomicType?) as xs:string?
The name of the day of the week, from a date, in English
$date? | the date |
functx:dayTimeDuration($days as xs:decimal?, $hours as xs:decimal?, $minutes as xs:decimal?, $seconds as xs:decimal?) as xs:dayTimeDuration
Construct a dayTimeDuration from a number of days, hours, etc.
$days? | the number of days |
$hours? | the number of hours |
$minutes? | the number of minutes |
$seconds? | the number of seconds |
functx:days-in-month($date as xs:anyAtomicType?) as xs:integer?
Number of days in the month
$date? | the date |
functx:depth-of-node($node as node()?) as xs:integer
The depth (level) of a node in an XML tree
$node? | the node to check |
functx:distinct-attribute-names($nodes as node()*) as xs:string*
The distinct names of all attributes in an XML fragment
$nodes* | the root to start from |
functx:distinct-deep($nodes as node()*) as node()*
The XML nodes with distinct values, taking into account attributes and descendants
$nodes* | the sequence of nodes to test |
functx:distinct-element-names($nodes as node()*) as xs:string*
The distinct names of all elements in an XML fragment
$nodes* | the root(s) to start from |
functx:distinct-element-paths($nodes as node()*) as xs:string*
The distinct paths of all descendant elements in an XML fragment
$nodes* | the root(s) to start from |
functx:distinct-nodes($nodes as node()*) as node()*
The distinct XML nodes in a sequence (by node identity)
$nodes* | the node sequence |
functx:duration-from-timezone($timezone as xs:string) as xs:dayTimeDuration
Converts a timezone like "-05:00" or "Z" into xs:dayTimeDuration
$timezone | the time zone, in (+|-)HH:MM format |
functx:dynamic-path($parent as node(), $path as xs:string) as item()*
Dynamically evaluates a simple XPath path
$parent | the root to start from |
$path | the path expression |
functx:escape-for-regex($arg as xs:string?) as xs:string
Escapes regex special characters
$arg? | the string to escape |
functx:exclusive-or($arg1 as xs:boolean?, $arg2 as xs:boolean?) as xs:boolean?
Whether one (and only one) of two boolean values is true
$arg1? | the first boolean value |
$arg2? | the second boolean value |
functx:first-day-of-month($date as xs:anyAtomicType?) as xs:date?
The first day of the month of a date
$date? | the date |
functx:first-day-of-year($date as xs:anyAtomicType?) as xs:date?
The first day of the year of a date
$date? | the date |
functx:first-node($nodes as node()*) as node()?
The XML node in a sequence that appears first in document order
$nodes* | the sequence of nodes |
functx:follows-not-descendant($a as node()?, $b as node()?) as xs:boolean
Whether an XML node follows another without being its descendant
$a? | the first node |
$b? | the second node |
functx:format-as-title-en($titles as xs:string*) as xs:string*
Moves title words like "the" and "a" to the end of strings
$titles* | the titles to format |
functx:fragment-from-uri($uri as xs:string?) as xs:string?
Returns the fragment from a URI
$uri? | the URI |
functx:get-matches($string as xs:string?, $regex as xs:string) as xs:string*
Return the matching regions of a string
$string? | the string to split |
$regex | the pattern |
functx:get-matches-and-non-matches($string as xs:string?, $regex as xs:string) as element()*
Splits a string into matching and non-matching regions
$string? | the string to split |
$regex | the pattern |
functx:has-element-only-content($element as element()) as xs:boolean
Whether an element has element-only content
$element | the XML element to test |
functx:has-empty-content($element as element()) as xs:boolean
Whether an element has empty content
$element | the XML element to test |
functx:has-mixed-content($element as element()) as xs:boolean
Whether an element has mixed content
$element | the XML element to test |
functx:has-simple-content($element as element()) as xs:boolean
Whether an element has simple content
$element | the XML element to test |
functx:id-from-element($element as element()?) as xs:string?
Gets the ID of an XML element
$element? | the element |
functx:id-untyped($node as node()*, $id as xs:anyAtomicType) as element()*
Gets XML element(s) that have an attribute with a particular value
$node* | the root node(s) to start from |
$id | the "id" to find |
functx:if-absent($arg as item()*, $value as item()*) as item()*
The first argument if it is not empty, otherwise the second argument
$arg* | the item(s) that may be absent |
$value* | the item(s) to use if the item is absent |
functx:if-empty($arg as item()?, $value as item()*) as item()*
The first argument if it is not blank, otherwise the second argument
$arg? | the node that may be empty |
$value* | the item(s) to use if the node is empty |
functx:index-of-deep-equal-node($nodes as node()*, $nodeToFind as node()) as xs:integer*
The position of a node in a sequence, based on contents and attributes
$nodes* | the node sequence |
$nodeToFind | the node to find in the sequence |
functx:index-of-match-first($arg as xs:string?, $pattern as xs:string) as xs:integer?
The first position of a matching substring
$arg? | the string |
$pattern | the pattern to match |
functx:index-of-node($nodes as node()*, $nodeToFind as node()) as xs:integer*
The position of a node in a sequence, based on node identity
$nodes* | the node sequence |
$nodeToFind | the node to find in the sequence |
functx:index-of-string($arg as xs:string?, $substring as xs:string) as xs:integer*
The position(s) of a substring
$arg? | the string |
$substring | the substring to find |
functx:index-of-string-first($arg as xs:string?, $substring as xs:string) as xs:integer?
The first position of a substring
$arg? | the string |
$substring | the substring to find |
functx:index-of-string-last($arg as xs:string?, $substring as xs:string) as xs:integer?
The last position of a substring
$arg? | the string |
$substring | the substring to find |
functx:insert-string($originalString as xs:string?, $stringToInsert as xs:string?, $pos as xs:integer) as xs:string
Inserts a string at a specified position
$originalString? | the original string to insert into |
$stringToInsert? | the string to insert |
$pos | the position |
functx:is-a-number($value as xs:anyAtomicType?) as xs:boolean
Whether a value is numeric
$value? | the value to test |
functx:is-absolute-uri($uri as xs:string?) as xs:boolean
Whether a URI is absolute
$uri? | the URI to test |
functx:is-ancestor($node1 as node(), $node2 as node()) as xs:boolean
Whether an XML node is an ancestor of another node
$node1 | the first node |
$node2 | the second node |
functx:is-descendant($node1 as node(), $node2 as node()) as xs:boolean
Whether an XML node is a descendant of another node
$node1 | the first node |
$node2 | the second node |
functx:is-leap-year($date as xs:anyAtomicType?) as xs:boolean
Whether a date falls in a leap year
$date? | the date or year |
functx:is-node-among-descendants($node as node()?, $seq as node()*) as xs:boolean
Whether an XML node is among the descendants of a sequence, based on node identity
$node? | the node to test |
$seq* | the sequence of nodes to search |
functx:is-node-among-descendants-deep-equal($node as node()?, $seq as node()*) as xs:boolean
Whether an XML node is among the descendants of a sequence, based on contents and attributes
$node? | the node to test |
$seq* | the sequence of nodes to search |
functx:is-node-in-sequence($node as node()?, $seq as node()*) as xs:boolean
Whether an XML node is in a sequence, based on node identity
$node? | the node to test |
$seq* | the sequence of nodes to search |
functx:is-node-in-sequence-deep-equal($node as node()?, $seq as node()*) as xs:boolean
Whether an XML node is in a sequence, based on contents and attributes
$node? | the node to test |
$seq* | the sequence of nodes to search |
functx:is-value-in-sequence($value as xs:anyAtomicType?, $seq as xs:anyAtomicType*) as xs:boolean
Whether an atomic value appears in a sequence
$value? | the atomic value to test |
$seq* | the sequence of values to search |
functx:last-day-of-month($date as xs:anyAtomicType?) as xs:date?
The last day of the month of a date
$date? | the date |
functx:last-day-of-year($date as xs:anyAtomicType?) as xs:date?
The last day of the month of a date
$date? | the date |
functx:last-node($nodes as node()*) as node()?
The XML node in a sequence that is last in document order
$nodes* | the sequence of nodes |
functx:leaf-elements($root as node()?) as element()*
All XML elements that don't have any child elements
$root? | the root |
functx:left-trim($arg as xs:string?) as xs:string
Trims leading whitespace
$arg? | the string to trim |
functx:line-count($arg as xs:string?) as xs:integer
The number of lines
$arg? | the string to test |
functx:lines($arg as xs:string?) as xs:string*
Split a string into separate lines
$arg? | the string to split |
functx:max-depth($root as node()?) as xs:integer?
The maximum depth of elements in an XML tree
$root? | the root to start from |
functx:max-determine-type($seq as xs:anyAtomicType*) as xs:anyAtomicType?
The maximum value in a sequence, figuring out its type (numeric or string)
$seq* | the sequence of values to test |
functx:max-line-length($arg as xs:string?) as xs:integer?
The maximum line length
$arg? | the string to test |
functx:max-node($nodes as node()*) as node()*
The XML node whose typed value is the maximum
$nodes* | the sequence of nodes to test |
functx:max-string($strings as xs:anyAtomicType*) as xs:string?
The maximum of a sequence of values, treating them like strings
$strings* | the sequence of values |
functx:min-determine-type($seq as xs:anyAtomicType*) as xs:anyAtomicType?
The minimum value in a sequence, figuring out its type (numeric or string)
$seq* | the sequence of values to test |
functx:min-node($nodes as node()*) as node()*
The XML node whose typed value is the minimum
$nodes* | the sequence of nodes to test |
functx:min-non-empty-string($strings as xs:string*) as xs:string?
The minimum of a sequence of strings, ignoring "empty" values
$strings* | the sequence of strings to search |
functx:min-string($strings as xs:anyAtomicType*) as xs:string?
The minimum of a sequence of values, treating them like strings
$strings* | the sequence of strings |
functx:mmddyyyy-to-date($dateString as xs:string?) as xs:date?
Converts a string with format MMDDYYYY (with any delimiters) to a date
$dateString? | the MMDDYYYY string |
functx:month-abbrev-en($date as xs:anyAtomicType?) as xs:string?
The month of a date as an abbreviated word (Jan, Feb, etc.)
$date? | the date |
functx:month-name-en($date as xs:anyAtomicType?) as xs:string?
The month of a date as a word (January, February, etc.)
$date? | the date |
functx:name-test($testname as xs:string?, $names as xs:string*) as xs:boolean
Whether a name matches a list of names or name wildcards
$testname? | the name to test |
$names* | the list of names or name wildcards |
functx:namespaces-in-use($root as node()?) as xs:anyURI*
A list of namespaces used in element/attribute names in an XML fragment
$root? | the root node to start from |
functx:next-day($date as xs:anyAtomicType?) as xs:date?
The next day
$date? | the date |
functx:node-kind($nodes as node()*) as xs:string*
The XML node kind (element, attribute, text, etc.)
$nodes* | the node(s) whose kind you want to determine |
functx:non-distinct-values($seq as xs:anyAtomicType*) as xs:anyAtomicType*
Returns any values that appear more than once in a sequence
$seq* | the sequence of values |
functx:number-of-matches($arg as xs:string?, $pattern as xs:string) as xs:integer
The number of regions that match a pattern
$arg? | the string to test |
$pattern | the regular expression |
functx:open-ref-document($refNode as node()) as document-node()?
Resolves a relative URI and references it, returning an XML document
$refNode | a node whose value is a relative URI reference |
functx:ordinal-number-en($num as xs:integer?) as xs:string
Reformats a number as an ordinal number, e.g. 1st, 2nd, 3rd.
$num? | the number |
functx:pad-integer-to-length($integerToPad as xs:anyAtomicType?, $length as xs:integer) as xs:string
Pads an integer to a desired length by adding leading zeros
$integerToPad? | the integer to pad |
$length | the desired length |
functx:pad-string-to-length($stringToPad as xs:string?, $padChar as xs:string, $length as xs:integer) as xs:string
Pads a string to a desired length
$stringToPad? | the string to pad |
$padChar | the character(s) to use as padding |
$length | the desired length |
functx:path-to-node($nodes as node()*) as xs:string*
A path to an XML node (or sequence of nodes)
$nodes* | the node sequence |
functx:path-to-node-with-pos($node as node()?) as xs:string
A unique path to an XML node (or sequence of nodes)
$node? | the node sequence |
functx:precedes-not-ancestor($a as node()?, $b as node()?) as xs:boolean
Whether an XML node precedes another without being its ancestor
$a? | the first node |
$b? | the second node |
functx:previous-day($date as xs:anyAtomicType?) as xs:date?
The previous day
$date? | the date |
functx:remove-attributes($elements as element()*, $names as xs:string*) as element()*
Removes attributes from an XML element, based on name
$elements* | the element(s) from which to remove the attributes |
$names* | the names of the attributes to remove, or * for all attributes |
functx:remove-attributes-deep($nodes as node()*, $names as xs:string*) as node()*
Removes attributes from an XML fragment, based on name
$nodes* | the root(s) to start from |
$names* | the names of the attributes to remove, or * for all attributes |
functx:remove-elements($elements as element()*, $names as xs:string*) as element()*
Removes child elements from an XML node, based on name
$elements* | the element(s) from which you wish to remove the children |
$names* | the names of the child elements to remove |
functx:remove-elements-deep($nodes as node()*, $names as xs:string*) as node()*
Removes descendant elements from an XML node, based on name
$nodes* | root(s) to start from |
$names* | the names of the elements to remove |
functx:remove-elements-not-contents($nodes as node()*, $names as xs:string*) as node()*
Removes descendant XML elements but keeps their content
$nodes* | the root(s) to start from |
$names* | the names of the elements to remove |
functx:repeat-string($stringToRepeat as xs:string?, $count as xs:integer) as xs:string
Repeats a string a given number of times
$stringToRepeat? | the string to repeat |
$count | the desired number of copies |
functx:replace-beginning($arg as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string
Replaces the beginning of a string, up to a matched pattern
$arg? | the entire string to change |
$pattern | the pattern of characters to replace up to |
$replacement | the replacement string |
functx:replace-element-values($elements as element()*, $values as xs:anyAtomicType*) as element()*
Updates the content of one or more elements
$elements* | the elements whose content you wish to replace |
$values* | the replacement values |
functx:replace-first($arg as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string
Replaces the first match of a pattern
$arg? | the entire string to change |
$pattern | the pattern of characters to replace |
$replacement | the replacement string |
functx:replace-multi($arg as xs:string?, $changeFrom as xs:string*, $changeTo as xs:string*) as xs:string?
Performs multiple replacements, using pairs of replace parameters
$arg? | the string to manipulate |
$changeFrom* | the sequence of strings or patterns to change from |
$changeTo* | the sequence of strings to change to |
functx:reverse-string($arg as xs:string?) as xs:string
Reverses the order of characters
$arg? | the string to reverse |
functx:right-trim($arg as xs:string?) as xs:string
Trims trailing whitespace
$arg? | the string to trim |
functx:scheme-from-uri($uri as xs:string?) as xs:string
Returns the scheme from a URI
$uri? | the URI |
functx:sequence-deep-equal($seq1 as item()*, $seq2 as item()*) as xs:boolean
Whether two sequences have the same XML node content and/or values
$seq1* | the first sequence |
$seq2* | the second sequence |
functx:sequence-node-equal($seq1 as node()*, $seq2 as node()*) as xs:boolean
Whether two sequences contain the same XML nodes, in the same order
$seq1* | the first sequence of nodes |
$seq2* | the second sequence of nodes |
functx:sequence-node-equal-any-order($seq1 as node()*, $seq2 as node()*) as xs:boolean
Whether two sequences contain the same XML nodes, regardless of order
$seq1* | the first sequence of nodes |
$seq2* | the second sequence of nodes |
functx:sequence-type($items as item()*) as xs:string
The sequence type that represents a sequence of nodes or values
$items* | the items whose sequence type you want to determine |
functx:siblings($node as node()?) as node()*
The siblings of an XML node
$node? | the node |
functx:siblings-same-name($element as element()?) as element()*
The siblings of an XML element that have the same name
$element? | the node |
functx:sort($seq as item()*) as item()*
Sorts a sequence of values or nodes
$seq* | the sequence to sort |
functx:sort-as-numeric($seq as item()*) as item()*
Sorts a sequence of numeric values or nodes
$seq* | the sequence to sort |
functx:sort-case-insensitive($seq as item()*) as item()*
Sorts a sequence of values or nodes regardless of capitalization
$seq* | the sequence to sort |
functx:sort-document-order($seq as node()*) as node()*
Sorts a sequence of nodes in document order
$seq* | the sequence to sort |
functx:substring-after-if-contains($arg as xs:string?, $delim as xs:string) as xs:string?
Performs substring-after, returning the entire string if it does not contain the delimiter
$arg? | the string to substring |
$delim | the delimiter |
functx:substring-after-last($arg as xs:string?, $delim as xs:string) as xs:string?
The substring after the last occurrence of a delimiter
$arg? | the string to substring |
$delim | the delimiter |
functx:substring-after-last-match($arg as xs:string?, $regex as xs:string) as xs:string?
The substring after the last text that matches a regex
$arg? | the string to substring |
$regex | the regular expression |
functx:substring-after-match($arg as xs:string?, $regex as xs:string) as xs:string?
The substring after the first text that matches a regex
$arg? | the string to substring |
$regex | the regular expression |
functx:substring-before-if-contains($arg as xs:string?, $delim as xs:string) as xs:string?
Performs substring-before, returning the entire string if it does not contain the delimiter
$arg? | the string to substring |
$delim | the delimiter |
functx:substring-before-last($arg as xs:string?, $delim as xs:string) as xs:string
The substring before the last occurrence of a delimiter
$arg? | the string to substring |
$delim | the delimiter |
functx:substring-before-last-match($arg as xs:string?, $regex as xs:string) as xs:string?
The substring after the first text that matches a regex
$arg? | the string to substring |
$regex | the regular expression |
functx:substring-before-match($arg as xs:string?, $regex as xs:string) as xs:string?
The substring before the last text that matches a regex
$arg? | the string to substring |
$regex | the regular expression |
functx:time($hour as xs:anyAtomicType, $minute as xs:anyAtomicType, $second as xs:anyAtomicType) as xs:time
Construct a time from an hour, minute and second
$hour | the hour |
$minute | the minute |
$second | the second |
functx:timezone-from-duration($duration as xs:dayTimeDuration) as xs:string
Converts an xs:dayTimeDuration into a timezone like "-05:00" or "Z"
$duration | the duration |
functx:total-days-from-duration($duration as xs:dayTimeDuration?) as xs:decimal?
The total number of days in a dayTimeDuration
$duration? | the duration |
functx:total-hours-from-duration($duration as xs:dayTimeDuration?) as xs:decimal?
The total number of hours in a dayTimeDuration
$duration? | the duration |
functx:total-minutes-from-duration($duration as xs:dayTimeDuration?) as xs:decimal?
The total number of minutes in a dayTimeDuration
$duration? | the duration |
functx:total-months-from-duration($duration as xs:yearMonthDuration?) as xs:decimal?
The total number of months in a yearMonthDuration
$duration? | the duration |
functx:total-seconds-from-duration($duration as xs:dayTimeDuration?) as xs:decimal?
The total number of seconds in a dayTimeDuration
$duration? | the duration |
functx:total-years-from-duration($duration as xs:yearMonthDuration?) as xs:decimal?
The total number of years in a yearMonthDuration
$duration? | the duration |
functx:trim($arg as xs:string?) as xs:string
Trims leading and trailing whitespace
$arg? | the string to trim |
functx:update-attributes($elements as element()*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element()*
Updates the attribute value of an XML element
$elements* | the element(s) for which you wish to update the attribute |
$attrNames* | the name(s) of the attribute(s) to add |
$attrValues* | the value(s) of the attribute(s) to add |
functx:value-except($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*
The values in one sequence that aren't in another sequence
$arg1* | the first sequence |
$arg2* | the second sequence |
functx:value-intersect($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*
The intersection of two sequences of values
$arg1* | the first sequence |
$arg2* | the second sequence |
functx:value-union($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*
The union of two sequences of values
$arg1* | the first sequence |
$arg2* | the second sequence |
functx:word-count($arg as xs:string?) as xs:integer
The number of words
$arg? | the string to measure |
functx:words-to-camel-case($arg as xs:string?) as xs:string
Turns a string of words into camelCase
$arg? | the string to modify |
functx:wrap-values-in-elements($values as xs:anyAtomicType*, $elementName as xs:QName) as element()*
Wraps a sequence of atomic values in XML elements
$values* | the values to wrap in elements |
$elementName | the name of the elements to construct |
functx:yearMonthDuration($years as xs:decimal?, $months as xs:integer?) as xs:yearMonthDuration
Construct a yearMonthDuration from a number of years and months
$years? | the number of years |
$months? | the number of months |