From 8b2c3c8d92aab4951ac53515e78b0a5cf4d445d3 Mon Sep 17 00:00:00 2001 From: Adam Bem Date: Fri, 31 Mar 2023 14:49:22 +0200 Subject: [PATCH] Added remaining functions --- Frontend/tools/xpath.html | 340 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 340 insertions(+) diff --git a/Frontend/tools/xpath.html b/Frontend/tools/xpath.html index 5f98753..4872c04 100644 --- a/Frontend/tools/xpath.html +++ b/Frontend/tools/xpath.html @@ -3030,6 +3030,240 @@ W3C Documentation reference + + fn:id() +
+ Returns the sequence of element nodes that have an ID value matching the value of one or more of the IDREF values supplied in $arg. + +

Note:

+ + This function does not have the desired effect when searching a document in which elements of type xs:ID are used as identifiers. To preserve backwards compatibility, a new function fn:element-with-id is therefore being introduced; it behaves the same way as fn:id in the case of ID-valued attributes. +

+ + Arguments: + + + + + + + + + + + + + + + + + +
TypeDescription
xs:string*$arg
node()*$node
xs:string$collation (Optional)
+ Return type: element()*

+ + W3C Documentation reference +
+ + fn:idref() +
+ Returns the sequence of element or attribute nodes with an IDREF value matching the value of one or more of the ID values supplied in $arg.

+ + Arguments: + + + + + + + + + + + + + + + + + +
TypeDescription
xs:string*$arg
node()*$node
xs:string$collation (Optional)
+ Return type: node()*

+ + W3C Documentation reference +
+ + + fn:doc() +
+ Returns the sequence of element or attribute nodes with an IDREF value matching the value of one or more of the ID values supplied in $arg.

+ + Arguments: + + + + + + + + + +
TypeDescription
xs:string$uri
+ Return type: document-node()?

+ Examples: + + + + + + + + + +
QueryResult
doc("test.xml")Contents of test.xml file returned as node

+ + W3C Documentation reference +
+ + + fn:doc-available() +
+ Retrieves a document using a URI supplied as an xs:string, and returns the corresponding document node.
+ + If $uri is the empty sequence, the result is an empty sequence.
+ + If $uri is not a valid URI, an error may be raised [err:FODC0005].
+ + If $uri is a relative URI reference, it is resolved relative to the value of the base URI property from the static context. The resulting absolute URI is promoted to an xs:string.

+ + Arguments: + + + + + + + + + +
TypeDescription
xs:string$uri
+ Return type: xs:boolean

+ Examples: + + + + + + + + + +
QueryResult
doc("test.xml")true (If document is available)

+ + W3C Documentation reference +
+ + + fn:collection() +
+ This function takes an xs:string as argument and returns a sequence of nodes obtained by interpreting $arg as an xs:anyURI and resolving it according to the mapping specified in Available collections described in Section C.2 Dynamic Context ComponentsXP. If Available collections provides a mapping from this string to a sequence of nodes, the function returns that sequence. If Available collections maps the string to an empty sequence, then the function returns an empty sequence. If Available collections provides no mapping for the string, an error is raised [err:FODC0004].
+ If $arg is not specified, the function returns the sequence of the nodes in the default collection in the dynamic context. See Section C.2 Dynamic Context ComponentsXP. If the value of the default collection is undefined an error is raised [err:FODC0002].

+ + Arguments: + + + + + + + + + +
TypeDescription
xs:string?$arg (Optional)
+ Return type: node()*

+ Examples: + + + + + + + + + +
QueryResult
collection("")<empty sequence>

+ + W3C Documentation reference +
+ + fn:element-with-id() +
+ Returns the sequence of element nodes that have an ID value matching the value of one or more of the IDREF values supplied in $arg.

+ + Arguments: + + + + + + + + + +
TypeDescription
xs:string?$arg (Optional)
+ Return type: node()*

+ + W3C Documentation reference +
+ + fn:position() +
+ Returns the context position from the dynamic context. (See Section C.2 Dynamic Context ComponentsXP.) If the context item is undefined, an error is raised: [err:XPDY0002]XP.

+ + Return type: xs:integer

+ Examples: + + + + + + + + + +
QueryResult
/l:library/l:readerList/position()1

+ + W3C Documentation reference +
+ + + fn:last() +
+ Returns the context size from the dynamic context. (See Section C.2 Dynamic Context ComponentsXP.) If the context item is undefined, an error is raised: [err:XPDY0002]XP.

+ + Return type: xs:integer

+ Examples: + + + + + + + + + +
QueryResult
/l:library/l:readerList/p:person/last()2
2

+ + W3C Documentation reference +
+ @@ -3980,6 +4214,91 @@
W3C Documentation reference + + fn:current-dateTime() +
+ Returns the current dateTime (with timezone) from the dynamic context. (See Section C.2 Dynamic Context ComponentsXP.) This is an xs:dateTime that is current at some time during the evaluation of a query or transformation in which fn:current-dateTime() is executed. This function is ·stable·. The precise instant during the query or transformation represented by the value of fn:current-dateTime() is ·implementation dependent·.

+ + Return type: xs:dateTime

+ Examples:
+ + + + + + + + + + +
ExpressionResult
current-dateTime()xs:dateTime corresponding to the current date and time

+ W3C Documentation reference +
+ + fn:current-date() +
+ Returns xs:date(fn:current-dateTime()). This is an xs:date (with timezone) that is current at some time during the evaluation of a query or transformation in which fn:current-date() is executed. This function is ·stable·. The precise instant during the query or transformation represented by the value of fn:current-date() is ·implementation dependent·.

+ + Return type: xs:date

+ Examples:
+ + + + + + + + + + +
ExpressionResult
current-date()xs:date corresponding to the current date

+ W3C Documentation reference +
+ + + fn:current-time() +
+ Returns xs:date(fn:current-dateTime()). This is an xs:date (with timezone) that is current at some time during the evaluation of a query or transformation in which fn:current-date() is executed. This function is ·stable·. The precise instant during the query or transformation represented by the value of fn:current-date() is ·implementation dependent·.

+ + Return type: xs:time

+ Examples:
+ + + + + + + + + + +
ExpressionResult
current-time()xs:date corresponding to the current time

+ W3C Documentation reference +
+ + fn:implicit-timezone() +
+ Returns the value of the implicit timezone property from the dynamic context. Components of the dynamic context are discussed in Section C.2 Dynamic Context ComponentsXP.

+ + Return type: xs:string

+ Examples:
+ + + + + + + + + + +
ExpressionResult
implicit-timezone()PT0S

+ W3C Documentation reference +
@@ -4370,6 +4689,27 @@ W3C Documentation reference
+ + fn:static-base-uri() +
+ Returns the value of the Base URI property from the static context. If the Base URI property is undefined, the empty sequence is returned. Components of the static context are discussed in Section C.1 Static Context ComponentsXP.

+ + Return type: xs:anyURI?

+ Examples:
+ + + + + + + + + + +
ExpressionResult
static-base-uri()()<empty sequence>

+ W3C Documentation reference +