How to use XQuery context function in XML
This article deals with XQuery context function
Context Function
The built-in context functions are defined below-
- last Function
fn:last function returns the context size from the dynamic context.
Syntax of last function
Example of fn:last function
The expression (1 to 25) then [fn:last() -1] returns 24.
|
Syntax of position function
fn:position() as xs:integer
|
Example of fn:position function
The expression (10 to 20) then [fn:position() eq 6] returns 15.
|
Syntax of current-date function
fn:current-date() as xs:date
|
Example of current-date function
fn:current-date() returns current date with time zone like 2012-07-13 6:57
|
Syntax of current-time function
fn:current-time() as xs:time
|
Example of current-time function
fn:current-time() returns current time with time zone like 7:04:07 UTC _5:30
|
Further Readings
You may also want to read these related articles:
Ask Your Question
Got a programming related question? You may want to post your question here