B Functions and Operators


This topic describes how DataDirect XQuery supports the following categories of XQuery functions and operators as described in the XQuery 1.0 and XPath 2.0 Functions and Operators, W3C Recommendation 23 January 2007 located at: http://www.w3.org/TR/2007/REC-xpath-functions-20070123/

In this topic, numbered headings and items correspond to the sections in the W3C Recommendation 23 January 2007 where that topic is discussed.

2 Accessors

Table B-1 describes how DataDirect XQuery supports XQuery accessor functions. Some accessor functions are compensated for relational sources; see Understanding Compensation for details.

Table B-1. XQuery Accessor Functions 
XQuery Function
Support
fn:node-name (2.1)
Supported.
fn:nilled (2.2)
Supported. Compensated for relational sources.
fn:string (2.3)
Supported.
fn:data (2.4)
Supported.
fn:base-uri (2.5)
Supported. Compensated for relational sources.
fn:document-uri (2.6)
Supported. Compensated for relational sources.

3 Error Function

Table B-2 describes how DataDirect XQuery supports the XQuery error function. The error function is compensated for relational sources; see Understanding Compensation for details.

Table B-2. XQuery Error Function 
XQuery Function
Support
fn:error (3)
Supported. Compensated for relational sources.

4 Trace Function

Table B-3 describes how DataDirect XQuery supports the XQuery trace function. The trace function is compensated for relational sources; see Understanding Compensation for details.

Table B-3. XQuery Trace Function 
XQuery Function
Support
fn:trace (4)
Supported. Compensated for relational sources.

5 Constructor Functions

Each predefined XQuery atomic type has an associated constructor function. Only those constructor functions that operate on supported atomic types are supported. See Supported XQuery Atomic Types for a list of the atomic types supported by DataDirect XQuery.

5.1 Constructor Functions for XML Schema Built-in Types

Table B-4 describes how DataDirect XQuery supports the XQuery constructor functions for XML schema built-in types. Some of these constructor functions are compensated for relational sources; see Understanding Compensation for details.

Table B-4. XQuery Constructor Functions for XML Schema Built-In Types 
XQuery Function
Support
xs:string (5.1)
Supported.
xs:boolean (5.1)
Supported.
xs:decimal (5.1)
Supported.
xs:float (5.1)
Supported. For relational sources, INF, -INF, and NaN are not supported.
xs:double (5.1)
Supported. For relational sources, INF, -INF, and NaN are not supported.
xs:duration (5.1)
Supported. Compensated for relational sources.
xs:dateTime (5.1)
Supported.
xs:time (5.1)
Supported.
xs:date (5.1)
Supported.
xs:gYearMonth (5.1)
Supported. Compensated for relational sources.
xs:gYear (5.1)
Supported. Compensated for relational sources.
xs:gMonthDay (5.1)
Supported. Compensated for relational sources.
xs:gDay (5.1)
Supported. Compensated for relational sources.
xs:gMonth (5.1)
Supported. Compensated for relational sources.
xs:hexBinary (5.1)
Supported. Compensated for relational sources.
xs:base64Binary (5.1)
Supported. Compensated for relational sources.
xs:anyURI (5.1)
Supported. Compensated for relational sources
xs:QName (5.1)
Supported.
xs:normalizedString (5.1)
Supported. Compensated for relational sources.
xs:token (5.1)
Supported. Compensated for relational sources.
xs:language (5.1)
Supported. Compensated for relational sources.
xs:NMTOKEN (5.1)
Supported. Compensated for relational sources.
xs:Name (5.1)
Supported. Compensated for relational sources.
xs:NCName (5.1)
Supported. Compensated for relational sources.
xs:ID (5.1)
Supported. Compensated for relational sources.
xs:IDREF (5.1)
Supported. Compensated for relational sources.
xs:ENTITY (5.1)
Supported. Compensated for relational sources.
xs:integer (5.1)
Supported.
xs:nonPositiveInteger (5.1)
Supported. Compensated for relational sources.
xs:negativeInteger (5.1)
Supported. Compensated for relational sources.
xs:long (5.1)
Supported.
xs:int (5.1)
Supported.
xs:short (5.1)
Supported.
xs:byte (5.1)
Supported.
xs:nonNegativeInteger (5.1)
Supported. Compensated for relational sources.
xs:unsignedLong (5.1)
Supported. Compensated for relational sources.
xs:unsignedInt (5.1)
Supported. Compensated for relational sources.
xs:unsignedShort (5.1)
Supported. Compensated for relational sources.
xs:unsignedByte (5.1)
Supported. Compensated for relational sources.
xs:positiveInteger (5.1)
Supported. Compensated for relational sources.
xs:yearMonthDuration (5.1)
Supported. Compensated for relational sources.
xs:dayTimeDuration (5.1)
Supported. Compensated for relational sources.
xs:untypedAtomic (5.1)
Supported.

