http://www.functx.com/ ZC

Module Description
Before using any of the functions below please remember to import the module namespace:
import module namespace functx = "http://www.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.

Version:

1.0

Module Resources
Related Documentation

For more details please also see:

Namespaces
functx http://www.functx.com/
Function Summary
add-attributes ( $elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType* ) as element(*)?
add-months ( $date as xs:anyAtomicType?, $months as xs:integer ) as xs:date?
add-or-update-attributes ( $elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType* ) as element(*)?
all-whitespace ( $arg as xs:string? ) as xs:boolean
are-distinct-values ( $seq as xs:anyAtomicType* ) as xs:boolean
atomic-type ( $values as xs:anyAtomicType* ) as xs:string*
avg-empty-is-zero ( $values as xs:anyAtomicType*, $allNodes as node()* ) as xs:double
between-exclusive ( $value as xs:anyAtomicType?, $minValue as xs:anyAtomicType, $maxValue as xs:anyAtomicType ) as xs:boolean
between-inclusive ( $value as xs:anyAtomicType?, $minValue as xs:anyAtomicType, $maxValue as xs:anyAtomicType ) as xs:boolean
camel-case-to-words ( $arg as xs:string?, $delim as xs:string ) as xs:string
capitalize-first ( $arg as xs:string? ) as xs:string?
change-element-names-deep ( $nodes as node()*, $oldNames as xs:QName*, $newNames as xs:QName* ) as node()*
change-element-ns ( $elements as element(*)*, $newns as xs:string, $prefix as xs:string ) as element(*)?
change-element-ns-deep ( $nodes as node()*, $newns as xs:string, $prefix as xs:string ) as node()*
chars ( $arg as xs:string? ) as xs:string*
contains-any-of ( $arg as xs:string?, $searchStrings as xs:string* ) as xs:boolean
contains-case-insensitive ( $arg as xs:string?, $substring as xs:string ) as xs:boolean?
contains-word ( $arg as xs:string?, $word as xs:string ) as xs:boolean
copy-attributes ( $copyTo as element(*), $copyFrom as element(*) ) as element(*)
date ( $year as xs:anyAtomicType, $month as xs:anyAtomicType, $day as xs:anyAtomicType ) as xs:date
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
day-in-year ( $date as xs:anyAtomicType? ) as xs:integer?
day-of-week ( $date as xs:anyAtomicType? ) as xs:integer?
day-of-week-abbrev-en ( $date as xs:anyAtomicType? ) as xs:string?
day-of-week-name-en ( $date as xs:anyAtomicType? ) as xs:string?
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-in-month ( $date as xs:anyAtomicType? ) as xs:integer?
depth-of-node ( $node as node()? ) as xs:integer
distinct-attribute-names ( $nodes as node()* ) as xs:string*
distinct-deep ( $nodes as node()* ) as node()*
distinct-element-names ( $nodes as node()* ) as xs:string*
distinct-element-paths ( $nodes as node()* ) as xs:string*
distinct-nodes ( $nodes as node()* ) as node()*
duration-from-timezone ( $timezone as xs:string ) as xs:dayTimeDuration
dynamic-path ( $parent as node(), $path as xs:string ) as item()*
escape-for-regex ( $arg as xs:string? ) as xs:string
exclusive-or ( $arg1 as xs:boolean?, $arg2 as xs:boolean? ) as xs:boolean?
first-day-of-month ( $date as xs:anyAtomicType? ) as xs:date?
first-day-of-year ( $date as xs:anyAtomicType? ) as xs:date?
first-node ( $nodes as node()* ) as node()?
follows-not-descendant ( $a as node()?, $b as node()? ) as xs:boolean
format-as-title-en ( $titles as xs:string* ) as xs:string*
fragment-from-uri ( $uri as xs:string? ) as xs:string?
get-matches ( $string as xs:string?, $regex as xs:string ) as xs:string*
get-matches-and-non-matches ( $string as xs:string?, $regex as xs:string ) as element(*)*
has-element-only-content ( $element as element(*) ) as xs:boolean
has-empty-content ( $element as element(*) ) as xs:boolean
has-mixed-content ( $element as element(*) ) as xs:boolean
has-simple-content ( $element as element(*) ) as xs:boolean
id-from-element ( $element as element(*)? ) as xs:string?
id-untyped ( $node as node()*, $id as xs:anyAtomicType ) as element(*)*
if-absent ( $arg as item()*, $value as item()* ) as item()*
if-empty ( $arg as item()?, $value as item()* ) as item()*
index-of-deep-equal-node ( $nodes as node()*, $nodeToFind as node() ) as xs:integer*
index-of-match-first ( $arg as xs:string?, $pattern as xs:string ) as xs:integer?
index-of-node ( $nodes as node()*, $nodeToFind as node() ) as xs:integer*
index-of-string ( $arg as xs:string?, $substring as xs:string ) as xs:integer*
index-of-string-first ( $arg as xs:string?, $substring as xs:string ) as xs:integer?
index-of-string-last ( $arg as xs:string?, $substring as xs:string ) as xs:integer?
insert-string ( $originalString as xs:string?, $stringToInsert as xs:string?, $pos as xs:integer ) as xs:string
is-a-number ( $value as xs:anyAtomicType? ) as xs:boolean
is-absolute-uri ( $uri as xs:string? ) as xs:boolean
is-ancestor ( $node1 as node(), $node2 as node() ) as xs:boolean
is-descendant ( $node1 as node(), $node2 as node() ) as xs:boolean
is-leap-year ( $date as xs:anyAtomicType? ) as xs:boolean
is-node-among-descendants ( $node as node()?, $seq as node()* ) as xs:boolean
is-node-among-descendants-deep-equal ( $node as node()?, $seq as node()* ) as xs:boolean
is-node-in-sequence ( $node as node()?, $seq as node()* ) as xs:boolean
is-node-in-sequence-deep-equal ( $node as node()?, $seq as node()* ) as xs:boolean
is-value-in-sequence ( $value as xs:anyAtomicType?, $seq as xs:anyAtomicType* ) as xs:boolean
last-day-of-month ( $date as xs:anyAtomicType? ) as xs:date?
last-day-of-year ( $date as xs:anyAtomicType? ) as xs:date?
last-node ( $nodes as node()* ) as node()?
leaf-elements ( $root as node()? ) as element(*)*
left-trim ( $arg as xs:string? ) as xs:string
line-count ( $arg as xs:string? ) as xs:integer
lines ( $arg as xs:string? ) as xs:string*
max-depth ( $root as node()? ) as xs:integer?
max-determine-type ( $seq as xs:anyAtomicType* ) as xs:anyAtomicType?
max-line-length ( $arg as xs:string? ) as xs:integer
max-node ( $nodes as node()* ) as node()*
max-string ( $strings as xs:anyAtomicType* ) as xs:string?
min-determine-type ( $seq as xs:anyAtomicType* ) as xs:anyAtomicType?
min-node ( $nodes as node()* ) as node()*
min-non-empty-string ( $strings as xs:string* ) as xs:string?
min-string ( $strings as xs:anyAtomicType* ) as xs:string?
mmddyyyy-to-date ( $dateString as xs:string? ) as xs:date?
month-abbrev-en ( $date as xs:anyAtomicType? ) as xs:string?
The month of a date as an abbreviated word (Jan, Feb, etc.
month-name-en ( $date as xs:anyAtomicType? ) as xs:string?
The month of a date as a word (January, February, etc.
name-test ( $testname as xs:string?, $names as xs:string* ) as xs:boolean
namespaces-in-use ( $root as node()? ) as xs:anyURI*
next-day ( $date as xs:anyAtomicType? ) as xs:date?
node-kind ( $nodes as node()* ) as xs:string*
The XML node kind (element, attribute, text, etc.
non-distinct-values ( $seq as xs:anyAtomicType* ) as xs:anyAtomicType*
number-of-matches ( $arg as xs:string?, $pattern as xs:string ) as xs:integer
open-ref-document ( $refNode as node() ) as document()
ordinal-number-en ( $num as xs:integer? ) as xs:string
Reformats a number as an ordinal number, e.
pad-integer-to-length ( $integerToPad as xs:anyAtomicType?, $length as xs:integer ) as xs:string
pad-string-to-length ( $stringToPad as xs:string?, $padChar as xs:string, $length as xs:integer ) as xs:string
path-to-node ( $nodes as node()* ) as xs:string*
path-to-node-with-pos ( $node as node()? ) as xs:string
precedes-not-ancestor ( $a as node()?, $b as node()? ) as xs:boolean
previous-day ( $date as xs:anyAtomicType? ) as xs:date?
remove-attributes ( $elements as element(*)*, $names as xs:string* ) as element(*)
remove-attributes-deep ( $nodes as node()*, $names as xs:string* ) as node()*
remove-elements ( $elements as element(*)*, $names as xs:string* ) as element(*)*
remove-elements-deep ( $nodes as node()*, $names as xs:string* ) as node()*
remove-elements-not-contents ( $nodes as node()*, $names as xs:string* ) as node()*
repeat-string ( $stringToRepeat as xs:string?, $count as xs:integer ) as xs:string
replace-beginning ( $arg as xs:string?, $pattern as xs:string, $replacement as xs:string ) as xs:string
replace-element-values ( $elements as element(*)*, $values as xs:anyAtomicType* ) as element(*)*
replace-first ( $arg as xs:string?, $pattern as xs:string, $replacement as xs:string ) as xs:string
replace-multi ( $arg as xs:string?, $changeFrom as xs:string*, $changeTo as xs:string* ) as xs:string?
reverse-string ( $arg as xs:string? ) as xs:string
right-trim ( $arg as xs:string? ) as xs:string
scheme-from-uri ( $uri as xs:string? ) as xs:string?
sequence-deep-equal ( $seq1 as item()*, $seq2 as item()* ) as xs:boolean
sequence-node-equal ( $seq1 as node()*, $seq2 as node()* ) as xs:boolean
sequence-node-equal-any-order ( $seq1 as node()*, $seq2 as node()* ) as xs:boolean
sequence-type ( $items as item()* ) as xs:string
siblings ( $node as node()? ) as node()*
siblings-same-name ( $element as element(*)? ) as element(*)*
sort ( $seq as item()* ) as item()*
sort-as-numeric ( $seq as item()* ) as item()*
sort-case-insensitive ( $seq as item()* ) as item()*
sort-document-order ( $seq as node()* ) as node()*
substring-after-if-contains ( $arg as xs:string?, $delim as xs:string ) as xs:string?
substring-after-last ( $arg as xs:string?, $delim as xs:string ) as xs:string
substring-after-last-match ( $arg as xs:string?, $regex as xs:string ) as xs:string
substring-after-match ( $arg as xs:string?, $regex as xs:string ) as xs:string?
substring-before-if-contains ( $arg as xs:string?, $delim as xs:string ) as xs:string?
substring-before-last ( $arg as xs:string?, $delim as xs:string ) as xs:string
substring-before-last-match ( $arg as xs:string?, $regex as xs:string ) as xs:string?
substring-before-match ( $arg as xs:string?, $regex as xs:string ) as xs:string
time ( $hour as xs:anyAtomicType, $minute as xs:anyAtomicType, $second as xs:anyAtomicType ) as xs:time
timezone-from-duration ( $duration as xs:dayTimeDuration ) as xs:string
total-days-from-duration ( $duration as xs:dayTimeDuration? ) as xs:decimal?
total-hours-from-duration ( $duration as xs:dayTimeDuration? ) as xs:decimal?
total-minutes-from-duration ( $duration as xs:dayTimeDuration? ) as xs:decimal?
total-months-from-duration ( $duration as xs:yearMonthDuration? ) as xs:decimal?
total-seconds-from-duration ( $duration as xs:dayTimeDuration? ) as xs:decimal?
total-years-from-duration ( $duration as xs:yearMonthDuration? ) as xs:decimal?
trim ( $arg as xs:string? ) as xs:string
update-attributes ( $elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType* ) as element(*)?
value-except ( $arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType* ) as xs:anyAtomicType*
value-intersect ( $arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType* ) as xs:anyAtomicType*
value-union ( $arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType* ) as xs:anyAtomicType*
word-count ( $arg as xs:string? ) as xs:integer
words-to-camel-case ( $arg as xs:string? ) as xs:string
wrap-values-in-elements ( $values as xs:anyAtomicType*, $elementName as xs:QName ) as element(*)*
yearMonthDuration ( $years as xs:decimal?, $months as xs:integer? ) as xs:yearMonthDuration
Functions
add-attributes back to 'Function Summary'
declare function functx:add-attributes (
            $elements as element(*)*, 
            $attrNames as xs:QName*, 
            $attrValues as xs:anyAtomicType* 
 ) as element(*)?

Adds attributes to XML elements

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

add-months back to 'Function Summary'
declare function functx:add-months (
            $date as xs:anyAtomicType?, 
            $months as xs:integer 
 ) as xs:date?

Adds months to a date

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

add-or-update-attributes back to 'Function Summary'
declare function functx:add-or-update-attributes (
            $elements as element(*)*, 
            $attrNames as xs:QName*, 
            $attrValues as xs:anyAtomicType* 
 ) as element(*)?

Adds attributes to XML elements

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

all-whitespace back to 'Function Summary'
declare function functx:all-whitespace (
            $arg as xs:string? 
 ) as xs:boolean

Whether a value is all whitespace or a zero-length string

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

are-distinct-values back to 'Function Summary'
declare function functx:are-distinct-values (
            $seq as xs:anyAtomicType* 
 ) as xs:boolean

Whether all the values in a sequence are distinct

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

atomic-type back to 'Function Summary'
declare function functx:atomic-type (
            $values as xs:anyAtomicType* 
 ) as xs:string*

The built-in type of an atomic value

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

avg-empty-is-zero back to 'Function Summary'
declare function functx:avg-empty-is-zero (
            $values as xs:anyAtomicType*, 
            $allNodes as node()* 
 ) as xs:double

The average, counting "empty" values as zero

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

between-exclusive back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

between-inclusive back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

camel-case-to-words back to 'Function Summary'
declare function functx:camel-case-to-words (
            $arg as xs:string?, 
            $delim as xs:string 
 ) as xs:string

Turns a camelCase string into space-separated words

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

capitalize-first back to 'Function Summary'
declare function functx:capitalize-first (
            $arg as xs:string? 
 ) as xs:string?

Capitalizes the first character of a string

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

change-element-names-deep back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

change-element-ns back to 'Function Summary'
declare function functx:change-element-ns (
            $elements as element(*)*, 
            $newns as xs:string, 
            $prefix as xs:string 
 ) as element(*)?

Changes the namespace of XML elements

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

change-element-ns-deep back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

chars back to 'Function Summary'
declare function functx:chars (
            $arg as xs:string? 
 ) as xs:string*

Converts a string to a sequence of characters

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

contains-any-of back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

contains-case-insensitive back to 'Function Summary'
declare function functx:contains-case-insensitive (
            $arg as xs:string?, 
            $substring as xs:string 
 ) as xs:boolean?

Whether one string contains another, without regard to case

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

contains-word back to 'Function Summary'
declare function functx:contains-word (
            $arg as xs:string?, 
            $word as xs:string 
 ) as xs:boolean

Whether one string contains another, as a separate word

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

copy-attributes back to 'Function Summary'
declare function functx:copy-attributes (
            $copyTo as element(*), 
            $copyFrom as element(*) 
 ) as element(*)

Copies attributes from one element to another

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

date back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

dateTime back to 'Function Summary'
declare 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:dateTime

Construct a date/time from individual components

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

day-in-year back to 'Function Summary'
declare function functx:day-in-year (
            $date as xs:anyAtomicType? 
 ) as xs:integer?

The day of the year (a number between 1 and 366)

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

day-of-week back to 'Function Summary'
declare function functx:day-of-week (
            $date as xs:anyAtomicType? 
 ) as xs:integer?

The day of the week, from a date

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

day-of-week-abbrev-en back to 'Function Summary'
declare function functx:day-of-week-abbrev-en (
            $date as xs:anyAtomicType? 
 ) as xs:string?

The abbreviated day of the week, from a date, in English

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

day-of-week-name-en back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

dayTimeDuration back to 'Function Summary'
declare function 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.

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

days-in-month back to 'Function Summary'
declare function functx:days-in-month (
            $date as xs:anyAtomicType? 
 ) as xs:integer?

Number of days in the month

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

depth-of-node back to 'Function Summary'
declare function functx:depth-of-node (
            $node as node()? 
 ) as xs:integer

The depth (level) of a node in an XML tree

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

distinct-attribute-names back to 'Function Summary'
declare function functx:distinct-attribute-names (
            $nodes as node()* 
 ) as xs:string*

The distinct names of all attributes in an XML fragment

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

distinct-deep back to 'Function Summary'
declare function functx:distinct-deep (
            $nodes as node()* 
 ) as node()*

The XML nodes with distinct values, taking into account attributes and descendants

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

distinct-element-names back to 'Function Summary'
declare function functx:distinct-element-names (
            $nodes as node()* 
 ) as xs:string*

The distinct names of all elements in an XML fragment

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

distinct-element-paths back to 'Function Summary'
declare function functx:distinct-element-paths (
            $nodes as node()* 
 ) as xs:string*

The distinct paths of all descendant elements in an XML fragment

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

distinct-nodes back to 'Function Summary'
declare function functx:distinct-nodes (
            $nodes as node()* 
 ) as node()*

The distinct XML nodes in a sequence (by node identity)

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

duration-from-timezone back to 'Function Summary'
declare function functx:duration-from-timezone (
            $timezone as xs:string 
 ) as xs:dayTimeDuration

Converts a timezone like "-05:00" or "Z" into xs:dayTimeDuration

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

dynamic-path back to 'Function Summary'
declare function functx:dynamic-path (
            $parent as node(), 
            $path as xs:string 
 ) as item()*

Dynamically evaluates a simple XPath path

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

escape-for-regex back to 'Function Summary'
declare function functx:escape-for-regex (
            $arg as xs:string? 
 ) as xs:string

Escapes regex special characters

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

exclusive-or back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

first-day-of-month back to 'Function Summary'
declare function functx:first-day-of-month (
            $date as xs:anyAtomicType? 
 ) as xs:date?

The first day of the month of a date

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

first-day-of-year back to 'Function Summary'
declare function functx:first-day-of-year (
            $date as xs:anyAtomicType? 
 ) as xs:date?

The first day of the year of a date

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

first-node back to 'Function Summary'
declare function functx:first-node (
            $nodes as node()* 
 ) as node()?

The XML node in a sequence that appears first in document order

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

follows-not-descendant back to 'Function Summary'
declare function functx:follows-not-descendant (
            $a as node()?, 
            $b as node()? 
 ) as xs:boolean

Whether an XML node follows another without being its descendant

Parameters:
Version:

1.0

Author:

W3C XML Query Working Group

See:

format-as-title-en back to 'Function Summary'
declare function functx:format-as-title-en (
            $titles as xs:string* 
 ) as xs:string*

Moves title words like "the" and "a" to the end of strings

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

fragment-from-uri back to 'Function Summary'
declare function functx:fragment-from-uri (
            $uri as xs:string? 
 ) as xs:string?

Returns the fragment from a URI

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

get-matches back to 'Function Summary'
declare function functx:get-matches (
            $string as xs:string?, 
            $regex as xs:string 
 ) as xs:string*

Return the matching regions of a string

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

get-matches-and-non-matches back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

has-element-only-content back to 'Function Summary'
declare function functx:has-element-only-content (
            $element as element(*) 
 ) as xs:boolean

Whether an element has element-only content

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

has-empty-content back to 'Function Summary'
declare function functx:has-empty-content (
            $element as element(*) 
 ) as xs:boolean

Whether an element has empty content

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

has-mixed-content back to 'Function Summary'
declare function functx:has-mixed-content (
            $element as element(*) 
 ) as xs:boolean

Whether an element has mixed content

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

has-simple-content back to 'Function Summary'
declare function functx:has-simple-content (
            $element as element(*) 
 ) as xs:boolean

Whether an element has simple content

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

id-from-element back to 'Function Summary'
declare function functx:id-from-element (
            $element as element(*)? 
 ) as xs:string?

Gets the ID of an XML element

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

id-untyped back to 'Function Summary'
declare function functx:id-untyped (
            $node as node()*, 
            $id as xs:anyAtomicType 
 ) as element(*)*

Gets XML element(s) that have an attribute with a particular value

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

if-absent back to 'Function Summary'
declare function functx:if-absent (
            $arg as item()*, 
            $value as item()* 
 ) as item()*

The first argument if it is not empty, otherwise the second argument

Parameters:
Version:

1.0

Author:

W3C XML Query WG

See:

if-empty back to 'Function Summary'
declare function functx:if-empty (
            $arg as item()?, 
            $value as item()* 
 ) as item()*

The first argument if it is not blank, otherwise the second argument

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

index-of-deep-equal-node back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

index-of-match-first back to 'Function Summary'
declare function functx:index-of-match-first (
            $arg as xs:string?, 
            $pattern as xs:string 
 ) as xs:integer?

The first position of a matching substring

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

index-of-node back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

W3C XML Query Working Group

See:

index-of-string back to 'Function Summary'
declare function functx:index-of-string (
            $arg as xs:string?, 
            $substring as xs:string 
 ) as xs:integer*

The position(s) of a substring

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

index-of-string-first back to 'Function Summary'
declare function functx:index-of-string-first (
            $arg as xs:string?, 
            $substring as xs:string 
 ) as xs:integer?

The first position of a substring

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

index-of-string-last back to 'Function Summary'
declare function functx:index-of-string-last (
            $arg as xs:string?, 
            $substring as xs:string 
 ) as xs:integer?

The last position of a substring

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

insert-string back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

is-a-number back to 'Function Summary'
declare function functx:is-a-number (
            $value as xs:anyAtomicType? 
 ) as xs:boolean

Whether a value is numeric

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

is-absolute-uri back to 'Function Summary'
declare function functx:is-absolute-uri (
            $uri as xs:string? 
 ) as xs:boolean

Whether a URI is absolute

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

is-ancestor back to 'Function Summary'
declare function functx:is-ancestor (
            $node1 as node(), 
            $node2 as node() 
 ) as xs:boolean

Whether an XML node is an ancestor of another node

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

is-descendant back to 'Function Summary'
declare function functx:is-descendant (
            $node1 as node(), 
            $node2 as node() 
 ) as xs:boolean

Whether an XML node is a descendant of another node

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

is-leap-year back to 'Function Summary'
declare function functx:is-leap-year (
            $date as xs:anyAtomicType? 
 ) as xs:boolean

Whether a date falls in a leap year

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

is-node-among-descendants back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

is-node-among-descendants-deep-equal back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

is-node-in-sequence back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

is-node-in-sequence-deep-equal back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

is-value-in-sequence back to 'Function Summary'
declare function functx:is-value-in-sequence (
            $value as xs:anyAtomicType?, 
            $seq as xs:anyAtomicType* 
 ) as xs:boolean

Whether an atomic value appears in a sequence

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

last-day-of-month back to 'Function Summary'
declare function functx:last-day-of-month (
            $date as xs:anyAtomicType? 
 ) as xs:date?

The last day of the month of a date

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

last-day-of-year back to 'Function Summary'
declare function functx:last-day-of-year (
            $date as xs:anyAtomicType? 
 ) as xs:date?

The last day of the month of a date

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

last-node back to 'Function Summary'
declare function functx:last-node (
            $nodes as node()* 
 ) as node()?

The XML node in a sequence that is last in document order

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

leaf-elements back to 'Function Summary'
declare function functx:leaf-elements (
            $root as node()? 
 ) as element(*)*

All XML elements that don't have any child elements

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

left-trim back to 'Function Summary'
declare function functx:left-trim (
            $arg as xs:string? 
 ) as xs:string

Trims leading whitespace

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

line-count back to 'Function Summary'
declare function functx:line-count (
            $arg as xs:string? 
 ) as xs:integer

The number of lines

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

lines back to 'Function Summary'
declare function functx:lines (
            $arg as xs:string? 
 ) as xs:string*

Split a string into separate lines

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

max-depth back to 'Function Summary'
declare function functx:max-depth (
            $root as node()? 
 ) as xs:integer?

The maximum depth of elements in an XML tree

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

max-determine-type back to 'Function Summary'
declare function functx:max-determine-type (
            $seq as xs:anyAtomicType* 
 ) as xs:anyAtomicType?

The maximum value in a sequence, figuring out its type (numeric or string)

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

max-line-length back to 'Function Summary'
declare function functx:max-line-length (
            $arg as xs:string? 
 ) as xs:integer

The maximum line length

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

max-node back to 'Function Summary'
declare function functx:max-node (
            $nodes as node()* 
 ) as node()*

The XML node whose typed value is the maximum

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

max-string back to 'Function Summary'
declare function functx:max-string (
            $strings as xs:anyAtomicType* 
 ) as xs:string?

The maximum of a sequence of values, treating them like strings

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

min-determine-type back to 'Function Summary'
declare function functx:min-determine-type (
            $seq as xs:anyAtomicType* 
 ) as xs:anyAtomicType?

The minimum value in a sequence, figuring out its type (numeric or string)

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

min-node back to 'Function Summary'
declare function functx:min-node (
            $nodes as node()* 
 ) as node()*

The XML node whose typed value is the minimum

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

min-non-empty-string back to 'Function Summary'
declare function functx:min-non-empty-string (
            $strings as xs:string* 
 ) as xs:string?

The minimum of a sequence of strings, ignoring "empty" values

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

min-string back to 'Function Summary'
declare function functx:min-string (
            $strings as xs:anyAtomicType* 
 ) as xs:string?

The minimum of a sequence of values, treating them like strings

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

mmddyyyy-to-date back to 'Function Summary'
declare function functx:mmddyyyy-to-date (
            $dateString as xs:string? 
 ) as xs:date?

Converts a string with format MMDDYYYY (with any delimiters) to a date

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

month-abbrev-en back to 'Function Summary'
declare function functx:month-abbrev-en (
            $date as xs:anyAtomicType? 
 ) as xs:string?

The month of a date as an abbreviated word (Jan, Feb, etc.)

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

month-name-en back to 'Function Summary'
declare function functx:month-name-en (
            $date as xs:anyAtomicType? 
 ) as xs:string?

The month of a date as a word (January, February, etc.)

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

name-test back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

namespaces-in-use back to 'Function Summary'
declare function functx:namespaces-in-use (
            $root as node()? 
 ) as xs:anyURI*

A list of namespaces used in element/attribute names in an XML fragment

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

next-day back to 'Function Summary'
declare function functx:next-day (
            $date as xs:anyAtomicType? 
 ) as xs:date?

The next day

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

node-kind back to 'Function Summary'
declare function functx:node-kind (
            $nodes as node()* 
 ) as xs:string*

The XML node kind (element, attribute, text, etc.)

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

non-distinct-values back to 'Function Summary'
declare function functx:non-distinct-values (
            $seq as xs:anyAtomicType* 
 ) as xs:anyAtomicType*

Returns any values that appear more than once in a sequence

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

number-of-matches back to 'Function Summary'
declare function functx:number-of-matches (
            $arg as xs:string?, 
            $pattern as xs:string 
 ) as xs:integer

The number of regions that match a pattern

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

open-ref-document back to 'Function Summary'
declare function functx:open-ref-document (
            $refNode as node() 
 ) as document()

Resolves a relative URI and references it, returning an XML document

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

ordinal-number-en back to 'Function Summary'
declare function functx:ordinal-number-en (
            $num as xs:integer? 
 ) as xs:string

Reformats a number as an ordinal number, e.g. 1st, 2nd, 3rd.

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

pad-integer-to-length back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

pad-string-to-length back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

path-to-node back to 'Function Summary'
declare function functx:path-to-node (
            $nodes as node()* 
 ) as xs:string*

A path to an XML node (or sequence of nodes)

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

path-to-node-with-pos back to 'Function Summary'
declare function functx:path-to-node-with-pos (
            $node as node()? 
 ) as xs:string

A unique path to an XML node (or sequence of nodes)

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

precedes-not-ancestor back to 'Function Summary'
declare function functx:precedes-not-ancestor (
            $a as node()?, 
            $b as node()? 
 ) as xs:boolean

Whether an XML node precedes another without being its ancestor

Parameters:
Version:

1.0

Author:

W3C XML Query Working Group

See:

previous-day back to 'Function Summary'
declare function functx:previous-day (
            $date as xs:anyAtomicType? 
 ) as xs:date?

The previous day

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

remove-attributes back to 'Function Summary'
declare function functx:remove-attributes (
            $elements as element(*)*, 
            $names as xs:string* 
 ) as element(*)

Removes attributes from an XML element, based on name

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

remove-attributes-deep back to 'Function Summary'
declare function functx:remove-attributes-deep (
            $nodes as node()*, 
            $names as xs:string* 
 ) as node()*

Removes attributes from an XML fragment, based on name

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

remove-elements back to 'Function Summary'
declare function functx:remove-elements (
            $elements as element(*)*, 
            $names as xs:string* 
 ) as element(*)*

Removes child elements from an XML node, based on name

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

remove-elements-deep back to 'Function Summary'
declare function functx:remove-elements-deep (
            $nodes as node()*, 
            $names as xs:string* 
 ) as node()*

Removes descendant elements from an XML node, based on name

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

remove-elements-not-contents back to 'Function Summary'
declare function functx:remove-elements-not-contents (
            $nodes as node()*, 
            $names as xs:string* 
 ) as node()*

Removes descendant XML elements but keeps their content

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

repeat-string back to 'Function Summary'
declare function functx:repeat-string (
            $stringToRepeat as xs:string?, 
            $count as xs:integer 
 ) as xs:string

Repeats a string a given number of times

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

replace-beginning back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

replace-element-values back to 'Function Summary'
declare function functx:replace-element-values (
            $elements as element(*)*, 
            $values as xs:anyAtomicType* 
 ) as element(*)*

Updates the content of one or more elements

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

replace-first back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

replace-multi back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

reverse-string back to 'Function Summary'
declare function functx:reverse-string (
            $arg as xs:string? 
 ) as xs:string

Reverses the order of characters

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

right-trim back to 'Function Summary'
declare function functx:right-trim (
            $arg as xs:string? 
 ) as xs:string

Trims trailing whitespace

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

scheme-from-uri back to 'Function Summary'
declare function functx:scheme-from-uri (
            $uri as xs:string? 
 ) as xs:string?

Returns the scheme from a URI

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

sequence-deep-equal back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

sequence-node-equal back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

sequence-node-equal-any-order back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

sequence-type back to 'Function Summary'
declare function functx:sequence-type (
            $items as item()* 
 ) as xs:string

The sequence type that represents a sequence of nodes or values

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

siblings back to 'Function Summary'
declare function functx:siblings (
            $node as node()? 
 ) as node()*

The siblings of an XML node

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

siblings-same-name back to 'Function Summary'
declare function functx:siblings-same-name (
            $element as element(*)? 
 ) as element(*)*

The siblings of an XML element that have the same name

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

sort back to 'Function Summary'
declare function functx:sort (
            $seq as item()* 
 ) as item()*

Sorts a sequence of values or nodes

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

sort-as-numeric back to 'Function Summary'
declare function functx:sort-as-numeric (
            $seq as item()* 
 ) as item()*

Sorts a sequence of numeric values or nodes

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

sort-case-insensitive back to 'Function Summary'
declare function functx:sort-case-insensitive (
            $seq as item()* 
 ) as item()*

Sorts a sequence of values or nodes regardless of capitalization

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

sort-document-order back to 'Function Summary'
declare function functx:sort-document-order (
            $seq as node()* 
 ) as node()*

Sorts a sequence of nodes in document order

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

substring-after-if-contains back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

substring-after-last back to 'Function Summary'
declare function functx:substring-after-last (
            $arg as xs:string?, 
            $delim as xs:string 
 ) as xs:string

The substring after the last occurrence of a delimiter

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

substring-after-last-match back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

substring-after-match back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

substring-before-if-contains back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

substring-before-last back to 'Function Summary'
declare function functx:substring-before-last (
            $arg as xs:string?, 
            $delim as xs:string 
 ) as xs:string

The substring before the last occurrence of a delimiter

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

substring-before-last-match back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

substring-before-match back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

time back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

timezone-from-duration back to 'Function Summary'
declare function functx:timezone-from-duration (
            $duration as xs:dayTimeDuration 
 ) as xs:string

Converts an xs:dayTimeDuration into a timezone like "-05:00" or "Z"

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

total-days-from-duration back to 'Function Summary'
declare function functx:total-days-from-duration (
            $duration as xs:dayTimeDuration? 
 ) as xs:decimal?

The total number of days in a dayTimeDuration

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

total-hours-from-duration back to 'Function Summary'
declare function functx:total-hours-from-duration (
            $duration as xs:dayTimeDuration? 
 ) as xs:decimal?

The total number of hours in a dayTimeDuration

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

total-minutes-from-duration back to 'Function Summary'
declare function functx:total-minutes-from-duration (
            $duration as xs:dayTimeDuration? 
 ) as xs:decimal?

The total number of minutes in a dayTimeDuration

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

total-months-from-duration back to 'Function Summary'
declare function functx:total-months-from-duration (
            $duration as xs:yearMonthDuration? 
 ) as xs:decimal?

The total number of months in a yearMonthDuration

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

total-seconds-from-duration back to 'Function Summary'
declare function functx:total-seconds-from-duration (
            $duration as xs:dayTimeDuration? 
 ) as xs:decimal?

The total number of seconds in a dayTimeDuration

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

total-years-from-duration back to 'Function Summary'
declare function functx:total-years-from-duration (
            $duration as xs:yearMonthDuration? 
 ) as xs:decimal?

The total number of years in a yearMonthDuration

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

trim back to 'Function Summary'
declare function functx:trim (
            $arg as xs:string? 
 ) as xs:string

Trims leading and trailing whitespace

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

update-attributes back to 'Function Summary'
declare function functx:update-attributes (
            $elements as element(*)*, 
            $attrNames as xs:QName*, 
            $attrValues as xs:anyAtomicType* 
 ) as element(*)?

Updates the attribute value of an XML element

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

value-except back to 'Function Summary'
declare function 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

Parameters:
Version:

1.0

Author:

W3C XML Query Working Group

See:

value-intersect back to 'Function Summary'
declare function functx:value-intersect (
            $arg1 as xs:anyAtomicType*, 
            $arg2 as xs:anyAtomicType* 
 ) as xs:anyAtomicType*

The intersection of two sequences of values

Parameters:
Version:

1.0

Author:

W3C XML Query Working Group

See:

value-union back to 'Function Summary'
declare function functx:value-union (
            $arg1 as xs:anyAtomicType*, 
            $arg2 as xs:anyAtomicType* 
 ) as xs:anyAtomicType*

The union of two sequences of values

Parameters:
Version:

1.0

Author:

W3C XML Query Working Group

See:

word-count back to 'Function Summary'
declare function functx:word-count (
            $arg as xs:string? 
 ) as xs:integer

The number of words

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

words-to-camel-case back to 'Function Summary'
declare function functx:words-to-camel-case (
            $arg as xs:string? 
 ) as xs:string

Turns a string of words into camelCase

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

wrap-values-in-elements back to 'Function Summary'
declare function functx:wrap-values-in-elements (
            $values as xs:anyAtomicType*, 
            $elementName as xs:QName 
 ) as element(*)*

Wraps a sequence of atomic values in XML elements

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

yearMonthDuration back to 'Function Summary'
declare function functx:yearMonthDuration (
            $years as xs:decimal?, 
            $months as xs:integer? 
 ) as xs:yearMonthDuration

Construct a yearMonthDuration from a number of years and months

Parameters:
Version:

1.0

Author:

Priscilla Walmsley, Datypic

See:

blog comments powered by Disqus