XQuery Reference

     Previous  Next    Contents    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

XQuery Reference

Topics Included in This Section

XQuery Alphabetical Functions and Operators Reference

XQuery String Functions Reference

xf:concat

Signatures

Returns

Related Topics

bea-xf: trim-left

Signatures

Returns

XQuery Compliance

Examples

Remove Leading Spaces

Error—Null

bea-xf: trim-right

Signatures

Returns

Examples

Remove Trailing Spaces

Error—Null

XQuery Compliance

bea-xf: trim

Signatures

Returns

Remove Leading and Trailing Spaces

Error—Null

XQuery Compliance

xs: normalizedString

Signatures

Returns

Examples

Remove Tabs

Remove Carriage Returns

Related Topics

xs: token

Signatures

Returns

Examples

Remove Tabs

Remove Carriage Returns

Collapse Spaces

Related Topics

xf: compare

Signatures

Returns

Examples

Less Than (-1)

Equal (0)

Greater Than (+1)

Related Topics

xf: starts-with

Signatures

Returns

Related Topics

xf: ends-with

Signatures

Returns

Related Topics

xf: contains

Signatures

Returns

Related Topics

xf: substring

Signatures

Returns

substring($string-var, $decimal-var)

substring($string-var, $decimal-var, $optional-decimal-var)

Examples

Specify Just the Starting Position

Specify the Starting Position and Length

From the Middle of the String

Pass in Null

Error—Out of Bounds

Related Topics

xf: string-length

Signatures

Returns

Examples

Simple

Pass in Null

Related Topics

xf: substring-before

Signatures

Returns

Related Topics

xf: substring-after

Signatures

Returns

Related Topics

xf: normalize-space

Signatures

Returns

Examples

Collapse Spaces

Pass in Null

Related Topics

xf: upper-case

Signatures

Returns

Examples

Simple

Pass in Null

Related Topics

xf: lower-case

Signatures

Returns

Examples

Simple

Pass in Null

Related Topics

xf: translate

Signatures

Returns

Examples

Simple

Replacement String Longer Than Source String

Replacement String Is Empty

Search String Is Empty

Pass in Null

Related Topics

xf: string-pad

Signatures

Returns

Related Topics

xf: matches

Signatures

Returns

Examples

Regular Expression Matches

Regular Expression Does Not Match

String Matches

Beginning Anchor Matches

Beginning Anchor Does Not Match

Ending Anchor Matches

Ending Anchor Does Not Match

Case-Insensitive Mode

Pass in Null

Related Topics

xf: replace

Signatures

Returns

Examples

Simple

Greedy Qualifiers

Reluctant Qualifiers

Replacement String Is Empty

Case-Insensitive Mode

Pass in Null

Related Topics

xf: tokenize

Signatures

Returns

Examples

White Space Delimited List

Comma Delimited List

Comma and White Space Delimited List

Case-Insensitive Mode

Related Topics

XQuery Type Conversion Functions Reference

xs: string

Signatures

Returns

Examples

XML Node

Integer

Float

Boolean

Related Topics

xs: decimal

Signatures

Returns

Examples

Simple

Null

Related Topics

xs: integer

Signatures

Returns

Examples

Simple

Error—Decimal Point is Not Allowed

Error—Not a Number

Null

XQuery Compliance

Related Topics

xs: long

Signatures

Returns

Examples

Simple

Error—Decimal Point Not Allowed

Error—Not a Number

Null

Related Topics

xs: int

Signatures

Returns

Examples

Simple

Error—Decimal Point Not Allowed

Error—Not a Number

Null

Related Topics

xs: short

Signatures

Returns

Examples

Simple

Error—Decimal Point Not Allowed

Error—Not a Number

Null

Related Topics

xs: byte

Signatures

Examples

Simple

Error—Decimal Point Not Allowed

Error—Not a Number

Null

Related Topics

xs: float

Signatures

Returns

Examples

Simple

Exponent

NaN

INF and -INF

Error—Invalid Exponent

Null

Related Topics

xs: double

Signatures

Returns

Examples

Simple

Exponent

NaN

INF and -INF

Error—Invalid Exponent

Error—Null

Related Topics

xf: number

Signatures

Returns

Examples

XML Node

Related Topics

bea-xf: integer-sequence

Signatures

Returns

Examples

Simple

xs: boolean

Signatures

Returns

Examples

Simple

Numeric

Related Topics

xs: dateTime

Signatures

Returns

Examples

