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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
17 Casting
Supported.