5.2 A Special Constructor Function for xs:dateTime

Table B-5 describes how DataDirect XQuery supports the Special Constructor Function for xs:dateTime.

Table B-5. A Special Constructor Function for xs:dateTime 
XQuery Function
Support
fn:dateTime($arg1 as xs:date, $arg2 as xs:time) as xs:dateTime (5.2)
Supported.

5.3 Constructor Functions for User-Defined Types

Not supported.

6 Functions and Operators on Numerics

This section describes how DataDirect XQuery supports functions and operators on numeric data types.

6.2 Operators on Numeric Values

Table B-6 describes how DataDirect XQuery supports operators on numeric values.

Table B-6. XQuery Operators on Numeric Values 
XQuery Operator
Support
op:numeric-add (6.2.1)
Supported.
op:numeric-subtract (6.2.2)
Supported.
op:numeric-multiply (6.2.3)
Supported.
op:numeric-divide (6.2.4)
Supported.
For relational sources, an xs:float or xs:double value divided by zero raises an error instead of returning INF or –INF.
op:numeric-integer-divide (6.2.5)
Supported.
op:numeric-mod (6.2.6)
Supported.
op:numeric-unary-plus (6.2.7)
Supported.
op:numeric-unary-minus (6.2.8)
Supported.

6.3 Comparison of Numeric Values

Table B-7 describes how DataDirect XQuery supports comparison operators on numeric values.

Table B-7. XQuery Comparison Operators on Numeric Values 
XQuery Operator
Support
op:numeric-equal (6.3.1)
Supported.
op:numeric-less-than (6.3.2)
Supported.
op:numeric-greater-than (6.3.3)
Supported.

6.4 Functions on Numeric Values

Table B-8 describes how DataDirect XQuery supports functions on numeric values. Some of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-8. XQuery Functions on Numeric Values 
XQuery Function
Support
fn:abs (6.4.1)
Supported.
fn:ceiling (6.4.2)
Supported. Compensated for Informix.
fn:floor (6.4.3)
Supported.
fn:round (6.4.4)
Supported.
fn:round-half-to-even (6.4.5)
Supported. Compensated for relational sources.

7 Functions on Strings

This section describes how DataDirect XQuery supports functions on string data types.

7.2 Functions to Assemble and Disassemble Strings

Table B-9 describes how DataDirect XQuery supports functions to assemble and disassemble strings. All of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-9. XQuery Functions to Assemble and Disassemble Strings 
XQuery Function
Support
fn:codepoints-to-string (7.2.1)
Supported. Compensated for relational sources.
fn:string-to-codepoints (7.2.2)
Supported. Compensated for relational sources.

7.3 Equality and Comparison of Strings

Table B-10 describes how DataDirect XQuery supports functions that provide equality and comparison operations on strings. Some of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-10. XQuery Functions for Equality and Comparison of Strings 
XQuery Function
Support
fn:compare (7.3.2)
Supported. See Specifying Collations for information about using the collation parameter.
fn:codepoint-equal (7.3.3)
Supported. Compensated for relational sources.