Simple

Seconds with Decimal

UTC Time Zone

Offset Time Zone

Error—No Seconds

Error—Incorrect Format

Related Topics

xs: date

Signatures

Returns

Examples

Simple

UTC Time Zone

Offset Time Zone

Error—Not A Valid Date

Error—Incorrect Format

Related Topics

xs:time

Signatures

Returns

Examples

Simple

UTC Time Zone

Error—Incorrect Format

Related Topics

xs: gYearMonth

Signatures

Returns

Examples

Simple

UTC Time Zone

Error—Incorrect Format

Related Topics

xs: gYear

Signatures

Returns

Examples

Simple

UTC Time Zone

Related Topics

xs: gMonthDay

Signatures

Returns

Examples

Simple

UTC Time Zone

Error—Incorrect Format

Related Topics

xs: gMonth

Signatures

Returns

Examples

Simple

UTC Time Zone

Error—Incorrect Format

Related Topics

xs: gDay

Signatures

Returns

Examples

Simple

UTC Time Zone

Error—Incorrect Format

Related Topics

xs: duration

Signatures

Returns

Examples

duration with Just Years

duration with Just Negative Months

duration with Just Days and Seconds

Related Topics

xs: anyURI

Signatures

Returns

Examples

Simple

Related Topics

xs: Name

Signatures

Returns

Related Topics

xs: QName

Signatures

Returns

Related Topics

XQuery URI Functions Reference

xf: escape-URI

Signatures

Returns

Examples

True

False

Related Topics

xf: resolve-URI

Signatures

Returns

Example

Resolve-URI Example 1

Resolve-URI Example 2

Resolve-URI Example 3

Related Topics

XQuery Numeric Function Reference

bea-xf: format-number

Signatures

Returns

Examples

Add Comma And More Decimal Places

XQuery Compliance

Related Topics

xf: floor

Signatures

Returns

Related Topics

xf: ceiling

Signatures

Returns

Related Topics

xf: round

Signatures

Returns

Related Topics

XQuery Aggregate Function Reference

xf: count

Signatures

Returns

Examples

Simple

Empty Sequence

Related Topics

xf: avg

Signatures

Returns

Examples

Simple

Empty Sequences

Nodes

Related Topics

xf: max

Signatures

Returns

Examples

Simple

Empty Sequences

Nodes

Related Topics

xf: min

Signatures

Returns

Examples

Simple

Empty Sequences

Nodes

Related Topics

xf: sum

Signatures

Returns

Examples

Simple

Empty Sequences

Nodes

Related Topics

XQuery Node Functions Reference

xf: node-kind

Returns

Examples

Element

Attribute

Text

Related Topics

xf: node-name

Signatures

Returns

Examples

Simple

Related Topics

xf: local-name

Signatures

Returns

Examples

Simple

Related Topics

XQuery Date Functions Reference

xf: get-year-from-dateTime

Signatures

Returns

Examples

Simple

Related Topics

xf: get-month-from-dateTime

Signatures

Returns

Examples

Simple

Related Topics

xf: get-day-from-dateTime

Signatures

Returns

Examples

Simple

Related Topics

xf: get-hours-from-dateTime

Signatures

Returns

Examples

Simple

Timezone

Related Topics

xf: get-minutes-from-dateTime

Signatures

Returns

Examples

Simple

Related Topics

xf: get-seconds-from-dateTime

Signatures

Returns

Examples

Simple

Related Topics

xf: get-timezone-from-dateTime

Signatures

Returns

Examples

Timezone

UTC Timezone

No Timezone

Related Topics

xf: get-year-from-date

Signatures

Returns

Examples

Simple

Related Topics

xf: get-month-from-date

Signatures

Returns

Examples

Simple

Related Topics

xf: get-day-from-date

Signatures

Returns

Examples

Simple

Related Topics

xf: get-timezone-from-date

Signatures

Returns

Examples

Timezone

UTC Timezone

No Timezone

Related Topics

xf: get-hours-from-time

Signatures

Returns

Examples

Simple

Timezone

Related Topics

xf: get-minutes-from-time

Signatures

Returns

Examples

Simple

Timezone

Related Topics

xf: get-seconds-from-time

Signatures

Returns

Examples

Simple

Timezone

Related Topics

xf: get-timezone-from-time

Signatures

Returns

Examples

Timezone

UTC Timezone

No Timezone

Related Topics

xf: add-timezone-to-dateTime

Signatures

Returns

Examples

