2013-12-04T01:28:38.942159+01:001.0http://www.functx.comwww.functx.com --------------------------------
The FunctX XQuery Function Library
--------------------------------
Copyright (C) 2007 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@functx.com.
1.0http://www.xqueryfunctions.comFunctX/FunctXxquery Adds attributes to XML elements
Priscilla Walmsley, Datypic1.0$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 addhttp://www.xqueryfunctions.com/xq/functx_add-attributes.htmlfunctx:add-attributesdeclare function functx:add-attributes($elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element(*)?elementselement(*)attrNamesxs:QNameattrValuesxs:anyAtomicTypeelement(*)?http://www.w3.org/2005/xpath-functionsnode-name Adds months to a date
Priscilla Walmsley, Datypic1.0$date the date$months the number of months to addhttp://www.xqueryfunctions.com/xq/functx_add-months.htmlfunctx:add-monthsdeclare function functx:add-months($date as xs:anyAtomicType?, $months as xs:integer) as xs:date?datexs:anyAtomicTypemonthsxs:integerxs:date?http://www.functx.comyearMonthDurationhttp://www.w3.org/2001/XMLSchemadate Adds attributes to XML elements
Priscilla Walmsley, Datypic1.0$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 addhttp://www.xqueryfunctions.com/xq/functx_add-or-update-attributes.htmlfunctx:add-or-update-attributesdeclare function functx:add-or-update-attributes($elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element(*)?elementselement(*)attrNamesxs:QNameattrValuesxs:anyAtomicTypeelement(*)?http://www.w3.org/2005/xpath-functionsnode-namehttp://www.w3.org/2005/xpath-functionsnot Whether a value is all whitespace or a zero-length string
Priscilla Walmsley, Datypic1.0$arg the string (or node) to testhttp://www.xqueryfunctions.com/xq/functx_all-whitespace.htmlfunctx:all-whitespacedeclare function functx:all-whitespace($arg as xs:string?) as xs:booleanargxs:stringxs:booleanhttp://www.w3.org/2005/xpath-functionsnormalize-space Whether all the values in a sequence are distinct
Priscilla Walmsley, Datypic1.0$seq the sequence of valueshttp://www.xqueryfunctions.com/xq/functx_are-distinct-values.htmlfunctx:are-distinct-valuesdeclare function functx:are-distinct-values($seq as xs:anyAtomicType*) as xs:booleanseqxs:anyAtomicTypexs:booleanhttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionsdistinct-values The built-in type of an atomic value
Priscilla Walmsley, Datypic1.0$values the value(s) whose type you want to determinehttp://www.xqueryfunctions.com/xq/functx_atomic-type.htmlfunctx:atomic-typedeclare function functx:atomic-type($values as xs:anyAtomicType*) as xs:string*valuesxs:anyAtomicTypexs:string* The average, counting "empty" values as zero
Priscilla Walmsley, Datypic1.0$values the values to be averaged$allNodes the sequence of all nodes to find the average overhttp://www.xqueryfunctions.com/xq/functx_avg-empty-is-zero.htmlfunctx:avg-empty-is-zerodeclare function functx:avg-empty-is-zero($values as xs:anyAtomicType*, $allNodes as node()*) as xs:doublevaluesxs:anyAtomicTypeallNodesnode()xs:doublehttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionsemptyhttp://www.w3.org/2005/xpath-functionsstringhttp://www.w3.org/2005/xpath-functionssum Whether a value is between two provided values
Priscilla Walmsley, Datypic1.0$value the value to be tested$minValue the minimum value$maxValue the maximum valuehttp://www.xqueryfunctions.com/xq/functx_between-exclusive.htmlfunctx:between-exclusivedeclare function functx:between-exclusive($value as xs:anyAtomicType?, $minValue as xs:anyAtomicType, $maxValue as xs:anyAtomicType) as xs:booleanvaluexs:anyAtomicTypeminValuexs:anyAtomicTypemaxValuexs:anyAtomicTypexs:boolean Whether a value is between two provided values, or equal to one of them
Priscilla Walmsley, Datypic1.0$value the value to be tested$minValue the minimum value$maxValue the maximum valuehttp://www.xqueryfunctions.com/xq/functx_between-inclusive.htmlfunctx:between-inclusivedeclare function functx:between-inclusive($value as xs:anyAtomicType?, $minValue as xs:anyAtomicType, $maxValue as xs:anyAtomicType) as xs:booleanvaluexs:anyAtomicTypeminValuexs:anyAtomicTypemaxValuexs:anyAtomicTypexs:boolean Turns a camelCase string into space-separated words
Priscilla Walmsley, Datypic1.0$arg the string to modify$delim the delimiter for the words (e.g. a space)http://www.xqueryfunctions.com/xq/functx_camel-case-to-words.htmlfunctx:camel-case-to-wordsdeclare function functx:camel-case-to-words($arg as xs:string?, $delim as xs:string) as xs:stringargxs:stringdelimxs:stringxs:stringhttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsreplacehttp://www.w3.org/2005/xpath-functionssubstringhttp://www.w3.org/2005/xpath-functionssubstring Capitalizes the first character of a string
Priscilla Walmsley, Datypic1.0$arg the word or phrase to capitalizehttp://www.xqueryfunctions.com/xq/functx_capitalize-first.htmlfunctx:capitalize-firstdeclare function functx:capitalize-first($arg as xs:string?) as xs:string?argxs:stringxs:string?http://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionssubstringhttp://www.w3.org/2005/xpath-functionssubstringhttp://www.w3.org/2005/xpath-functionsupper-case Changes the names of elements in an XML fragment
Priscilla Walmsley, Datypic1.0$nodes the element(s) to change$oldNames the sequence of names to change from$newNames the sequence of names to change tohttp://www.xqueryfunctions.com/xq/functx_change-element-names-deep.htmlfunctx:change-element-names-deepdeclare function functx:change-element-names-deep($nodes as node()*, $oldNames as xs:QName*, $newNames as xs:QName*) as node()*nodesnode()oldNamesxs:QNamenewNamesxs:QNamenode()*http://www.functx.comchange-element-names-deephttp://www.functx.comif-emptyhttp://www.w3.org/2001/XMLSchemaQNamehttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionserrorhttp://www.w3.org/2005/xpath-functionsindex-ofhttp://www.w3.org/2005/xpath-functionsnode-name Changes the namespace of XML elements and its descendants
Priscilla Walmsley, Datypic1.0$nodes the nodes to change$newns the new namespace$prefix the prefix to use for the new namespacehttp://www.xqueryfunctions.com/xq/functx_change-element-ns-deep.htmlfunctx:change-element-ns-deepdeclare function functx:change-element-ns-deep($nodes as node()*, $newns as xs:string, $prefix as xs:string) as node()*nodesnode()newnsxs:stringprefixxs:stringnode()*http://www.functx.comchange-element-ns-deephttp://www.w3.org/2005/xpath-functionsQNamehttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionslocal-name Changes the namespace of XML elements
Priscilla Walmsley, Datypic1.0$elements the elements to change$newns the new namespace$prefix the prefix to use for the new namespacehttp://www.xqueryfunctions.com/xq/functx_change-element-ns.htmlfunctx:change-element-nsdeclare function functx:change-element-ns($elements as element(*)*, $newns as xs:string, $prefix as xs:string) as element(*)?elementselement(*)newnsxs:stringprefixxs:stringelement(*)?http://www.w3.org/2005/xpath-functionsQNamehttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionslocal-name Converts a string to a sequence of characters
Priscilla Walmsley, Datypic1.0$arg the string to splithttp://www.xqueryfunctions.com/xq/functx_chars.htmlfunctx:charsdeclare function functx:chars($arg as xs:string?) as xs:string*argxs:stringxs:string*http://www.w3.org/2005/xpath-functionscodepoints-to-stringhttp://www.w3.org/2005/xpath-functionsstring-to-codepoints Whether a string contains any of a sequence of strings
Priscilla Walmsley, Datypic1.0$arg the string to test$searchStrings the strings to look forhttp://www.xqueryfunctions.com/xq/functx_contains-any-of.htmlfunctx:contains-any-ofdeclare function functx:contains-any-of($arg as xs:string?, $searchStrings as xs:string*) as xs:booleanargxs:stringsearchStringsxs:stringxs:booleanhttp://www.w3.org/2005/xpath-functionscontains Whether one string contains another, without regard to case
Priscilla Walmsley, Datypic1.0$arg the string to search$substring the substring to findhttp://www.xqueryfunctions.com/xq/functx_contains-case-insensitive.htmlfunctx:contains-case-insensitivedeclare function functx:contains-case-insensitive($arg as xs:string?, $substring as xs:string) as xs:boolean?argxs:stringsubstringxs:stringxs:boolean?http://www.w3.org/2005/xpath-functionscontainshttp://www.w3.org/2005/xpath-functionsupper-case Whether one string contains another, as a separate word
Priscilla Walmsley, Datypic1.0$arg the string to search$word the word to findhttp://www.xqueryfunctions.com/xq/functx_contains-word.htmlfunctx:contains-worddeclare function functx:contains-word($arg as xs:string?, $word as xs:string) as xs:booleanargxs:stringwordxs:stringxs:booleanhttp://www.functx.comescape-for-regexhttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsmatcheshttp://www.w3.org/2005/xpath-functionsupper-case Copies attributes from one element to another
Priscilla Walmsley, Datypic1.0$copyTo the element to copy attributes to$copyFrom the element to copy attributes fromhttp://www.xqueryfunctions.com/xq/functx_copy-attributes.htmlfunctx:copy-attributesdeclare function functx:copy-attributes($copyTo as element(*), $copyFrom as element(*)) as element(*)copyToelement(*)copyFromelement(*)element(*)http://www.w3.org/2005/xpath-functionsnode-namehttp://www.w3.org/2005/xpath-functionsnot Construct a date from a year, month and day
Priscilla Walmsley, Datypic1.0$year the year$month the month$day the dayhttp://www.xqueryfunctions.com/xq/functx_date.htmlfunctx:datedeclare function functx:date($year as xs:anyAtomicType, $month as xs:anyAtomicType, $day as xs:anyAtomicType) as xs:dateyearxs:anyAtomicTypemonthxs:anyAtomicTypedayxs:anyAtomicTypexs:datehttp://www.functx.compad-integer-to-lengthhttp://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2001/XMLSchemaintegerhttp://www.w3.org/2005/xpath-functionsconcat Construct a date/time from individual components
Priscilla Walmsley, Datypic1.0$year the year$month the month$day the day$hour the hour$minute the minute$second the secondhttp://www.xqueryfunctions.com/xq/functx_datetime.htmlfunctx:dateTimedeclare function 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:dateTimeyearxs:anyAtomicTypemonthxs:anyAtomicTypedayxs:anyAtomicTypehourxs:anyAtomicTypeminutexs:anyAtomicTypesecondxs:anyAtomicTypexs:dateTimehttp://www.functx.comdatehttp://www.functx.comtimehttp://www.w3.org/2001/XMLSchemadateTimehttp://www.w3.org/2005/xpath-functionsconcat The day of the year (a number between 1 and 366)
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_day-in-year.htmlfunctx:day-in-yeardeclare function functx:day-in-year($date as xs:anyAtomicType?) as xs:integer?datexs:anyAtomicTypexs:integer?http://www.functx.comfirst-day-of-yearhttp://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2005/xpath-functionsdays-from-duration The abbreviated day of the week, from a date, in English
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_day-of-week-abbrev-en.htmlfunctx:day-of-week-abbrev-endeclare function functx:day-of-week-abbrev-en($date as xs:anyAtomicType?) as xs:string?datexs:anyAtomicTypexs:string?http://www.functx.comday-of-week The name of the day of the week, from a date, in English
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_day-of-week-name-en.htmlfunctx:day-of-week-name-endeclare function functx:day-of-week-name-en($date as xs:anyAtomicType?) as xs:string?datexs:anyAtomicTypexs:string?http://www.functx.comday-of-week The day of the week, from a date
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_day-of-week.htmlfunctx:day-of-weekdeclare function functx:day-of-week($date as xs:anyAtomicType?) as xs:integer?datexs:anyAtomicTypexs:integer?http://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2001/XMLSchemadayTimeDurationhttp://www.w3.org/2001/XMLSchemaintegerhttp://www.w3.org/2005/xpath-functionsempty Construct a dayTimeDuration from a number of days, hours, etc.
Priscilla Walmsley, Datypic1.0$days the number of days$hours the number of hours$minutes the number of minutes$seconds the number of secondshttp://www.xqueryfunctions.com/xq/functx_daytimeduration.htmlfunctx:dayTimeDurationdeclare function functx:dayTimeDuration($days as xs:decimal?, $hours as xs:decimal?, $minutes as xs:decimal?, $seconds as xs:decimal?) as xs:dayTimeDurationdaysxs:decimalhoursxs:decimalminutesxs:decimalsecondsxs:decimalxs:dayTimeDurationhttp://www.functx.comif-emptyhttp://www.w3.org/2001/XMLSchemadayTimeDuration Number of days in the month
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_days-in-month.htmlfunctx:days-in-monthdeclare function functx:days-in-month($date as xs:anyAtomicType?) as xs:integer?datexs:anyAtomicTypexs:integer?http://www.functx.comis-leap-yearhttp://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2005/xpath-functionsmonth-from-date The depth (level) of a node in an XML tree
Priscilla Walmsley, Datypic1.0$node the node to checkhttp://www.xqueryfunctions.com/xq/functx_depth-of-node.htmlfunctx:depth-of-nodedeclare function functx:depth-of-node($node as node()?) as xs:integernodenode()xs:integerhttp://www.w3.org/2005/xpath-functionscount The distinct names of all attributes in an XML fragment
Priscilla Walmsley, Datypic1.0$nodes the root to start fromhttp://www.xqueryfunctions.com/xq/functx_distinct-attribute-names.htmlfunctx:distinct-attribute-namesdeclare function functx:distinct-attribute-names($nodes as node()*) as xs:string*nodesnode()xs:string*http://www.w3.org/2005/xpath-functionsdistinct-valueshttp://www.w3.org/2005/xpath-functionsname The XML nodes with distinct values, taking into account attributes and descendants
Priscilla Walmsley, Datypic1.0$nodes the sequence of nodes to testhttp://www.xqueryfunctions.com/xq/functx_distinct-deep.htmlfunctx:distinct-deepdeclare function functx:distinct-deep($nodes as node()*) as node()*nodesnode()node()*http://www.functx.comis-node-in-sequence-deep-equalhttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionsnothttp://www.w3.org/2005/xpath-functionsposition The distinct names of all elements in an XML fragment
Priscilla Walmsley, Datypic1.0$nodes the root(s) to start fromhttp://www.xqueryfunctions.com/xq/functx_distinct-element-names.htmlfunctx:distinct-element-namesdeclare function functx:distinct-element-names($nodes as node()*) as xs:string*nodesnode()xs:string*http://www.w3.org/2005/xpath-functionsdistinct-valueshttp://www.w3.org/2005/xpath-functionsname The distinct paths of all descendant elements in an XML fragment
Priscilla Walmsley, Datypic1.0$nodes the root(s) to start fromhttp://www.xqueryfunctions.com/xq/functx_distinct-element-paths.htmlfunctx:distinct-element-pathsdeclare function functx:distinct-element-paths($nodes as node()*) as xs:string*nodesnode()xs:string*http://www.functx.compath-to-nodehttp://www.w3.org/2005/xpath-functionsdistinct-values The distinct XML nodes in a sequence (by node identity)
Priscilla Walmsley, Datypic1.0$nodes the node sequencehttp://www.xqueryfunctions.com/xq/functx_distinct-nodes.htmlfunctx:distinct-nodesdeclare function functx:distinct-nodes($nodes as node()*) as node()*nodesnode()node()*http://www.functx.comis-node-in-sequencehttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionsnothttp://www.w3.org/2005/xpath-functionsposition Converts a timezone like "-05:00" or "Z" into xs:dayTimeDuration
Priscilla Walmsley, Datypic1.0$timezone the time zone, in (+|-)HH:MM formathttp://www.xqueryfunctions.com/xq/functx_duration-from-timezone.htmlfunctx:duration-from-timezonedeclare function functx:duration-from-timezone($timezone as xs:string) as xs:dayTimeDurationtimezonexs:stringxs:dayTimeDurationhttp://www.w3.org/2001/XMLSchemaQNamehttp://www.w3.org/2001/XMLSchemadayTimeDurationhttp://www.w3.org/2005/xpath-functionserrorhttp://www.w3.org/2005/xpath-functionsmatcheshttp://www.w3.org/2005/xpath-functionsnothttp://www.w3.org/2005/xpath-functionsreplace Dynamically evaluates a simple XPath path
Priscilla Walmsley, Datypic1.0$parent the root to start from$path the path expressionhttp://www.xqueryfunctions.com/xq/functx_dynamic-path.htmlfunctx:dynamic-pathdeclare function functx:dynamic-path($parent as node(), $path as xs:string) as item()*parentnode()pathxs:stringitem()*http://www.functx.comdynamic-pathhttp://www.functx.comname-testhttp://www.functx.comsubstring-before-if-containshttp://www.w3.org/2005/xpath-functionsnamehttp://www.w3.org/2005/xpath-functionssubstring-after Escapes regex special characters
Priscilla Walmsley, Datypic1.0$arg the string to escapehttp://www.xqueryfunctions.com/xq/functx_escape-for-regex.htmlfunctx:escape-for-regexdeclare function functx:escape-for-regex($arg as xs:string?) as xs:stringargxs:stringxs:stringhttp://www.w3.org/2005/xpath-functionsreplace Whether one (and only one) of two boolean values is true
Priscilla Walmsley, Datypic1.0$arg1 the first boolean value$arg2 the second boolean valuehttp://www.xqueryfunctions.com/xq/functx_exclusive-or.htmlfunctx:exclusive-ordeclare function functx:exclusive-or($arg1 as xs:boolean?, $arg2 as xs:boolean?) as xs:boolean?arg1xs:booleanarg2xs:booleanxs:boolean? The first day of the month of a date
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_first-day-of-month.htmlfunctx:first-day-of-monthdeclare function functx:first-day-of-month($date as xs:anyAtomicType?) as xs:date?datexs:anyAtomicTypexs:date?http://www.functx.comdatehttp://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2005/xpath-functionsmonth-from-datehttp://www.w3.org/2005/xpath-functionsyear-from-date The first day of the year of a date
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_first-day-of-year.htmlfunctx:first-day-of-yeardeclare function functx:first-day-of-year($date as xs:anyAtomicType?) as xs:date?datexs:anyAtomicTypexs:date?http://www.functx.comdatehttp://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2005/xpath-functionsyear-from-date The XML node in a sequence that appears first in document order
Priscilla Walmsley, Datypic1.0$nodes the sequence of nodeshttp://www.xqueryfunctions.com/xq/functx_first-node.htmlfunctx:first-nodedeclare function functx:first-node($nodes as node()*) as node()?nodesnode()node()? Whether an XML node follows another without being its descendant
W3C XML Query Working Group1.0$a the first node$b the second nodehttp://www.xqueryfunctions.com/xq/functx_follows-not-descendant.htmlfunctx:follows-not-descendantdeclare function functx:follows-not-descendant($a as node()?, $b as node()?) as xs:booleananode()bnode()xs:booleanhttp://www.w3.org/2005/xpath-functionsempty Moves title words like "the" and "a" to the end of strings
Priscilla Walmsley, Datypic1.0$titles the titles to formathttp://www.xqueryfunctions.com/xq/functx_format-as-title-en.htmlfunctx:format-as-title-endeclare function functx:format-as-title-en($titles as xs:string*) as xs:string*titlesxs:stringxs:string*http://www.functx.comsubstring-before-matchhttp://www.w3.org/2005/xpath-functionsreplace Returns the fragment from a URI
Priscilla Walmsley, Datypic1.0$uri the URIhttp://www.xqueryfunctions.com/xq/functx_fragment-from-uri.htmlfunctx:fragment-from-urideclare function functx:fragment-from-uri($uri as xs:string?) as xs:string?urixs:stringxs:string?http://www.w3.org/2005/xpath-functionssubstring-after Splits a string into matching and non-matching regions
Priscilla Walmsley, Datypic1.0$string the string to split$regex the patternhttp://www.xqueryfunctions.com/xq/functx_get-matches-and-non-matches.htmlfunctx:get-matches-and-non-matchesdeclare function functx:get-matches-and-non-matches($string as xs:string?, $regex as xs:string) as element(*)*stringxs:stringregexxs:stringelement(*)*http://www.functx.comget-matches-and-non-matcheshttp://www.functx.comindex-of-match-firsthttp://www.functx.comreplace-firsthttp://www.w3.org/2005/xpath-functionsemptyhttp://www.w3.org/2005/xpath-functionsstring-lengthhttp://www.w3.org/2005/xpath-functionssubstringhttp://www.w3.org/2005/xpath-functionssubstring Return the matching regions of a string
Priscilla Walmsley, Datypic1.0$string the string to split$regex the patternhttp://www.xqueryfunctions.com/xq/functx_get-matches.htmlfunctx:get-matchesdeclare function functx:get-matches($string as xs:string?, $regex as xs:string) as xs:string*stringxs:stringregexxs:stringxs:string*http://www.functx.comget-matches-and-non-matcheshttp://www.w3.org/2005/xpath-functionsstring Whether an element has element-only content
Priscilla Walmsley, Datypic1.0$element the XML element to testhttp://www.xqueryfunctions.com/xq/functx_has-element-only-content.htmlfunctx:has-element-only-contentdeclare function functx:has-element-only-content($element as element(*)) as xs:booleanelementelement(*)xs:booleanhttp://www.w3.org/2005/xpath-functionsnormalize-spacehttp://www.w3.org/2005/xpath-functionsnot Whether an element has empty content
Priscilla Walmsley, Datypic1.0$element the XML element to testhttp://www.xqueryfunctions.com/xq/functx_has-empty-content.htmlfunctx:has-empty-contentdeclare function functx:has-empty-content($element as element(*)) as xs:booleanelementelement(*)xs:booleanhttp://www.w3.org/2005/xpath-functionsnot Whether an element has mixed content
Priscilla Walmsley, Datypic1.0$element the XML element to testhttp://www.xqueryfunctions.com/xq/functx_has-mixed-content.htmlfunctx:has-mixed-contentdeclare function functx:has-mixed-content($element as element(*)) as xs:booleanelementelement(*)xs:booleanhttp://www.w3.org/2005/xpath-functionsnormalize-space Whether an element has simple content
Priscilla Walmsley, Datypic1.0$element the XML element to testhttp://www.xqueryfunctions.com/xq/functx_has-simple-content.htmlfunctx:has-simple-contentdeclare function functx:has-simple-content($element as element(*)) as xs:booleanelementelement(*)xs:booleanhttp://www.w3.org/2005/xpath-functionsnot Gets the ID of an XML element
Priscilla Walmsley, Datypic1.0$element the elementhttp://www.xqueryfunctions.com/xq/functx_id-from-element.htmlfunctx:id-from-elementdeclare function functx:id-from-element($element as element(*)?) as xs:string?elementelement(*)xs:string?http://www.w3.org/2005/xpath-functionsdatahttp://www.w3.org/2005/xpath-functionsid Gets XML element(s) that have an attribute with a particular value
Priscilla Walmsley, Datypic1.0$node the root node(s) to start from$id the "id" to findhttp://www.xqueryfunctions.com/xq/functx_id-untyped.htmlfunctx:id-untypeddeclare function functx:id-untyped($node as node()*, $id as xs:anyAtomicType) as element(*)*nodenode()idxs:anyAtomicTypeelement(*)* The first argument if it is not empty, otherwise the second argument
W3C XML Query WG1.0$arg the item(s) that may be absent$value the item(s) to use if the item is absenthttp://www.xqueryfunctions.com/xq/functx_if-absent.htmlfunctx:if-absentdeclare function functx:if-absent($arg as item()*, $value as item()*) as item()*argitem()valueitem()item()*http://www.w3.org/2005/xpath-functionsexists The first argument if it is not blank, otherwise the second argument
Priscilla Walmsley, Datypic1.0$arg the node that may be empty$value the item(s) to use if the node is emptyhttp://www.xqueryfunctions.com/xq/functx_if-empty.htmlfunctx:if-emptydeclare function functx:if-empty($arg as item()?, $value as item()*) as item()*argitem()valueitem()item()*http://www.w3.org/2005/xpath-functionsdatahttp://www.w3.org/2005/xpath-functionsstring The position of a node in a sequence, based on contents and attributes
Priscilla Walmsley, Datypic1.0$nodes the node sequence$nodeToFind the node to find in the sequencehttp://www.xqueryfunctions.com/xq/functx_index-of-deep-equal-node.htmlfunctx:index-of-deep-equal-nodedeclare function functx:index-of-deep-equal-node($nodes as node()*, $nodeToFind as node()) as xs:integer*nodesnode()nodeToFindnode()xs:integer*http://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionsdeep-equal The first position of a matching substring
Priscilla Walmsley, Datypic1.0$arg the string$pattern the pattern to matchhttp://www.xqueryfunctions.com/xq/functx_index-of-match-first.htmlfunctx:index-of-match-firstdeclare function functx:index-of-match-first($arg as xs:string?, $pattern as xs:string) as xs:integer?argxs:stringpatternxs:stringxs:integer?http://www.w3.org/2005/xpath-functionsmatcheshttp://www.w3.org/2005/xpath-functionsstring-lengthhttp://www.w3.org/2005/xpath-functionstokenize The position of a node in a sequence, based on node identity
W3C XML Query Working Group1.0$nodes the node sequence$nodeToFind the node to find in the sequencehttp://www.xqueryfunctions.com/xq/functx_index-of-node.htmlfunctx:index-of-nodedeclare function functx:index-of-node($nodes as node()*, $nodeToFind as node()) as xs:integer*nodesnode()nodeToFindnode()xs:integer*http://www.w3.org/2005/xpath-functionscount The first position of a substring
Priscilla Walmsley, Datypic1.0$arg the string$substring the substring to findhttp://www.xqueryfunctions.com/xq/functx_index-of-string-first.htmlfunctx:index-of-string-firstdeclare function functx:index-of-string-first($arg as xs:string?, $substring as xs:string) as xs:integer?argxs:stringsubstringxs:stringxs:integer?http://www.w3.org/2005/xpath-functionscontainshttp://www.w3.org/2005/xpath-functionsstring-lengthhttp://www.w3.org/2005/xpath-functionssubstring-before The last position of a substring
Priscilla Walmsley, Datypic1.0$arg the string$substring the substring to findhttp://www.xqueryfunctions.com/xq/functx_index-of-string-last.htmlfunctx:index-of-string-lastdeclare function functx:index-of-string-last($arg as xs:string?, $substring as xs:string) as xs:integer?argxs:stringsubstringxs:stringxs:integer?http://www.functx.comindex-of-stringhttp://www.w3.org/2005/xpath-functionslast The position(s) of a substring
Priscilla Walmsley, Datypic1.0$arg the string$substring the substring to findhttp://www.xqueryfunctions.com/xq/functx_index-of-string.htmlfunctx:index-of-stringdeclare function functx:index-of-string($arg as xs:string?, $substring as xs:string) as xs:integer*argxs:stringsubstringxs:stringxs:integer*http://www.functx.comindex-of-stringhttp://www.w3.org/2005/xpath-functionscontainshttp://www.w3.org/2005/xpath-functionsstring-lengthhttp://www.w3.org/2005/xpath-functionssubstring-afterhttp://www.w3.org/2005/xpath-functionssubstring-before Inserts a string at a specified position
Priscilla Walmsley, Datypic1.0$originalString the original string to insert into$stringToInsert the string to insert$pos the positionhttp://www.xqueryfunctions.com/xq/functx_insert-string.htmlfunctx:insert-stringdeclare function functx:insert-string($originalString as xs:string?, $stringToInsert as xs:string?, $pos as xs:integer) as xs:stringoriginalStringxs:stringstringToInsertxs:stringposxs:integerxs:stringhttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionssubstringhttp://www.w3.org/2005/xpath-functionssubstring Whether a value is numeric
Priscilla Walmsley, Datypic1.0$value the value to testhttp://www.xqueryfunctions.com/xq/functx_is-a-number.htmlfunctx:is-a-numberdeclare function functx:is-a-number($value as xs:anyAtomicType?) as xs:booleanvaluexs:anyAtomicTypexs:booleanhttp://www.w3.org/2005/xpath-functionsnumberhttp://www.w3.org/2005/xpath-functionsstring Whether a URI is absolute
Priscilla Walmsley, Datypic1.0$uri the URI to testhttp://www.xqueryfunctions.com/xq/functx_is-absolute-uri.htmlfunctx:is-absolute-urideclare function functx:is-absolute-uri($uri as xs:string?) as xs:booleanurixs:stringxs:booleanhttp://www.w3.org/2005/xpath-functionsmatches Whether an XML node is an ancestor of another node
Priscilla Walmsley, Datypic1.0$node1 the first node$node2 the second nodehttp://www.xqueryfunctions.com/xq/functx_is-ancestor.htmlfunctx:is-ancestordeclare function functx:is-ancestor($node1 as node(), $node2 as node()) as xs:booleannode1node()node2node()xs:booleanhttp://www.w3.org/2005/xpath-functionsexists Whether an XML node is a descendant of another node
Priscilla Walmsley, Datypic1.0$node1 the first node$node2 the second nodehttp://www.xqueryfunctions.com/xq/functx_is-descendant.htmlfunctx:is-descendantdeclare function functx:is-descendant($node1 as node(), $node2 as node()) as xs:booleannode1node()node2node()xs:booleanhttp://www.w3.org/2005/xpath-functionsboolean Whether a date falls in a leap year
Priscilla Walmsley, Datypic1.0$date the date or yearhttp://www.xqueryfunctions.com/xq/functx_is-leap-year.htmlfunctx:is-leap-yeardeclare function functx:is-leap-year($date as xs:anyAtomicType?) as xs:booleandatexs:anyAtomicTypexs:booleanhttp://www.w3.org/2001/XMLSchemaintegerhttp://www.w3.org/2005/xpath-functionsstringhttp://www.w3.org/2005/xpath-functionssubstring Whether an XML node is among the descendants of a sequence, based on contents and attributes
Priscilla Walmsley, Datypic1.0$node the node to test$seq the sequence of nodes to searchhttp://www.xqueryfunctions.com/xq/functx_is-node-among-descendants-deep-equal.htmlfunctx:is-node-among-descendants-deep-equaldeclare function functx:is-node-among-descendants-deep-equal($node as node()?, $seq as node()*) as xs:booleannodenode()seqnode()xs:booleanhttp://www.w3.org/2005/xpath-functionsdeep-equal Whether an XML node is among the descendants of a sequence, based on node identity
Priscilla Walmsley, Datypic1.0$node the node to test$seq the sequence of nodes to searchhttp://www.xqueryfunctions.com/xq/functx_is-node-among-descendants.htmlfunctx:is-node-among-descendantsdeclare function functx:is-node-among-descendants($node as node()?, $seq as node()*) as xs:booleannodenode()seqnode()xs:boolean Whether an XML node is in a sequence, based on contents and attributes
Priscilla Walmsley, Datypic1.0$node the node to test$seq the sequence of nodes to searchhttp://www.xqueryfunctions.com/xq/functx_is-node-in-sequence-deep-equal.htmlfunctx:is-node-in-sequence-deep-equaldeclare function functx:is-node-in-sequence-deep-equal($node as node()?, $seq as node()*) as xs:booleannodenode()seqnode()xs:booleanhttp://www.w3.org/2005/xpath-functionsdeep-equal Whether an XML node is in a sequence, based on node identity
Priscilla Walmsley, Datypic1.0$node the node to test$seq the sequence of nodes to searchhttp://www.xqueryfunctions.com/xq/functx_is-node-in-sequence.htmlfunctx:is-node-in-sequencedeclare function functx:is-node-in-sequence($node as node()?, $seq as node()*) as xs:booleannodenode()seqnode()xs:boolean Whether an atomic value appears in a sequence
Priscilla Walmsley, Datypic1.0$value the atomic value to test$seq the sequence of values to searchhttp://www.xqueryfunctions.com/xq/functx_is-value-in-sequence.htmlfunctx:is-value-in-sequencedeclare function functx:is-value-in-sequence($value as xs:anyAtomicType?, $seq as xs:anyAtomicType*) as xs:booleanvaluexs:anyAtomicTypeseqxs:anyAtomicTypexs:boolean The last day of the month of a date
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_last-day-of-month.htmlfunctx:last-day-of-monthdeclare function functx:last-day-of-month($date as xs:anyAtomicType?) as xs:date?datexs:anyAtomicTypexs:date?http://www.functx.comdatehttp://www.functx.comdays-in-monthhttp://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2005/xpath-functionsmonth-from-datehttp://www.w3.org/2005/xpath-functionsyear-from-date The last day of the month of a date
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_last-day-of-year.htmlfunctx:last-day-of-yeardeclare function functx:last-day-of-year($date as xs:anyAtomicType?) as xs:date?datexs:anyAtomicTypexs:date?http://www.functx.comdatehttp://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2005/xpath-functionsyear-from-date The XML node in a sequence that is last in document order
Priscilla Walmsley, Datypic1.0$nodes the sequence of nodeshttp://www.xqueryfunctions.com/xq/functx_last-node.htmlfunctx:last-nodedeclare function functx:last-node($nodes as node()*) as node()?nodesnode()node()?http://www.w3.org/2005/xpath-functionslast All XML elements that don't have any child elements
Priscilla Walmsley, Datypic1.0$root the roothttp://www.xqueryfunctions.com/xq/functx_leaf-elements.htmlfunctx:leaf-elementsdeclare function functx:leaf-elements($root as node()?) as element(*)*rootnode()element(*)*http://www.w3.org/2005/xpath-functionsnot Trims leading whitespace
Priscilla Walmsley, Datypic1.0$arg the string to trimhttp://www.xqueryfunctions.com/xq/functx_left-trim.htmlfunctx:left-trimdeclare function functx:left-trim($arg as xs:string?) as xs:stringargxs:stringxs:stringhttp://www.w3.org/2005/xpath-functionsreplace The number of lines
Priscilla Walmsley, Datypic1.0$arg the string to testhttp://www.xqueryfunctions.com/xq/functx_line-count.htmlfunctx:line-countdeclare function functx:line-count($arg as xs:string?) as xs:integerargxs:stringxs:integerhttp://www.functx.comlineshttp://www.w3.org/2005/xpath-functionscount Split a string into separate lines
Priscilla Walmsley, Datypic1.0$arg the string to splithttp://www.xqueryfunctions.com/xq/functx_lines.htmlfunctx:linesdeclare function functx:lines($arg as xs:string?) as xs:string*argxs:stringxs:string*http://www.w3.org/2005/xpath-functionstokenize The maximum depth of elements in an XML tree
Priscilla Walmsley, Datypic1.0$root the root to start fromhttp://www.xqueryfunctions.com/xq/functx_max-depth.htmlfunctx:max-depthdeclare function functx:max-depth($root as node()?) as xs:integer?rootnode()xs:integer?http://www.functx.commax-depthhttp://www.w3.org/2005/xpath-functionsmax The maximum value in a sequence, figuring out its type (numeric or string)
Priscilla Walmsley, Datypic1.0$seq the sequence of values to testhttp://www.xqueryfunctions.com/xq/functx_max-determine-type.htmlfunctx:max-determine-typedeclare function functx:max-determine-type($seq as xs:anyAtomicType*) as xs:anyAtomicType?seqxs:anyAtomicTypexs:anyAtomicType?http://www.w3.org/2001/XMLSchemadoublehttp://www.w3.org/2001/XMLSchemastringhttp://www.w3.org/2005/xpath-functionsmax The maximum line length
Priscilla Walmsley, Datypic1.0$arg the string to testhttp://www.xqueryfunctions.com/xq/functx_max-line-length.htmlfunctx:max-line-lengthdeclare function functx:max-line-length($arg as xs:string?) as xs:integerargxs:stringxs:integerhttp://www.functx.comlineshttp://www.w3.org/2005/xpath-functionsmaxhttp://www.w3.org/2005/xpath-functionsstring-length The XML node whose typed value is the maximum
Priscilla Walmsley, Datypic1.0$nodes the sequence of nodes to testhttp://www.xqueryfunctions.com/xq/functx_max-node.htmlfunctx:max-nodedeclare function functx:max-node($nodes as node()*) as node()*nodesnode()node()*http://www.w3.org/2005/xpath-functionsmax The maximum of a sequence of values, treating them like strings
Priscilla Walmsley, Datypic1.0$strings the sequence of valueshttp://www.xqueryfunctions.com/xq/functx_max-string.htmlfunctx:max-stringdeclare function functx:max-string($strings as xs:anyAtomicType*) as xs:string?stringsxs:anyAtomicTypexs:string?http://www.w3.org/2005/xpath-functionsmaxhttp://www.w3.org/2005/xpath-functionsstring The minimum value in a sequence, figuring out its type (numeric or string)
Priscilla Walmsley, Datypic1.0$seq the sequence of values to testhttp://www.xqueryfunctions.com/xq/functx_min-determine-type.htmlfunctx:min-determine-typedeclare function functx:min-determine-type($seq as xs:anyAtomicType*) as xs:anyAtomicType?seqxs:anyAtomicTypexs:anyAtomicType?http://www.w3.org/2001/XMLSchemadoublehttp://www.w3.org/2001/XMLSchemastringhttp://www.w3.org/2005/xpath-functionsmin The XML node whose typed value is the minimum
Priscilla Walmsley, Datypic1.0$nodes the sequence of nodes to testhttp://www.xqueryfunctions.com/xq/functx_min-node.htmlfunctx:min-nodedeclare function functx:min-node($nodes as node()*) as node()*nodesnode()node()*http://www.w3.org/2005/xpath-functionsmin The minimum of a sequence of strings, ignoring "empty" values
Priscilla Walmsley, Datypic1.0$strings the sequence of strings to searchhttp://www.xqueryfunctions.com/xq/functx_min-non-empty-string.htmlfunctx:min-non-empty-stringdeclare function functx:min-non-empty-string($strings as xs:string*) as xs:string?stringsxs:stringxs:string?http://www.w3.org/2005/xpath-functionsmin The minimum of a sequence of values, treating them like strings
Priscilla Walmsley, Datypic1.0$strings the sequence of stringshttp://www.xqueryfunctions.com/xq/functx_min-string.htmlfunctx:min-stringdeclare function functx:min-string($strings as xs:anyAtomicType*) as xs:string?stringsxs:anyAtomicTypexs:string?http://www.w3.org/2005/xpath-functionsminhttp://www.w3.org/2005/xpath-functionsstring Converts a string with format MMDDYYYY (with any delimiters) to a date
Priscilla Walmsley, Datypic1.0$dateString the MMDDYYYY stringhttp://www.xqueryfunctions.com/xq/functx_mmddyyyy-to-date.htmlfunctx:mmddyyyy-to-datedeclare function functx:mmddyyyy-to-date($dateString as xs:string?) as xs:date?dateStringxs:stringxs:date?http://www.w3.org/2001/XMLSchemaQNamehttp://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2005/xpath-functionsemptyhttp://www.w3.org/2005/xpath-functionserrorhttp://www.w3.org/2005/xpath-functionsmatcheshttp://www.w3.org/2005/xpath-functionsnothttp://www.w3.org/2005/xpath-functionsreplace The month of a date as an abbreviated word (Jan, Feb, etc.)
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_month-abbrev-en.htmlfunctx:month-abbrev-endeclare function functx:month-abbrev-en($date as xs:anyAtomicType?) as xs:string?datexs:anyAtomicTypexs:string?http://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2005/xpath-functionsmonth-from-date The month of a date as a word (January, February, etc.)
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_month-name-en.htmlfunctx:month-name-endeclare function functx:month-name-en($date as xs:anyAtomicType?) as xs:string?datexs:anyAtomicTypexs:string?http://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2005/xpath-functionsmonth-from-date Whether a name matches a list of names or name wildcards
Priscilla Walmsley, Datypic1.0$testname the name to test$names the list of names or name wildcardshttp://www.xqueryfunctions.com/xq/functx_name-test.htmlfunctx:name-testdeclare function functx:name-test($testname as xs:string?, $names as xs:string*) as xs:booleantestnamexs:stringnamesxs:stringxs:booleanhttp://www.functx.comsubstring-after-if-containshttp://www.w3.org/2005/xpath-functionscontainshttp://www.w3.org/2005/xpath-functionssubstring-afterhttp://www.w3.org/2005/xpath-functionssubstring-before A list of namespaces used in element/attribute names in an XML fragment
Priscilla Walmsley, Datypic1.0$root the root node to start fromhttp://www.xqueryfunctions.com/xq/functx_namespaces-in-use.htmlfunctx:namespaces-in-usedeclare function functx:namespaces-in-use($root as node()?) as xs:anyURI*rootnode()xs:anyURI*http://www.w3.org/2005/xpath-functionsdistinct-valueshttp://www.w3.org/2005/xpath-functionsnamespace-uri The next day
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_next-day.htmlfunctx:next-daydeclare function functx:next-day($date as xs:anyAtomicType?) as xs:date?datexs:anyAtomicTypexs:date?http://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2001/XMLSchemadayTimeDuration The XML node kind (element, attribute, text, etc.)
Priscilla Walmsley, Datypic1.0$nodes the node(s) whose kind you want to determinehttp://www.xqueryfunctions.com/xq/functx_node-kind.htmlfunctx:node-kinddeclare function functx:node-kind($nodes as node()*) as xs:string*nodesnode()xs:string* Returns any values that appear more than once in a sequence
Priscilla Walmsley, Datypic1.0$seq the sequence of valueshttp://www.xqueryfunctions.com/xq/functx_non-distinct-values.htmlfunctx:non-distinct-valuesdeclare function functx:non-distinct-values($seq as xs:anyAtomicType*) as xs:anyAtomicType*seqxs:anyAtomicTypexs:anyAtomicType*http://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionsdistinct-values The number of regions that match a pattern
Priscilla Walmsley, Datypic1.0$arg the string to test$pattern the regular expressionhttp://www.xqueryfunctions.com/xq/functx_number-of-matches.htmlfunctx:number-of-matchesdeclare function functx:number-of-matches($arg as xs:string?, $pattern as xs:string) as xs:integerargxs:stringpatternxs:stringxs:integerhttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionstokenize Resolves a relative URI and references it, returning an XML document
Priscilla Walmsley, Datypic1.0$refNode a node whose value is a relative URI referencehttp://www.xqueryfunctions.com/xq/functx_open-ref-document.htmlfunctx:open-ref-documentdeclare function functx:open-ref-document($refNode as node()) as document()refNodenode()document()http://www.w3.org/2005/xpath-functionsbase-urihttp://www.w3.org/2005/xpath-functionsdochttp://www.w3.org/2005/xpath-functionsresolve-urihttp://www.w3.org/2005/xpath-functionsresolve-uri Reformats a number as an ordinal number, e.g. 1st, 2nd, 3rd.
Priscilla Walmsley, Datypic1.0$num the numberhttp://www.xqueryfunctions.com/xq/functx_ordinal-number-en.htmlfunctx:ordinal-number-endeclare function functx:ordinal-number-en($num as xs:integer?) as xs:stringnumxs:integerxs:stringhttp://www.w3.org/2001/XMLSchemastringhttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsends-withhttp://www.w3.org/2005/xpath-functionsmatches Pads an integer to a desired length by adding leading zeros
Priscilla Walmsley, Datypic1.0$integerToPad the integer to pad$length the desired lengthhttp://www.xqueryfunctions.com/xq/functx_pad-integer-to-length.htmlfunctx:pad-integer-to-lengthdeclare function functx:pad-integer-to-length($integerToPad as xs:anyAtomicType?, $length as xs:integer) as xs:stringintegerToPadxs:anyAtomicTypelengthxs:integerxs:stringhttp://www.functx.comrepeat-stringhttp://www.w3.org/2001/XMLSchemaQNamehttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionserrorhttp://www.w3.org/2005/xpath-functionsstringhttp://www.w3.org/2005/xpath-functionsstring-length Pads a string to a desired length
Priscilla Walmsley, Datypic1.0$stringToPad the string to pad$padChar the character(s) to use as padding$length the desired lengthhttp://www.xqueryfunctions.com/xq/functx_pad-string-to-length.htmlfunctx:pad-string-to-lengthdeclare function functx:pad-string-to-length($stringToPad as xs:string?, $padChar as xs:string, $length as xs:integer) as xs:stringstringToPadxs:stringpadCharxs:stringlengthxs:integerxs:stringhttp://www.w3.org/2005/xpath-functionsstring-joinhttp://www.w3.org/2005/xpath-functionssubstring A unique path to an XML node (or sequence of nodes)
Priscilla Walmsley, Datypic1.0$node the node sequencehttp://www.xqueryfunctions.com/xq/functx_path-to-node-with-pos.htmlfunctx:path-to-node-with-posdeclare function functx:path-to-node-with-pos($node as node()?) as xs:stringnodenode()xs:stringhttp://www.functx.comindex-of-nodehttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionsnamehttp://www.w3.org/2005/xpath-functionsnamehttp://www.w3.org/2005/xpath-functionsstring-join A path to an XML node (or sequence of nodes)
Priscilla Walmsley, Datypic1.0$nodes the node sequencehttp://www.xqueryfunctions.com/xq/functx_path-to-node.htmlfunctx:path-to-nodedeclare function functx:path-to-node($nodes as node()*) as xs:string*nodesnode()xs:string*http://www.w3.org/2005/xpath-functionsnamehttp://www.w3.org/2005/xpath-functionsstring-join Whether an XML node precedes another without being its ancestor
W3C XML Query Working Group1.0$a the first node$b the second nodehttp://www.xqueryfunctions.com/xq/functx_precedes-not-ancestor.htmlfunctx:precedes-not-ancestordeclare function functx:precedes-not-ancestor($a as node()?, $b as node()?) as xs:booleananode()bnode()xs:booleanhttp://www.w3.org/2005/xpath-functionsempty The previous day
Priscilla Walmsley, Datypic1.0$date the datehttp://www.xqueryfunctions.com/xq/functx_previous-day.htmlfunctx:previous-daydeclare function functx:previous-day($date as xs:anyAtomicType?) as xs:date?datexs:anyAtomicTypexs:date?http://www.w3.org/2001/XMLSchemadatehttp://www.w3.org/2001/XMLSchemadayTimeDuration Removes attributes from an XML fragment, based on name
Priscilla Walmsley, Datypic1.0$nodes the root(s) to start from$names the names of the attributes to remove, or * for all attributeshttp://www.xqueryfunctions.com/xq/functx_remove-attributes-deep.htmlfunctx:remove-attributes-deepdeclare function functx:remove-attributes-deep($nodes as node()*, $names as xs:string*) as node()*nodesnode()namesxs:stringnode()*http://www.functx.comname-testhttp://www.functx.comremove-attributes-deephttp://www.w3.org/2005/xpath-functionsnamehttp://www.w3.org/2005/xpath-functionsnode-namehttp://www.w3.org/2005/xpath-functionsnot Removes attributes from an XML element, based on name
Priscilla Walmsley, Datypic1.0$elements the element(s) from which to remove the attributes$names the names of the attributes to remove, or * for all attributeshttp://www.xqueryfunctions.com/xq/functx_remove-attributes.htmlfunctx:remove-attributesdeclare function functx:remove-attributes($elements as element(*)*, $names as xs:string*) as element(*)elementselement(*)namesxs:stringelement(*)http://www.functx.comname-testhttp://www.w3.org/2005/xpath-functionsnamehttp://www.w3.org/2005/xpath-functionsnode-namehttp://www.w3.org/2005/xpath-functionsnot Removes descendant elements from an XML node, based on name
Priscilla Walmsley, Datypic1.0$nodes root(s) to start from$names the names of the elements to removehttp://www.xqueryfunctions.com/xq/functx_remove-elements-deep.htmlfunctx:remove-elements-deepdeclare function functx:remove-elements-deep($nodes as node()*, $names as xs:string*) as node()*nodesnode()namesxs:stringnode()*http://www.functx.comname-testhttp://www.functx.comremove-elements-deephttp://www.w3.org/2005/xpath-functionsnamehttp://www.w3.org/2005/xpath-functionsnode-name Removes descendant XML elements but keeps their content
Priscilla Walmsley, Datypic1.0$nodes the root(s) to start from$names the names of the elements to removehttp://www.xqueryfunctions.com/xq/functx_remove-elements-not-contents.htmlfunctx:remove-elements-not-contentsdeclare function functx:remove-elements-not-contents($nodes as node()*, $names as xs:string*) as node()*nodesnode()namesxs:stringnode()*http://www.functx.comname-testhttp://www.functx.comremove-elements-not-contentshttp://www.w3.org/2005/xpath-functionsnamehttp://www.w3.org/2005/xpath-functionsnode-name Removes child elements from an XML node, based on name
Priscilla Walmsley, Datypic1.0$elements the element(s) from which you wish to remove the children$names the names of the child elements to removehttp://www.xqueryfunctions.com/xq/functx_remove-elements.htmlfunctx:remove-elementsdeclare function functx:remove-elements($elements as element(*)*, $names as xs:string*) as element(*)*elementselement(*)namesxs:stringelement(*)*http://www.functx.comname-testhttp://www.w3.org/2005/xpath-functionsnamehttp://www.w3.org/2005/xpath-functionsnode-namehttp://www.w3.org/2005/xpath-functionsnot Repeats a string a given number of times
Priscilla Walmsley, Datypic1.0$stringToRepeat the string to repeat$count the desired number of copieshttp://www.xqueryfunctions.com/xq/functx_repeat-string.htmlfunctx:repeat-stringdeclare function functx:repeat-string($stringToRepeat as xs:string?, $count as xs:integer) as xs:stringstringToRepeatxs:stringcountxs:integerxs:stringhttp://www.w3.org/2005/xpath-functionsstring-join Replaces the beginning of a string, up to a matched pattern
Priscilla Walmsley, Datypic1.0$arg the entire string to change$pattern the pattern of characters to replace up to$replacement the replacement stringhttp://www.xqueryfunctions.com/xq/functx_replace-beginning.htmlfunctx:replace-beginningdeclare function functx:replace-beginning($arg as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:stringargxs:stringpatternxs:stringreplacementxs:stringxs:stringhttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsreplace Updates the content of one or more elements
Priscilla Walmsley, Datypic1.0$elements the elements whose content you wish to replace$values the replacement valueshttp://www.xqueryfunctions.com/xq/functx_replace-element-values.htmlfunctx:replace-element-valuesdeclare function functx:replace-element-values($elements as element(*)*, $values as xs:anyAtomicType*) as element(*)*elementselement(*)valuesxs:anyAtomicTypeelement(*)*http://www.w3.org/2005/xpath-functionsnode-name Replaces the first match of a pattern
Priscilla Walmsley, Datypic1.0$arg the entire string to change$pattern the pattern of characters to replace$replacement the replacement stringhttp://www.xqueryfunctions.com/xq/functx_replace-first.htmlfunctx:replace-firstdeclare function functx:replace-first($arg as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:stringargxs:stringpatternxs:stringreplacementxs:stringxs:stringhttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsreplace Performs multiple replacements, using pairs of replace parameters
Priscilla Walmsley, Datypic1.0$arg the string to manipulate$changeFrom the sequence of strings or patterns to change from$changeTo the sequence of strings to change tohttp://www.xqueryfunctions.com/xq/functx_replace-multi.htmlfunctx:replace-multideclare function functx:replace-multi($arg as xs:string?, $changeFrom as xs:string*, $changeTo as xs:string*) as xs:string?argxs:stringchangeFromxs:stringchangeToxs:stringxs:string?http://www.functx.comif-absenthttp://www.functx.comreplace-multihttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionspositionhttp://www.w3.org/2005/xpath-functionsreplace Reverses the order of characters
Priscilla Walmsley, Datypic1.0$arg the string to reversehttp://www.xqueryfunctions.com/xq/functx_reverse-string.htmlfunctx:reverse-stringdeclare function functx:reverse-string($arg as xs:string?) as xs:stringargxs:stringxs:stringhttp://www.w3.org/2005/xpath-functionscodepoints-to-stringhttp://www.w3.org/2005/xpath-functionsreversehttp://www.w3.org/2005/xpath-functionsstring-to-codepoints Trims trailing whitespace
Priscilla Walmsley, Datypic1.0$arg the string to trimhttp://www.xqueryfunctions.com/xq/functx_right-trim.htmlfunctx:right-trimdeclare function functx:right-trim($arg as xs:string?) as xs:stringargxs:stringxs:stringhttp://www.w3.org/2005/xpath-functionsreplace Returns the scheme from a URI
Priscilla Walmsley, Datypic1.0$uri the URIhttp://www.xqueryfunctions.com/xq/functx_scheme-from-uri.htmlfunctx:scheme-from-urideclare function functx:scheme-from-uri($uri as xs:string?) as xs:string?urixs:stringxs:string?http://www.w3.org/2005/xpath-functionssubstring-before Whether two sequences have the same XML node content and/or values
Priscilla Walmsley, Datypic1.0$seq1 the first sequence$seq2 the second sequencehttp://www.xqueryfunctions.com/xq/functx_sequence-deep-equal.htmlfunctx:sequence-deep-equaldeclare function functx:sequence-deep-equal($seq1 as item()*, $seq2 as item()*) as xs:booleanseq1item()seq2item()xs:booleanhttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionsdeep-equalhttp://www.w3.org/2005/xpath-functionsmax Whether two sequences contain the same XML nodes, regardless of order
Priscilla Walmsley, Datypic1.0$seq1 the first sequence of nodes$seq2 the second sequence of nodeshttp://www.xqueryfunctions.com/xq/functx_sequence-node-equal-any-order.htmlfunctx:sequence-node-equal-any-orderdeclare function functx:sequence-node-equal-any-order($seq1 as node()*, $seq2 as node()*) as xs:booleanseq1node()seq2node()xs:booleanhttp://www.w3.org/2005/xpath-functionsnot Whether two sequences contain the same XML nodes, in the same order
Priscilla Walmsley, Datypic1.0$seq1 the first sequence of nodes$seq2 the second sequence of nodeshttp://www.xqueryfunctions.com/xq/functx_sequence-node-equal.htmlfunctx:sequence-node-equaldeclare function functx:sequence-node-equal($seq1 as node()*, $seq2 as node()*) as xs:booleanseq1node()seq2node()xs:booleanhttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionsmax The sequence type that represents a sequence of nodes or values
Priscilla Walmsley, Datypic1.0$items the items whose sequence type you want to determinehttp://www.xqueryfunctions.com/xq/functx_sequence-type.htmlfunctx:sequence-typedeclare function functx:sequence-type($items as item()*) as xs:stringitemsitem()xs:stringhttp://www.functx.comatomic-typehttp://www.functx.comnode-kindhttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionsdistinct-valueshttp://www.w3.org/2005/xpath-functionsempty The siblings of an XML element that have the same name
Priscilla Walmsley, Datypic1.0$element the nodehttp://www.xqueryfunctions.com/xq/functx_siblings-same-name.htmlfunctx:siblings-same-namedeclare function functx:siblings-same-name($element as element(*)?) as element(*)*elementelement(*)element(*)*http://www.w3.org/2005/xpath-functionsnode-name The siblings of an XML node
Priscilla Walmsley, Datypic1.0$node the nodehttp://www.xqueryfunctions.com/xq/functx_siblings.htmlfunctx:siblingsdeclare function functx:siblings($node as node()?) as node()*nodenode()node()* Sorts a sequence of numeric values or nodes
Priscilla Walmsley, Datypic1.0$seq the sequence to sorthttp://www.xqueryfunctions.com/xq/functx_sort-as-numeric.htmlfunctx:sort-as-numericdeclare function functx:sort-as-numeric($seq as item()*) as item()*seqitem()item()*http://www.w3.org/2005/xpath-functionsnumber Sorts a sequence of values or nodes regardless of capitalization
Priscilla Walmsley, Datypic1.0$seq the sequence to sorthttp://www.xqueryfunctions.com/xq/functx_sort-case-insensitive.htmlfunctx:sort-case-insensitivedeclare function functx:sort-case-insensitive($seq as item()*) as item()*seqitem()item()*http://www.w3.org/2005/xpath-functionsstringhttp://www.w3.org/2005/xpath-functionsupper-case Sorts a sequence of nodes in document order
Priscilla Walmsley, Datypic1.0$seq the sequence to sorthttp://www.xqueryfunctions.com/xq/functx_sort-document-order.htmlfunctx:sort-document-orderdeclare function functx:sort-document-order($seq as node()*) as node()*seqnode()node()* Sorts a sequence of values or nodes
Priscilla Walmsley, Datypic1.0$seq the sequence to sorthttp://www.xqueryfunctions.com/xq/functx_sort.htmlfunctx:sortdeclare function functx:sort($seq as item()*) as item()*seqitem()item()* Performs substring-after, returning the entire string if it does not contain the delimiter
Priscilla Walmsley, Datypic1.0$arg the string to substring$delim the delimiterhttp://www.xqueryfunctions.com/xq/functx_substring-after-if-contains.htmlfunctx:substring-after-if-containsdeclare function functx:substring-after-if-contains($arg as xs:string?, $delim as xs:string) as xs:string?argxs:stringdelimxs:stringxs:string?http://www.w3.org/2005/xpath-functionscontainshttp://www.w3.org/2005/xpath-functionssubstring-after The substring after the last text that matches a regex
Priscilla Walmsley, Datypic1.0$arg the string to substring$regex the regular expressionhttp://www.xqueryfunctions.com/xq/functx_substring-after-last-match.htmlfunctx:substring-after-last-matchdeclare function functx:substring-after-last-match($arg as xs:string?, $regex as xs:string) as xs:stringargxs:stringregexxs:stringxs:stringhttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsreplace The substring after the last occurrence of a delimiter
Priscilla Walmsley, Datypic1.0$arg the string to substring$delim the delimiterhttp://www.xqueryfunctions.com/xq/functx_substring-after-last.htmlfunctx:substring-after-lastdeclare function functx:substring-after-last($arg as xs:string?, $delim as xs:string) as xs:stringargxs:stringdelimxs:stringxs:stringhttp://www.functx.comescape-for-regexhttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsreplace The substring after the first text that matches a regex
Priscilla Walmsley, Datypic1.0$arg the string to substring$regex the regular expressionhttp://www.xqueryfunctions.com/xq/functx_substring-after-match.htmlfunctx:substring-after-matchdeclare function functx:substring-after-match($arg as xs:string?, $regex as xs:string) as xs:string?argxs:stringregexxs:stringxs:string?http://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsreplace Performs substring-before, returning the entire string if it does not contain the delimiter
Priscilla Walmsley, Datypic1.0$arg the string to substring$delim the delimiterhttp://www.xqueryfunctions.com/xq/functx_substring-before-if-contains.htmlfunctx:substring-before-if-containsdeclare function functx:substring-before-if-contains($arg as xs:string?, $delim as xs:string) as xs:string?argxs:stringdelimxs:stringxs:string?http://www.w3.org/2005/xpath-functionscontainshttp://www.w3.org/2005/xpath-functionssubstring-before The substring after the first text that matches a regex
Priscilla Walmsley, Datypic1.0$arg the string to substring$regex the regular expressionhttp://www.xqueryfunctions.com/xq/functx_substring-before-last-match.htmlfunctx:substring-before-last-matchdeclare function functx:substring-before-last-match($arg as xs:string?, $regex as xs:string) as xs:string?argxs:stringregexxs:stringxs:string?http://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsreplace The substring before the last occurrence of a delimiter
Priscilla Walmsley, Datypic1.0$arg the string to substring$delim the delimiterhttp://www.xqueryfunctions.com/xq/functx_substring-before-last.htmlfunctx:substring-before-lastdeclare function functx:substring-before-last($arg as xs:string?, $delim as xs:string) as xs:stringargxs:stringdelimxs:stringxs:stringhttp://www.functx.comescape-for-regexhttp://www.w3.org/2005/xpath-functionsconcathttp://www.w3.org/2005/xpath-functionsmatcheshttp://www.w3.org/2005/xpath-functionsreplace The substring before the last text that matches a regex
Priscilla Walmsley, Datypic1.0$arg the string to substring$regex the regular expressionhttp://www.xqueryfunctions.com/xq/functx_substring-before-match.htmlfunctx:substring-before-matchdeclare function functx:substring-before-match($arg as xs:string?, $regex as xs:string) as xs:stringargxs:stringregexxs:stringxs:stringhttp://www.w3.org/2005/xpath-functionstokenize Construct a time from an hour, minute and second
Priscilla Walmsley, Datypic1.0$hour the hour$minute the minute$second the secondhttp://www.xqueryfunctions.com/xq/functx_time.htmlfunctx:timedeclare function functx:time($hour as xs:anyAtomicType, $minute as xs:anyAtomicType, $second as xs:anyAtomicType) as xs:timehourxs:anyAtomicTypeminutexs:anyAtomicTypesecondxs:anyAtomicTypexs:timehttp://www.functx.compad-integer-to-lengthhttp://www.w3.org/2001/XMLSchemaintegerhttp://www.w3.org/2001/XMLSchematimehttp://www.w3.org/2005/xpath-functionsconcat Converts an xs:dayTimeDuration into a timezone like "-05:00" or "Z"
Priscilla Walmsley, Datypic1.0$duration the durationhttp://www.xqueryfunctions.com/xq/functx_timezone-from-duration.htmlfunctx:timezone-from-durationdeclare function functx:timezone-from-duration($duration as xs:dayTimeDuration) as xs:stringdurationxs:dayTimeDurationxs:stringhttp://www.w3.org/2001/XMLSchemaQNamehttp://www.w3.org/2005/xpath-functionserrorhttp://www.w3.org/2005/xpath-functionsmatcheshttp://www.w3.org/2005/xpath-functionsreplacehttp://www.w3.org/2005/xpath-functionsstring The total number of days in a dayTimeDuration
Priscilla Walmsley, Datypic1.0$duration the durationhttp://www.xqueryfunctions.com/xq/functx_total-days-from-duration.htmlfunctx:total-days-from-durationdeclare function functx:total-days-from-duration($duration as xs:dayTimeDuration?) as xs:decimal?durationxs:dayTimeDurationxs:decimal?http://www.w3.org/2001/XMLSchemadayTimeDuration The total number of hours in a dayTimeDuration
Priscilla Walmsley, Datypic1.0$duration the durationhttp://www.xqueryfunctions.com/xq/functx_total-hours-from-duration.htmlfunctx:total-hours-from-durationdeclare function functx:total-hours-from-duration($duration as xs:dayTimeDuration?) as xs:decimal?durationxs:dayTimeDurationxs:decimal?http://www.w3.org/2001/XMLSchemadayTimeDuration The total number of minutes in a dayTimeDuration
Priscilla Walmsley, Datypic1.0$duration the durationhttp://www.xqueryfunctions.com/xq/functx_total-minutes-from-duration.htmlfunctx:total-minutes-from-durationdeclare function functx:total-minutes-from-duration($duration as xs:dayTimeDuration?) as xs:decimal?durationxs:dayTimeDurationxs:decimal?http://www.w3.org/2001/XMLSchemadayTimeDuration The total number of months in a yearMonthDuration
Priscilla Walmsley, Datypic1.0$duration the durationhttp://www.xqueryfunctions.com/xq/functx_total-months-from-duration.htmlfunctx:total-months-from-durationdeclare function functx:total-months-from-duration($duration as xs:yearMonthDuration?) as xs:decimal?durationxs:yearMonthDurationxs:decimal?http://www.w3.org/2001/XMLSchemayearMonthDuration The total number of seconds in a dayTimeDuration
Priscilla Walmsley, Datypic1.0$duration the durationhttp://www.xqueryfunctions.com/xq/functx_total-seconds-from-duration.htmlfunctx:total-seconds-from-durationdeclare function functx:total-seconds-from-duration($duration as xs:dayTimeDuration?) as xs:decimal?durationxs:dayTimeDurationxs:decimal?http://www.w3.org/2001/XMLSchemadayTimeDuration The total number of years in a yearMonthDuration
Priscilla Walmsley, Datypic1.0$duration the durationhttp://www.xqueryfunctions.com/xq/functx_total-years-from-duration.htmlfunctx:total-years-from-durationdeclare function functx:total-years-from-duration($duration as xs:yearMonthDuration?) as xs:decimal?durationxs:yearMonthDurationxs:decimal?http://www.w3.org/2001/XMLSchemayearMonthDuration Trims leading and trailing whitespace
Priscilla Walmsley, Datypic1.0$arg the string to trimhttp://www.xqueryfunctions.com/xq/functx_trim.htmlfunctx:trimdeclare function functx:trim($arg as xs:string?) as xs:stringargxs:stringxs:stringhttp://www.w3.org/2005/xpath-functionsreplace Updates the attribute value of an XML element
Priscilla Walmsley, Datypic1.0$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 addhttp://www.xqueryfunctions.com/xq/functx_update-attributes.htmlfunctx:update-attributesdeclare function functx:update-attributes($elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element(*)?elementselement(*)attrNamesxs:QNameattrValuesxs:anyAtomicTypeelement(*)?http://www.w3.org/2005/xpath-functionsnode-namehttp://www.w3.org/2005/xpath-functionsnot The values in one sequence that aren't in another sequence
W3C XML Query Working Group1.0$arg1 the first sequence$arg2 the second sequencehttp://www.xqueryfunctions.com/xq/functx_value-except.htmlfunctx:value-exceptdeclare function functx:value-except($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*arg1xs:anyAtomicTypearg2xs:anyAtomicTypexs:anyAtomicType*http://www.w3.org/2005/xpath-functionsdistinct-valueshttp://www.w3.org/2005/xpath-functionsnot The intersection of two sequences of values
W3C XML Query Working Group1.0$arg1 the first sequence$arg2 the second sequencehttp://www.xqueryfunctions.com/xq/functx_value-intersect.htmlfunctx:value-intersectdeclare function functx:value-intersect($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*arg1xs:anyAtomicTypearg2xs:anyAtomicTypexs:anyAtomicType*http://www.w3.org/2005/xpath-functionsdistinct-values The union of two sequences of values
W3C XML Query Working Group1.0$arg1 the first sequence$arg2 the second sequencehttp://www.xqueryfunctions.com/xq/functx_value-union.htmlfunctx:value-uniondeclare function functx:value-union($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*arg1xs:anyAtomicTypearg2xs:anyAtomicTypexs:anyAtomicType*http://www.w3.org/2005/xpath-functionsdistinct-values The number of words
Priscilla Walmsley, Datypic1.0$arg the string to measurehttp://www.xqueryfunctions.com/xq/functx_word-count.htmlfunctx:word-countdeclare function functx:word-count($arg as xs:string?) as xs:integerargxs:stringxs:integerhttp://www.w3.org/2005/xpath-functionscounthttp://www.w3.org/2005/xpath-functionstokenize Turns a string of words into camelCase
Priscilla Walmsley, Datypic1.0$arg the string to modifyhttp://www.xqueryfunctions.com/xq/functx_words-to-camel-case.htmlfunctx:words-to-camel-casedeclare function functx:words-to-camel-case($arg as xs:string?) as xs:stringargxs:stringxs:stringhttp://www.functx.comcapitalize-firsthttp://www.w3.org/2005/xpath-functionspositionhttp://www.w3.org/2005/xpath-functionsstring-joinhttp://www.w3.org/2005/xpath-functionstokenize Wraps a sequence of atomic values in XML elements
Priscilla Walmsley, Datypic1.0$values the values to wrap in elements$elementName the name of the elements to constructhttp://www.xqueryfunctions.com/xq/functx_wrap-values-in-elements.htmlfunctx:wrap-values-in-elementsdeclare function functx:wrap-values-in-elements($values as xs:anyAtomicType*, $elementName as xs:QName) as element(*)*valuesxs:anyAtomicTypeelementNamexs:QNameelement(*)* Construct a yearMonthDuration from a number of years and months
Priscilla Walmsley, Datypic1.0$years the number of years$months the number of monthshttp://www.xqueryfunctions.com/xq/functx_yearmonthduration.htmlfunctx:yearMonthDurationdeclare function functx:yearMonthDuration($years as xs:decimal?, $months as xs:integer?) as xs:yearMonthDurationyearsxs:decimalmonthsxs:integerxs:yearMonthDurationhttp://www.functx.comif-emptyhttp://www.w3.org/2001/XMLSchemayearMonthDuration