7.4 Functions on String Values

Table B-11 describes how DataDirect XQuery supports functions on string values. Some of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-11. XQuery Functions on String Values 
XQuery Function
Support
fn:concat (7.4.1)
Supported.
fn:string-join (7.4.2)
Supported. Compensated for relational sources.
fn:substring (7.4.3)
Supported.
fn:string-length (7.4.4)
Supported.
fn:normalize-space (7.4.5)
Supported. Compensated for relational sources.
fn:normalize-unicode (7.4.6)
Supported. Compensated for relational sources.
fn:upper-case (7.4.7)
Supported.
fn:lower-case (7.4.8)
Supported.
fn:translate (7.4.9)
Supported. Compensated for relational sources, except in this case:
fn:translate( $arg as xs:string?, $mapString as xs:string, $transString as xs:string) as xs:string
fn:translate( ) is not compensated if all of the following conditions are true:
  • $mapString and $transString are literals.
  • No characters of $mapString appear in $transString, and vice versa.
  • The underlying database is not Sybase.
fn:escape-uri (7.4.10)
Supported. Compensated for relational sources.
fn:iri-to-uri (7.4.11)
Supported. Compensated for relational sources.
fn:escape-html-uri (7.4.12)
Supported. Compensated for relational sources.

7.5 Functions Based on Substring Matching

Table B-12 describes how DataDirect XQuery supports functions based on substring matching.

Table B-12. XQuery Functions Based on Substring Matching 
XQuery Function
Support
fn:contains (7.5.1)
Supported. Compensated for Informix, except when the second argument is a sting literal. See Specifying Collations for information about using the collation parameter.
fn:starts-with (7.5.2)
Supported. Compensated for Informix, except when the second argument is a sting literal. See Specifying Collations for information about using the collation parameter.
fn:ends-with (7.5.3)
Supported. Compensated for Informix, except when the second argument is a sting literal. See Specifying Collations for information about using the collation parameter.
fn:substring-before (7.5.4)
Supported. Compensated for Informix. See Specifying Collations for information about using the collation parameter.
fn:substring-after (7.5.5)
Supported. Compensated for Informix. See Specifying Collations for information about using the collation parameter.

7.6 String Functions That Use Pattern Matching

Table B-13 describes how DataDirect XQuery supports functions that use pattern matching. All of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-13. String Functions That Use Pattern Matching 
XQuery Function
Support
fn:matches (7.6.2)
Supported. Compensated for relational sources.
fn:replace (7.6.3)
Supported. Compensated for relational sources, except if all of the following conditions are true:
  • $pattern and $replacement are string literals.
  • $pattern is not a regular expression, does not contain unescaped characters: ( | ) [ ] * ? + ^ $.
  • $replacement cannot include unescaped \ or $ characters.
  • The underlying database is not Sybase.
fn:tokenize (7.6.4)
Supported. Compensated for relational sources.

8 Functions and Operators for anyURI

Table B-14 describes how DataDirect XQuery supports functions on the anyURI data type. The resolve-uri function is compensated for relational sources; see Understanding Compensation for details.

Table B-14. XQuery anyURI Functions 
XQuery Function
Support
fn:resolve-uri (8.1)
Supported. Compensated for relational sources.

9 Functions and Operators on Boolean Values

This section describes how DataDirect XQuery supports functions and operators on the boolean data type.

9.1 Boolean Constructor Functions

Table B-15 describes how DataDirect XQuery supports boolean constructor functions.

Table B-15. XQuery Boolean Constructor Functions 
XQuery Function
Support
fn:true (9.1.1)
Supported.
fn:false (9.1.2)
Supported.

9.2 Operators on Boolean Values

Table B-16 describes how DataDirect XQuery supports operators on boolean values.