Adding the Specified Timezone to the dateTime Value

Adding the Implicit Timezone to the dateTime Value

Related Topics

xf: remove-timezone-from-dateTime

Signatures

Returns

Examples

Removing the Specified Timezone From a dateTime Value

Removing the Implicit Timezone From the dateTime Value

Related Topics

xf: add-timezone-to-date

Signatures

Returns

Examples

Adding the Specified Timezone to the date Value

Adding the Implicit Timezone to the date Value

Related Topics

xf: add-timezone-to-time

Signatures

Returns

Examples

Adding the Specified Timezone to the time Value

Adding the Implicit Timezone to the time Value

Related Topics

xf: remove-timezone-from-time

Signatures

Returns

Examples

Removing the Specified Timezone From a time Value

Removing the Implicit Timezone From the time Value

Related Topics

xf: current-dateTime

Signatures

Returns

Examples

Invoke Once

Invoke Multiple Times

Related Topics

xf: current-date

Signatures

Returns

Examples

Related Topics

xf: current-time

Signatures

Returns

Examples

Invoke Once

Invoke Multiple Times

Related Topics

XQuery QName Functions Reference

xf: get-local-name-from-QName

Signatures

Returns

Examples

Simple

Related Topics

xf: get-namespace-from-QName

Signatures

Returns

Examples

Simple

Related Topics

XQuery Boolean Operators Reference

op: boolean-equal

Signatures

Returns

Examples

Not Equal Returns false

Equal Returns true

Related Topics

op: boolean-less-than

Signatures

Returns

Examples

boolean-less-than(false, true) Returns true

boolean-less-than(true, false) Returns false

Related Topics

op: boolean-greater-than

Signatures

Returns

Examples

boolean-greater-than(true, false) Returns true

boolean-greater-than(false, true) Returns false

Related Topics

XQuery Duration Functions Reference

xf: yearMonthDuration

Signatures

Returns

Examples

yearMonthDuration with Year and Month

yearMonthDuration with Year

yearMonthDuration with Negative Month

Related Topics

xf: dayTimeDuration

Signatures

Returns

Examples

dayTimeDuration with All Components

dayTimeDuration with Just Hours and Seconds

dayTimeDuration with Just Negative Days

Related Topics

xf: get-years-from-yearMonthDuration

Signatures

Returns

Examples

Get Years from yearMonthDuration with Years and Months

Get Years from yearMonthDuration with Just Negative Years

Get Years from yearMonthDuration with Just Months

Related Topics

xf: get-months-from-yearMonthDuration

Signatures

Returns

Examples

Get Months from yearMonthDuration with Years and Months

Get Months from yearMonthDuration with Just Negative Months

Related Topics

xf: get-days-from-dayTimeDuration

Signatures

Returns

Examples

Get Days from dayTimeDuration with All Components

Get Days from dayTimeDuration with Just Negative Days

Get Days from dayTimeDuration with No Days

Related Topics

xf: get-hours-from-dayTimeDuration

Signatures

Returns

Examples

Get Hours from dayTimeDuration with All Components

Get Hours from dayTimeDuration with Just Negative Hours

Get Hours from dayTimeDuration with No Hours

Related Topics

xf: get-minutes-from-dayTimeDuration

Signatures

Returns

Examples

Get Minutes from dayTimeDuration with All Components

Get Minutes from dayTimeDuration with Just Negative Minutes

Get Minutes from dayTimeDuration with No Minutes

Related Topics

xf: get-seconds-from-dayTimeDuration

Signatures

Returns

Examples

Get Seconds from dayTimeDuration with All Components

Get Seconds from dayTimeDuration with Just Negative Seconds

Get Seconds from dayTimeDuration with No Seconds

Related Topics

xf: get-yearMonthDuration-from-dateTimes

Signatures

Returns

Examples

Positive Difference

Negative Difference

Round Up

Not Enough to Round Up

Related Topics

xf: get-dayTimeDuration-from-dateTimes

Signatures

Returns

Examples

Positive Difference

Negative Difference

Related Topics

XQuery Numeric Operators Reference

op: decimal-add

Signatures

Returns

Examples

Simple

Related Topics

op: float-add

Signatures

Returns

Examples

Simple

Related Topics

op: double-add

Signatures

Returns

Examples

Simple

Related Topics

op: decimal-subtract

Signatures

Returns

Examples

Simple

Related Topics

op: float-subtract

Signatures

Returns

Examples

Simple

Related Topics

