REC-xpath-functions-30-20140408: Fix a missing semicolon error.

(: XPath and XQuery Functions and Operators 3.0
 : W3C Recommendation 08 April 2014
 :
 : Reference: https://www.w3.org/TR/2014/REC-xpath-functions-30-20140408/
 :)
xquery version "3.0";

module  namespace fn = "http://www.w3.org/2005/xpath-functions";
declare namespace xs = "http://www.w3.org/2001/XMLSchema";

declare function fn:QName($paramURI as xs:string?, $paramQName as xs:string) as xs:QName external; (: §10.1.2 :)
declare function fn:abs($arg as xs:numeric?) as xs:numeric? external; (: §4.4.1 :)
declare function fn:adjust-date-to-timezone($arg as xs:date?) as xs:date? external; (: §9.6.2 :)
declare function fn:adjust-date-to-timezone($arg as xs:date?, $timezone as xs:dayTimeDuration?) as xs:date? external; (: §9.6.2 :)
declare function fn:adjust-dateTime-to-timezone($arg as xs:dateTime?) as xs:dateTime? external; (: §9.6.1 :)
declare function fn:adjust-dateTime-to-timezone($arg as xs:dateTime?, $timezone as xs:dayTimeDuration?) as xs:dateTime? external; (: §9.6.1 :)
declare function fn:adjust-time-to-timezone($arg as xs:time?) as xs:time? external; (: §9.6.3 :)
declare function fn:adjust-time-to-timezone($arg as xs:time?, $timezone as xs:dayTimeDuration?) as xs:time? external; (: §9.6.3 :)
declare function fn:analyze-string($input as xs:string?, $pattern as xs:string) as element(fn:analyze-string-result) external; (: §5.6.5 :)
declare function fn:analyze-string($input as xs:string?, $pattern as xs:string, $flags as xs:string) as element(fn:analyze-string-result) external; (: §5.6.5 :)
declare function fn:available-environment-variables() as xs:string* external; (: §14.8.9 :)
declare function fn:avg($arg as xs:anyAtomicType*) as xs:anyAtomicType? external; (: §14.5.2 :)
declare function fn:base-uri() as xs:anyURI? external; (: §2.5 :)
declare function fn:base-uri($arg as node()?) as xs:anyURI? external; (: §2.5 :)
declare function fn:boolean($arg as item()*) as xs:boolean external; (: §7.3.1 :)
declare function fn:ceiling($arg as xs:numeric?) as xs:numeric? external; (: §4.4.2 :)
declare function fn:codepoint-equal($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:boolean? external; (: §5.3.5 :)
declare function fn:codepoints-to-string($arg as xs:integer*) as xs:string external; (: §5.2.1 :)
declare function fn:collection() as node()* external; (: §14.8.3 :)
declare function fn:collection($arg as xs:string?) as node()* external; (: §14.8.3 :)
declare function fn:compare($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:integer? external; (: §5.3.4 :)
declare function fn:compare($comparand1 as xs:string?, $comparand2 as xs:string?, $collation as xs:string) as xs:integer? external; (: §5.3.4 :)
declare %variadic("xs:anyAtomicType?") function fn:concat($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:string external; (: §5.4.1 :)
declare function fn:contains($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external; (: §5.5.1 :)
declare function fn:contains($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external; (: §5.5.1 :)
declare function fn:count($arg as item()*) as xs:integer external; (: §14.5.1 :)
declare function fn:current-date() as xs:date external; (: §15.4 :)
declare function fn:current-dateTime() as xs:dateTime external; (: §15.3 :)
declare function fn:current-time() as xs:time external; (: §15.5 :)
declare function fn:data() as xs:anyAtomicType* external; (: §2.4 :)
declare function fn:data($arg as item()*) as xs:anyAtomicType* external; (: §2.4 :)
declare function fn:dateTime($arg1 as xs:date?, $arg2 as xs:time?) as xs:dateTime? external; (: §9.3.1 :)
declare function fn:day-from-date($arg as xs:date?) as xs:integer? external; (: §9.5.10 :)
declare function fn:day-from-dateTime($arg as xs:dateTime?) as xs:integer? external; (: §9.5.3 :)
declare function fn:days-from-duration($arg as xs:duration?) as xs:integer? external; (: §8.3.3 :)
declare function fn:deep-equal($parameter1 as item()*, $parameter2 as item()*) as xs:boolean external; (: §14.2.3 :)
declare function fn:deep-equal($parameter1 as item()*, $parameter2 as item()*, $collation as string) as xs:boolean external; (: §14.2.3 :)
declare function fn:default-collation() as xs:string external; (: §15.7 :)
declare function fn:distinct-values($arg as xs:anyAtomicType*) as xs:anyAtomicType* external; (: §14.2.1 :)
declare function fn:distinct-values($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType* external; (: §14.2.1 :)
declare function fn:doc($uri as xs:string?) as document-node()? external; (: §14.8.1 :)
declare function fn:doc-available($uri as xs:string?) as xs:boolean external; (: §14.8.2 :)
declare function fn:document-uri() as xs:anyURI? external; (: §2.6 :)
declare function fn:document-uri($arg as node()?) as xs:anyURI? external; (: §2.6 :)
declare function fn:element-with-id($arg as xs:string*) as element()* external; (: §14.7.2 :)
declare function fn:element-with-id($arg as xs:string*, $node as node()) as element()* external; (: §14.7.2 :)
declare function fn:empty($arg as item()*) as xs:boolean external; (: §14.1.2 :)
declare function fn:encode-for-uri($uri-part as xs:string?) as xs:string external; (: §6.2 :)
declare function fn:ends-with($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external; (: §5.5.3 :)
declare function fn:ends-with($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external; (: §5.5.3 :)
declare function fn:environment-variable($name as xs:string) as xs:string? external; (: §14.8.8 :)
declare function fn:error() as none external; (: §3.1 :)
declare function fn:error($error as xs:QName) as none external; (: §3.1 :)
declare function fn:error($error as xs:QName?, $description as xs:string) as none external; (: §3.1 :)
declare function fn:error($error as xs:QName?, $description as xs:string, $error-object as item()*) as none external; (: §3.1 :)
declare function fn:escape-html-uri($uri as xs:string?) as xs:string external; (: §6.4 :)
declare function fn:exactly-one($arg as item()*) as item() external; (: §14.3.3 :)
declare function fn:exists($arg as item()*) as xs:boolean external; (: §14.1.3 :)
declare function fn:false() as xs:boolean external; (: §7.1.2 :)
declare function fn:filter($seq as item()*, $f as function(item()) as xs:boolean) as item()* external; (: §16.2.2 :)
declare function fn:floor($arg as xs:numeric?) as xs:numeric? external; (: §4.4.3 :)
declare function fn:fold-left($seq as item()*, $zero as item()*, $f as function(item()*, item()) as item()*) as item()* external; (: §16.2.3 :)
declare function fn:fold-right($seq as item()*, $zero as item()*, $f as function(item()*, item()) as item()*) as item()* external; (: §16.2.4 :)
declare function fn:for-each($seq as item()*, $f as function(item()) as item()*) as item()* external; (: §16.2.1 :)
declare function fn:for-each-pair($seq1 as item()*, $seq2 as item()*, $f as function(item(), item()) as item()*) as item()* external; (: §16.2.5 :)
declare function fn:format-date($value as xs:date?, $picture as xs:string) as xs:string? external; (: §9.8.2 :)
declare function fn:format-date($value as xs:date?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external; (: §9.8.2 :)
declare function fn:format-dateTime($value as xs:dateTime?, $picture as xs:string) as xs:string? external; (: §9.8.1 :)
declare function fn:format-dateTime($value as xs:dateTime?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external; (: §9.8.1 :)
declare function fn:format-integer($value as xs:integer?, $picture as xs:string) as xs:string external; (: §4.6.1 :)
declare function fn:format-integer($value as xs:integer?, $picture as xs:string, $lang as xs:string?) as xs:string external; (: §4.6.1 :)
declare function fn:format-number($value as xs:numeric?, $picture as xs:string) as xs:string external; (: §4.7.2 :)
declare function fn:format-number($value as xs:numeric?, $picture as xs:string, $decimal-format-name as xs:string?) as xs:string external; (: §4.7.2 :)
declare function fn:format-time($value as xs:time?, $picture as xs:string) as xs:string? external; (: §9.8.3 :)
declare function fn:format-time($value as xs:time?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external; (: §9.8.3 :)
declare function fn:function-arity($func as function(*)) as xs:integer external; (: §16.1.3 :)
declare function fn:function-lookup($name as xs:QName, $arity as xs:integer) as function(*)? external; (: §16.1.1 :)
declare function fn:function-name($func as function(*)) as xs:QName? external; (: §16.1.2:)
declare function fn:generate-id() as xs:string external; (: §14.7.4 :)
declare function fn:generate-id($arg as node()?) as xs:string external; (: §14.7.4 :)
declare function fn:has-children() as xs:boolean external; (: §13.10 :)
declare function fn:has-children($node as node()?) as xs:boolean external; (: §13.10 :)
declare function fn:head($arg as item()*) as item()? external; (: §14.1.4 :)
declare function fn:hours-from-dateTime($arg as xs:dateTime?) as xs:integer? external; (: §9.5.4 :)
declare function fn:hours-from-duration($arg as xs:duration?) as xs:integer? external; (: §8.3.4 :)
declare function fn:hours-from-time($arg as xs:time?) as xs:integer? external; (: §9.5.12 :)
declare function fn:id($arg as xs:string*) as element()* external; (: §14.7.1 :)
declare function fn:id($arg as xs:string*, $node as node()) as element()* external; (: §14.7.1 :)
declare function fn:idref($arg as xs:string*) as node()* external; (: §14.7.3 :)
declare function fn:idref($arg as xs:string*, $node as node()) as node()* external; (: §14.7.3 :)
declare function fn:implicit-timezone() as xs:dayTimeDuration external; (: §15.6 :)
declare function fn:in-scope-prefixes($element as element()) as xs:string* external; (: §10.2.6 :)
declare function fn:index-of($seq as xs:anyAtomicType*, $search as xs:anyAtomicType) as xs:integer* external; (: §14.2.2 :)
declare function fn:index-of($seq as xs:anyAtomicType*, $search as xs:anyAtomicType, $collation as xs:string) as xs:integer* external; (: §14.2.2 :)
declare function fn:innermost($nodes as node()*) as node()* external; (: §13.11 :)
declare function fn:insert-before($target as item()*, $position as xs:integer, $inserts as item()*) as item()* external; (: §14.1.6 :)
declare function fn:iri-to-uri($iri as xs:string?) as xs:string external; (: §6.3 :)
declare function fn:lang($testlang as xs:string?) as xs:boolean external; (: §13.4 :)
declare function fn:lang($testlang as xs:string?, $node as node()) as xs:boolean external; (: §13.4 :)
declare function fn:last() as xs:integer external; (: §15.2 :)
declare function fn:local-name() as xs:string external; (: §13.2 :)
declare function fn:local-name($arg as node()?) as xs:string external; (: §13.2 :)
declare function fn:local-name-from-QName($arg as xs:QName?) as xs:NCName? external; (: §10.2.3 :)
declare function fn:lower-case($arg as xs:string?) as xs:string external; (: §5.4.8 :)
declare function fn:matches($input as xs:string?, $pattern as xs:string) as xs:boolean external; (: §5.6.2 :)
declare function fn:matches($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:boolean external; (: §5.6.2 :)
declare function fn:max($arg as xs:anyAtomicType*) as xs:anyAtomicType? external; (: §14.5.3 :)
declare function fn:max($arg as xs:anyAtomicType*, $collation as string) as xs:anyAtomicType? external; (: §14.5.3 :)
declare function fn:min($arg as xs:anyAtomicType*) as xs:anyAtomicType? external; (: §14.5.4 :)
declare function fn:min($arg as xs:anyAtomicType*, $collation as string) as xs:anyAtomicType? external; (: §14.5.4 :)
declare function fn:minutes-from-dateTime($arg as xs:dateTime?) as xs:integer? external; (: §9.5.5 :)
declare function fn:minutes-from-duration($arg as xs:duration?) as xs:integer? external; (: §8.3.5 :)
declare function fn:minutes-from-time($arg as xs:time?) as xs:integer? external; (: §9.5.13 :)
declare function fn:month-from-date($arg as xs:date?) as xs:integer? external; (: §9.5.9 :)
declare function fn:month-from-dateTime($arg as xs:dateTime?) as xs:integer? external; (: §9.5.2 :)
declare function fn:months-from-duration($arg as xs:duration?) as xs:integer? external; (: §8.3.2 :)
declare function fn:name() as xs:string external; (: §13.1 :)
declare function fn:name($arg as node()?) as xs:string external; (: §13.1 :)
declare function fn:namespace-uri() as xs:anyURI external; (: §13.3 :)
declare function fn:namespace-uri($arg as node()?) as xs:anyURI external; (: §13.3 :)
declare function fn:namespace-uri-for-prefix($prefix as xs:string?, $element as element()) as xs:anyURI? external; (: §10.2.5 :)
declare function fn:namespace-uri-from-QName($arg as xs:QName?) as xs:anyURI? external; (: §10.2.4 :)
declare function fn:nilled() as xs:boolean external; (: §2.2 :)
declare function fn:nilled($arg as node()?) as xs:boolean? external; (: §2.2 :)
declare function fn:node-name() as xs:QName? external; (: §2.1 :)
declare function fn:node-name($arg as node()?) as xs:QName? external; (: §2.1 :)
declare function fn:normalize-space() as xs:string external; (: §5.4.5 :)
declare function fn:normalize-space($arg as xs:string?) as xs:string external; (: §5.4.5 :)
declare function fn:normalize-unicode($arg as xs:string?) as xs:string external; (: §5.4.6 :)
declare function fn:normalize-unicode($arg as xs:string?, $normalizationForm as xs:string) as xs:string external; (: §5.4.6 :)
declare function fn:not($arg as item()*) as xs:boolean external; (: §7.3.1 :)
declare function fn:number() as xs:double external; (: §4.5.1 :)
declare function fn:number($arg as xs:anyAtomicType?) as xs:double external; (: §4.5.1 :)
declare function fn:one-or-more($arg as item()*) as item()+ external; (: §14.3.2 :)
declare function fn:outermost($nodes as node()*) as node()* external; (: §13.12 :)
declare function fn:parse-xml($arg as xs:string?) as document-node(element(*))? external; (: §14.9.1 :)
declare function fn:parse-xml-fragment($arg as xs:string?) as document-node()? external; (: §14.9.2 :)
declare function fn:path() as xs:string? external; (: §13.9 :)
declare function fn:path($arg as node()?) as xs:string? external; (: §13.9 :)
declare function fn:position() as xs:integer external; (: §15.1 :)
declare function fn:prefix-from-QName($arg as xs:QName?) as xs:NCName? external; (: §10.2.2 :)
declare function fn:remove($target as item()*, $position as xs:integer) as item()* external; (: §14.1.7 :)
declare function fn:replace($input as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string external; (: §5.6.3 :)
declare function fn:replace($input as xs:string?, $pattern as xs:string, $replacement as xs:string, $flags as xs:string) as xs:string external; (: §5.6.3 :)
declare function fn:resolve-QName($qname as xs:string?, $element as element()) as xs:QName? external; (: §10.1.1 :)
declare function fn:resolve-uri($relative as xs:string?) as xs:anyURI? external; (: §6.1 :)
declare function fn:resolve-uri($relative as xs:string?, $base as xs:string) as xs:anyURI? external; (: §6.1 :)
declare function fn:reverse($arg as item()*) as item()* external; (: §14.1.8 :)
declare function fn:root() as node() external; (: §13.8 :)
declare function fn:root($arg as node()?) as node()? external; (: §13.8 :)
declare function fn:round($arg as xs:numeric?) as xs:numeric? external; (: §4.4.4 :)
declare function fn:round($arg as xs:numeric?, $precision as xs:integer) as xs:numeric? external; (: §4.4.4 :)
declare function fn:round-half-to-even($arg as xs:numeric?) as xs:numeric? external; (: §4.4.5 :)
declare function fn:round-half-to-even($arg as xs:numeric?, $precision as xs:integer) as xs:numeric? external; (: §4.4.5 :)
declare function fn:seconds-from-dateTime($arg as xs:dateTime?) as xs:decimal? external; (: §9.5.6 :)
declare function fn:seconds-from-duration($arg as xs:duration?) as xs:decimal? external; (: §8.3.6 :)
declare function fn:seconds-from-time($arg as xs:time?) as xs:decimal? external; (: §9.5.14 :)
declare function fn:serialize($arg as item()*) as xs:string external; (: §14.9.3 :)
declare function fn:serialize($arg as item()*, $params as element(output:serialization-parameters)?) as xs:string external; (: §14.9.3 :)
declare function fn:starts-with($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external; (: §5.5.2 :)
declare function fn:starts-with($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external; (: §5.5.2 :)
declare function fn:static-base-uri() as xs:anyURI? external; (: §15.8 :)
declare function fn:string() as xs:string external; (: §2.3 :)
declare function fn:string($arg as item()?) as xs:string external; (: §2.3 :)
declare function fn:string-join($arg1 as xs:string*) as xs:string external; (: §5.4.2 :)
declare function fn:string-join($arg1 as xs:string*, $arg2 as xs:string) as xs:string external; (: §5.4.2 :)
declare function fn:string-length() as xs:integer external; (: §5.4.4 :)
declare function fn:string-length($arg as xs:string?) as xs:integer external; (: §5.4.4 :)
declare function fn:string-to-codepoints($arg as xs:string?) as xs:integer* external; (: §5.2.2 :)
declare function fn:subsequence($sourceSeq as item()*, $startingLoc as xs:double) as item()* external; (: §14.1.9 :)
declare function fn:subsequence($sourceSeq as item()*, $startingLoc as xs:double, $length as xs:double) as item()* external; (: §14.1.9 :)
declare function fn:substring($sourceString as xs:string?, $start as xs:double) as xs:string external; (: §5.4.3 :)
declare function fn:substring($sourceString as xs:string?, $start as xs:double, $length as xs:double) as xs:string external; (: §5.4.3 :)
declare function fn:substring-after($arg1 as xs:string?, $arg2 as xs:string?) as xs:string external; (: §5.5.5 :)
declare function fn:substring-after($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string external; (: §5.5.5 :)
declare function fn:substring-before($arg1 as xs:string?, $arg2 as xs:string?) as xs:string external; (: §5.5.4 :)
declare function fn:substring-before($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string external; (: §5.5.4 :)
declare function fn:sum($arg as xs:anyAtomicType*) as xs:anyAtomicType external; (: §14.5.5 :)
declare function fn:sum($arg as xs:anyAtomicType*, $zero as xs:anyAtomicType?) as xs:anyAtomicType? external; (: §14.5.5 :)
declare function fn:tail($arg as item()*) as item()? external; (: §14.1.5 :)
declare function fn:timezone-from-date($arg as xs:date?) as xs:dayTimeDuration? external; (: §9.5.11 :)
declare function fn:timezone-from-dateTime($arg as xs:dateTime?) as xs:dayTimeDuration? external; (: §9.5.7 :)
declare function fn:timezone-from-time($arg as xs:time?) as xs:dayTimeDuration? external; (: §9.5.15 :)
declare function fn:tokenize($input as xs:string?, $pattern as xs:string) as xs:string* external; (: §5.6.4 :)
declare function fn:tokenize($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:string* external; (: §5.6.4 :)
declare function fn:trace($value as item()*, $label as xs:string) as item()* external; (: §3.2 :)
declare function fn:translate($arg as xs:string?, $mapString as xs:string, $transString as xs:string) as xs:string external; (: §5.4.9 :)
declare function fn:true() as xs:boolean external; (: §7.1.1 :)
declare function fn:unordered($sourceSeq as item()*) as item()* external; (: §14.1.10 :)
declare function fn:unparsed-text($href as xs:string?) as xs:string? external; (: §14.8.5 :)
declare function fn:unparsed-text($href as xs:string?, $encoding as xs:string) as xs:string? external; (: §14.8.5 :)
declare function fn:unparsed-text-available($href as xs:string?) as xs:string? external; (: §14.8.7 :)
declare function fn:unparsed-text-available($href as xs:string?, $encoding as xs:string) as xs:string? external; (: §14.8.7 :)
declare function fn:unparsed-text-lines($href as xs:string?) as xs:string? external; (: §14.8.6 :)
declare function fn:unparsed-text-lines($href as xs:string?, $encoding as xs:string) as xs:string? external; (: §14.8.6 :)
declare function fn:upper-case($arg as xs:string?) as xs:string external; (: §5.4.7 :)
declare function fn:uri-collection() as xs:anyURI* external; (: §14.8.4 :)
declare function fn:uri-collection($arg as xs:string?) as xs:anyURI* external; (: §14.8.4 :)
declare function fn:year-from-date($arg as xs:date?) as xs:integer? external; (: §9.5.8 :)
declare function fn:year-from-dateTime($arg as xs:dateTime?) as xs:integer? external; (: §9.5.1 :)
declare function fn:years-from-duration($arg as xs:duration?) as xs:integer? external; (: §8.3.1 :)
declare function fn:zero-or-one($arg as item()*) as item()? external; (: §14.3.1 :)

(: XPath and XQuery Functions and Operators 3.0
 : W3C Recommendation 08 April 2014
 :
 : Reference: https://www.w3.org/TR/2014/REC-xpath-functions-30-20140408/
 :)
xquery version "3.0";

module  namespace fn = "http://www.w3.org/2005/xpath-functions";
declare namespace xs = "http://www.w3.org/2001/XMLSchema";

declare function fn:QName($paramURI as xs:string?, $paramQName as xs:string) as xs:QName external; (: §10.1.2 :)
declare function fn:abs($arg as xs:numeric?) as xs:numeric? external; (: §4.4.1 :)
declare function fn:adjust-date-to-timezone($arg as xs:date?) as xs:date? external; (: §9.6.2 :)
declare function fn:adjust-date-to-timezone($arg as xs:date?, $timezone as xs:dayTimeDuration?) as xs:date? external; (: §9.6.2 :)
declare function fn:adjust-dateTime-to-timezone($arg as xs:dateTime?) as xs:dateTime? external; (: §9.6.1 :)
declare function fn:adjust-dateTime-to-timezone($arg as xs:dateTime?, $timezone as xs:dayTimeDuration?) as xs:dateTime? external; (: §9.6.1 :)
declare function fn:adjust-time-to-timezone($arg as xs:time?) as xs:time? external; (: §9.6.3 :)
declare function fn:adjust-time-to-timezone($arg as xs:time?, $timezone as xs:dayTimeDuration?) as xs:time? external; (: §9.6.3 :)
declare function fn:analyze-string($input as xs:string?, $pattern as xs:string) as element(fn:analyze-string-result) external; (: §5.6.5 :)
declare function fn:analyze-string($input as xs:string?, $pattern as xs:string, $flags as xs:string) as element(fn:analyze-string-result) external; (: §5.6.5 :)
declare function fn:available-environment-variables() as xs:string* external; (: §14.8.9 :)
declare function fn:avg($arg as xs:anyAtomicType*) as xs:anyAtomicType? external; (: §14.5.2 :)
declare function fn:base-uri() as xs:anyURI? external; (: §2.5 :)
declare function fn:base-uri($arg as node()?) as xs:anyURI? external; (: §2.5 :)
declare function fn:boolean($arg as item()*) as xs:boolean external; (: §7.3.1 :)
declare function fn:ceiling($arg as xs:numeric?) as xs:numeric? external; (: §4.4.2 :)
declare function fn:codepoint-equal($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:boolean? external; (: §5.3.5 :)
declare function fn:codepoints-to-string($arg as xs:integer*) as xs:string external; (: §5.2.1 :)
declare function fn:collection() as node()* external; (: §14.8.3 :)
declare function fn:collection($arg as xs:string?) as node()* external; (: §14.8.3 :)
declare function fn:compare($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:integer? external; (: §5.3.4 :)
declare function fn:compare($comparand1 as xs:string?, $comparand2 as xs:string?, $collation as xs:string) as xs:integer? external; (: §5.3.4 :)
declare %variadic("xs:anyAtomicType?") function fn:concat($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:string external; (: §5.4.1 :)
declare function fn:contains($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external; (: §5.5.1 :)
declare function fn:contains($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external; (: §5.5.1 :)
declare function fn:count($arg as item()*) as xs:integer external; (: §14.5.1 :)
declare function fn:current-date() as xs:date external; (: §15.4 :)
declare function fn:current-dateTime() as xs:dateTime external; (: §15.3 :)
declare function fn:current-time() as xs:time external; (: §15.5 :)
declare function fn:data() as xs:anyAtomicType* external; (: §2.4 :)
declare function fn:data($arg as item()*) as xs:anyAtomicType* external; (: §2.4 :)
declare function fn:dateTime($arg1 as xs:date?, $arg2 as xs:time?) as xs:dateTime? external; (: §9.3.1 :)
declare function fn:day-from-date($arg as xs:date?) as xs:integer? external; (: §9.5.10 :)
declare function fn:day-from-dateTime($arg as xs:dateTime?) as xs:integer? external; (: §9.5.3 :)
declare function fn:days-from-duration($arg as xs:duration?) as xs:integer? external; (: §8.3.3 :)
declare function fn:deep-equal($parameter1 as item()*, $parameter2 as item()*) as xs:boolean external; (: §14.2.3 :)
declare function fn:deep-equal($parameter1 as item()*, $parameter2 as item()*, $collation as string) as xs:boolean external; (: §14.2.3 :)
declare function fn:default-collation() as xs:string external; (: §15.7 :)
declare function fn:distinct-values($arg as xs:anyAtomicType*) as xs:anyAtomicType* external; (: §14.2.1 :)
declare function fn:distinct-values($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType* external; (: §14.2.1 :)
declare function fn:doc($uri as xs:string?) as document-node()? external; (: §14.8.1 :)
declare function fn:doc-available($uri as xs:string?) as xs:boolean external; (: §14.8.2 :)
declare function fn:document-uri() as xs:anyURI? external; (: §2.6 :)
declare function fn:document-uri($arg as node()?) as xs:anyURI? external; (: §2.6 :)
declare function fn:element-with-id($arg as xs:string*) as element()* external; (: §14.7.2 :)
declare function fn:element-with-id($arg as xs:string*, $node as node()) as element()* external; (: §14.7.2 :)
declare function fn:empty($arg as item()*) as xs:boolean external; (: §14.1.2 :)
declare function fn:encode-for-uri($uri-part as xs:string?) as xs:string external; (: §6.2 :)
declare function fn:ends-with($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external; (: §5.5.3 :)
declare function fn:ends-with($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external; (: §5.5.3 :)
declare function fn:environment-variable($name as xs:string) as xs:string? external; (: §14.8.8 :)
declare function fn:error() as none external; (: §3.1 :)
declare function fn:error($error as xs:QName) as none external; (: §3.1 :)
declare function fn:error($error as xs:QName?, $description as xs:string) as none external; (: §3.1 :)
declare function fn:error($error as xs:QName?, $description as xs:string, $error-object as item()*) as none external; (: §3.1 :)
declare function fn:escape-html-uri($uri as xs:string?) as xs:string external; (: §6.4 :)
declare function fn:exactly-one($arg as item()*) as item() external; (: §14.3.3 :)
declare function fn:exists($arg as item()*) as xs:boolean external; (: §14.1.3 :)
declare function fn:false() as xs:boolean external; (: §7.1.2 :)
declare function fn:filter($seq as item()*, $f as function(item()) as xs:boolean) as item()* external; (: §16.2.2 :)
declare function fn:floor($arg as xs:numeric?) as xs:numeric? external; (: §4.4.3 :)
declare function fn:fold-left($seq as item()*, $zero as item()*, $f as function(item()*, item()) as item()*) as item()* external; (: §16.2.3 :)
declare function fn:fold-right($seq as item()*, $zero as item()*, $f as function(item()*, item()) as item()*) as item()* external; (: §16.2.4 :)
declare function fn:for-each($seq as item()*, $f as function(item()) as item()*) as item()* external; (: §16.2.1 :)
declare function fn:for-each-pair($seq1 as item()*, $seq2 as item()*, $f as function(item(), item()) as item()*) as item()* external; (: §16.2.5 :)
declare function fn:format-date($value as xs:date?, $picture as xs:string) as xs:string? external; (: §9.8.2 :)
declare function fn:format-date($value as xs:date?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external; (: §9.8.2 :)
declare function fn:format-dateTime($value as xs:dateTime?, $picture as xs:string) as xs:string? external; (: §9.8.1 :)
declare function fn:format-dateTime($value as xs:dateTime?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external; (: §9.8.1 :)
declare function fn:format-integer($value as xs:integer?, $picture as xs:string) as xs:string external; (: §4.6.1 :)
declare function fn:format-integer($value as xs:integer?, $picture as xs:string, $lang as xs:string?) as xs:string external (: §4.6.1 :)
declare function fn:format-number($value as xs:numeric?, $picture as xs:string) as xs:string external; (: §4.7.2 :)
declare function fn:format-number($value as xs:numeric?, $picture as xs:string, $decimal-format-name as xs:string?) as xs:string external; (: §4.7.2 :)
declare function fn:format-time($value as xs:time?, $picture as xs:string) as xs:string? external; (: §9.8.3 :)
declare function fn:format-time($value as xs:time?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external; (: §9.8.3 :)
declare function fn:function-arity($func as function(*)) as xs:integer external; (: §16.1.3 :)
declare function fn:function-lookup($name as xs:QName, $arity as xs:integer) as function(*)? external; (: §16.1.1 :)
declare function fn:function-name($func as function(*)) as xs:QName? external; (: §16.1.2:)
declare function fn:generate-id() as xs:string external; (: §14.7.4 :)
declare function fn:generate-id($arg as node()?) as xs:string external; (: §14.7.4 :)
declare function fn:has-children() as xs:boolean external; (: §13.10 :)
declare function fn:has-children($node as node()?) as xs:boolean external; (: §13.10 :)
declare function fn:head($arg as item()*) as item()? external; (: §14.1.4 :)
declare function fn:hours-from-dateTime($arg as xs:dateTime?) as xs:integer? external; (: §9.5.4 :)
declare function fn:hours-from-duration($arg as xs:duration?) as xs:integer? external; (: §8.3.4 :)
declare function fn:hours-from-time($arg as xs:time?) as xs:integer? external; (: §9.5.12 :)
declare function fn:id($arg as xs:string*) as element()* external; (: §14.7.1 :)
declare function fn:id($arg as xs:string*, $node as node()) as element()* external; (: §14.7.1 :)
declare function fn:idref($arg as xs:string*) as node()* external; (: §14.7.3 :)
declare function fn:idref($arg as xs:string*, $node as node()) as node()* external; (: §14.7.3 :)
declare function fn:implicit-timezone() as xs:dayTimeDuration external; (: §15.6 :)
declare function fn:in-scope-prefixes($element as element()) as xs:string* external; (: §10.2.6 :)
declare function fn:index-of($seq as xs:anyAtomicType*, $search as xs:anyAtomicType) as xs:integer* external; (: §14.2.2 :)
declare function fn:index-of($seq as xs:anyAtomicType*, $search as xs:anyAtomicType, $collation as xs:string) as xs:integer* external; (: §14.2.2 :)
declare function fn:innermost($nodes as node()*) as node()* external; (: §13.11 :)
declare function fn:insert-before($target as item()*, $position as xs:integer, $inserts as item()*) as item()* external; (: §14.1.6 :)
declare function fn:iri-to-uri($iri as xs:string?) as xs:string external; (: §6.3 :)
declare function fn:lang($testlang as xs:string?) as xs:boolean external; (: §13.4 :)
declare function fn:lang($testlang as xs:string?, $node as node()) as xs:boolean external; (: §13.4 :)
declare function fn:last() as xs:integer external; (: §15.2 :)
declare function fn:local-name() as xs:string external; (: §13.2 :)
declare function fn:local-name($arg as node()?) as xs:string external; (: §13.2 :)
declare function fn:local-name-from-QName($arg as xs:QName?) as xs:NCName? external; (: §10.2.3 :)
declare function fn:lower-case($arg as xs:string?) as xs:string external; (: §5.4.8 :)
declare function fn:matches($input as xs:string?, $pattern as xs:string) as xs:boolean external; (: §5.6.2 :)
declare function fn:matches($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:boolean external; (: §5.6.2 :)
declare function fn:max($arg as xs:anyAtomicType*) as xs:anyAtomicType? external; (: §14.5.3 :)
declare function fn:max($arg as xs:anyAtomicType*, $collation as string) as xs:anyAtomicType? external; (: §14.5.3 :)
declare function fn:min($arg as xs:anyAtomicType*) as xs:anyAtomicType? external; (: §14.5.4 :)
declare function fn:min($arg as xs:anyAtomicType*, $collation as string) as xs:anyAtomicType? external; (: §14.5.4 :)
declare function fn:minutes-from-dateTime($arg as xs:dateTime?) as xs:integer? external; (: §9.5.5 :)
declare function fn:minutes-from-duration($arg as xs:duration?) as xs:integer? external; (: §8.3.5 :)
declare function fn:minutes-from-time($arg as xs:time?) as xs:integer? external; (: §9.5.13 :)
declare function fn:month-from-date($arg as xs:date?) as xs:integer? external; (: §9.5.9 :)
declare function fn:month-from-dateTime($arg as xs:dateTime?) as xs:integer? external; (: §9.5.2 :)
declare function fn:months-from-duration($arg as xs:duration?) as xs:integer? external; (: §8.3.2 :)
declare function fn:name() as xs:string external; (: §13.1 :)
declare function fn:name($arg as node()?) as xs:string external; (: §13.1 :)
declare function fn:namespace-uri() as xs:anyURI external; (: §13.3 :)
declare function fn:namespace-uri($arg as node()?) as xs:anyURI external; (: §13.3 :)
declare function fn:namespace-uri-for-prefix($prefix as xs:string?, $element as element()) as xs:anyURI? external; (: §10.2.5 :)
declare function fn:namespace-uri-from-QName($arg as xs:QName?) as xs:anyURI? external; (: §10.2.4 :)
declare function fn:nilled() as xs:boolean external; (: §2.2 :)
declare function fn:nilled($arg as node()?) as xs:boolean? external; (: §2.2 :)
declare function fn:node-name() as xs:QName? external; (: §2.1 :)
declare function fn:node-name($arg as node()?) as xs:QName? external; (: §2.1 :)
declare function fn:normalize-space() as xs:string external; (: §5.4.5 :)
declare function fn:normalize-space($arg as xs:string?) as xs:string external; (: §5.4.5 :)
declare function fn:normalize-unicode($arg as xs:string?) as xs:string external; (: §5.4.6 :)
declare function fn:normalize-unicode($arg as xs:string?, $normalizationForm as xs:string) as xs:string external; (: §5.4.6 :)
declare function fn:not($arg as item()*) as xs:boolean external; (: §7.3.1 :)
declare function fn:number() as xs:double external; (: §4.5.1 :)
declare function fn:number($arg as xs:anyAtomicType?) as xs:double external; (: §4.5.1 :)
declare function fn:one-or-more($arg as item()*) as item()+ external; (: §14.3.2 :)
declare function fn:outermost($nodes as node()*) as node()* external; (: §13.12 :)
declare function fn:parse-xml($arg as xs:string?) as document-node(element(*))? external; (: §14.9.1 :)
declare function fn:parse-xml-fragment($arg as xs:string?) as document-node()? external; (: §14.9.2 :)
declare function fn:path() as xs:string? external; (: §13.9 :)
declare function fn:path($arg as node()?) as xs:string? external; (: §13.9 :)
declare function fn:position() as xs:integer external; (: §15.1 :)
declare function fn:prefix-from-QName($arg as xs:QName?) as xs:NCName? external; (: §10.2.2 :)
declare function fn:remove($target as item()*, $position as xs:integer) as item()* external; (: §14.1.7 :)
declare function fn:replace($input as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string external; (: §5.6.3 :)
declare function fn:replace($input as xs:string?, $pattern as xs:string, $replacement as xs:string, $flags as xs:string) as xs:string external; (: §5.6.3 :)
declare function fn:resolve-QName($qname as xs:string?, $element as element()) as xs:QName? external; (: §10.1.1 :)
declare function fn:resolve-uri($relative as xs:string?) as xs:anyURI? external; (: §6.1 :)
declare function fn:resolve-uri($relative as xs:string?, $base as xs:string) as xs:anyURI? external; (: §6.1 :)
declare function fn:reverse($arg as item()*) as item()* external; (: §14.1.8 :)
declare function fn:root() as node() external; (: §13.8 :)
declare function fn:root($arg as node()?) as node()? external; (: §13.8 :)
declare function fn:round($arg as xs:numeric?) as xs:numeric? external; (: §4.4.4 :)
declare function fn:round($arg as xs:numeric?, $precision as xs:integer) as xs:numeric? external; (: §4.4.4 :)
declare function fn:round-half-to-even($arg as xs:numeric?) as xs:numeric? external; (: §4.4.5 :)
declare function fn:round-half-to-even($arg as xs:numeric?, $precision as xs:integer) as xs:numeric? external; (: §4.4.5 :)
declare function fn:seconds-from-dateTime($arg as xs:dateTime?) as xs:decimal? external; (: §9.5.6 :)
declare function fn:seconds-from-duration($arg as xs:duration?) as xs:decimal? external; (: §8.3.6 :)
declare function fn:seconds-from-time($arg as xs:time?) as xs:decimal? external; (: §9.5.14 :)
declare function fn:serialize($arg as item()*) as xs:string external; (: §14.9.3 :)
declare function fn:serialize($arg as item()*, $params as element(output:serialization-parameters)?) as xs:string external; (: §14.9.3 :)
declare function fn:starts-with($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external; (: §5.5.2 :)
declare function fn:starts-with($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external; (: §5.5.2 :)
declare function fn:static-base-uri() as xs:anyURI? external; (: §15.8 :)
declare function fn:string() as xs:string external; (: §2.3 :)
declare function fn:string($arg as item()?) as xs:string external; (: §2.3 :)
declare function fn:string-join($arg1 as xs:string*) as xs:string external; (: §5.4.2 :)
declare function fn:string-join($arg1 as xs:string*, $arg2 as xs:string) as xs:string external; (: §5.4.2 :)
declare function fn:string-length() as xs:integer external; (: §5.4.4 :)
declare function fn:string-length($arg as xs:string?) as xs:integer external; (: §5.4.4 :)
declare function fn:string-to-codepoints($arg as xs:string?) as xs:integer* external; (: §5.2.2 :)
declare function fn:subsequence($sourceSeq as item()*, $startingLoc as xs:double) as item()* external; (: §14.1.9 :)
declare function fn:subsequence($sourceSeq as item()*, $startingLoc as xs:double, $length as xs:double) as item()* external; (: §14.1.9 :)
declare function fn:substring($sourceString as xs:string?, $start as xs:double) as xs:string external; (: §5.4.3 :)
declare function fn:substring($sourceString as xs:string?, $start as xs:double, $length as xs:double) as xs:string external; (: §5.4.3 :)
declare function fn:substring-after($arg1 as xs:string?, $arg2 as xs:string?) as xs:string external; (: §5.5.5 :)
declare function fn:substring-after($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string external; (: §5.5.5 :)
declare function fn:substring-before($arg1 as xs:string?, $arg2 as xs:string?) as xs:string external; (: §5.5.4 :)
declare function fn:substring-before($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string external; (: §5.5.4 :)
declare function fn:sum($arg as xs:anyAtomicType*) as xs:anyAtomicType external; (: §14.5.5 :)
declare function fn:sum($arg as xs:anyAtomicType*, $zero as xs:anyAtomicType?) as xs:anyAtomicType? external; (: §14.5.5 :)
declare function fn:tail($arg as item()*) as item()? external; (: §14.1.5 :)
declare function fn:timezone-from-date($arg as xs:date?) as xs:dayTimeDuration? external; (: §9.5.11 :)
declare function fn:timezone-from-dateTime($arg as xs:dateTime?) as xs:dayTimeDuration? external; (: §9.5.7 :)
declare function fn:timezone-from-time($arg as xs:time?) as xs:dayTimeDuration? external; (: §9.5.15 :)
declare function fn:tokenize($input as xs:string?, $pattern as xs:string) as xs:string* external; (: §5.6.4 :)
declare function fn:tokenize($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:string* external; (: §5.6.4 :)
declare function fn:trace($value as item()*, $label as xs:string) as item()* external; (: §3.2 :)
declare function fn:translate($arg as xs:string?, $mapString as xs:string, $transString as xs:string) as xs:string external; (: §5.4.9 :)
declare function fn:true() as xs:boolean external; (: §7.1.1 :)
declare function fn:unordered($sourceSeq as item()*) as item()* external; (: §14.1.10 :)
declare function fn:unparsed-text($href as xs:string?) as xs:string? external; (: §14.8.5 :)
declare function fn:unparsed-text($href as xs:string?, $encoding as xs:string) as xs:string? external; (: §14.8.5 :)
declare function fn:unparsed-text-available($href as xs:string?) as xs:string? external; (: §14.8.7 :)
declare function fn:unparsed-text-available($href as xs:string?, $encoding as xs:string) as xs:string? external; (: §14.8.7 :)
declare function fn:unparsed-text-lines($href as xs:string?) as xs:string? external; (: §14.8.6 :)
declare function fn:unparsed-text-lines($href as xs:string?, $encoding as xs:string) as xs:string? external; (: §14.8.6 :)
declare function fn:upper-case($arg as xs:string?) as xs:string external; (: §5.4.7 :)
declare function fn:uri-collection() as xs:anyURI* external; (: §14.8.4 :)
declare function fn:uri-collection($arg as xs:string?) as xs:anyURI* external; (: §14.8.4 :)
declare function fn:year-from-date($arg as xs:date?) as xs:integer? external; (: §9.5.8 :)
declare function fn:year-from-dateTime($arg as xs:dateTime?) as xs:integer? external; (: §9.5.1 :)
declare function fn:years-from-duration($arg as xs:duration?) as xs:integer? external; (: §8.3.1 :)
declare function fn:zero-or-one($arg as item()*) as item()? external; (: §14.3.1 :)


Annotate the XMLSchema constructor functions with versioned type restrictions.

xquery version "3.1";
(:~
 : XPath and XQuery Functions and Operators: Constructor Functions
 :
 : @see https://www.w3.org/TR/2007/REC-xpath-functions-20070123/
 : @see https://www.w3.org/TR/2010/REC-xpath-functions-20101214/
 : @see https://www.w3.org/TR/2014/REC-xpath-functions-30-20140408/
 : @see https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/
 :)
module namespace xs = "http://www.w3.org/2001/XMLSchema";

declare namespace a = "http://reecedunn.co.uk/xquery/annotations";

declare %a:since("xmlschema", "1.0-20010502") function xs:ENTITY($arg as xs:anyAtomicType?) as xs:ENTITY? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:ID($arg as xs:anyAtomicType?) as xs:ID? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:IDREF($arg as xs:anyAtomicType?) as xs:IDREF? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:NCName($arg as xs:anyAtomicType?) as xs:NCName? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:NMTOKEN($arg as xs:anyAtomicType?) as xs:NMTOKEN? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:Name($arg as xs:anyAtomicType?) as xs:Name? external;
declare %a:restrict-until("$arg", "xmlschema", "1.1-20120405", "xs:anyAtomicType")
        %a:since("xmlschema", "1.0-20010502") function xs:QName($arg as xs:anyAtomicType?) as xs:QName? external;

declare %a:since("xmlschema", "1.0-20010502") function xs:anyURI($arg as xs:anyAtomicType?) as xs:anyURI? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:base64Binary($arg as xs:anyAtomicType?) as xs:base64Binary? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:boolean($arg as xs:anyAtomicType?) as xs:boolean? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:byte($arg as xs:anyAtomicType?) as xs:byte? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:date($arg as xs:anyAtomicType?) as xs:date? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:dateTime($arg as xs:anyAtomicType?) as xs:dateTime? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:dayTimeDuration($arg as xs:anyAtomicType?) as xs:dayTimeDuration? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:decimal($arg as xs:anyAtomicType?) as xs:decimal? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:double($arg as xs:anyAtomicType?) as xs:double? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:duration($arg as xs:anyAtomicType?) as xs:duration? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:float($arg as xs:anyAtomicType?) as xs:float? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:gDay($arg as xs:anyAtomicType?) as xs:gDay? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:gMonth($arg as xs:anyAtomicType?) as xs:gMonth? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:gMonthDay($arg as xs:anyAtomicType?) as xs:gMonthDay? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:gYear($arg as xs:anyAtomicType?) as xs:gYear? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:gYearMonth($arg as xs:anyAtomicType?) as xs:gYearMonth? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:hexBinary($arg as xs:anyAtomicType?) as xs:hexBinary? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:int($arg as xs:anyAtomicType?) as xs:int? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:integer($arg as xs:anyAtomicType?) as xs:integer? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:language($arg as xs:anyAtomicType?) as xs:language? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:long($arg as xs:anyAtomicType?) as xs:long? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:negativeInteger($arg as xs:anyAtomicType?) as xs:negativeInteger? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:nonNegativeInteger($arg as xs:anyAtomicType?) as xs:nonNegativeInteger? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:nonPositiveInteger($arg as xs:anyAtomicType?) as xs:nonPositiveInteger? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:normalizedString($arg as xs:anyAtomicType?) as xs:normalizedString? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:positiveInteger($arg as xs:anyAtomicType?) as xs:positiveInteger? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:short($arg as xs:anyAtomicType?) as xs:short? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:string($arg as xs:anyAtomicType?) as xs:string? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:time($arg as xs:anyAtomicType?) as xs:time? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:token($arg as xs:anyAtomicType?) as xs:token? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:unsignedByte($arg as xs:anyAtomicType?) as xs:unsignedByte? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:unsignedInt($arg as xs:anyAtomicType?) as xs:unsignedInt? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:unsignedLong($arg as xs:anyAtomicType?) as xs:unsignedLong? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:unsignedShort($arg as xs:anyAtomicType?) as xs:unsignedShort? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:untypedAtomic($arg as xs:anyAtomicType?) as xs:untypedAtomic? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:yearMonthDuration($arg as xs:anyAtomicType?) as xs:yearMonthDuration? external;
declare %a:since("xmlschema", "1.1-20120405") function xs:dateTimeStamp($arg as xs:anyAtomicType?) as xs:dateTimeStamp? external;

xquery version "3.1";
(:~
 : XPath and XQuery Functions and Operators: Constructor Functions
 :
 : @see https://www.w3.org/TR/2007/REC-xpath-functions-20070123/
 : @see https://www.w3.org/TR/2010/REC-xpath-functions-20101214/
 : @see https://www.w3.org/TR/2014/REC-xpath-functions-30-20140408/
 : @see https://www.w3.org/TR/2017/REC-xpath-functions-31-20170321/
 :)
module namespace xs = "http://www.w3.org/2001/XMLSchema";

declare namespace a = "http://reecedunn.co.uk/xquery/annotations";

declare %a:since("xmlschema", "1.0-20010502") function xs:ENTITY($arg as xs:anyAtomicType?) as xs:ENTITY? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:ID($arg as xs:anyAtomicType?) as xs:ID? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:IDREF($arg as xs:anyAtomicType?) as xs:IDREF? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:NCName($arg as xs:anyAtomicType?) as xs:NCName? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:NMTOKEN($arg as xs:anyAtomicType?) as xs:NMTOKEN? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:Name($arg as xs:anyAtomicType?) as xs:Name? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:QName($arg (: as [1.0]xs:anyAtomicType [1.1]xs:anyAtomicType? :)) as xs:QName? external;

declare %a:since("xmlschema", "1.0-20010502") function xs:anyURI($arg as xs:anyAtomicType?) as xs:anyURI? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:base64Binary($arg as xs:anyAtomicType?) as xs:base64Binary? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:boolean($arg as xs:anyAtomicType?) as xs:boolean? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:byte($arg as xs:anyAtomicType?) as xs:byte? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:date($arg as xs:anyAtomicType?) as xs:date? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:dateTime($arg as xs:anyAtomicType?) as xs:dateTime? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:dayTimeDuration($arg as xs:anyAtomicType?) as xs:dayTimeDuration? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:decimal($arg as xs:anyAtomicType?) as xs:decimal? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:double($arg as xs:anyAtomicType?) as xs:double? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:duration($arg as xs:anyAtomicType?) as xs:duration? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:float($arg as xs:anyAtomicType?) as xs:float? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:gDay($arg as xs:anyAtomicType?) as xs:gDay? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:gMonth($arg as xs:anyAtomicType?) as xs:gMonth? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:gMonthDay($arg as xs:anyAtomicType?) as xs:gMonthDay? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:gYear($arg as xs:anyAtomicType?) as xs:gYear? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:gYearMonth($arg as xs:anyAtomicType?) as xs:gYearMonth? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:hexBinary($arg as xs:anyAtomicType?) as xs:hexBinary? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:int($arg as xs:anyAtomicType?) as xs:int? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:integer($arg as xs:anyAtomicType?) as xs:integer? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:language($arg as xs:anyAtomicType?) as xs:language? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:long($arg as xs:anyAtomicType?) as xs:long? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:negativeInteger($arg as xs:anyAtomicType?) as xs:negativeInteger? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:nonNegativeInteger($arg as xs:anyAtomicType?) as xs:nonNegativeInteger? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:nonPositiveInteger($arg as xs:anyAtomicType?) as xs:nonPositiveInteger? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:normalizedString($arg as xs:anyAtomicType?) as xs:normalizedString? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:positiveInteger($arg as xs:anyAtomicType?) as xs:positiveInteger? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:short($arg as xs:anyAtomicType?) as xs:short? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:string($arg as xs:anyAtomicType?) as xs:string? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:time($arg as xs:anyAtomicType?) as xs:time? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:token($arg as xs:anyAtomicType?) as xs:token? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:unsignedByte($arg as xs:anyAtomicType?) as xs:unsignedByte? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:unsignedInt($arg as xs:anyAtomicType?) as xs:unsignedInt? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:unsignedLong($arg as xs:anyAtomicType?) as xs:unsignedLong? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:unsignedShort($arg as xs:anyAtomicType?) as xs:unsignedShort? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:untypedAtomic($arg as xs:anyAtomicType?) as xs:untypedAtomic? external;
declare %a:since("xmlschema", "1.0-20010502") function xs:yearMonthDuration($arg as xs:anyAtomicType?) as xs:yearMonthDuration? external;
declare %a:since("xmlschema", "1.1-20120405") function xs:dateTimeStamp($arg as xs:anyAtomicType?) as xs:dateTimeStamp? external;