Table B-16. XQuery Operators on Boolean Values 
XQuery Operator
Support
op:boolean-equal (9.2.1)
Supported.
op:boolean-less-than (9.2.2)
Supported.
op:boolean-greater-than (9.2.3)
Supported.

9.3 Functions on Boolean Values

Table B-17 describes how DataDirect XQuery supports functions on boolean values.

Table B-17. XQuery Functions on Boolean Values 
XQuery Function
Support
fn:not (9.3.1)
Supported.

10 Functions and Operators on Durations, Dates, and Times

This section describes how DataDirect XQuery supports functions and operators on duration, date, and time data types.

10.1 and 10.2 Duration, Date, and Time Types

Table B-18 describes how DataDirect XQuery supports functions on duration, date, and time data types. Some of these are compensated for relational sources, see Understanding Compensation for details.

Table B-18. Functions on Duration, Date, and Time Data Types
XQuery Function
Support
xs:dateTime (10.1)
Supported. See comments for xs:dateTime (5.1).
xs:date (10.1)
Supported.
xs:time (10.1)
Supported. See comments for xs:time (5.1).
xs:gYearMonth (10.1)
Supported. Compensated for relational sources.
xs:gYear (10.1)
Supported. Compensated for relational sources.
xs:gMonthDay (10.1)
Supported. Compensated for relational sources.
xs:gMonth (10.1)
Supported. Compensated for relational sources.
xs:gDay (10.1)
Supported. Compensated for relational sources.

10.3 Two Totally Ordered Subtypes of Duration

DataDirect XQuery supports the xs:yearMonthDuration (10.3.1) and xs:dayTimeDuration (10.3.2). For relational sources, these two subtypes are compensated. See Understanding Compensation.

10.4 Comparisons of Duration, Date, and Time Values

Table B-19 describes how DataDirect XQuery supports comparisons of duration, date, and time values. Some of the comparison operators on duration, date, and time values are compensated for relational sources; see Understanding Compensation for details.

Table B-19. XQuery Comparisons of Duration, Date, and Time Values 
XQuery Operator
Support
op:yearMonthDuration-equal (10.4.1)
Supported. Compensated for relational sources.
op:yearMonthDuration-less-than (10.4.2)
Supported. Compensated for relational sources.
op:yearMonthDuration-greater-than (10.4.3)
Supported. Compensated for relational sources.
op:dayTimeDuration-equal (10.4.4)
Supported. Compensated for relational sources.
op:dayTimeDuration-less-than (10.4.5)
Supported. Compensated for relational sources.
op:dayTimeDuration-greater-than (10.4.6)
Supported. Compensated for relational sources.
op:duration-equal (10.4.7)
Supported. Compensated for relational sources.
op:dateTime-equal (10.4.8)
Supported.
op:dateTime-less-than (10.4.9)
Supported.
op:dateTime-greater-than (10.4.10)
Supported.
op:date-equal (10.4.11)
Supported.
op:date-less-than (10.4.12)
Supported.
op:date-greater-than (10.4.13)
Supported.
op:time-equal (10.4.14)
Supported.
op:time-less-than (10.4.15)
Supported.
op:time-greater-than (10.4.16)
Supported.
op:gYearMonth-equal (10.4.17)
Supported. Compensated for relational sources.
op:gYear-equal (10.4.18)
Supported. Compensated for relational sources.
op:gMonthDay-equal (10.4.19)
Supported. Compensated for relational sources.
op:gMonth-equal (10.4.20)
Supported. Compensated for relational sources.
op:gDay-equal (10.4.21)
Supported. Compensated for relational sources.

10.5 Component Extraction Functions on Durations, Dates, and Times