op: double-subtract

Signatures

Returns

Examples

Simple

Related Topics

op: decimal-multiply

Signatures

Returns

Examples

Simple

Related Topics

op: float-multiply

Signatures

Returns

Examples

Simple

Related Topics

op: double-multiply

Signatures

Returns

Examples

Simple

Related Topics

op: decimal-divide

Signatures

Returns

Examples

Simple

Error—Divide by Zero

Related Topics

op: float-divide

Signatures

Returns

Examples

Simple

Divide by Zero

Related Topics

op: double-divide

Signatures

Returns

Examples

Simple

Divide by Zero

Related Topics

op: numeric-integer-divide

Signatures

Returns

Examples

No Remainder

Throw Away Remainder

Error—Divide by Zero

Related Topics

op: decimal-mod

Signatures

Returns

Examples

Simple

Error—Divide by Zero

Related Topics

op: float-mod

Signatures

Returns

Examples

Simple

Divide by Zero

Related Topics

op: double-mod

Signatures

Examples

Simple

Divide by Zero

Related Topics

XQuery Date and Time Operators Reference

op: subtract-dates

Signatures

Returns

Examples

Positive Difference

Negative Difference

Related Topics

op: subtract-times

Signatures

Returns

Examples

Positive

Negative

Related Topics

op: add-yearMonthDuration-to-dateTime

Signatures

Returns

Examples

Simple

Related Topics

op: add-dayTimeDuration-to-dateTime

Signatures

Returns

Examples

Simple

Related Topics

op: subtract-yearMonthDuration-from-dateTime

Signatures

Returns

Examples

Subtracting a Positive yearMonthDuration

Subtracting a Negative yearMonthDuration

Related Topics

op: subtract-dayTimeDuration-from-dateTime

Signatures

Returns

Examples

Subtracting a Positive dayTimeDuration

Subtracting a Negative dayTimeDuration

Related Topics

op: add-yearMonthDuration-to-date

Signatures

Returns

Examples

Simple

Related Topics

op: add-dayTimeDuration-to-date

Signatures

Returns

Examples

Simple

Related Topics

op: subtract-yearMonthDuration-from-date

Signatures

Returns

Examples

Subtracting a Positive yearMonthDuration

Subtracting a Negative yearMonthDuration

Related Topics

op: subtract-dayTimeDuration-from-date

Signatures

Returns

Examples

Subtracting a Positive dayTimeDuration

Subtracting a Negative dayTimeDuration

Related Topics

op: add-dayTimeDuration-to-time

Signatures

Returns

Examples

Simple

Related Topics

op: subtract-dayTimeDuration-from-time

Signatures

Returns

Examples

Subtracting a Positive dayTimeDuration

Subtracting a Negative dayTimeDuration

Related Topics

XQuery Duration Operators Reference

op: add-yearMonthDurations

Signatures

Returns

Examples

Simple

Related Topics

op: subtract-yearMonthDurations

Signatures

Returns

Examples

Positive

Negative

Related Topics

op: multiply-yearMonthDuration

Signatures

Returns

Examples

Round Up

Not Enough to Round Up

Related Topics

op: divide-yearMonthDuration

Signatures

Returns

Examples

Round Up

Not Enough to Round Up

Related Topics

op: add-dayTimeDurations

Signatures

Returns

Examples

Simple

Related Topics

op: subtract-dayTimeDurations

Signatures

Returns

Examples

Positive

Negative

Related Topics

op: multiply-dayTimeDuration

Signatures

Returns

Examples

Simple

Related Topics

op: divide-dayTimeDuration

Signatures

Returns

Examples

Simple

Related Topics

XQuery Occurrence Indicators

None

?

*

+

XQuery Namespace Conventions

xs:

xf:

op:

bea-xf:

XQuery Data Types

item

integer

node

XQuery Language and XML Reference

XQuery Prologs

XQuery Expressions

XQuery FLWR Expressions

XQuery Namespaces

XQuery Function Definitions

XQuery Function Calls and Arguments

XQuery Path Expressions

XQuery Literals

XQuery Combining Sequences

XQuery Conditional Expressions

XQuery Logical Expressions

XQuery Comparison Expressions

XML Element Declarations

XML Attribute Declarations

XML CDATA Sections

XML Comments

XML Prolog and Document Type Declaration

ISO-3166 Country Codes and ISO-639 Language Codes

ISO-3166 Country Codes

Related Topics


  Back to Top       Previous  Next