Table B-20 describes how DataDirect XQuery supports component extraction functions. Some of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-20. XQuery Component Extraction Functions 
XQuery Function
Support
fn:years-from-duration (10.5.1)
Supported. Compensated for relational sources.
fn:months-from-duration (10.5.2)
Supported. Compensated for relational sources.
fn:days-from-duration (10.5.3)
Supported. Compensated for relational sources.
fn:hours-from-duration (10.5.4)
Supported. Compensated for relational sources.
fn:minutes-from-duration (10.5.5)
Supported. Compensated for relational sources.
fn:seconds-from-duration (10.5.6)
Supported. Compensated for relational sources.
fn:year-from-dateTime (10.5.7)
Supported.
fn:month-from-dateTime (10.5.8)
Supported.
fn:day-from-dateTime (10.5.9)
Supported.
fn:hours-from-dateTime (10.5.10)
Supported. Compensated for Informix.
fn:minutes-from-dateTime (10.5.11)
Supported. Compensated for Informix.
fn:seconds-from-dateTime (10.5.12)
Supported. Compensated for Informix.
fn:timezone-from-dateTime (10.5.13)
Supported. Compensated for relational sources.
fn:year-from-date (10.5.14)
Supported.
fn:month-from-date (10.5.15)
Supported.
fn:day-from-date (10.5.16)
Supported.
fn:timezone-from-date (10.5.17)
Supported. Compensated for relational sources.
fn:hours-from-time (10.5.18)
Supported. Compensated for Informix.
fn:minutes-from-time (10.5.19)
Supported. Compensated for Informix.
fn:seconds-from-time (10.5.20)
Supported. Compensated for Informix.
fn:timezone-from-time (10.5.21)
Supported. Compensated for relational sources.

10.6 Arithmetic Operators on Durations

Table B-21 describes how DataDirect XQuery supports arithmetic operators on durations. All of these operators are compensated for relational sources; see Understanding Compensation for details.

Table B-21. XQuery Arithmetic Operators on Durations 
XQuery Operator
Support
op:add-yearMonthDurations (10.6.1)
Supported. Compensated for relational sources.
op:subtract-yearMonthDurations (10.6.2)
Supported. Compensated for relational sources.
op:multiply-yearMonthDuration (10.6.3)
Supported. Compensated for relational sources.
op:divide-yearMonthDuration (10.6.4)
Supported. Compensated for relational sources.
op:divide-yearMonthDuration-by-year
MonthDuration (10.6.5)
Supported. Compensated for relational sources.
op:add-dayTimeDurations (10.6.6)
Supported. Compensated for relational sources.
op:subtract-dayTimeDurations (10.6.7)
Supported. Compensated for relational sources.
op:multiply-dayTimeDuration (10.6.8)
Supported. Compensated for relational sources.
op:divide-dayTimeDuration (10.6.9)
Supported. Compensated for relational sources.
op:divide-dayTimeDuration-by-dayTimeDuration (10.6.10)
Supported. Compensated for relational sources.

10.7 Timezone Adjustment on Dates and Time Values

Table B-22 describes how DataDirect XQuery supports functions and operators used to adjust timezones on dateTime, date, and time values. All of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-22. Functions for Timezone Adjustment on dateTime, date, and time Values 
XQuery Function
Support
fn:adjust-dateTime-to-timezone (10.7.1)
Supported. Compensated for relational sources.
fn:adjust-date-to-timezone (10.7.2)
Supported. Compensated for relational sources.
fn:adjust-time-to-timezone (10.7.3)
Supported. Compensated for relational sources.

10.8 Arithmetic Operators on Durations, Dates, and Times

Table B-23 describes how DataDirect XQuery supports operators used to add and subtract durations from dateTime, date, and time. All of these operators are compensated for relational sources; see Understanding Compensation for details.

Table B-23. Operators for Adding and Subtracting Durations from dateTime, date, and time 
XQuery Operator
Support
op:subtract-dateTimes (10.8.1)
Supported. Compensated for relational sources.
op:subtract-dates (10.8.2)
Supported. Compensated for relational sources.
op:subtract-times (10.8.3)
Supported. Compensated for relational sources.
op:add-yearMonthDuration-to-dateTime (10.8.4)
Supported. Compensated for relational sources.
op:add-dayTimeDuration-to-dateTime (10.8.5)
Supported. Compensated for relational sources.
op:subtract-yearMonthDuration-from-dateTime (10.8.6)
Supported. Compensated for relational sources.
op:subtract-dayTimeDuration-from-dateTime (10.8.7)
Supported. Compensated for relational sources.
op:add-yearMonthDuration-to-date (10.8.8)
Supported. Compensated for relational sources.
op:add-dayTimeDuration-to-date (10.8.9)
Supported. Compensated for relational sources.
op:subtract-yearMonthDuration-from-date (10.8.10)
Supported. Compensated for relational sources.
op:subtract-dayTimeDuration-from-date (10.8.11)
Supported. Compensated for relational sources.
op:add-dayTimeDuration-from-date (10.8.12)
Supported. Compensated for relational sources.
op:subtract-dayTimeDuration-from-time (10.8.13)
Supported. Compensated for relational sources.

11 Functions Related to QNames

This section describes how DataDirect XQuery supports functions related to QNames.

11.1 Constructor Functions for QNames

Table B-24 describes how DataDirect XQuery supports constructor functions for QNames. Some of these constructor functions are compensated for relational sources; see Understanding Compensation for details.

Table B-24. Constructor Functions for QNames 
XQuery Function
Support
fn:resolve-QName (11.1.1)
Supported. Compensated for relational sources.
fn:QName (11.1.2)
Supported.

11.2 Operators and Functions Related to QNames

Table B-25 describes how DataDirect XQuery supports the operators and functions related to QNames. Some of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-25. XQuery Operators and Functions Related to QNames 
XQuery Operator or Function
Support
op:QName-equal (11.2.1)
Supported.
fn:prefix-from-Qname (11.2.2)
Supported.
fn:local-name-from-QName (11.2.3)
Supported.
fn:namespace-uri-from-QName (11.2.4)
Supported.
fn:namespace-uri-for-prefix (11.2.5)
Supported. Compensated for relational sources.
fn:in-scope-prefixes (11.2.6)
Supported. Compensated for relational sources.

12 Operators on base64Binary and hexBinary

Table B-26 describes how DataDirect XQuery supports comparisons of base64Binary and hexBinary values. One of these operators is compensated for relational sources; see Understanding Compensation for details.

Table B-26. XQuery Comparisons of base64Binary and hexBinary Values 
XQuery Operator
Support
op:hexBinary-equal (12.1.1)
Supported.
op:base64Binary-equal (12.1.2)
Supported. Compensated for relational sources.

13 Functions and Operators on NOTATION

Table B-27 describes how DataDirect XQuery supports operators that work with NOTATION.

Table B-27. XQuery Operators on NOTATION 
XQuery Operator
Support
op:NOTATION-equal (13.1.1)
Supported.

14 Functions and Operators on Nodes

Table B-28 describes how DataDirect XQuery supports functions and operators on nodes. One of these functions is compensated for relational sources; see Understanding Compensation for details.

Table B-28. XQuery Functions and Operators on Nodes 
XQuery Function or Operator
Support
fn:name (14.1)
Supported.
fn:local-name (14.2)
Supported.
fn:namespace-uri (14.3)
Supported.
fn:number (14.4)
Supported.
fn:lang (14.5)
Supported. Compensated for relational sources.
op:is-same-node (14.6)
Supported.
op:node-before (14.7)
Supported.
op:node-after (14.8)
Supported.
fn:root (14.9)
Supported.

15 Functions and Operators on Sequences

This section describes how DataDirect XQuery supports functions and operators on sequences.

15.1 General Functions and Operators on Sequences

Table B-29 describes how DataDirect XQuery supports functions and operators on sequences. Some of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-29. XQuery General Functions and Operators on Sequences 
XQuery Function or Operator
Support
fn:boolean (15.1.1)
Supported.
op:concatenate (15.1.2)
Supported
fn:index-of (15.1.3)
Supported. See Specifying Collations for information about using the collation parameter.
Compensated for relational sources.
fn:empty (15.1.4)
Supported.
fn:exists (15.1.5)
Supported.
fn:distinct-values (15.1.6)
Supported. See Specifying Collations for information about using the collation parameter.
fn:insert-before (15.1.7)
Supported. Compensated for relational sources.
fn:remove (15.1.8)
Supported. Compensated for relational sources.
fn:reverse (15.1.9)
Supported. Compensated for relational sources.
fn:subsequence (15.1.10)
Supported. Compensated for relational sources.
fn:unordered (15.1.11)
Supported. Compensated for relational sources.

15.2 Functions that Test Cardinality of Sequences

Table B-30 describes how DataDirect XQuery supports functions that test cardinality of sequences. All of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-30. XQuery Functions that Test Cardinality on Sequences 
XQuery Function
Support
fn:zero-or-one (15.2.1)
Supported. Compensated for relational sources.
fn:one-or-more (15.2.2)
Supported. Compensated for relational sources.
fn:exactly-one (15.2.3)
Supported. Compensated for relational sources.

15.3 Equals, Union, Intersection, and Except

Table B-31 describes how DataDirect XQuery supports functions and operators on equals, union, intersection, and except. Some of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-31. XQuery Functions and Operators on Equals, Union, Intersection, and Except 
XQuery Function or Operator
Support
fn:deep-equal (15.3.1)
Supported. See Specifying Collations for information about using the collation parameter.
Compensated for relational sources.
op:union (15.3.2)
Supported.
op:intersect (15.3.3)
Supported.
op:except (15.3.4)
Supported.

15.4 Aggregate Functions

Table B-32 describes how DataDirect XQuery supports aggregate functions.

Table B-32. XQuery Aggregate Functions 
XQuery Function
Support
fn:count (15.4.1)
Supported.
fn:avg (15.4.2)
Supported.
fn:max (15.4.3)
fn:min (15.4.4)
Supported. See Specifying Collations for information about using the collation parameter.
fn:sum (15.4.5)
Supported.

15.5 Functions and Operators That Generate Sequences

Table B-33 describes how DataDirect XQuery supports functions and operators that generate sequences. Some of these functions and operators are compensated for relational sources; see Understanding Compensation for details.

Table B-33. XQuery Functions and Operators That Generate Sequences 
XQuery Function or Operator
Support
op:to (15.5.1)
Supported. Compensated for relational sources.
fn:id (15.5.2)
Supported. Compensated for relational sources.
fn:idref (15.5.3)
Supported. Compensated for relational sources.
fn:doc (15.5.4)
Supported. See XML Data Sources for rules governing URIs.
fn:doc-available (15.5.5)
Supported.
fn:collection (15.5.6)
Supported.

16 Context Functions

Table B-34 describes how DataDirect XQuery supports context functions. Some of these functions are compensated for relational sources; see Understanding Compensation for details.

Table B-34. XQuery Context Functions 
XQuery Function
Support
fn:position (16.1)
Supported. Compensated for relational sources.
fn:last (16.2)
Supported. Compensated for relational sources.
fn:current-dateTime (16.3)
Supported. For relational sources, values are returned without timezones.
fn:current-date (16.4)
Supported. For relational sources, values are returned without timezones.
fn:current-time (16.5)
Supported. For relational sources, values are returned without timezones.
fn:implicit-timezone (16.6)
Supported. Compensated for relational sources.
fn:default-collation (16.7)
Supported. Compensated for relational sources.
fn:static-base-uri (16.8)
Supported. Compensated for relational sources.

17 Casting

Supported.