From a78f3bd52b752add764e8164716a10db4cd0eae8 Mon Sep 17 00:00:00 2001 From: Mikolaj Widla Date: Mon, 21 Aug 2023 14:15:07 +0200 Subject: [PATCH] enhancement/implement_tooltips_for_xpath3 (#242) Co-authored-by: widlam Reviewed-on: https://gitea.release11.com/R11/release11-tools/pulls/242 --- Backend-libXML/Parser.py | 2 +- .../src/assets/tooltips/xpath/xpath1.json | 733 ++- .../src/assets/tooltips/xpath/xpath2.json | 4648 ++++++++--------- .../src/assets/tooltips/xpath/xpath3.json | 3117 ++++++++++- .../src/assets/tooltips/xpath/xpath31.json | 3336 +++++++++++- .../src/assets/tooltips/xpath/xpathdiffs.json | 46 + .../xml/tooltips/TooltipComponent.vue | 6 +- .../xml/tooltips/TooltipDiffsComponent.vue | 49 + .../xml/tooltips/TooltipEntryComponent.vue | 6 +- 9 files changed, 9194 insertions(+), 2749 deletions(-) create mode 100644 Frontend/src/assets/tooltips/xpath/xpathdiffs.json create mode 100644 Frontend/src/components/xml/tooltips/TooltipDiffsComponent.vue diff --git a/Backend-libXML/Parser.py b/Backend-libXML/Parser.py index 0357cd8..442484d 100644 --- a/Backend-libXML/Parser.py +++ b/Backend-libXML/Parser.py @@ -8,7 +8,7 @@ def convertHTML(source: str, sourceFrom: str): if sourceFrom == "xml": xmldoc = etree.parse(BytesIO(source.encode("utf-8")), xmlParser) - return html.tostring(xmldoc, method="html", pretty_print=True).decode() + return html.tostring(xmldoc, method="html", pretty_print=True, doctype="").decode() elif sourceFrom == "html": htmldoc = html.parse(BytesIO(source.encode("utf-8")), htmlParser) return etree.tostring(htmldoc, method="xml", pretty_print=True, doctype="", xml_declaration=True, encoding="utf-8").decode() diff --git a/Frontend/src/assets/tooltips/xpath/xpath1.json b/Frontend/src/assets/tooltips/xpath/xpath1.json index 899f8c9..6b5bb1e 100644 --- a/Frontend/src/assets/tooltips/xpath/xpath1.json +++ b/Frontend/src/assets/tooltips/xpath/xpath1.json @@ -1,152 +1,15 @@ [ { - "name": "Node-Set", "entries": [ { - "name": "position()", - "description": "Returns the position of the current context node.", - "arguments": [], - "output": "number", - "examples": [ - { - "command": "position()", - "output": "3" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" - }, - { - "name": "last()", - "description": "The position function returns a number equal to the context position from the expression evaluation context.", - "arguments": [], - "output": "number", - "examples": [], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" - }, - { - "name": "count()", - "description": "Returns the number of nodes in the node-set", - "arguments": [ - { - "type": "node-set", - "description": "Node-set to count nodes in" - } - ], - "output": "number", - "examples": [ - { - "command": "count(/u:root/u:UserList/u:User)", - "output": "10" - }, - { - "command": "count(/u:root/u:UserList[@Id = 'b']/u:User)", - "output": "1" - } - - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" - }, - { - "name": "id()", - "description": "Returns the element specified by it's unique id, requires DTD", - "arguments": [], - "output": "node-set", - "examples": [], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" - }, - { - "name": "local-name()", - "description": "Returns the number of nodes in the node-set", - "arguments": [ - { - "type": "node-set", - "description": "Extract first node and return its local name" - } - ], - "output": "string", - "examples": [ - { - "command": "local-name(/u:root)", - "output": "root" - }, - { - "command": "local-name(/u:root/u:UserList)", - "output": "UserList" - } - - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" - }, - { - "name": "namespace-uri()", - "description": "Returns the namespace-uri for the first node in the node-set", - "arguments": [ - { - "type": "node-set", - "description": "Extract first node and return the namespace URI" - } - ], - "output": "string", - "examples": [ - { - "command": "namespace-uri(/u:root)", - "output": "http://www.release11.com/schemas/Sample.xsd" - } - - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" - }, - { - "name": "name()", - "description": "Returns the number of nodes in the node-set", - "arguments": [ - { - "type": "node-set? (Optional)", - "description": "Extract first node and return QName" - } - ], - "output": "string", - "examples": [ - { - "command": "name(/u:root)", - "output": "u:root" - }, - { - "command": "name(/u:root/u:UserList)", - "output": "u:UserList" - } - - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions" - }, - { - "name": "lang()", - "description": "The lang function returns true or false depending on whether the language of the context node as specified by xml:lang attributes is the same as or is a sublanguage of the language specified by the argument string.", - "arguments": [ - { - "type": "string", - "description": "Language that will be looked for in context node" - } - ], - "output": "boolean", - "examples": [], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" - } - ] - }, - { - "name": "Boolean", - "entries": [ - { - "name": "boolean()", - "description": "The boolean function converts its argument to a boolean", "arguments": [ { "type": "object", "description": "The object to convert to a boolean" } ], - "output": "boolean", + "description": "The boolean function converts its argument to a boolean", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions", "examples": [ { "command": "boolean('Release11')", @@ -160,132 +23,305 @@ "command": "boolean(2334)", "output": "true" } - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" + "name": "boolean()", + "output": "boolean" }, { - "name": "not()", - "description": "The not function returns true if its argument is false, and false otherwise.", "arguments": [], - "output": "boolean", + "description": "The true function returns false.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions", "examples": [ { - "command": "not('text')", - "output": "false" + "output": "false", + "command": "false()" + } + ], + "name": "false()", + "output": "boolean" + }, + { + "arguments": [], + "description": "The not function returns true if its argument is false, and false otherwise.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions", + "examples": [ + { + "output": "false", + "command": "not('text')" }, { "command": "not('')", "output": "true" } - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" + "name": "not()", + "output": "boolean" }, { - "name": "true()", + "arguments": [], "description": "The true function returns true.", - "arguments": [], - "output": "boolean", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions", "examples": [ { - "command": "true()", - "output": "true" + "output": "true", + "command": "true()" } ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" - }, - { - "name": "false()", - "description": "The true function returns false.", - "arguments": [], - "output": "boolean", - "examples": [ - { - "command": "false()", - "output": "false" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions" + "name": "true()", + "output": "boolean" } - - ] + ], + "name": "Boolean" }, { - "name": "String", "entries": [ { - "name": "string()", - "description": "The string function converts an object to a string", + "arguments": [ + { + "type": "node-set", + "description": "Node-set to count nodes in" + } + ], + "description": "Returns the number of nodes in the node-set", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions", + "examples": [ + { + "output": "10", + "command": "count(/u:root/u:UserList/u:User)" + }, + { + "output": "1", + "command": "count(/u:root/u:UserList[@Id = 'b']/u:User)" + } + ], + "name": "count()", + "output": "number" + }, + { + "arguments": [], + "description": "Returns the element specified by it's unique id, requires DTD", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions", + "examples": [], + "name": "id()", + "output": "node-set" + }, + { + "arguments": [ + { + "description": "Language that will be looked for in context node", + "type": "string" + } + ], + "description": "The lang function returns true or false depending on whether the language of the context node as specified by xml:lang attributes is the same as or is a sublanguage of the language specified by the argument string.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions", + "examples": [], + "name": "lang()", + "output": "boolean" + }, + { + "arguments": [], + "description": "The position function returns a number equal to the context position from the expression evaluation context.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions", + "examples": [], + "name": "last()", + "output": "number" + }, + { + "arguments": [ + { + "description": "Extract first node and return its local name", + "type": "node-set" + } + ], + "description": "Returns the number of nodes in the node-set", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions", + "examples": [ + { + "command": "local-name(/u:root)", + "output": "root" + }, + { + "command": "local-name(/u:root/u:UserList)", + "output": "UserList" + } + ], + "name": "local-name()", + "output": "string" + }, + { + "arguments": [ + { + "description": "Extract first node and return QName", + "type": "node-set? (Optional)" + } + ], + "description": "Returns the number of nodes in the node-set", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions", + "examples": [ + { + "command": "name(/u:root)", + "output": "u:root" + }, + { + "command": "name(/u:root/u:UserList)", + "output": "u:UserList" + } + ], + "name": "name()", + "output": "string" + }, + { + "arguments": [ + { + "description": "Extract first node and return the namespace URI", + "type": "node-set" + } + ], + "description": "Returns the namespace-uri for the first node in the node-set", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions", + "examples": [ + { + "output": "http://www.release11.com/schemas/Sample.xsd", + "command": "namespace-uri(/u:root)" + } + ], + "name": "namespace-uri()", + "output": "string" + }, + { + "arguments": [], + "description": "Returns the position of the current context node.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions", + "examples": [ + { + "output": "3", + "command": "position()" + } + ], + "name": "position()", + "output": "number" + } + ], + "name": "Node-Set" + }, + { + "entries": [ + { + "arguments": [ + { + "type": "number", + "description": "Number to round" + } + ], + "description": "The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions", + "examples": [ + { + "output": "3", + "command": "floor(3.1)" + }, + { + "output": "3", + "command": "floor(3.9)" + }, + { + "output": "3", + "command": "floor(3.5)" + } + ], + "name": "floor()", + "output": "number" + }, + { "arguments": [ { "type": "object", - "description": "The object to convert to a string" + "description": "The object to convert to a number" } ], - "output": "string", + "description": "The number function converts its argument to a number", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions", "examples": [ { - "command": "string(10)", - "output": "10" + "output": "10", + "command": "number(10)" }, { - "command": "string('Release11')", - "output": "Release11" + "output": "NaN", + "command": "number('')" } - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" + "name": "number()", + "output": "number" }, { - "name": "concat()", - "description": "The concat function returns the concatenation of its arguments.", + "arguments": [ + { + "type": "number", + "description": "Number to round" + } + ], + "description": "The round function returns the number that is closest to the argument and that is an integer. If there are two such numbers, then the one that is closest to positive infinity is returned. If the argument is NaN, then NaN is returned. If the argument is positive infinity, then positive infinity is returned. If the argument is negative infinity, then negative infinity is returned. If the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned. If the argument is less than zero, but greater than or equal to -0.5, then negative zero is returned.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions", + "examples": [ + { + "output": "3", + "command": "round(3.1)" + }, + { + "output": "4", + "command": "round(3.9)" + }, + { + "output": "4", + "command": "round(3.5)" + } + ], + "name": "round()", + "output": "number" + }, + { + "arguments": [ + { + "description": "Node set to sum", + "type": "node-set" + } + ], + "description": "The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions", + "examples": [ + { + "output": "78", + "command": "sum(/someNode/value)" + } + ], + "name": "sum()", + "output": "number" + } + ], + "name": "Number" + }, + { + "entries": [ + { "arguments": [ { "type": "string* (One or More)", "description": "Strings to concatenate" } ], - "output": "string", + "description": "The concat function returns the concatenation of its arguments.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions", "examples": [ { "command": "concat('Release', 11)", "output": "Release11" } ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" - } - , + "name": "concat()", + "output": "string" + }, { - "name": "starts-with()", - "description": "Returns true if the first argument string starts with the second argument string, and otherwise returns false.", - "arguments": [ - { - "type": "string", - "description": "String to test" - }, - { - "type": "string", - "description": "String that first string has to start from" - } - ], - "output": "boolean", - "examples": [ - { - "command": "starts-with('Release11', 'Rel'))", - "output": "true" - }, - { - "command": "starts-with('Release11', 'ease'))", - "output": "false" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" - } - , - { - "name": "contains()", - "description": "The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.", "arguments": [ { "type": "string", @@ -296,62 +332,102 @@ "description": "String that first string has to contain" } ], - "output": "boolean", + "description": "The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions", "examples": [ { "command": "contains('Release11', 'eas')", "output": "true" } ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" + "name": "contains()", + "output": "boolean" + }, + { + "arguments": [ + { + "description": "String to normalize", + "type": "string? (Optional)" + } + ], + "description": "The normalize-space function returns the argument string with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters by a single space.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions", + "examples": [ + { + "output": "abc def", + "command": "normalize-space(' abc def ')" + } + ], + "name": "normalize-space(()", + "output": "string" }, { - "name": "substring-before()", - "description": "The substring-before function returns the substring of the first argument string that precedes the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string.", "arguments": [ { "type": "string", - "description": "String to split" + "description": "String to test" }, { "type": "string", - "description": "String that splits first string" + "description": "String that first string has to start from" } ], - "output": "string", + "description": "Returns true if the first argument string starts with the second argument string, and otherwise returns false.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions", "examples": [ { - "command": "substring-before('Release11', '11')", - "output": "Release" + "command": "starts-with('Release11', 'Rel'))", + "output": "true" + }, + { + "output": "false", + "command": "starts-with('Release11', 'ease'))" } ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" + "name": "starts-with()", + "output": "boolean" }, { - "name": "substring-after()", - "description": "The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string.", "arguments": [ { - "type": "string", - "description": "String to split" - }, - { - "type": "string", - "description": "String that splits first string" + "type": "object", + "description": "The object to convert to a string" } ], - "output": "string", + "description": "The string function converts an object to a string", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions", "examples": [ { - "command": "substring-after('Release11', 'le')", - "output": "ase11" + "output": "10", + "command": "string(10)" + }, + { + "output": "Release11", + "command": "string('Release11')" } ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" + "name": "string()", + "output": "string" + }, + { + "arguments": [ + { + "description": "String to test", + "type": "string? (Optional)" + } + ], + "description": "The string-length returns the number of characters in the string.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions", + "examples": [ + { + "output": "6", + "command": "string-length('abcdef')" + } + ], + "name": "string-length()", + "output": "number" }, { - "name": "substring()", - "description": "The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument.", "arguments": [ { "type": "string", @@ -362,187 +438,100 @@ "description": "Starting index" }, { - "type": "number? (Optional)", - "description": "Length of target substring" + "description": "Length of target substring", + "type": "number? (Optional)" } ], - "output": "string", + "description": "The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions", "examples": [ { - "command": "substring('12345',2)", - "output": "2345" + "output": "2345", + "command": "substring('12345',2)" }, { - "command": "substring('12345',2,3)", - "output": "234" + "output": "234", + "command": "substring('12345',2,3)" } ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" + "name": "substring()", + "output": "string" }, { - "name": "string-length()", - "description": "The string-length returns the number of characters in the string.", "arguments": [ { - "type": "string? (Optional)", - "description": "String to test" + "type": "string", + "description": "String to split" + }, + { + "type": "string", + "description": "String that splits first string" } ], - "output": "number", + "description": "The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions", "examples": [ { - "command": "string-length('abcdef')", - "output": "6" + "output": "ase11", + "command": "substring-after('Release11', 'le')" } ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" + "name": "substring-after()", + "output": "string" }, { - "name": "normalize-space(()", - "description": "The normalize-space function returns the argument string with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters by a single space.", "arguments": [ { - "type": "string? (Optional)", - "description": "String to normalize" + "type": "string", + "description": "String to split" + }, + { + "type": "string", + "description": "String that splits first string" } ], - "output": "string", + "description": "The substring-before function returns the substring of the first argument string that precedes the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions", "examples": [ { - "command": "normalize-space(' abc def ')", - "output": "abc def" + "output": "Release", + "command": "substring-before('Release11', '11')" } ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" + "name": "substring-before()", + "output": "string" }, { - "name": "translate()", - "description": "The translate function returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string. If there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string), then occurrences of that character in the first argument string are removed.", "arguments": [ { "type": "string", "description": "String to process" }, { - "type": "string", - "description": "Characters to remove" + "description": "Characters to remove", + "type": "string" }, { "type": "string", "description": "String to insert characters from second argument" } ], - "output": "string", + "description": "The translate function returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string. If there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string), then occurrences of that character in the first argument string are removed.", + "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions", "examples": [ { - "command": "translate('bar','abc','ABC')", - "output": "BAr" + "output": "BAr", + "command": "translate('bar','abc','ABC')" }, { - "command": "translate('--aaa--','abc-','ABC')", - "output": "AAA" + "output": "AAA", + "command": "translate('--aaa--','abc-','ABC')" } ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions" + "name": "translate()", + "output": "string" } - ] - }, - { - "name": "Number", - "entries": [ - { - "name": "number()", - "description": "The number function converts its argument to a number", - "arguments": [ - { - "type": "object", - "description": "The object to convert to a number" - } - ], - "output": "number", - "examples": [ - { - "command": "number(10)", - "output": "10" - }, - { - "command": "number('')", - "output": "NaN" - } - - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions" - }, - { - "name": "sum()", - "description": "The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number.", - "arguments": [ - { - "type": "node-set", - "description": "Node set to sum" - } - ], - "output": "number", - "examples": [ - { - "command": "sum(/someNode/value)", - "output": "78" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions" - }, - { - "name": "floor()", - "description": "The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.", - "arguments": [ - { - "type": "number", - "description": "Number to round" - } - ], - "output": "number", - "examples": [ - { - "command": "floor(3.1)", - "output": "3" - }, - { - "command": "floor(3.9)", - "output": "3" - }, - { - "command": "floor(3.5)", - "output": "3" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions" - }, - { - "name": "round()", - "description": "The round function returns the number that is closest to the argument and that is an integer. If there are two such numbers, then the one that is closest to positive infinity is returned. If the argument is NaN, then NaN is returned. If the argument is positive infinity, then positive infinity is returned. If the argument is negative infinity, then negative infinity is returned. If the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned. If the argument is less than zero, but greater than or equal to -0.5, then negative zero is returned.", - "arguments": [ - { - "type": "number", - "description": "Number to round" - } - ], - "output": "number", - "examples": [ - { - "command": "round(3.1)", - "output": "3" - }, - { - "command": "round(3.9)", - "output": "4" - }, - { - "command": "round(3.5)", - "output": "4" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions" - } - ] + ], + "name": "String" } ] \ No newline at end of file diff --git a/Frontend/src/assets/tooltips/xpath/xpath2.json b/Frontend/src/assets/tooltips/xpath/xpath2.json index d698a58..1cd384f 100644 --- a/Frontend/src/assets/tooltips/xpath/xpath2.json +++ b/Frontend/src/assets/tooltips/xpath/xpath2.json @@ -1,694 +1,1979 @@ [ { - "name": "Node-Set", "entries": [ { - "name": "name()", - "description": "Returns the name of a node, as an xs:string that is either the zero-length string, or has the lexical form of an xs:QName. If the argument is omitted, it defaults to the context item (.). The behavior of the function if the argument is omitted is exactly the same as if the context item had been passed as the argument.", "arguments": [ { - "type": "node?", - "description": "Node to display name" + "description": "$arg", + "type": "item()*" } ], - "output": "xs:string", - "examples": [ - { - "command": "name(/u:root)", - "output": "u:root" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-name" - }, - { - "name": "local-name()", - "description": "Returns the local part of the name of $arg as an xs:string that will either be the zero-length string or will have the lexical form of an xs:NCName. If the argument is omitted, it defaults to the context item (.). The behavior of the function if the argument is omitted is exactly the same as if the context item had been passed as the argument.", - "arguments": [ - { - "type": "node?", - "description": "Node to display local-name" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "name(/u:root)", - "output": "root" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-local-name" - }, - { - "name": "nilled()", - "description": "Returns an xs:boolean indicating whether the argument node is 'nilled'. If the argument is not an element node, returns the empty sequence. If the argument is the empty sequence, returns the empty sequence.", - "arguments": [ - { - "type": "node?", - "description": "Node to test" - } - ], - "output": "xs:boolean", - "examples": [ - { - "command": "nilled(/u:root)", - "output": "false" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-nilled" - }, - { - "name": "base-uri()", - "description": "Returns the value of the base-uri URI property for $arg as defined by the accessor function dm:base-uri() for that kind of node in Section 5.2 base-uri AccessorDM.", - "arguments": [ - { - "type": "node?", - "description": "Node which URI is looked for" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "base-uri(/u:root/u:UserList[1])", - "output": "" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-base-uri" - }, - { - "name": "document-uri()", - "description": "Returns the value of the document-uri property for $arg as defined by the dm:document-uri accessor function defined in Section 6.1.2 AccessorsDM.", - "arguments": [ - { - "type": "node?", - "description": "Node which document-uri value needs to be returned." - } - ], - "output": "xs:string", - "examples": [ - { - "command": "document-uri(/u:root)", - "output": "" - }, - { - "command": "document-uri(/library/fiction:book[1])", - "output": "http://example.com/library.xml (assuming the document URI of the first fiction:book element is 'http://example.com/library.xml')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-document-uri" - }, - { - "name": "lang()", - "description": "This function tests whether the language of $node, or the context item if the second argument is omitted, as specified by xml:lang attributes is the same as, or is a sublanguage of, the language specified by $testlang.", - "arguments": [ - { - "type": "xs:string?", - "description": "$testlang (Look description)" - }, - { - "type": "node?", - "description": "$node (Look description)" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "document-uri(/u:root)", - "output": "" - }, - { - "command": "document-uri(/library/fiction:book[1])", - "output": "http://example.com/library.xml (assuming the document URI of the first fiction:book element is 'http://example.com/library.xml')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-lang" - }, - { - "name": "root()", - "description": "Returns the root of the tree to which $arg belongs. This will usually, but not necessarily, be a document node.", - "arguments": [ - { - "type": "node?", - "description": "$arg (Look description)" - } - ], - "output": "node", - "examples": [ - { - "command": "root(//u:UserList[1])", - "output": "" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-root" - }, - { - "name": "count()", - "description": "Returns the number of items in the value of $arg. Returns 0 if $arg is the empty sequence.", - "arguments": [ - { - "type": "item()*", - "description": "$arg (Look description)" - } - ], - "output": "number", - "examples": [ - { - "command": "count(//u:UserList)", - "output": "3" - }, - { - "command": "count(//u:UserList/u:User)", - "output": "10" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-root" - } - ] - }, - { - "name": "Boolean", - "entries": [ - { - "name": "boolean()", "description": "Computes the effective boolean value of the sequence $arg.", - "arguments": [ - { - "type": "item()*", - "description": "$arg" - } - ], - "output": "xs:boolean?", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-boolean", "examples": [ { - "command": "boolean(0)", - "output": "false" + "command": "boolean(1)", + "output": "true" }, { "command": "boolean(())", "output": "false" }, { - "command": "boolean(1)", - "output": "true" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-boolean" - }, - { - "name": "true()", - "description": "Returns the xs:boolean value true. Equivalent to xs:boolean('1').", - "arguments": [], - "output": "xs:boolean", - "examples": [ - { - "command": "true()", - "output": "true" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-true" - }, - { - "name": "false()", - "description": "Returns the xs:boolean value false. Equivalent to xs:boolean('0').", - "arguments": [], - "output": "xs:boolean", - "examples": [ - { - "command": "false()", + "command": "boolean(0)", "output": "false" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-false" + "name": "boolean()", + "output": "xs:boolean?" }, { - "name": "not()", - "description": "$arg is first reduced to an effective boolean value by applying the fn:boolean() function. Returns true if the effective boolean value is false, and false if the effective boolean value is true.", - "arguments": [ + "arguments": [], + "description": "Returns the xs:boolean value false. Equivalent to xs:boolean('0').", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-false", + "examples": [ { - "type": "item()", - "description": "$arg" + "output": "false", + "command": "false()" } ], - "output": "xs:boolean", + "name": "false()", + "output": "xs:boolean" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "item()" + } + ], + "description": "$arg is first reduced to an effective boolean value by applying the fn:boolean() function. Returns true if the effective boolean value is false, and false if the effective boolean value is true.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-not", "examples": [ + { + "output": "false", + "command": "not(true())" + }, { "command": "not(false())", "output": "true" - }, - { - "command": "not(true())", - "output": "false" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-not" + "name": "not()", + "output": "xs:boolean" + }, + { + "arguments": [], + "description": "Returns the xs:boolean value true. Equivalent to xs:boolean('1').", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-true", + "examples": [ + { + "output": "true", + "command": "true()" + } + ], + "name": "true()", + "output": "xs:boolean" } - ] + ], + "name": "Boolean" }, { - "name": "String", "entries": [ { - "name": "string()", - "description": "Returns the value of $arg represented as a xs:string. If no argument is supplied, the context item (.) is used as the default argument.", "arguments": [ { - "type": "item()?", - "description": "$arg" + "description": "$arg", + "type": "xs:string?" } ], - "output": "xs:string", + "description": "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", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-collection", "examples": [ { - "command": "string((1<0))", - "output": "false" - }, - { - "command": "string(.11)", - "output": "0.11" + "output": "()", + "command": "collection('')" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-string" + "name": "collection()", + "output": "node()*" }, { - "name": "codepoints-to-string()", - "description": "Creates an xs:string from a sequence of The Unicode Standard code points. Returns the zero-length string if $arg is the empty sequence. If any of the code points in $arg is not a legal XML character, an error is raised [err:FOCH0001].", "arguments": [ { - "type": "xs:integer*", - "description": "$arg" + "type": "item*", + "description": "Items to convert." } ], - "output": "xs:string", + "description": "Takes a sequence of items and returns a sequence of atomic values.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-data", "examples": [ { - "command": "codepoints-to-string((2309, 2358, 2378, 2325))", - "output": "अशॊक" - }, - { - "command": "codepoints-to-string((40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41))", - "output": "( ͡° ͜ʖ ͡°)" + "output": "('John', 'Wick', '2023-10-10')", + "command": "data(/u:root/u:UserList[1]/u:User[1])" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-codepoints-to-string" + "name": "data()", + "output": "xs:anyAtomicType*" }, { - "name": "string-to-codepoints()", - "description": "Returns the sequence of The Unicode Standard code points that constitute an xs:string. If $arg is a zero-length string or the empty sequence, the empty sequence is returned.", "arguments": [ { - "type": "xs:string*", - "description": "$arg" + "description": "$collation", + "type": "xs:string?" + }, + { + "description": "$parameter2", + "type": "item*" + }, + { + "description": "$parameter1", + "type": "item*" } ], - "output": "xs:integer*", + "description": "This function assesses whether two sequences are deep-equal to each other. To be deep-equal, they must contain items that are pairwise deep-equal; and for two items to be deep-equal, they must either be atomic values that compare equal, or nodes of the same kind, with the same name, whose children are deep-equal.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-deep-equal", "examples": [ { - "command": "string-to-codepoints('Thérèse')", - "output": "https://www.w3.org/TR/xquery-operators/#func-string-to-codepoints" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-min" - }, - { - "name": "compare()", - "description": "Returns -1, 0, or 1, depending on whether the value of the $comparand1 is respectively less than, equal to, or greater than the value of $comparand2, according to the rules of the collation that is used.", - "arguments": [ - { - "type": "xs:string?", - "description": "$comparand1" - }, - { - "type": "xs:string?", - "description": "$comparand2" - }, - { - "type": "xs:string?", - "description": "$collation" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "compare('abc', 'abc')", - "output": "0" - }, - { - "command": "compare('abc', 'acc')", - "output": "-1" - }, - { - "command": "compare('abc', 'acc')", - "output": "1" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-compare" - }, - { - "name": "codepoint-equal()", - "description": "Returns true or false depending on whether the value of $comparand1 is equal to the value of $comparand2, according to the Unicode code point collation.", - "arguments": [ - { - "type": "xs:string?", - "description": "$comparand1" - }, - { - "type": "xs:string?", - "description": "$comparand2" - }, - { - "type": "xs:string", - "description": "$collation" - } - ], - "output": "xs:boolean?", - "examples": [ - { - "command": "codepoint-equal('asdf', 'asdf')", + "command": "deep-equal(/u:root/u:UserList[1], /u:root/u:UserList[1])", "output": "true" }, { - "command": "codepoint-equal('asdf', 'asdf ')", + "command": "deep-equal(/u:root/u:UserList[1], /u:root/u:UserList[2])", "output": "false" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-codepoint-equal" + "name": "deep-equal()", + "output": "xs:boolean" }, { - "name": "concat()", - "description": " Accepts two or more xs:anyAtomicType arguments and casts them to xs:string. Returns the xs:string that is the concatenation of the values of its arguments after conversion. If any of the arguments is the empty sequence, the argument is treated as the zero-length string.", "arguments": [ { - "type": "xs:anyAtomicType?", - "description": "$arg1" + "description": "$collation", + "type": "xs:string?" }, { - "type": "xs:anyAtomicType?", - "description": "$arg2" - }, - { - "type": "xs:anyAtomicType?", - "description": "$arg.." + "description": "$arg", + "type": "xs:anyAtomicType*" } ], - "output": "xs:string", + "description": "Returns the sequence that results from removing from $arg all but one of a set of values that are eq to one other. Values of type xs:untypedAtomic are compared as if they were of type xs:string.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-distinct-values", "examples": [ { - "command": "concat('un', 'grateful')", - "output": "ungrateful" + "output": "(1, 3, 2.0)", + "command": "distinct-values((1, 2.0, 3, 2))" + } + ], + "name": "distinct-values()", + "output": "xs:anyAtomicType*" + }, + { + "arguments": [ + { + "description": "$uri", + "type": "xs:string" + } + ], + "description": "Retrieves a document using a URI supplied as an xs:string, and returns the corresponding document node.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-doc", + "examples": [ + { + "output": "", + "command": "doc('test.xml')" + } + ], + "name": "doc()", + "output": "document-node()?" + }, + { + "arguments": [ + { + "description": "$uri", + "type": "xs:string" + } + ], + "description": "The function returns true if and only if the function call fn:doc($uri) would return a document node.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-doc-available", + "examples": [ + { + "command": "doc('test.xml')", + "output": "true " + } + ], + "name": "doc-available()", + "output": "item()*" + }, + { + "arguments": [ + { + "description": "$length", + "type": "xs:double?" + }, + { + "description": "$startingLoc", + "type": "xs:double?" + }, + { + "description": "$arg", + "type": "xs:string?" + } + ], + "description": "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.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-subsequence", + "examples": [ + { + "output": "('b', 'c', 'd')", + "command": "subsequence( ('a', 'b', 'c', 'd', 'e'), 2, 3)" + }, + { + "output": "('d', 'e')", + "command": "subsequence( ('a', 'b', 'c', 'd', 'e') , 4)" + } + ], + "name": "element-with-id()", + "output": "node()*" + }, + { + "arguments": [ + { + "description": "arg", + "type": "item*" + } + ], + "description": "If the value of $arg is the empty sequence, the function returns true; otherwise, the function returns false.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-empty", + "examples": [ + { + "command": "empty(())", + "output": "true" + }, + { + "command": "empty(('hello', 'world'))", + "output": "false" + } + ], + "name": "empty()", + "output": "xs:boolean" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "item*" + } + ], + "description": "Returns $arg if it contains exactly one item. Otherwise, raises an error [err:FORG0005].", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-exactly-one", + "examples": [ + { + "output": "A sequence of more than one item is not allowed as the first argument of fn:exactly-one() ('a', 'b')", + "command": "exactly-one(('a', 'b'))" + }, + { + "output": "('a')", + "command": "exactly-one(('a'))" + } + ], + "name": "exactly-one()", + "output": "item()?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "item*" + } + ], + "description": "If the value of $arg is not the empty sequence, the function returns true; otherwise, the function returns false.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-exists", + "examples": [ + { + "command": "exists(remove(('hello'), 1))", + "output": "false" + } + ], + "name": "exists()", + "output": "xs:boolean" + }, + { + "arguments": [ + { + "description": "$collation", + "type": "xs:string?" + }, + { + "description": "$startingLoc", + "type": "node()*" + }, + { + "description": "$arg", + "type": "xs:string*" + } + ], + "description": "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.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-id", + "examples": [], + "name": "id()", + "output": "element()*" + }, + { + "arguments": [ + { + "description": "$collation", + "type": "xs:string?" + }, + { + "description": "$node", + "type": "node()*" + }, + { + "description": "$arg", + "type": "xs:string*" + } + ], + "description": "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.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-idref", + "examples": [], + "name": "idref()", + "output": "node()*" + }, + { + "arguments": [ + { + "description": "$collation", + "type": "xs:string?" + }, + { + "description": "$srchParam", + "type": "xs:anyAtomicType" + }, + { + "description": "$seqParam", + "type": "xs:anyAtomicType" + } + ], + "description": " Returns a sequence of positive integers giving the positions within the sequence $seqParam of items that are equal to $srchParam.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-index-of", + "examples": [ + { + "output": "(1, 4)", + "command": "index-of(('a', 'sport', 'and', 'a', 'pastime'), 'a')" + }, + { + "output": "(2, 5)", + "command": "index-of((10, 20, 30, 30, 20, 10), 20)" + }, + { + "output": "()", + "command": "index-of((10, 20, 30, 40), 35)" + } + ], + "name": "index-of()", + "output": "xs:integer*" + }, + { + "arguments": [ + { + "description": "$$inserts", + "type": "item()*" + }, + { + "description": "$position", + "type": "xs:integer" + }, + { + "description": "$target", + "type": "item*" + } + ], + "description": "Returns a new sequence constructed from the value of $target with the value of $inserts inserted at the position specified by the value of $position.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-insert-before", + "examples": [ + { + "output": "('a', 'z', 'b', 'c')", + "command": "insert-before($x, 2, 'z')" + }, + { + "output": "('z', 'a', 'b', 'c')", + "command": "insert-before($x, 1, 'z')" + }, + { + "output": "('z', 'a', 'b', 'c')", + "command": "insert-before($x, 0, 'z')" + } + ], + "name": "insert-before()", + "output": "item()*" + }, + { + "arguments": [], + "description": "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.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-last", + "examples": [ + { + "output": "(3, 3, 3)", + "command": "/u:root/u:UserList/last()" + } + ], + "name": "last()", + "output": "xs:integer" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "item*" + } + ], + "description": "Returns $arg if it contains one or more items. Otherwise, raises an error [err:FORG0004].", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-one-or-more", + "examples": [ + { + "output": "('a', 'b')", + "command": "one-or-more(('a', 'b'))" + }, + { + "output": "('a')", + "command": "one-or-more(('a'))" + } + ], + "name": "one-or-more()", + "output": "item()?" + }, + { + "arguments": [], + "description": "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.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-position", + "examples": [ + { + "command": "/u:root/u:UserList[@Id = 'b']/position()", + "output": "1" + } + ], + "name": "position()", + "output": "xs:integer" + }, + { + "arguments": [ + { + "description": "$position", + "type": "xs:integer" + }, + { + "description": "$target", + "type": "item*" + } + ], + "description": "Returns a new sequence constructed from the value of $target with the item at the position specified by the value of $position removed.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-remove", + "examples": [ + { + "output": "('a', 'b', 'c')", + "command": "remove($x, 6)" + }, + { + "output": "('b', 'c')", + "command": "remove($x, 1)" + }, + { + "output": "('a', 'b', 'c')", + "command": "remove($x, 0)" + } + ], + "name": "remove()", + "output": "item()*" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "item*" + } + ], + "description": "Reverses the order of items in a sequence. If $arg is the empty sequence, the empty sequence is returned.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-reverse", + "examples": [ + { + "output": "('')", + "command": "reverse( ('') )" + }, + { + "output": "('hello')", + "command": "reverse( ('hello') )" + }, + { + "output": "('c', 'b', 'a')", + "command": "reverse( ('a', 'b', 'c') )" + } + ], + "name": "reverse()", + "output": "item()*" + }, + { + "arguments": [ + { + "description": "$length", + "type": "xs:double?" + }, + { + "description": "$startingLoc", + "type": "xs:double?" + }, + { + "description": "$sourceSeq", + "type": "item*" + } + ], + "description": "Returns the contiguous sequence of items in the value of $sourceSeq beginning at the position indicated by the value of $startingLoc and continuing for the number of items indicated by the value of $length.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-subsequence", + "examples": [ + { + "output": "('b', 'c', 'd')", + "command": "subsequence( ('a', 'b', 'c', 'd', 'e'), 2, 3)" + }, + { + "output": "('d', 'e')", + "command": "subsequence( ('a', 'b', 'c', 'd', 'e') , 4)" + } + ], + "name": "subsequence()", + "output": "item()*" + }, + { + "arguments": [ + { + "description": "$sourceSeq", + "type": "item*" + } + ], + "description": "Returns the items of $sourceSeq in an implementation dependent order.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-unordered", + "examples": [], + "name": "unordered()", + "output": "item()*" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "item*" + } + ], + "description": "Returns $arg if it contains zero or one items. Otherwise, raises an error [err:FORG0003].", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-zero-or-one", + "examples": [ + { + "output": "A sequence of more than one item is not allowed as the first argument of fn:zero-or-one() ('a', 'b')", + "command": "zero-or-one(('a', 'b'))" + }, + { + "output": "('a')", + "command": "zero-or-one(('a'))" + } + ], + "name": "zero-or-one()", + "output": "item()*" + } + ], + "name": "Collections" + }, + { + "entries": [ + { + "arguments": [ + { + "description": "$timezone", + "type": "xs:dayTimeDuration?" + }, + { + "description": "$arg", + "type": "xs:date?" + } + ], + "description": "Adjusts an xs:date value to a specific timezone, or to no timezone at all. If $timezone is the empty sequence, returns an xs:date without a timezone. Otherwise, returns an xs:date with a timezone. For purposes of timezone adjustment, an xs:date is treated as an xs:dateTime with time 00:00:00.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-adjust-date-to-timezone", + "examples": [ + { + "output": "2002-03-07-10:00", + "command": "adjust-date-to-timezone(xs:date('2002-03-07'), xs:dayTimeDuration('-PT10H'))" + }, + { + "output": "2002-03-07-05:00", + "command": "adjust-date-to-timezone(xs:date('2002-03-07'))" + } + ], + "name": "adjust-date-to-timezone()", + "output": "xs:date?" + }, + { + "arguments": [ + { + "description": "$timezone", + "type": "xs:dayTimeDuration?" + }, + { + "description": "$arg", + "type": "xs:time?" + } + ], + "description": "Adjusts an xs:time value to a specific timezone, or to no timezone at all. If $timezone is the empty sequence, returns an xs:time without a timezone. Otherwise, returns an xs:time with a timezone.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-adjust-time-to-timezone", + "examples": [ + { + "output": "10:00:00-10:00", + "command": "adjust-time-to-timezone(xs:time('10:00:00'), xs:dayTimeDuration('-PT10H'))" + }, + { + "output": "10:00:00-05:00", + "command": "adjust-time-to-timezone(xs:time('10:00:00'))" + } + ], + "name": "adjust-time-to-timezone()", + "output": "xs:time?" + }, + { + "arguments": [ + { + "description": "$timezone", + "type": "xs:dayTimeDuration?" + }, + { + "description": "$arg", + "type": "xs:time?" + } + ], + "description": "Adjusts an xs:time value to a specific timezone, or to no timezone at all. If $timezone is the empty sequence, returns an xs:time without a timezone. Otherwise, returns an xs:time with a timezone.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-adjust-time-to-timezone", + "examples": [ + { + "output": "2002-03-07-10:00", + "command": "adjust-time-to-timezone(xs:time('10:00:00'), xs:dayTimeDuration('-PT10H'))" + }, + { + "output": "2002-03-07-05:00", + "command": "adjust-time-to-timezone(xs:time('10:00:00'))" + } + ], + "name": "adjust-time-to-timezone()", + "output": "xs:time?" + }, + { + "arguments": [], + "description": "Returns the current date (with timezone) from the dynamic context.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-current-date", + "examples": [ + { + "output": "", + "command": "current-date()" + } + ], + "name": "current-date()", + "output": "xs:date" + }, + { + "arguments": [], + "description": "Returns the current dateTime (with timezone) from the dynamic context.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-current-dateTime", + "examples": [ + { + "output": "", + "command": "current-dateTime()" + } + ], + "name": "current-dateTime()", + "output": "xs:dateTime" + }, + { + "arguments": [], + "description": "Returns the current time (with timezone) from the dynamic context.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-current-time", + "examples": [ + { + "output": "", + "command": "current-time()" + } + ], + "name": "current-time()", + "output": "xs:time" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:date?" + } + ], + "description": "Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-day-from-date", + "examples": [ + { + "output": "01", + "command": "day-from-date(xs:date('2000-01-01+05:00'))" + }, + { + "output": "31", + "command": "day-from-date(xs:date('1999-05-31'))" + } + ], + "name": "day-from-date()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:dateTime?" + } + ], + "description": "Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-day-from-dateTime", + "examples": [ + { + "output": "1", + "command": "day-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))" + }, + { + "output": "31", + "command": "day-from-dateTime(xs:dateTime('1999-12-31T19:20:00'))" + }, + { + "output": "31", + "command": "day-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))" + } + ], + "name": "day-from-dateTime()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:duration?" + } + ], + "description": "Returns an xs:integer representing the days component in the value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-days-from-duration", + "examples": [ + { + "output": "0", + "command": "days-from-duration(xs:yearMonthDuration('P3Y5M')" + }, + { + "output": "5", + "command": "days-from-duration(xs:yearMonthDuration('P3DT55H'))" + }, + { + "output": "3", + "command": "days-from-duration(xs:yearMonthDuration('P3DT10H')" + } + ], + "name": "days-from-duration()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:dateTime?" + } + ], + "description": "Returns an xs:integer between 0 and 23, both inclusive, representing the hours component in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-hours-from-dateTime", + "examples": [ + { + "output": "0", + "command": "hours-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))" + }, + { + "output": "19", + "command": "hours-from-dateTime(xs:dateTime('1999-12-31T19:20:00'))" + }, + { + "output": "13", + "command": "hours-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))" + } + ], + "name": "hours-from-dateTime()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:duration?" + } + ], + "description": "Returns an xs:integer representing the hours component in the value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-hours-from-duration", + "examples": [ + { + "output": "0", + "command": "hours-from-duration(xs:yearMonthDuration('-PT123H')" + }, + { + "output": "12", + "command": "hours-from-duration(xs:yearMonthDuration('P3DT12H32M12S'))" + }, + { + "output": "10", + "command": "hours-from-duration(xs:yearMonthDuration('P3DT10H')" + } + ], + "name": "hours-from-duration()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:time?" + } + ], + "description": "Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-hours-from-time", + "examples": [ + { + "output": "0", + "command": "hours-from-time(xs:time('24:00:00'))" + }, + { + "output": "11", + "command": "hours-from-time(xs:time('11:23:00'))" + } + ], + "name": "hours-from-time()", + "output": "xs:integer?" + }, + { + "arguments": [], + "description": "Returns the value of the implicit timezone property from the dynamic context.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-implicit-timezone", + "examples": [ + { + "command": "implicit-timezone()", + "output": "PT0S" + } + ], + "name": "implicit-timezone()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:dateTime?" + } + ], + "description": "Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-minutes-from-dateTime", + "examples": [ + { + "output": "0", + "command": "minutes-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))" + }, + { + "output": "20", + "command": "minutes-from-dateTime(xs:dateTime('1999-12-31T19:20:00'))" + }, + { + "output": "20", + "command": "minutes-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))" + } + ], + "name": "minutes-from-dateTime()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:duration?" + } + ], + "description": "Returns an xs:integer representing the minutes component in the value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-minutes-from-duration", + "examples": [ + { + "output": "-30", + "command": "minutes-from-duration(xs:yearMonthDuration('-PT1P5DT12H30M23H')" + }, + { + "output": "0", + "command": "minutes-from-duration(xs:yearMonthDuration('P3DT10H')" + } + ], + "name": "minutes-from-duration()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:time?" + } + ], + "description": "Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-minutes-from-time", + "examples": [ + { + "output": "0", + "command": "minutes-from-time(xs:time('24:00:00'))" + }, + { + "output": "23", + "command": "hourminutess-from-time(xs:time('11:23:00'))" + } + ], + "name": "minutes-from-time()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:date?" + } + ], + "description": "Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-month-from-date", + "examples": [ + { + "output": "01", + "command": "month-from-date(xs:date('2000-01-01+05:00'))" + }, + { + "output": "05", + "command": "month-from-date(xs:date('1999-05-31'))" + } + ], + "name": "month-from-date()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:dateTime?" + } + ], + "description": "Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-month-from-dateTime", + "examples": [ + { + "output": "1", + "command": "month-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))" + }, + { + "output": "12", + "command": "month-from-dateTime(xs:dateTime('1999-12-31T19:20:00'))" + }, + { + "output": "05", + "command": "month-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))" + } + ], + "name": "month-from-dateTime()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:duration?" + } + ], + "description": "Returns an xs:integer representing the months component in the value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-months-from-duration", + "examples": [ + { + "output": "0", + "command": "months-from-duration(xs:yearMonthDuration('-P2DT15H0M0S')" + }, + { + "output": "-6", + "command": "months-from-duration(xs:yearMonthDuration('-P20Y18M'))" + }, + { + "output": "3", + "command": "months-from-duration(xs:yearMonthDuration('P20Y15M')" + } + ], + "name": "months-from-duration()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:dateTime?" + } + ], + "description": "Returns an xs:decimal value greater than or equal to zero and less than 60, representing the seconds and fractional seconds in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-seconds-from-dateTime", + "examples": [ + { + "output": "0", + "command": "seconds-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))" + }, + { + "output": "0", + "command": "seconds-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))" + } + ], + "name": "seconds-from-dateTime()", + "output": "xs:decimal?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:duration?" + } + ], + "description": "Returns an xs:integer representing the seconds component in the value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-seconds-from-duration", + "examples": [ + { + "output": "16", + "command": "seconds-from-duration(xs:yearMonthDuration('-PT256S')" + }, + { + "output": "12.5", + "command": "seconds-from-duration(xs:yearMonthDuration('P3DT10H12.5S')" + } + ], + "name": "seconds-from-duration()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:time?" + } + ], + "description": "Returns an xs:decimal value greater than or equal to zero and less than 60, representing the seconds and fractional seconds in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-seconds-from-time", + "examples": [ + { + "output": "0", + "command": "seconds-from-time(xs:time('24:00:00'))" + }, + { + "output": "30", + "command": "seconds-from-time(xs:time('11:23:30'))" + } + ], + "name": "seconds-from-time()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:date?" + } + ], + "description": " Returns the timezone component of $arg if any. If $arg has a timezone component, then the result is an xs:dayTimeDuration that indicates deviation from UTC; its value may range from +14:00 to -14:00 hours, both inclusive. Otherwise, the result is the empty sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-timezone-from-date", + "examples": [ + { + "output": "PT0S", + "command": "timezone-from-date(xs:date('2000-01-01+05:00'))" + }, + { + "output": "-PT5H", + "command": "timezone-from-date(xs:date('1999-05-31'))" + } + ], + "name": "timezone-from-date()", + "output": "xs:dayTimeDuration?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:dateTime?" + } + ], + "description": " Returns an xs:decimal value greater than or equal to zero and less than 60, representing the seconds and fractional seconds in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-timezone-from-dateTime", + "examples": [ + { + "output": "()", + "command": "timezone-from-dateTime(xs:dateTime('2004-08-27T00:00:00'))" + }, + { + "output": "PT0S", + "command": "timezone-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))" + }, + { + "output": "PT5H", + "command": "timezone-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))" + } + ], + "name": "timezone-from-dateTime()", + "output": "xs:dayTimeDuration?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:time?" + } + ], + "description": "Returns an xs:decimal value greater than or equal to zero and less than 60, representing the seconds and fractional seconds in the localized value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-hours-from-time", + "examples": [ + { + "output": "0", + "command": "hours-from-time(xs:time('24:00:00'))" + }, + { + "output": "11", + "command": "hours-from-time(xs:time('11:23:00'))" + } + ], + "name": "timezone-from-time()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:date?" + } + ], + "description": "Returns an xs:integer representing the year in the localized value of $arg. The value may be negative.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-year-from-date", + "examples": [ + { + "output": "2000", + "command": "year-from-date(xs:date('2000-01-01+05:00'))" + }, + { + "output": "1999", + "command": "year-from-date(xs:date('1999-05-31'))" + } + ], + "name": "year-from-date()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:dateTime?" + } + ], + "description": "Returns an xs:integer representing the year component in the localized value of $arg. The result may be negative.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-year-from-dateTime", + "examples": [ + { + "output": "2000", + "command": "year-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))" + }, + { + "output": "1999", + "command": "year-from-dateTime(xs:dateTime('1999-12-31T19:20:00'))" + }, + { + "output": "1999", + "command": "year-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))" + } + ], + "name": "year-from-dateTime()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:duration?" + } + ], + "description": "Returns an xs:integer representing the years component in the value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-years-from-duration", + "examples": [ + { + "output": "0", + "command": "years-from-duration(xs:yearMonthDuration('-P2DT15H')" + }, + { + "output": "-1", + "command": "years-from-duration(xs:yearMonthDuration('-P15M'))" + }, + { + "output": "21", + "command": "years-from-duration(xs:yearMonthDuration('P20Y15M')" + } + ], + "name": "years-from-duration()", + "output": "xs:integer?" + } + ], + "name": "Date / Time" + }, + { + "entries": [ + { + "arguments": [], + "description": "The fn:error function is a general function that may be invoked as above but may also be invoked from XQuery or XPath applications with, for example, an xs:QName argument.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-error", + "examples": [], + "name": "error()", + "output": "N/A" + }, + { + "arguments": [ + { + "description": "$label", + "type": "xs:string" + }, + { + "description": "$arg", + "type": "item()*" + } + ], + "description": "Provides an execution trace intended to be used in debugging queries. The input $value is returned, unchanged, as the result of the function. In addition, the inputs $value, converted to an xs:string, and $label may be directed to a trace data set. The destination of the trace output is ·implementation-defined·. The format of the trace output is ·implementation dependent·. The ordering of output from invocations of the fn:trace() function is ·implementation dependent·.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-trace", + "examples": [], + "name": "trace()", + "output": "item" + } + ], + "name": "Error" + }, + { + "entries": [ + { + "arguments": [ + { + "description": "$paramQName", + "type": "xs:string" + }, + { + "description": "$paramURI", + "type": "xs:string?" + } + ], + "description": "Returns an xs:QName with the namespace URI given in $paramURI.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-QName", + "examples": [ + { + "command": "QName('http://www.release11.com/schemas/Sample.xsd', 'u:UserList')", + "output": "u:UserList" + } + ], + "name": "QName()", + "output": "xs:QName" + }, + { + "arguments": [ + { + "description": "$element", + "type": "element()" + } + ], + "description": "Returns the prefixes of the in-scope namespaces for $element. For namespaces that have a prefix, it returns the prefix as an xs:NCName. For the default namespace, which has no prefix, it returns the zero-length string.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-in-scope-prefixes", + "examples": [ + { + "output": "('u', 'xsi', 'xml')", + "command": "in-scope-prefixes(/u:root)" + } + ], + "name": "in-scope-prefixes()", + "output": "xs:string*" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:QName?" + } + ], + "description": "Returns an xs:NCName representing the prefix of $arg. The empty sequence is returned if $arg is the empty sequence or if the value of $arg contains no prefix.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-local-name-from-QName", + "examples": [ + { + "command": "local-name-from-QName(resolve-QName('u:UserList', /u:root/u:UserList))", + "output": "UserList" + } + ], + "name": "local-name-from-QName()", + "output": "xs:NCName?" + }, + { + "arguments": [ + { + "description": "$element", + "type": "element()" + }, + { + "description": "$prefix", + "type": "xs:string?" + } + ], + "description": "Returns the namespace URI of one of the in-scope namespaces for $element, identified by its namespace prefix.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-namespace-uri-for-prefix", + "examples": [ + { + "output": "http://www.release11.com/schemas/Sample.xsd", + "command": "namespace-uri-for-prefix('u', /u:root)" + } + ], + "name": "namespace-uri-for-prefix()", + "output": "xs:anyURI?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:QName?" + } + ], + "description": "Returns the namespace URI for $arg as an xs:anyURI. If $arg is the empty sequence, the empty sequence is returned. If $arg is in no namespace, the zero-length xs:anyURI is returned.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-namespace-uri-from-QName", + "examples": [ + { + "output": "http://www.release11.com/schemas/Sample.xsd", + "command": "namespace-uri-from-QName(resolve-QName('u:UserList', /u:root/u:UserList[1]))" + } + ], + "name": "namespace-uri-from-QName()", + "output": "xs:anyURI?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:QName?" + } + ], + "description": "Returns an xs:NCName representing the prefix of $arg. The empty sequence is returned if $arg is the empty sequence or if the value of $arg contains no prefix.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-prefix-from-QName", + "examples": [ + { + "command": "prefix-from-QName(resolve-QName('u:UserList', /u:root/u:UserList))", + "output": "u" + } + ], + "name": "prefix-from-QName()", + "output": "xs:NCName?" + }, + { + "arguments": [ + { + "description": "$element", + "type": "element" + }, + { + "description": "$qname", + "type": "xs:string?" + } + ], + "description": "Returns an xs:QName value (that is, an expanded-QName) by taking an xs:string that has the lexical form of an xs:QName (a string in the form 'prefix:local-name' or 'local-name') and resolving it using the in-scope namespaces for a given element.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-resolve-QName", + "examples": [ + { + "output": "l:libraryID", + "command": "resolve-QName('l:libraryID', /l:library/l:libraryName)" + }, + { + "output": "hello", + "command": "resolve-QName('hello', /l:library/l:libraryName)" + } + ], + "name": "resolve-QName()", + "output": "xs:QName?" + }, + { + "arguments": [ + { + "description": "$base", + "type": "xs:string" + }, + { + "description": "$relative", + "type": "xs:string?" + } + ], + "description": "This function enables a relative URI reference to be resolved against an absolute URI. If $relative is a relative URI reference, it is resolved against $base, or against the base-uri property from the static context, using an algorithm such as those described in RFC 2396 or RFC 3986, and the resulting absolute URI reference is returned. If $relative is an absolute URI reference, it is returned unchanged.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-resolve-uri", + "examples": [], + "name": "resolve-uri()", + "output": "xs:anyURI?" + }, + { + "arguments": [], + "description": "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.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-static-base-uri", + "examples": [ + { + "output": "()", + "command": "static-base-uri()" + } + ], + "name": "static-base-uri()", + "output": "xs:QName?" + } + ], + "name": "Misc" + }, + { + "entries": [ + { + "arguments": [ + { + "description": "Node which URI is looked for", + "type": "node?" + } + ], + "description": "Returns the value of the base-uri URI property for $arg as defined by the accessor function dm:base-uri() for that kind of node in Section 5.2 base-uri AccessorDM.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-base-uri", + "examples": [ + { + "output": "", + "command": "base-uri(/u:root/u:UserList[1])" + } + ], + "name": "base-uri()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$arg (Look description)", + "type": "item()*" + } + ], + "description": "Returns the number of items in the value of $arg. Returns 0 if $arg is the empty sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-root", + "examples": [ + { + "output": "10", + "command": "count(//u:UserList/u:User)" + }, + { + "output": "3", + "command": "count(//u:UserList)" + } + ], + "name": "count()", + "output": "number" + }, + { + "arguments": [ + { + "description": "Node which document-uri value needs to be returned.", + "type": "node?" + } + ], + "description": "Returns the value of the document-uri property for $arg as defined by the dm:document-uri accessor function defined in Section 6.1.2 AccessorsDM.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-document-uri", + "examples": [ + { + "command": "document-uri(/library/fiction:book[1])", + "output": "http://example.com/library.xml (assuming the document URI of the first fiction:book element is 'http://example.com/library.xml')" + }, + { + "output": "", + "command": "document-uri(/u:root)" + } + ], + "name": "document-uri()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$node (Look description)", + "type": "node?" + }, + { + "description": "$testlang (Look description)", + "type": "xs:string?" + } + ], + "description": "This function tests whether the language of $node, or the context item if the second argument is omitted, as specified by xml:lang attributes is the same as, or is a sublanguage of, the language specified by $testlang.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-lang", + "examples": [ + { + "command": "document-uri(/library/fiction:book[1])", + "output": "http://example.com/library.xml (assuming the document URI of the first fiction:book element is 'http://example.com/library.xml')" + }, + { + "output": "", + "command": "document-uri(/u:root)" + } + ], + "name": "lang()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "Node to display local-name", + "type": "node?" + } + ], + "description": "Returns the local part of the name of $arg as an xs:string that will either be the zero-length string or will have the lexical form of an xs:NCName. If the argument is omitted, it defaults to the context item (.). The behavior of the function if the argument is omitted is exactly the same as if the context item had been passed as the argument.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-local-name", + "examples": [ + { + "command": "name(/u:root)", + "output": "root" + } + ], + "name": "local-name()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "Node to display name", + "type": "node?" + } + ], + "description": "Returns the name of a node, as an xs:string that is either the zero-length string, or has the lexical form of an xs:QName. If the argument is omitted, it defaults to the context item (.). The behavior of the function if the argument is omitted is exactly the same as if the context item had been passed as the argument.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-name", + "examples": [ + { + "command": "name(/u:root)", + "output": "u:root" + } + ], + "name": "name()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "Node to test", + "type": "node?" + } + ], + "description": "Returns an xs:boolean indicating whether the argument node is 'nilled'. If the argument is not an element node, returns the empty sequence. If the argument is the empty sequence, returns the empty sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-nilled", + "examples": [ + { + "output": "false", + "command": "nilled(/u:root)" + } + ], + "name": "nilled()", + "output": "xs:boolean" + }, + { + "arguments": [ + { + "description": "$arg (Look description)", + "type": "node?" + } + ], + "description": "Returns the root of the tree to which $arg belongs. This will usually, but not necessarily, be a document node.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-root", + "examples": [ + { + "output": "", + "command": "root(//u:UserList[1])" + } + ], + "name": "root()", + "output": "node" + } + ], + "name": "Node-Set" + }, + { + "entries": [ + { + "arguments": [ + { + "description": "$arg", + "type": "numeric?" + } + ], + "description": "Returns the absolute value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-abs", + "examples": [ + { + "output": "25", + "command": "abs(-25)" + }, + { + "output": "25", + "command": "abs(25)" + } + ], + "name": "abs()", + "output": "numeric?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:anyAtomicType*" + } + ], + "description": "Returns the number of items in the value of $arg. Returns 0 if $arg is the empty sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-avg", + "examples": [ + { + "output": "2.6", + "command": "avg(//u:User/@Id)" + } + ], + "name": "avg()", + "output": "xs:anyAtomicType" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "numeric?" + } + ], + "description": "Returns the smallest (closest to negative infinity) number with no fractional part that is not less than the value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-ceiling", + "examples": [ + { + "output": "11", + "command": "ceiling(10.1)" + }, + { + "output": "10", + "command": "ceiling(-10.5)" + }, + { + "output": "11", + "command": "ceiling(10.5)" + } + ], + "name": "ceiling()", + "output": "numeric?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "numeric?" + } + ], + "description": "Returns the largest (closest to positive infinity) number with no fractional part that is not greater than the value of $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-floor", + "examples": [ + { + "output": "10", + "command": "floor(10.1)" + }, + { + "output": "-11", + "command": "floor(-10.5)" + }, + { + "output": "10", + "command": "floor(10.5)" + } + ], + "name": "floor()", + "output": "numeric?" + }, + { + "arguments": [ + { + "description": "$collation", + "type": "xs:string?" + }, + { + "description": "$arg", + "type": "xs:anyAtomicType*" + } + ], + "description": "Selects an item from the input sequence $arg whose value is greater than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is ·implementation dependent·.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-max", + "examples": [ + { + "output": "5", + "command": "max(//u:User/@Id)" + } + ], + "name": "max()", + "output": "xs:anyAtomicType" + }, + { + "arguments": [ + { + "description": "$collation", + "type": "xs:string?" + }, + { + "description": "$arg", + "type": "xs:anyAtomicType*" + } + ], + "description": "Selects an item from the input sequence $arg whose value is less than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is ·implementation dependent·.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-min", + "examples": [ + { + "output": "1", + "command": "min(//u:User/@Id)" + } + ], + "name": "min()", + "output": "xs:anyAtomicType" + }, + { + "arguments": [ + { + "description": "Value to convert to number", + "type": "xs:anyAtomicType?" + } + ], + "description": "Returns the value indicated by $arg or, if $arg is not specified, the context item after atomization, converted to an xs:double.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-number", + "examples": [ + { + "output": "NaN", + "command": "number('Release11')" + }, + { + "output": "123", + "command": "number(123)" + } + ], + "name": "number()", + "output": "xs:double" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "numeric?" + } + ], + "description": "Returns the number with no fractional part that is closest to the argument.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-round", + "examples": [ + { + "output": "10", + "command": "round(10.1)" + }, + { + "output": "-10", + "command": "round(-10.5)" + }, + { + "output": "11", + "command": "round(10.5)" + } + ], + "name": "round()", + "output": "numeric?" + }, + { + "arguments": [ + { + "description": "$precision", + "type": "numeric?" + }, + { + "description": "$arg", + "type": "numeric?" + } + ], + "description": "The value returned is the nearest (that is, numerically closest) value to $arg that is a multiple of ten to the power of minus $precision. If two such values are equally near (e.g. if the fractional part in $arg is exactly .500...), the function returns the one whose least significant digit is even.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#round-half-to-even", + "examples": [ + { + "output": "3", + "command": "round-half-to-even(2.6)" + }, + { + "output": "2", + "command": "round-half-to-even(2.5)" + }, + { + "output": "2", + "command": "round-half-to-even(1.5)" + }, + { + "output": "0", + "command": "round-half-to-even(0.5)" + } + ], + "name": "round-half-to-even()", + "output": "numeric?" + }, + { + "arguments": [ + { + "description": "$zero", + "type": "xs:anyAtomicType?" + }, + { + "description": "$arg", + "type": "xs:anyAtomicType*" + } + ], + "description": "Returns a value obtained by adding together the values in $arg. If $zero is not specified, then the value returned for an empty sequence is the xs:integer value 0. If $zero is specified, then the value returned for an empty sequence is $zero. Any values of type xs:untypedAtomic in $arg are cast to xs:double. The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-sum", + "examples": [ + { + "output": "26", + "command": "sum(//u:User/@Id)" + } + ], + "name": "sum()", + "output": "xs:anyAtomicType" + } + ], + "name": "Number" + }, + { + "entries": [ + { + "arguments": [ + { + "description": "$collation", + "type": "xs:string" + }, + { + "description": "$comparand2", + "type": "xs:string?" + }, + { + "description": "$comparand1", + "type": "xs:string?" + } + ], + "description": "Returns true or false depending on whether the value of $comparand1 is equal to the value of $comparand2, according to the Unicode code point collation.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-codepoint-equal", + "examples": [ + { + "command": "codepoint-equal('asdf', 'asdf ')", + "output": "false" + }, + { + "command": "codepoint-equal('asdf', 'asdf')", + "output": "true" + } + ], + "name": "codepoint-equal()", + "output": "xs:boolean?" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:integer*" + } + ], + "description": "Creates an xs:string from a sequence of The Unicode Standard code points. Returns the zero-length string if $arg is the empty sequence. If any of the code points in $arg is not a legal XML character, an error is raised [err:FOCH0001].", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-codepoints-to-string", + "examples": [ + { + "output": "( ͡° ͜ʖ ͡°)", + "command": "codepoints-to-string((40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41))" + }, + { + "command": "codepoints-to-string((2309, 2358, 2378, 2325))", + "output": "अशॊक" + } + ], + "name": "codepoints-to-string()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$collation", + "type": "xs:string?" + }, + { + "description": "$comparand2", + "type": "xs:string?" + }, + { + "description": "$comparand1", + "type": "xs:string?" + } + ], + "description": "Returns -1, 0, or 1, depending on whether the value of the $comparand1 is respectively less than, equal to, or greater than the value of $comparand2, according to the rules of the collation that is used.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-compare", + "examples": [ + { + "output": "1", + "command": "compare('abc', 'acc')" + }, + { + "output": "-1", + "command": "compare('abc', 'acc')" + }, + { + "output": "0", + "command": "compare('abc', 'abc')" + } + ], + "name": "compare()", + "output": "xs:integer?" + }, + { + "arguments": [ + { + "description": "$arg..", + "type": "xs:anyAtomicType?" + }, + { + "description": "$arg2", + "type": "xs:anyAtomicType?" + }, + { + "description": "$arg1", + "type": "xs:anyAtomicType?" + } + ], + "description": " Accepts two or more xs:anyAtomicType arguments and casts them to xs:string. Returns the xs:string that is the concatenation of the values of its arguments after conversion. If any of the arguments is the empty sequence, the argument is treated as the zero-length string.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-concat", + "examples": [ + { + "output": "Ciao!", + "command": "concat('Ciao!',())" }, { "command": "concat('Thy ', (), 'old ', 'groans', '', ' ring', ' yet', ' in', ' my', 'ancient',' ears.')", "output": "Thy old groans ring yet in my ancient ears." }, { - "command": "concat('Ciao!',())", - "output": "Ciao!" + "command": "concat('un', 'grateful')", + "output": "ungrateful" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-concat" + "name": "concat()", + "output": "xs:string" }, { - "name": "string-join()", - "description": "Returns a xs:string created by concatenating the members of the $arg1 sequence using $arg2 as a separator. If the value of $arg2 is the zero-length string, then the members of $arg1 are concatenated without a separator.", "arguments": [ { - "type": "xs:string*", - "description": "$arg1" + "description": "$collation", + "type": "xs:string?" }, { - "type": "xs:string", - "description": "$arg2" + "description": "$arg2", + "type": "xs:string?" }, { - "type": "xs:string", - "description": "$collation" + "description": "$arg1", + "type": "xs:string?" } ], - "output": "xs:string", - "examples": [ - { - "command": "string-join(('Now', 'is', 'the', 'time', '...'), ' ')", - "output": "Now is the time ..." - }, - { - "command": "string-join(('Blow, ', 'blow, ', 'thou ', 'winter ', 'wind!'), '')", - "output": "Blow, blow, thou winter wind!" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-string-join" - }, - { - "name": "substring()", - "description": "Returns the portion of the value of $sourceString beginning at the position indicated by the value of $startingLoc and continuing for the number of characters indicated by the value of $length. The characters returned do not extend beyond $sourceString.", - "arguments": [ - { - "type": "xs:string?", - "description": "$comparand1" - }, - { - "type": "xs:double", - "description": "$startingLoc" - }, - { - "type": "xs:double?", - "description": "$length" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "substring('motor car', 6)", - "output": "' car'" - }, - { - "command": "substring('metadata', 4, 3)", - "output": "ada" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-substring" - }, - { - "name": "string-length()", - "description": "Returns the portion of the value of $sourceString beginning at the position indicated by the value of $startingLoc and continuing for the number of characters indicated by the value of $length. The characters returned do not extend beyond $sourceString.", - "arguments": [ - { - "type": "xs:string?", - "description": "$arg" - } - ], - "output": "xs:integer", - "examples": [ - { - "command": "string-length('Harp not on that string, madam; that is past.')", - "output": "45" - }, - { - "command": "string-length(())", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-string-length" - }, - { - "name": "normalize-space()", - "description": "Returns the value of $arg with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of one or more than one whitespace character with a single space.", - "arguments": [ - { - "type": "xs:string?", - "description": "$arg" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "normalize-space(' The wealthy curled darlings of our nation. ')", - "output": "The wealthy curled darlings of our nation.'" - }, - { - "command": "normalize-space(())", - "output": "''" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-normalize-space" - }, - { - "name": "normalize-unicode()", - "description": "Returns the value of $arg normalized according to the normalization criteria for a normalization form identified by the value of $normalizationForm. The effective value of the $normalizationForm is computed by removing leading and trailing blanks, if present, and converting to upper case.", - "arguments": [ - { - "type": "xs:string?", - "description": "$arg" - }, - { - "type": "xs:string?", - "description": "$normalizationForm" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "normalize-unicode('test ')", - "output": "'test'" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-normalize-unicode" - }, - { - "name": "upper-case()", - "description": "Returns the value of $arg after translating every character to its upper-case correspondent as defined in the appropriate case mappings section in the Unicode standard.", - "arguments": [ - { - "type": "xs:string?", - "description": "$arg" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "upper-case('abCd0')", - "output": "ABCD0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-upper-case" - }, - { - "name": "substring()", - "description": "Returns the value of $arg after translating every character to its lower-case correspondent as defined in the appropriate case mappings section in the Unicode standard.", - "arguments": [ - { - "type": "xs:string?", - "description": "$arg" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "lower-case('abCd0')", - "output": "abcd0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-lower-case" - }, - { - "name": "translate()", - "description": "Returns the value of $arg modified so that every character in the value of $arg that occurs at some position N in the value of $mapString has been replaced by the character that occurs at position N in the value of $transString.", - "arguments": [ - { - "type": "xs:string?", - "description": "$arg" - }, - { - "type": "xs:string", - "description": "$mapString" - }, - { - "type": "xs:string", - "description": "$mapString" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "translate('bar','abc','ABC')", - "output": "BAr" - }, - { - "command": "translate('--aaa--','abc-','ABC')", - "output": "AAA" - }, - { - "command": "translate('abcdabc', 'abc', 'AB')", - "output": "ABdAB" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-translate" - }, - { - "name": "encode-for-uri()", - "description": "This function encodes reserved characters in an xs:string that is intended to be used in the path segment of a URI. It is invertible but not idempotent.", - "arguments": [ - { - "type": "xs:string?", - "description": "$uri-part" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "encode-for-uri('https://www.google.com')", - "output": "https%3A%2F%2Fwww.google.com" - }, - { - "command": "concat('http://www.example.com/', encode-for-uri('~bébé'))", - "output": "http://www.example.com/~b%C3%A9b%C3%A9" - }, - { - "command": "concat('http://www.example.com/', encode-for-uri('100% organic'))", - "output": "http://www.example.com/100%25%20organic" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-encode-for-uri" - }, - { - "name": "iri-to-uri()", - "description": "This function converts an xs:string containing an IRI into a URI according to the rules spelled out in Section 3.1 of [RFC 3987]. It is idempotent but not invertible.", - "arguments": [ - { - "type": "xs:string?", - "description": "$iri" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "iri-to-uri ('http://www.example.com/00/Weather/CA/Los%20Angeles#ocean')", - "output": "http://www.example.com/00/Weather/CA/Los%20Angeles#ocean" - }, - { - "command": "iri-to-uri ('http://www.example.com/~bébé')", - "output": "http://www.example.com/~b%C3%A9b%C3%A9" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-iri-to-uri" - }, - { - "name": "escape-html-uri()", - "description": "This function escapes all characters except printable characters of the US-ASCII coded character set, specifically the octets ranging from 32 to 126 (decimal). The effect of the function is to escape a URI in the manner html user agents handle attribute values that expect URIs.", - "arguments": [ - { - "type": "xs:string?", - "description": "$uri" - } - ], - "output": "xs:string", - "examples": [ - { - "command": "escape-html-uri('http://www.example.com/00/Weather/CA/Los Angeles#ocean')", - "output": "http://www.example.com/00/Weather/CA/Los Angeles#ocean'" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-escape-html-uri" - }, - { - "name": "contains()", "description": "Returns an xs:boolean indicating whether or not the value of $arg1 contains (at the beginning, at the end, or anywhere within) at least one sequence of collation units that provides a minimal match to the collation units in the value of $arg2, according to the collation that is used.", - "arguments": [ - { - "type": "xs:string?", - "description": "$arg1" - }, - { - "type": "xs:string?", - "description": "$arg2" - }, - { - "type": "xs:string?", - "description": "$collation" - } - ], - "output": "xs:boolean", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-contains", "examples": [ { - "command": "contains( 'tattoo', 'tat')", + "command": "contains ( '', ())", "output": "true" }, { @@ -696,67 +1981,59 @@ "output": "false" }, { - "command": "contains ( '', ())", + "command": "contains( 'tattoo', 'tat')", "output": "true" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-contains" + "name": "contains()", + "output": "xs:boolean" }, { - "name": "starts-with(()", - "description": "Returns an xs:boolean indicating whether or not the value of $arg1 starts with a sequence of collation units that provides a match to the collation units of $arg2 according to the collation that is used.", "arguments": [ { - "type": "xs:string?", - "description": "$arg1" - }, - { - "type": "xs:string?", - "description": "$arg2" - }, - { - "type": "xs:string?", - "description": "$collation" + "description": "$uri-part", + "type": "xs:string?" } ], - "output": "xs:boolean", + "description": "This function encodes reserved characters in an xs:string that is intended to be used in the path segment of a URI. It is invertible but not idempotent.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-encode-for-uri", "examples": [ { - "command": "starts-with('tattoo', 'tat')", - "output": "true" + "command": "concat('http://www.example.com/', encode-for-uri('100% organic'))", + "output": "http://www.example.com/100%25%20organic" }, { - "command": "starts-with('tattoo', 'ttt')", - "output": "false" + "command": "concat('http://www.example.com/', encode-for-uri('~bébé'))", + "output": "http://www.example.com/~b%C3%A9b%C3%A9" }, { - "command": "starts-with ( '', ())", - "output": "true" + "command": "encode-for-uri('https://www.google.com')", + "output": "https%3A%2F%2Fwww.google.com" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-starts-with" + "name": "encode-for-uri()", + "output": "xs:string" }, { - "name": "ends-with(()", - "description": "Returns an xs:boolean indicating whether or not the value of $arg1 starts with a sequence of collation units that provides a match to the collation units of $arg2 according to the collation that is used.", "arguments": [ { - "type": "xs:string?", - "description": "$arg1" + "description": "$collation", + "type": "xs:string?" }, { - "type": "xs:string?", - "description": "$arg2" + "description": "$arg2", + "type": "xs:string?" }, { - "type": "xs:string?", - "description": "$collation" + "description": "$arg1", + "type": "xs:string?" } ], - "output": "xs:boolean", + "description": "Returns an xs:boolean indicating whether or not the value of $arg1 starts with a sequence of collation units that provides a match to the collation units of $arg2 according to the collation that is used.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-ends-with", "examples": [ { - "command": "ends-with('tattoo', 'too')", + "command": "ends-with ( '', ())", "output": "true" }, { @@ -764,1761 +2041,482 @@ "output": "false" }, { - "command": "ends-with ( '', ())", + "command": "ends-with('tattoo', 'too')", "output": "true" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-ends-with" + "name": "ends-with(()", + "output": "xs:boolean" }, { - "name": "substring-before(()", - "description": "Returns the substring of the value of $arg1 that precedes in the value of $arg1 the first occurrence of a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.", "arguments": [ { - "type": "xs:string?", - "description": "$arg1" - }, - { - "type": "xs:string?", - "description": "$arg2" - }, - { - "type": "xs:string?", - "description": "$collation" + "description": "$uri", + "type": "xs:string?" } ], - "output": "xs:string", + "description": "This function escapes all characters except printable characters of the US-ASCII coded character set, specifically the octets ranging from 32 to 126 (decimal). The effect of the function is to escape a URI in the manner html user agents handle attribute values that expect URIs.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-escape-html-uri", "examples": [ { - "command": "substring-before( 'tattoo', 'too')", - "output": "tat" - }, - { - "command": "substring-before( 'tattoo', 'tat')", - "output": "''" + "command": "escape-html-uri('http://www.example.com/00/Weather/CA/Los Angeles#ocean')", + "output": "http://www.example.com/00/Weather/CA/Los Angeles#ocean'" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-substring-before" + "name": "escape-html-uri()", + "output": "xs:string" }, { - "name": "substring-after()", - "description": "Returns the substring of the value of $arg1 that follows in the value of $arg1 the first occurrence of a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.", "arguments": [ { - "type": "xs:string?", - "description": "$arg1" - }, - { - "type": "xs:string?", - "description": "$arg2" - }, - { - "type": "xs:string?", - "description": "$collation" + "description": "$iri", + "type": "xs:string?" } ], - "output": "xs:string", + "description": "This function converts an xs:string containing an IRI into a URI according to the rules spelled out in Section 3.1 of [RFC 3987]. It is idempotent but not invertible.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-iri-to-uri", "examples": [ { - "command": "substring-after( 'tattoo', 'too')", - "output": "''" + "output": "http://www.example.com/~b%C3%A9b%C3%A9", + "command": "iri-to-uri ('http://www.example.com/~bébé')" }, { - "command": "substring-after( 'tattoo', 'tat')", - "output": "too" + "output": "http://www.example.com/00/Weather/CA/Los%20Angeles#ocean", + "command": "iri-to-uri ('http://www.example.com/00/Weather/CA/Los%20Angeles#ocean')" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-substring-after" + "name": "iri-to-uri()", + "output": "xs:string" }, { - "name": "matches()", + "arguments": [ + { + "description": "$flags", + "type": "xs:string?" + }, + { + "description": "$pattern", + "type": "xs:string?" + }, + { + "description": "$input", + "type": "xs:string?" + } + ], "description": "The function returns true if $input matches the regular expression supplied as $pattern as influenced by the value of $flags, if present; otherwise, it returns false.", - "arguments": [ - { - "type": "xs:string?", - "description": "$input" - }, - { - "type": "xs:string?", - "description": "$pattern" - }, - { - "type": "xs:string?", - "description": "$flags" - } - ], - "output": "xs:boolean", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-matches", "examples": [ + { + "output": "false", + "command": "matches('abracadabra', '^a.*a$')" + }, { "command": "matches('abracadabra', 'bra')", "output": "true" - }, - { - "command": "matches('abracadabra', '^a.*a$')", - "output": "false" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-matches" + "name": "matches()", + "output": "xs:boolean" }, { - "name": "replace()", + "arguments": [ + { + "description": "$arg", + "type": "xs:string?" + } + ], + "description": "Returns the value of $arg with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of one or more than one whitespace character with a single space.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-normalize-space", + "examples": [ + { + "output": "''", + "command": "normalize-space(())" + }, + { + "command": "normalize-space(' The wealthy curled darlings of our nation. ')", + "output": "The wealthy curled darlings of our nation.'" + } + ], + "name": "normalize-space()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$normalizationForm", + "type": "xs:string?" + }, + { + "description": "$arg", + "type": "xs:string?" + } + ], + "description": "Returns the value of $arg normalized according to the normalization criteria for a normalization form identified by the value of $normalizationForm. The effective value of the $normalizationForm is computed by removing leading and trailing blanks, if present, and converting to upper case.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-normalize-unicode", + "examples": [ + { + "output": "'test'", + "command": "normalize-unicode('test ')" + } + ], + "name": "normalize-unicode()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$flags", + "type": "xs:string?" + }, + { + "description": "$replacement", + "type": "xs:string" + }, + { + "description": "$startingLoc", + "type": "xs:string" + }, + { + "description": "$comparand1", + "type": "xs:string?" + } + ], "description": "The function returns the xs:string that is obtained by replacing each non-overlapping substring of $input that matches the given $pattern with an occurrence of the $replacement string.", - "arguments": [ - { - "type": "xs:string?", - "description": "$comparand1" - }, - { - "type": "xs:string", - "description": "$startingLoc" - }, - { - "type": "xs:string", - "description": "$replacement" - }, - { - "type": "xs:string?", - "description": "$flags" - } - ], - "output": "xs:string", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-replace", "examples": [ { - "command": "replace('abracadabra', 'bra', '*')", - "output": "a*cada*" + "output": "b", + "command": "replace('AAAA', 'A+', 'b')" }, { - "command": "replace('abracadabra', 'a.*a, '*')", - "output": "ada" + "output": "ada", + "command": "replace('abracadabra', 'a.*a, '*')" }, { - "command": "replace('AAAA', 'A+', 'b')", - "output": "b" + "output": "a*cada*", + "command": "replace('abracadabra', 'bra', '*')" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-replace" + "name": "replace()", + "output": "xs:string" }, { - "name": "tokenize()", + "arguments": [ + { + "description": "$collation", + "type": "xs:string?" + }, + { + "description": "$arg2", + "type": "xs:string?" + }, + { + "description": "$arg1", + "type": "xs:string?" + } + ], + "description": "Returns an xs:boolean indicating whether or not the value of $arg1 starts with a sequence of collation units that provides a match to the collation units of $arg2 according to the collation that is used.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-starts-with", + "examples": [ + { + "command": "starts-with ( '', ())", + "output": "true" + }, + { + "output": "false", + "command": "starts-with('tattoo', 'ttt')" + }, + { + "command": "starts-with('tattoo', 'tat')", + "output": "true" + } + ], + "name": "starts-with(()", + "output": "xs:boolean" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "item()?" + } + ], + "description": "Returns the value of $arg represented as a xs:string. If no argument is supplied, the context item (.) is used as the default argument.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-string", + "examples": [ + { + "output": "0.11", + "command": "string(.11)" + }, + { + "output": "false", + "command": "string((1<0))" + } + ], + "name": "string()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$collation", + "type": "xs:string" + }, + { + "description": "$arg2", + "type": "xs:string" + }, + { + "description": "$arg1", + "type": "xs:string*" + } + ], + "description": "Returns a xs:string created by concatenating the members of the $arg1 sequence using $arg2 as a separator. If the value of $arg2 is the zero-length string, then the members of $arg1 are concatenated without a separator.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-string-join", + "examples": [ + { + "output": "Blow, blow, thou winter wind!", + "command": "string-join(('Blow, ', 'blow, ', 'thou ', 'winter ', 'wind!'), '')" + }, + { + "output": "Now is the time ...", + "command": "string-join(('Now', 'is', 'the', 'time', '...'), ' ')" + } + ], + "name": "string-join()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:string?" + } + ], + "description": "Returns the portion of the value of $sourceString beginning at the position indicated by the value of $startingLoc and continuing for the number of characters indicated by the value of $length. The characters returned do not extend beyond $sourceString.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-string-length", + "examples": [ + { + "output": "0", + "command": "string-length(())" + }, + { + "output": "45", + "command": "string-length('Harp not on that string, madam; that is past.')" + } + ], + "name": "string-length()", + "output": "xs:integer" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:string*" + } + ], + "description": "Returns the sequence of The Unicode Standard code points that constitute an xs:string. If $arg is a zero-length string or the empty sequence, the empty sequence is returned.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-min", + "examples": [ + { + "output": "https://www.w3.org/TR/xquery-operators/#func-string-to-codepoints", + "command": "string-to-codepoints('Thérèse')" + } + ], + "name": "string-to-codepoints()", + "output": "xs:integer*" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:string?" + } + ], + "description": "Returns the value of $arg after translating every character to its lower-case correspondent as defined in the appropriate case mappings section in the Unicode standard.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-lower-case", + "examples": [ + { + "output": "abcd0", + "command": "lower-case('abCd0')" + } + ], + "name": "substring()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$length", + "type": "xs:double?" + }, + { + "description": "$startingLoc", + "type": "xs:double" + }, + { + "description": "$comparand1", + "type": "xs:string?" + } + ], + "description": "Returns the portion of the value of $sourceString beginning at the position indicated by the value of $startingLoc and continuing for the number of characters indicated by the value of $length. The characters returned do not extend beyond $sourceString.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-substring", + "examples": [ + { + "output": "ada", + "command": "substring('metadata', 4, 3)" + }, + { + "output": "' car'", + "command": "substring('motor car', 6)" + } + ], + "name": "substring()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$collation", + "type": "xs:string?" + }, + { + "description": "$arg2", + "type": "xs:string?" + }, + { + "description": "$arg1", + "type": "xs:string?" + } + ], + "description": "Returns the substring of the value of $arg1 that follows in the value of $arg1 the first occurrence of a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-substring-after", + "examples": [ + { + "command": "substring-after( 'tattoo', 'tat')", + "output": "too" + }, + { + "output": "''", + "command": "substring-after( 'tattoo', 'too')" + } + ], + "name": "substring-after()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$collation", + "type": "xs:string?" + }, + { + "description": "$arg2", + "type": "xs:string?" + }, + { + "description": "$arg1", + "type": "xs:string?" + } + ], + "description": "Returns the substring of the value of $arg1 that precedes in the value of $arg1 the first occurrence of a sequence of collation units that provides a minimal match to the collation units of $arg2 according to the collation that is used.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-substring-before", + "examples": [ + { + "output": "''", + "command": "substring-before( 'tattoo', 'tat')" + }, + { + "command": "substring-before( 'tattoo', 'too')", + "output": "tat" + } + ], + "name": "substring-before(()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$flags", + "type": "xs:string?" + }, + { + "description": "$pattern", + "type": "xs:string" + }, + { + "description": "$comparand1", + "type": "xs:string?" + } + ], "description": "This function breaks the $input string into a sequence of strings, treating any substring that matches $pattern as a separator. The separators themselves are not returned.", - "arguments": [ - { - "type": "xs:string?", - "description": "$comparand1" - }, - { - "type": "xs:string", - "description": "$pattern" - }, - { - "type": "xs:string?", - "description": "$flags" - } - ], - "output": "xs:string*", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-tokenize", "examples": [ { - "command": "tokenize('The cat sat on the mat', '\\s+')", - "output": "('The', 'cat', 'sat', 'on', 'the', 'mat')" + "output": "('1', '15', '24', '50')", + "command": "tokenize('1, 15, 24, 50', '\\s*')" }, { - "command": "tokenize('1, 15, 24, 50', '\\s*')", - "output": "('1', '15', '24', '50')" + "output": "('The', 'cat', 'sat', 'on', 'the', 'mat')", + "command": "tokenize('The cat sat on the mat', '\\s+')" } ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-tokenize" + "name": "tokenize()", + "output": "xs:string*" + }, + { + "arguments": [ + { + "description": "$mapString", + "type": "xs:string" + }, + { + "description": "$mapString", + "type": "xs:string" + }, + { + "description": "$arg", + "type": "xs:string?" + } + ], + "description": "Returns the value of $arg modified so that every character in the value of $arg that occurs at some position N in the value of $mapString has been replaced by the character that occurs at position N in the value of $transString.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-translate", + "examples": [ + { + "output": "ABdAB", + "command": "translate('abcdabc', 'abc', 'AB')" + }, + { + "output": "AAA", + "command": "translate('--aaa--','abc-','ABC')" + }, + { + "output": "BAr", + "command": "translate('bar','abc','ABC')" + } + ], + "name": "translate()", + "output": "xs:string" + }, + { + "arguments": [ + { + "description": "$arg", + "type": "xs:string?" + } + ], + "description": "Returns the value of $arg after translating every character to its upper-case correspondent as defined in the appropriate case mappings section in the Unicode standard.", + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-upper-case", + "examples": [ + { + "output": "ABCD0", + "command": "upper-case('abCd0')" + } + ], + "name": "upper-case()", + "output": "xs:string" } - ] - }, - { - "name": "Number", - "entries": [ - { - "name": "number()", - "description": "Returns the value indicated by $arg or, if $arg is not specified, the context item after atomization, converted to an xs:double.", - "arguments": [ - { - "type": "xs:anyAtomicType?", - "description": "Value to convert to number" - } - ], - "output": "xs:double", - "examples": [ - { - "command": "number(123)", - "output": "123" - }, - { - "command": "number('Release11')", - "output": "NaN" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-number" - }, - { - "name": "avg()", - "description": "Returns the number of items in the value of $arg. Returns 0 if $arg is the empty sequence.", - "arguments": [ - { - "type": "xs:anyAtomicType*", - "description": "$arg" - } - ], - "output": "xs:anyAtomicType", - "examples": [ - { - "command": "avg(//u:User/@Id)", - "output": "2.6" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-avg" - }, - { - "name": "max()", - "description": "Selects an item from the input sequence $arg whose value is greater than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is ·implementation dependent·.", - "arguments": [ - { - "type": "xs:anyAtomicType*", - "description": "$arg" - }, - { - "type": "xs:string?", - "description": "$collation" - } - ], - "output": "xs:anyAtomicType", - "examples": [ - { - "command": "max(//u:User/@Id)", - "output": "5" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-max" - }, - { - "name": "min()", - "description": "Selects an item from the input sequence $arg whose value is less than or equal to the value of every other item in the input sequence. If there are two or more such items, then the specific item whose value is returned is ·implementation dependent·.", - "arguments": [ - { - "type": "xs:anyAtomicType*", - "description": "$arg" - }, - { - "type": "xs:string?", - "description": "$collation" - } - ], - "output": "xs:anyAtomicType", - "examples": [ - { - "command": "min(//u:User/@Id)", - "output": "1" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-min" - }, - { - "name": "sum()", - "description": "Returns a value obtained by adding together the values in $arg. If $zero is not specified, then the value returned for an empty sequence is the xs:integer value 0. If $zero is specified, then the value returned for an empty sequence is $zero. Any values of type xs:untypedAtomic in $arg are cast to xs:double. The items in the resulting sequence may be reordered in an arbitrary order. The resulting sequence is referred to below as the converted sequence.", - "arguments": [ - { - "type": "xs:anyAtomicType*", - "description": "$arg" - }, - { - "type": "xs:anyAtomicType?", - "description": "$zero" - } - ], - "output": "xs:anyAtomicType", - "examples": [ - { - "command": "sum(//u:User/@Id)", - "output": "26" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-sum" - }, - { - "name": "abs()", - "description": "Returns the absolute value of $arg.", - "arguments": [ - { - "type": "numeric?", - "description": "$arg" - } - ], - "output": "numeric?", - "examples": [ - { - "command": "abs(25)", - "output": "25" - }, - { - "command": "abs(-25)", - "output": "25" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-abs" - }, - { - "name": "ceiling()", - "description": "Returns the smallest (closest to negative infinity) number with no fractional part that is not less than the value of $arg.", - "arguments": [ - { - "type": "numeric?", - "description": "$arg" - } - ], - "output": "numeric?", - "examples": [ - { - "command": "ceiling(10.5)", - "output": "11" - }, - { - "command": "ceiling(-10.5)", - "output": "10" - }, - { - "command": "ceiling(10.1)", - "output": "11" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-ceiling" - }, - { - "name": "floor()", - "description": "Returns the largest (closest to positive infinity) number with no fractional part that is not greater than the value of $arg.", - "arguments": [ - { - "type": "numeric?", - "description": "$arg" - } - ], - "output": "numeric?", - "examples": [ - { - "command": "floor(10.5)", - "output": "10" - }, - { - "command": "floor(-10.5)", - "output": "-11" - }, - { - "command": "floor(10.1)", - "output": "10" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-floor" - }, - { - "name": "round()", - "description": "Returns the number with no fractional part that is closest to the argument.", - "arguments": [ - { - "type": "numeric?", - "description": "$arg" - } - ], - "output": "numeric?", - "examples": [ - { - "command": "round(10.5)", - "output": "11" - }, - { - "command": "round(-10.5)", - "output": "-10" - }, - { - "command": "round(10.1)", - "output": "10" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-round" - }, - { - "name": "round-half-to-even()", - "description": "The value returned is the nearest (that is, numerically closest) value to $arg that is a multiple of ten to the power of minus $precision. If two such values are equally near (e.g. if the fractional part in $arg is exactly .500...), the function returns the one whose least significant digit is even.", - "arguments": [ - { - "type": "numeric?", - "description": "$arg" - }, - { - "type": "numeric?", - "description": "$precision" - } - ], - "output": "numeric?", - "examples": [ - { - "command": "round-half-to-even(0.5)", - "output": "0" - }, - { - "command": "round-half-to-even(1.5)", - "output": "2" - }, - { - "command": "round-half-to-even(2.5)", - "output": "2" - }, - { - "command": "round-half-to-even(2.6)", - "output": "3" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#round-half-to-even" - } - ] - }, - { - "name": "Collections", - "entries": [ - { - "name": "data()", - "description": "Takes a sequence of items and returns a sequence of atomic values.", - "arguments": [ - { - "type": "item*", - "description": "Items to convert." - } - ], - "output": "xs:anyAtomicType*", - "examples": [ - { - "command": "data(/u:root/u:UserList[1]/u:User[1])", - "output": "('John', 'Wick', '2023-10-10')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-data" - }, - { - "name": "index-of()", - "description": " Returns a sequence of positive integers giving the positions within the sequence $seqParam of items that are equal to $srchParam.", - "arguments": [ - { - "type": "xs:anyAtomicType", - "description": "$seqParam" - }, - { - "type": "xs:anyAtomicType", - "description": "$srchParam" - }, - { - "type": "xs:string?", - "description": "$collation" - } - ], - "output": "xs:integer*", - "examples": [ - { - "command": "index-of((10, 20, 30, 40), 35)", - "output": "()" - }, - { - "command": "index-of((10, 20, 30, 30, 20, 10), 20)", - "output": "(2, 5)" - }, - { - "command": "index-of(('a', 'sport', 'and', 'a', 'pastime'), 'a')", - "output": "(1, 4)" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-index-of" - }, - { - "name": "empty()", - "description": "If the value of $arg is the empty sequence, the function returns true; otherwise, the function returns false.", - "arguments": [ - { - "type": "item*", - "description": "arg" - } - ], - "output": "xs:boolean", - "examples": [ - { - "command": "empty(('hello', 'world'))", - "output": "false" - }, - { - "command": "empty(())", - "output": "true" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-empty" - }, - { - "name": "exists()", - "description": "If the value of $arg is not the empty sequence, the function returns true; otherwise, the function returns false.", - "arguments": [ - { - "type": "item*", - "description": "$arg" - } - ], - "output": "xs:boolean", - "examples": [ - { - "command": "exists(remove(('hello'), 1))", - "output": "false" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-exists" - }, - { - "name": "distinct-values()", - "description": "Returns the sequence that results from removing from $arg all but one of a set of values that are eq to one other. Values of type xs:untypedAtomic are compared as if they were of type xs:string.", - "arguments": [ - { - "type": "xs:anyAtomicType*", - "description": "$arg" - }, - { - "type": "xs:string?", - "description": "$collation" - } - ], - "output": "xs:anyAtomicType*", - "examples": [ - { - "command": "distinct-values((1, 2.0, 3, 2))", - "output": "(1, 3, 2.0)" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-distinct-values" - }, - { - "name": "insert-before()", - "description": "Returns a new sequence constructed from the value of $target with the value of $inserts inserted at the position specified by the value of $position.", - "arguments": [ - { - "type": "item*", - "description": "$target" - }, - { - "type": "xs:integer", - "description": "$position" - }, - { - "type": "item()*", - "description": "$$inserts" - } - ], - "output": "item()*", - "examples": [ - { - "command": "insert-before($x, 0, 'z')", - "output": "('z', 'a', 'b', 'c')" - }, - { - "command": "insert-before($x, 1, 'z')", - "output": "('z', 'a', 'b', 'c')" - }, - { - "command": "insert-before($x, 2, 'z')", - "output": "('a', 'z', 'b', 'c')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-insert-before" - }, - { - "name": "remove()", - "description": "Returns a new sequence constructed from the value of $target with the item at the position specified by the value of $position removed.", - "arguments": [ - { - "type": "item*", - "description": "$target" - }, - { - "type": "xs:integer", - "description": "$position" - } - ], - "output": "item()*", - "examples": [ - { - "command": "remove($x, 0)", - "output": "('a', 'b', 'c')" - }, - { - "command": "remove($x, 1)", - "output": "('b', 'c')" - }, - { - "command": "remove($x, 6)", - "output": "('a', 'b', 'c')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-remove" - }, - { - "name": "reverse()", - "description": "Reverses the order of items in a sequence. If $arg is the empty sequence, the empty sequence is returned.", - "arguments": [ - { - "type": "item*", - "description": "$arg" - } - ], - "output": "item()*", - "examples": [ - { - "command": "reverse( ('a', 'b', 'c') )", - "output": "('c', 'b', 'a')" - }, - { - "command": "reverse( ('hello') )", - "output": "('hello')" - }, - { - "command": "reverse( ('') )", - "output": "('')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-reverse" - }, - { - "name": "subsequence()", - "description": "Returns the contiguous sequence of items in the value of $sourceSeq beginning at the position indicated by the value of $startingLoc and continuing for the number of items indicated by the value of $length.", - "arguments": [ - { - "type": "item*", - "description": "$sourceSeq" - }, - { - "type": "xs:double?", - "description": "$startingLoc" - }, - { - "type": "xs:double?", - "description": "$length" - } - ], - "output": "item()*", - "examples": [ - { - "command": "subsequence( ('a', 'b', 'c', 'd', 'e') , 4)", - "output": "('d', 'e')" - }, - { - "command": "subsequence( ('a', 'b', 'c', 'd', 'e'), 2, 3)", - "output": "('b', 'c', 'd')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-subsequence" - }, - { - "name": "unordered()", - "description": "Returns the items of $sourceSeq in an implementation dependent order.", - "arguments": [ - { - "type": "item*", - "description": "$sourceSeq" - } - ], - "output": "item()*", - "examples": [], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-unordered" - }, - { - "name": "zero-or-one()", - "description": "Returns $arg if it contains zero or one items. Otherwise, raises an error [err:FORG0003].", - "arguments": [ - { - "type": "item*", - "description": "$arg" - } - ], - "output": "item()*", - "examples": [ - { - "command": "zero-or-one(('a'))", - "output": "('a')" - }, - { - "command": "zero-or-one(('a', 'b'))", - "output": "A sequence of more than one item is not allowed as the first argument of fn:zero-or-one() ('a', 'b')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-zero-or-one" - }, - { - "name": "one-or-more()", - "description": "Returns $arg if it contains one or more items. Otherwise, raises an error [err:FORG0004].", - "arguments": [ - { - "type": "item*", - "description": "$arg" - } - ], - "output": "item()?", - "examples": [ - { - "command": "one-or-more(('a'))", - "output": "('a')" - }, - { - "command": "one-or-more(('a', 'b'))", - "output": "('a', 'b')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-one-or-more" - }, - { - "name": "exactly-one()", - "description": "Returns $arg if it contains exactly one item. Otherwise, raises an error [err:FORG0005].", - "arguments": [ - { - "type": "item*", - "description": "$arg" - } - ], - "output": "item()?", - "examples": [ - { - "command": "exactly-one(('a'))", - "output": "('a')" - }, - { - "command": "exactly-one(('a', 'b'))", - "output": "A sequence of more than one item is not allowed as the first argument of fn:exactly-one() ('a', 'b')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-exactly-one" - }, - { - "name": "deep-equal()", - "description": "This function assesses whether two sequences are deep-equal to each other. To be deep-equal, they must contain items that are pairwise deep-equal; and for two items to be deep-equal, they must either be atomic values that compare equal, or nodes of the same kind, with the same name, whose children are deep-equal.", - "arguments": [ - { - "type": "item*", - "description": "$parameter1" - }, - { - "type": "item*", - "description": "$parameter2" - }, - { - "type": "xs:string?", - "description": "$collation" - } - ], - "output": "xs:boolean", - "examples": [ - { - "command": "deep-equal(/u:root/u:UserList[1], /u:root/u:UserList[2])", - "output": "false" - }, - { - "command": "deep-equal(/u:root/u:UserList[1], /u:root/u:UserList[1])", - "output": "true" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-deep-equal" - }, - { - "name": "id()", - "description": "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": [ - { - "type": "xs:string*", - "description": "$arg" - }, - { - "type": "node()*", - "description": "$startingLoc" - }, - { - "type": "xs:string?", - "description": "$collation" - } - ], - "output": "element()*", - "examples": [], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-id" - }, - { - "name": "idref()", - "description": "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": [ - { - "type": "xs:string*", - "description": "$arg" - }, - { - "type": "node()*", - "description": "$node" - }, - { - "type": "xs:string?", - "description": "$collation" - } - ], - "output": "node()*", - "examples": [], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-idref" - }, - { - "name": "doc()", - "description": "Retrieves a document using a URI supplied as an xs:string, and returns the corresponding document node.", - "arguments": [ - { - "type": "xs:string", - "description": "$uri" - } - ], - "output": "document-node()?", - "examples": [ - { - "command": "doc('test.xml')", - "output": "" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-doc" - }, - { - "name": "doc-available()", - "description": "The function returns true if and only if the function call fn:doc($uri) would return a document node.", - "arguments": [ - { - "type": "xs:string", - "description": "$uri" - } - ], - "output": "item()*", - "examples": [ - { - "command": "doc('test.xml')", - "output": "true " - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-doc-available" - }, - { - "name": "collection()", - "description": "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", - "arguments": [ - { - "type": "xs:string?", - "description": "$arg" - } - ], - "output": "node()*", - "examples": [ - { - "command": "collection('')", - "output": "()" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-collection" - }, - { - "name": "element-with-id()", - "description": "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": [ - { - "type": "xs:string?", - "description": "$arg" - }, - { - "type": "xs:double?", - "description": "$startingLoc" - }, - { - "type": "xs:double?", - "description": "$length" - } - ], - "output": "node()*", - "examples": [ - { - "command": "subsequence( ('a', 'b', 'c', 'd', 'e') , 4)", - "output": "('d', 'e')" - }, - { - "command": "subsequence( ('a', 'b', 'c', 'd', 'e'), 2, 3)", - "output": "('b', 'c', 'd')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-subsequence" - }, - { - "name": "position()", - "description": "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.", - "arguments": [], - "output": "xs:integer", - "examples": [ - { - "command": "/u:root/u:UserList[@Id = 'b']/position()", - "output": "1" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-position" - }, - { - "name": "last()", - "description": "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": [], - "output": "xs:integer", - "examples": [ - { - "command": "/u:root/u:UserList/last()", - "output": "(3, 3, 3)" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-last" - } - ] - }, - { - "name": "Date / Time", - "entries": [ - { - "name": "years-from-duration()", - "description": "Returns an xs:integer representing the years component in the value of $arg.", - "arguments": [ - { - "type": "xs:duration?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "years-from-duration(xs:yearMonthDuration('P20Y15M')", - "output": "21" - }, - { - "command": "years-from-duration(xs:yearMonthDuration('-P15M'))", - "output": "-1" - }, - { - "command": "years-from-duration(xs:yearMonthDuration('-P2DT15H')", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-years-from-duration" - }, - { - "name": "months-from-duration()", - "description": "Returns an xs:integer representing the months component in the value of $arg.", - "arguments": [ - { - "type": "xs:duration?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "months-from-duration(xs:yearMonthDuration('P20Y15M')", - "output": "3" - }, - { - "command": "months-from-duration(xs:yearMonthDuration('-P20Y18M'))", - "output": "-6" - }, - { - "command": "months-from-duration(xs:yearMonthDuration('-P2DT15H0M0S')", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-months-from-duration" - }, - { - "name": "days-from-duration()", - "description": "Returns an xs:integer representing the days component in the value of $arg.", - "arguments": [ - { - "type": "xs:duration?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "days-from-duration(xs:yearMonthDuration('P3DT10H')", - "output": "3" - }, - { - "command": "days-from-duration(xs:yearMonthDuration('P3DT55H'))", - "output": "5" - }, - { - "command": "days-from-duration(xs:yearMonthDuration('P3Y5M')", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-days-from-duration" - }, - { - "name": "hours-from-duration()", - "description": "Returns an xs:integer representing the hours component in the value of $arg.", - "arguments": [ - { - "type": "xs:duration?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "hours-from-duration(xs:yearMonthDuration('P3DT10H')", - "output": "10" - }, - { - "command": "hours-from-duration(xs:yearMonthDuration('P3DT12H32M12S'))", - "output": "12" - }, - { - "command": "hours-from-duration(xs:yearMonthDuration('-PT123H')", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-hours-from-duration" - }, - { - "name": "minutes-from-duration()", - "description": "Returns an xs:integer representing the minutes component in the value of $arg.", - "arguments": [ - { - "type": "xs:duration?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "minutes-from-duration(xs:yearMonthDuration('P3DT10H')", - "output": "0" - }, - { - "command": "minutes-from-duration(xs:yearMonthDuration('-PT1P5DT12H30M23H')", - "output": "-30" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-minutes-from-duration" - }, - { - "name": "seconds-from-duration()", - "description": "Returns an xs:integer representing the seconds component in the value of $arg.", - "arguments": [ - { - "type": "xs:duration?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "seconds-from-duration(xs:yearMonthDuration('P3DT10H12.5S')", - "output": "12.5" - }, - { - "command": "seconds-from-duration(xs:yearMonthDuration('-PT256S')", - "output": "16" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-seconds-from-duration" - }, - { - "name": "year-from-dateTime()", - "description": "Returns an xs:integer representing the year component in the localized value of $arg. The result may be negative.", - "arguments": [ - { - "type": "xs:dateTime?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "year-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))", - "output": "1999" - }, - { - "command": "year-from-dateTime(xs:dateTime('1999-12-31T19:20:00'))", - "output": "1999" - }, - { - "command": "year-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))", - "output": "2000" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-year-from-dateTime" - }, - { - "name": "month-from-dateTime()", - "description": "Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg.", - "arguments": [ - { - "type": "xs:dateTime?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "month-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))", - "output": "05" - }, - { - "command": "month-from-dateTime(xs:dateTime('1999-12-31T19:20:00'))", - "output": "12" - }, - { - "command": "month-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))", - "output": "1" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-month-from-dateTime" - }, - { - "name": "day-from-dateTime()", - "description": "Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of $arg.", - "arguments": [ - { - "type": "xs:dateTime?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "day-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))", - "output": "31" - }, - { - "command": "day-from-dateTime(xs:dateTime('1999-12-31T19:20:00'))", - "output": "31" - }, - { - "command": "day-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))", - "output": "1" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-day-from-dateTime" - }, - { - "name": "hours-from-dateTime()", - "description": "Returns an xs:integer between 0 and 23, both inclusive, representing the hours component in the localized value of $arg.", - "arguments": [ - { - "type": "xs:dateTime?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "hours-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))", - "output": "13" - }, - { - "command": "hours-from-dateTime(xs:dateTime('1999-12-31T19:20:00'))", - "output": "19" - }, - { - "command": "hours-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-hours-from-dateTime" - }, - { - "name": "minutes-from-dateTime()", - "description": "Returns an xs:integer value between 0 and 59, both inclusive, representing the minute component in the localized value of $arg.", - "arguments": [ - { - "type": "xs:dateTime?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "minutes-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))", - "output": "20" - }, - { - "command": "minutes-from-dateTime(xs:dateTime('1999-12-31T19:20:00'))", - "output": "20" - }, - { - "command": "minutes-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-minutes-from-dateTime" - }, - { - "name": "seconds-from-dateTime()", - "description": "Returns an xs:decimal value greater than or equal to zero and less than 60, representing the seconds and fractional seconds in the localized value of $arg.", - "arguments": [ - { - "type": "xs:dateTime?", - "description": "$arg" - } - ], - "output": "xs:decimal?", - "examples": [ - { - "command": "seconds-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))", - "output": "0" - }, - { - "command": "seconds-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-seconds-from-dateTime" - }, - { - "name": "timezone-from-dateTime()", - "description": " Returns an xs:decimal value greater than or equal to zero and less than 60, representing the seconds and fractional seconds in the localized value of $arg.", - "arguments": [ - { - "type": "xs:dateTime?", - "description": "$arg" - } - ], - "output": "xs:dayTimeDuration?", - "examples": [ - { - "command": "timezone-from-dateTime(xs:dateTime('1999-05-31T13:20:00-05:00'))", - "output": "PT5H" - }, - { - "command": "timezone-from-dateTime(xs:dateTime('1999-12-31T24:00:00'))", - "output": "PT0S" - }, - { - "command": "timezone-from-dateTime(xs:dateTime('2004-08-27T00:00:00'))", - "output": "()" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-timezone-from-dateTime" - }, - { - "name": "year-from-date()", - "description": "Returns an xs:integer representing the year in the localized value of $arg. The value may be negative.", - "arguments": [ - { - "type": "xs:date?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "year-from-date(xs:date('1999-05-31'))", - "output": "1999" - }, - { - "command": "year-from-date(xs:date('2000-01-01+05:00'))", - "output": "2000" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-year-from-date" - }, - { - "name": "month-from-date()", - "description": "Returns an xs:integer between 1 and 12, both inclusive, representing the month component in the localized value of $arg.", - "arguments": [ - { - "type": "xs:date?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "month-from-date(xs:date('1999-05-31'))", - "output": "05" - }, - { - "command": "month-from-date(xs:date('2000-01-01+05:00'))", - "output": "01" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-month-from-date" - }, - { - "name": "day-from-date()", - "description": "Returns an xs:integer between 1 and 31, both inclusive, representing the day component in the localized value of $arg.", - "arguments": [ - { - "type": "xs:date?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "day-from-date(xs:date('1999-05-31'))", - "output": "31" - }, - { - "command": "day-from-date(xs:date('2000-01-01+05:00'))", - "output": "01" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-day-from-date" - }, - { - "name": "timezone-from-date()", - "description": " Returns the timezone component of $arg if any. If $arg has a timezone component, then the result is an xs:dayTimeDuration that indicates deviation from UTC; its value may range from +14:00 to -14:00 hours, both inclusive. Otherwise, the result is the empty sequence.", - "arguments": [ - { - "type": "xs:date?", - "description": "$arg" - } - ], - "output": "xs:dayTimeDuration?", - "examples": [ - { - "command": "timezone-from-date(xs:date('1999-05-31'))", - "output": "-PT5H" - }, - { - "command": "timezone-from-date(xs:date('2000-01-01+05:00'))", - "output": "PT0S" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-timezone-from-date" - }, - { - "name": "hours-from-time()", - "description": "Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of $arg.", - "arguments": [ - { - "type": "xs:time?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "hours-from-time(xs:time('11:23:00'))", - "output": "11" - }, - { - "command": "hours-from-time(xs:time('24:00:00'))", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-hours-from-time" - }, - { - "name": "minutes-from-time()", - "description": "Returns an xs:integer between 0 and 23, both inclusive, representing the value of the hours component in the localized value of $arg.", - "arguments": [ - { - "type": "xs:time?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "hourminutess-from-time(xs:time('11:23:00'))", - "output": "23" - }, - { - "command": "minutes-from-time(xs:time('24:00:00'))", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-minutes-from-time" - }, - { - "name": "seconds-from-time()", - "description": "Returns an xs:decimal value greater than or equal to zero and less than 60, representing the seconds and fractional seconds in the localized value of $arg.", - "arguments": [ - { - "type": "xs:time?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "seconds-from-time(xs:time('11:23:30'))", - "output": "30" - }, - { - "command": "seconds-from-time(xs:time('24:00:00'))", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-seconds-from-time" - }, - { - "name": "timezone-from-time()", - "description": "Returns an xs:decimal value greater than or equal to zero and less than 60, representing the seconds and fractional seconds in the localized value of $arg.", - "arguments": [ - { - "type": "xs:time?", - "description": "$arg" - } - ], - "output": "xs:integer?", - "examples": [ - { - "command": "hours-from-time(xs:time('11:23:00'))", - "output": "11" - }, - { - "command": "hours-from-time(xs:time('24:00:00'))", - "output": "0" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-hours-from-time" - }, - { - "name": "adjust-date-to-timezone()", - "description": "Adjusts an xs:date value to a specific timezone, or to no timezone at all. If $timezone is the empty sequence, returns an xs:date without a timezone. Otherwise, returns an xs:date with a timezone. For purposes of timezone adjustment, an xs:date is treated as an xs:dateTime with time 00:00:00.", - "arguments": [ - { - "type": "xs:date?", - "description": "$arg" - }, - { - "type": "xs:dayTimeDuration?", - "description": "$timezone" - } - ], - "output": "xs:date?", - "examples": [ - { - "command": "adjust-date-to-timezone(xs:date('2002-03-07'))", - "output": "2002-03-07-05:00" - }, - { - "command": "adjust-date-to-timezone(xs:date('2002-03-07'), xs:dayTimeDuration('-PT10H'))", - "output": "2002-03-07-10:00" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-adjust-date-to-timezone" - }, - { - "name": "adjust-time-to-timezone()", - "description": "Adjusts an xs:time value to a specific timezone, or to no timezone at all. If $timezone is the empty sequence, returns an xs:time without a timezone. Otherwise, returns an xs:time with a timezone.", - "arguments": [ - { - "type": "xs:time?", - "description": "$arg" - }, - { - "type": "xs:dayTimeDuration?", - "description": "$timezone" - } - ], - "output": "xs:time?", - "examples": [ - { - "command": "adjust-time-to-timezone(xs:time('10:00:00'))", - "output": "2002-03-07-05:00" - }, - { - "command": "adjust-time-to-timezone(xs:time('10:00:00'), xs:dayTimeDuration('-PT10H'))", - "output": "2002-03-07-10:00" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-adjust-time-to-timezone" - }, - { - "name": "adjust-time-to-timezone()", - "description": "Adjusts an xs:time value to a specific timezone, or to no timezone at all. If $timezone is the empty sequence, returns an xs:time without a timezone. Otherwise, returns an xs:time with a timezone.", - "arguments": [ - { - "type": "xs:time?", - "description": "$arg" - }, - { - "type": "xs:dayTimeDuration?", - "description": "$timezone" - } - ], - "output": "xs:time?", - "examples": [ - { - "command": "adjust-time-to-timezone(xs:time('10:00:00'))", - "output": "10:00:00-05:00" - }, - { - "command": "adjust-time-to-timezone(xs:time('10:00:00'), xs:dayTimeDuration('-PT10H'))", - "output": "10:00:00-10:00" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-adjust-time-to-timezone" - }, - { - "name": "current-dateTime()", - "description": "Returns the current dateTime (with timezone) from the dynamic context.", - "arguments": [], - "output": "xs:dateTime", - "examples": [ - { - "command": "current-dateTime()", - "output": "" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-current-dateTime" - }, - { - "name": "current-date()", - "description": "Returns the current date (with timezone) from the dynamic context.", - "arguments": [], - "output": "xs:date", - "examples": [ - { - "command": "current-date()", - "output": "" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-current-date" - }, - { - "name": "current-time()", - "description": "Returns the current time (with timezone) from the dynamic context.", - "arguments": [], - "output": "xs:time", - "examples": [ - { - "command": "current-time()", - "output": "" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-current-time" - }, - { - "name": "implicit-timezone()", - "description": "Returns the value of the implicit timezone property from the dynamic context.", - "arguments": [], - "output": "xs:string", - "examples": [ - { - "command": "implicit-timezone()", - "output": "PT0S" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-implicit-timezone" - } - - ] - }, - { - "name": "Error", - "entries": [ - { - "name": "error()", - "description": "The fn:error function is a general function that may be invoked as above but may also be invoked from XQuery or XPath applications with, for example, an xs:QName argument.", - "arguments": [], - "output": "N/A", - "examples": [], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-error" - }, - { - "name": "trace()", - "description": "Provides an execution trace intended to be used in debugging queries. The input $value is returned, unchanged, as the result of the function. In addition, the inputs $value, converted to an xs:string, and $label may be directed to a trace data set. The destination of the trace output is ·implementation-defined·. The format of the trace output is ·implementation dependent·. The ordering of output from invocations of the fn:trace() function is ·implementation dependent·.", - "arguments": [ - { - "type": "item()*", - "description": "$arg" - }, - { - "type": "xs:string", - "description": "$label" - } - ], - "output": "item", - "examples": [], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-trace" - } - ] - }, - { - "name": "Misc", - "entries": [ - { - "name": "resolve-uri()", - "description": "This function enables a relative URI reference to be resolved against an absolute URI. If $relative is a relative URI reference, it is resolved against $base, or against the base-uri property from the static context, using an algorithm such as those described in RFC 2396 or RFC 3986, and the resulting absolute URI reference is returned. If $relative is an absolute URI reference, it is returned unchanged.", - "arguments": [ - { - "type": "xs:string?", - "description": "$relative" - }, - { - "type": "xs:string", - "description": "$base" - } - ], - "output": "xs:anyURI?", - "examples": [], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-resolve-uri" - }, - { - "name": "resolve-QName()", - "description": "Returns an xs:QName value (that is, an expanded-QName) by taking an xs:string that has the lexical form of an xs:QName (a string in the form 'prefix:local-name' or 'local-name') and resolving it using the in-scope namespaces for a given element.", - "arguments": [ - { - "type": "xs:string?", - "description": "$qname" - }, - { - "type": "element", - "description": "$element" - } - ], - "output": "xs:QName?", - "examples": [ - { - "command": "resolve-QName('hello', /l:library/l:libraryName)", - "output": "hello" - }, - { - "command": "resolve-QName('l:libraryID', /l:library/l:libraryName)", - "output": "l:libraryID" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-resolve-QName" - }, - { - "name": "QName()", - "description": "Returns an xs:QName with the namespace URI given in $paramURI.", - "arguments": [ - { - "type": "xs:string?", - "description": "$paramURI" - }, - { - "type": "xs:string", - "description": "$paramQName" - } - ], - "output": "xs:QName", - "examples": [ - { - "command": "QName('http://www.release11.com/schemas/Sample.xsd', 'u:UserList')", - "output": "u:UserList" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-QName" - }, - { - "name": "prefix-from-QName()", - "description": "Returns an xs:NCName representing the prefix of $arg. The empty sequence is returned if $arg is the empty sequence or if the value of $arg contains no prefix.", - "arguments": [ - { - "type": "xs:QName?", - "description": "$arg" - } - ], - "output": "xs:NCName?", - "examples": [ - { - "command": "prefix-from-QName(resolve-QName('u:UserList', /u:root/u:UserList))", - "output": "u" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-prefix-from-QName" - }, - { - "name": "local-name-from-QName()", - "description": "Returns an xs:NCName representing the prefix of $arg. The empty sequence is returned if $arg is the empty sequence or if the value of $arg contains no prefix.", - "arguments": [ - { - "type": "xs:QName?", - "description": "$arg" - } - ], - "output": "xs:NCName?", - "examples": [ - { - "command": "local-name-from-QName(resolve-QName('u:UserList', /u:root/u:UserList))", - "output": "UserList" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-local-name-from-QName" - }, - { - "name": "namespace-uri-from-QName()", - "description": "Returns the namespace URI for $arg as an xs:anyURI. If $arg is the empty sequence, the empty sequence is returned. If $arg is in no namespace, the zero-length xs:anyURI is returned.", - "arguments": [ - { - "type": "xs:QName?", - "description": "$arg" - } - ], - "output": "xs:anyURI?", - "examples": [ - { - "command": "namespace-uri-from-QName(resolve-QName('u:UserList', /u:root/u:UserList[1]))", - "output": "http://www.release11.com/schemas/Sample.xsd" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-namespace-uri-from-QName" - }, - { - "name": "namespace-uri-for-prefix()", - "description": "Returns the namespace URI of one of the in-scope namespaces for $element, identified by its namespace prefix.", - "arguments": [ - { - "type": "xs:string?", - "description": "$prefix" - }, - { - "type": "element()", - "description": "$element" - } - ], - "output": "xs:anyURI?", - "examples": [ - { - "command": "namespace-uri-for-prefix('u', /u:root)", - "output": "http://www.release11.com/schemas/Sample.xsd" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-namespace-uri-for-prefix" - }, - { - "name": "in-scope-prefixes()", - "description": "Returns the prefixes of the in-scope namespaces for $element. For namespaces that have a prefix, it returns the prefix as an xs:NCName. For the default namespace, which has no prefix, it returns the zero-length string.", - "arguments": [ - { - "type": "element()", - "description": "$element" - } - ], - "output": "xs:string*", - "examples": [ - { - "command": "in-scope-prefixes(/u:root)", - "output": "('u', 'xsi', 'xml')" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-in-scope-prefixes" - }, - { - "name": "static-base-uri()", - "description": "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.", - "arguments": [], - "output": "xs:QName?", - "examples": [ - { - "command": "static-base-uri()", - "output": "()" - } - ], - "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-static-base-uri" - } - - ] + ], + "name": "String" } ] \ No newline at end of file diff --git a/Frontend/src/assets/tooltips/xpath/xpath3.json b/Frontend/src/assets/tooltips/xpath/xpath3.json index 3f696bb..810702f 100644 --- a/Frontend/src/assets/tooltips/xpath/xpath3.json +++ b/Frontend/src/assets/tooltips/xpath/xpath3.json @@ -1,40 +1,3109 @@ [ { - "name": "Number", "entries": [ { - "name": "sum", - "description": "The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number.", "arguments": [ { "name": "$arg", - "type": "node-set", - "description": "Data to sum" + "type": "item()*", + "description": "sequence of arguments" } ], - "output": "number", - "examples": [], - "documentationReferenceURL": "wwww.google.pl" - }, - { - "name": "floor", - "description": "The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.", - "arguments": [ - { - "name": "$arg", - "type": "number", - "description": "Data to round" - } - ], - "output": "number", + "description": "Computes the effective boolean value of the sequence $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-boolean", "examples": [ { - "command": "floor(3.6)", - "output": "3" + "command": "boolean(\"true\")", + "output": "true" } ], - "documentationReferenceURL": "wwww.google.pl" + "name": "boolean()", + "output": "boolean" + }, + { + "arguments": [], + "description": "Returns the xs:boolean value false.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-false", + "examples": [ + { + "output": "false", + "command": "false()" + } + ], + "name": "false()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "sequence of arguments" + } + ], + "description": "Returns true if the effective boolean value of $arg is false, or false if it is true", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-not", + "examples": [ + { + "output": "false", + "command": "not(\"true\")" + } + ], + "name": "not()", + "output": "boolean" + }, + { + "arguments": [], + "description": "Returns the xs:boolean value true.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-true", + "examples": [ + { + "output": "true", + "command": "true()" + } + ], + "name": "true()", + "output": "boolean" } - ] + ], + "name": "Boolean" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$arg", + "type": "any()*", + "description": "sequence" + } + ], + "description": "Returns the average of the values in the input sequence $arg, that is, the sum of the values divided by the number of values.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-avg", + "examples": [ + { + "output": "10", + "command": "avg( (5,10,15) )" + } + ], + "name": "avg()", + "output": "any?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "sequence" + } + ], + "description": "Returns the number of items in a sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-count", + "examples": [ + { + "output": "2", + "command": "count( ('release','11') )" + } + ], + "name": "count()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$collation", + "description": "collation", + "type": "string?" + }, + { + "name": "$parameter1", + "description": "first sequence", + "type": "item()*" + }, + { + "name": "$parameter2", + "type": "item()*", + "description": "second sequence" + } + ], + "description": "This function assesses whether two sequences are deep-equal to each other. To be deep-equal, they must contain items that are pairwise deep-equal", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-deep-equal", + "examples": [ + { + "command": "deep-equal( ('release','11') , ('release','11') )", + "output": "true" + } + ], + "name": "deep-equal()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "any()*", + "description": "base sequence" + }, + { + "name": "$collation", + "description": "collation", + "type": "string?" + } + ], + "description": "Returns the values that appear in a sequence, with duplicates eliminated.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-distinct-values", + "examples": [ + { + "output": "('release','11','tools')", + "command": "distinct-values(('release','release','11','tools'))" + } + ], + "name": "distinct-values()", + "output": "any()*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "input items", + "type": "item()*" + } + ], + "description": "Returns true if the argument is the empty sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-empty", + "examples": [ + { + "command": "empty(//u:UserList[1]/u:User[1111])", + "output": "true" + } + ], + "name": "empty()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "sequence" + } + ], + "description": "Returns $arg if it contains exactly one item. Otherwise, raises an error.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-exactly-one", + "examples": [ + { + "command": "exactly-one( ('release','11') )", + "output": "Raises an error" + } + ], + "name": "exactly-one()", + "output": "item" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "input items", + "type": "item()*" + } + ], + "description": "Returns true if the argument is a non-empty sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-empty", + "examples": [ + { + "command": "exists(//u:UserList[1]/u:User[1111])", + "output": "false" + } + ], + "name": "exists()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "input items", + "type": "item()*" + } + ], + "description": "Returns the first item in a sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-head", + "examples": [ + { + "output": "First item in UserList with childrens", + "command": "head(//u:UserList)" + } + ], + "name": "head()", + "output": "item()?" + }, + { + "arguments": [ + { + "name": "$collation", + "description": "collation", + "type": "string?" + }, + { + "name": "$search", + "type": "any", + "description": "item to find" + }, + { + "name": "$seq", + "type": "any()*", + "description": "base sequence" + } + ], + "description": "Returns a sequence of positive integers giving the positions within the sequence $seq of items that are equal to $search.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-index-of", + "examples": [ + { + "output": "(1,2)", + "command": "index-of(('release','release','11','tools'),'release')" + } + ], + "name": "index-of()", + "output": "integer*" + }, + { + "arguments": [ + { + "name": "$nodes", + "description": "input nodes", + "type": "node()*" + } + ], + "description": "Returns every node within the input sequence that is not an ancestor of another member of the input sequence; the nodes are returned in document order with duplicates eliminated.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-innermost", + "examples": [ + { + "command": "innermost(//u:UserList[1])", + "output": "node with childrens" + } + ], + "name": "innermost()", + "output": "node()*" + }, + { + "arguments": [ + { + "name": "$inserts", + "type": "item()*", + "description": "itemst to insert" + }, + { + "name": "$position", + "type": "integer", + "description": "position where insert data" + }, + { + "name": "$target", + "description": "base sequence", + "type": "item()*" + } + ], + "description": "Returns a sequence constructed by inserting an item or a sequence of items at a given position within an existing sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-insert-before", + "examples": [ + { + "output": "First UserList with 'hello' on the start", + "command": "insert-before(//u:UserList[1],1,\"hello\")" + } + ], + "name": "insert-before()", + "output": "item()*" + }, + { + "arguments": [], + "description": "Returns the context size from the dynamic context", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-last", + "examples": [ + { + "command": "//u:UserList[last()]", + "output": "Last UserList" + } + ], + "name": "last()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "any()*", + "description": "sequence" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns a value that is equal to the highest value appearing in the input sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-max", + "examples": [ + { + "output": "15", + "command": "max( (5,10,15) )" + } + ], + "name": "max()", + "output": "any?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "any()*", + "description": "sequence" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns a value that is equal to the lowest value appearing in the input sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-min", + "examples": [ + { + "output": "5", + "command": "min( (5,10,15) )" + } + ], + "name": "min()", + "output": "any?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "sequence" + } + ], + "description": "Returns $arg if it contains one or more items. Otherwise, raises an error.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-one-or-more", + "examples": [ + { + "output": "('release','11')", + "command": "one-or-more( ('release','11') )" + } + ], + "name": "one-or-more()", + "output": "item+" + }, + { + "arguments": [ + { + "name": "$nodes", + "description": "input nodes", + "type": "node()*" + } + ], + "description": "Returns every node within the input sequence that has no ancestor that is itself a member of the input sequence; the nodes are returned in document order with duplicates eliminated.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-outermost", + "examples": [ + { + "output": "node with childrens", + "command": "outermost(//u:UserList[1]/u:User[1])" + } + ], + "name": "outermost()", + "output": "node()*" + }, + { + "arguments": [], + "description": "Returns the context position from the dynamic context.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-position", + "examples": [ + { + "command": "//u:UserList[position() = 2]", + "output": "UserList with index 2" + } + ], + "name": "position()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$position", + "type": "integer", + "description": "position where insert data" + }, + { + "name": "$target", + "description": "base sequence", + "type": "item()*" + } + ], + "description": "Returns a new sequence containing all the items of $target except the item at position $position.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-remove", + "examples": [ + { + "output": "First UserList witout second User", + "command": "remove(//u:UserList[1]/*,2)" + } + ], + "name": "remove()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "base sequence", + "type": "item()*" + } + ], + "description": "Reverses the order of items in a sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-reverse", + "examples": [ + { + "command": "reverse(//u:UserList[1]/*)", + "output": "Users from first UserList, but in reversed order(from Id=4 to Id=1)" + } + ], + "name": "reverse()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$length", + "type": "double", + "description": "lenght to subsequence" + }, + { + "name": "$startingLoc", + "type": "double", + "description": "starting location" + }, + { + "name": "$surceSeq", + "description": "base sequence", + "type": "item()*" + } + ], + "description": "Returns the contiguous sequence of items in the value of $sourceSeq beginning at the position indicated by the value of $startingLoc and continuing for the number of items indicated by the value of $length.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-subsequence", + "examples": [ + { + "command": "subsequence(//u:UserList[1]/*,3,1)", + "output": "User on position 3" + } + ], + "name": "subsequence()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "any()*", + "description": "sequence" + }, + { + "name": "$zero", + "type": "any?", + "description": "value to return when sum is 0" + } + ], + "description": "Returns a value obtained by adding together the values in $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-sum", + "examples": [ + { + "output": "30", + "command": "sum( (5,10,15) )" + } + ], + "name": "sum()", + "output": "any?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "input items", + "type": "item()*" + } + ], + "description": "Returns all but the first item in a sequence", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-tail", + "examples": [ + { + "command": "tail(//u:UserList)", + "output": "UserList items without first element" + } + ], + "name": "tail()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$surceSeq", + "description": "base sequence", + "type": "item()*" + } + ], + "description": "Returns the items of $sourceSeq in an implementation dependent order.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-unordered", + "examples": [ + { + "command": "unordered(//u:UserList[1]/*)", + "output": "Users from UserList" + } + ], + "name": "unordered()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "sequence" + } + ], + "description": "Returns $arg if it contains zero or one items. Otherwise, raises an error.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-zero-or-one", + "examples": [ + { + "output": "raises an error", + "command": "zero-or-one( ('release','11') )" + } + ], + "name": "zero-or-one()", + "output": "item?" + } + ], + "name": "Collections" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + }, + { + "name": "$timezone", + "type": "dayTimeDuration?", + "description": "timezone" + } + ], + "description": "Adjusts an xs:date value to a specific timezone, or to no timezone at all; the result is the date in the target timezone that contains the starting instant of the supplied date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-adjust-date-to-timezone", + "examples": [ + { + "output": "2002-03-07-10:00", + "command": "adjust-date-to-timezone(xs:date(\"2002-03-07\"), $tz-10)" + } + ], + "name": "adjust-date-to-timezone()", + "output": "date?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "datetime", + "type": "datetime?" + }, + { + "name": "$timezone", + "type": "dayTimeDuration?", + "description": "timezone" + } + ], + "description": "Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-adjust-dateTime-to-timezone", + "examples": [ + { + "command": "adjust-dateTime-to-timezone(xs:dateTime('2002-03-07T10:00:00'), $tz-10)", + "output": "dateTime('2002-03-07T10:00:00-10:00')" + } + ], + "name": "adjust-dateTime-to-timezone()", + "output": "dateTime?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "time", + "type": "time?" + }, + { + "name": "$timezone", + "type": "dayTimeDuration?", + "description": "timezone" + } + ], + "description": "Adjusts an xs:time value to a specific timezone, or to no timezone at all.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-adjust-time-to-timezone", + "examples": [ + { + "output": "10:00:00-10:00", + "command": "adjust-time-to-timezone(xs:time(\"10:00:00\"), $tz-10)" + } + ], + "name": "adjust-time-to-timezone()", + "output": "time?" + }, + { + "arguments": [], + "description": "Returns the current date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-current-date", + "examples": [ + { + "output": "2023-08-17Z", + "command": "current-date()" + } + ], + "name": "current-date()", + "output": "date" + }, + { + "arguments": [], + "description": "Returns the current date and time (with timezone).", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-current-dateTime", + "examples": [ + { + "output": "2023-08-17T10:34:53.526001419Z", + "command": "current-dateTime()" + } + ], + "name": "current-dateTime()", + "output": "dateTimeStamp" + }, + { + "arguments": [], + "description": "Returns the current time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-current-time", + "examples": [ + { + "output": "10:36:53.154103936Z", + "command": "current-time()" + } + ], + "name": "current-time()", + "output": "time" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + }, + { + "name": "$arg2", + "description": "time", + "type": "time?" + } + ], + "description": "Returns an xs:dateTime value created by combining an xs:date and an xs:time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-dateTime", + "examples": [ + { + "output": "1999-12-31T12:00:00", + "command": "dateTime(xs:date(\"1999-12-31\"), xs:time(\"12:00:00\"))" + } + ], + "name": "dateTime()", + "output": "dateTime" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + } + ], + "description": "Returns the day component of an xs:date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-day-from-date", + "examples": [ + { + "output": "31", + "command": "day-from-date(xs:date(\"1999-05-31\"))" + } + ], + "name": "day-from-date()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the day component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-day-from-dateTime", + "examples": [ + { + "output": "31", + "command": "day-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))" + } + ], + "name": "day-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of days in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-days-from-duration", + "examples": [ + { + "output": "3", + "command": "days-from-duration(xs:yearMonthDuration(\"P3DT10H\"))" + } + ], + "name": "days-from-duration()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$calendar", + "description": "calendar", + "type": "string?" + }, + { + "name": "$language", + "description": "language", + "type": "string?" + }, + { + "name": "$picture", + "description": "picture", + "type": "string?" + }, + { + "name": "$place", + "description": "place", + "type": "string?" + }, + { + "name": "$value", + "description": "date", + "type": "date?" + } + ], + "description": "Returns a string containing an xs:date value formatted for display.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-format-date", + "examples": [], + "name": "format-date()", + "output": "string?" + }, + { + "arguments": [ + { + "name": "$calendar", + "description": "calendar", + "type": "string?" + }, + { + "name": "$language", + "description": "language", + "type": "string?" + }, + { + "name": "$picture", + "description": "picture", + "type": "string?" + }, + { + "name": "$place", + "description": "place", + "type": "string?" + }, + { + "name": "$value", + "description": "datetime", + "type": "dateTime?" + } + ], + "description": "Returns a string containing an xs:dateTime value formatted for display.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-format-dateTime", + "examples": [], + "name": "format-dateTime()", + "output": "string?" + }, + { + "arguments": [ + { + "name": "$calendar", + "description": "calendar", + "type": "string?" + }, + { + "name": "$language", + "description": "language", + "type": "string?" + }, + { + "name": "$picture", + "description": "picture", + "type": "string?" + }, + { + "name": "$place", + "description": "place", + "type": "string?" + }, + { + "name": "$value", + "description": "time", + "type": "time?" + } + ], + "description": "RReturns a string containing an xs:time value formatted for display.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-format-time", + "examples": [], + "name": "format-time()", + "output": "string?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the hours component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-hours-from-dateTime", + "examples": [ + { + "output": "13", + "command": "hours-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))" + } + ], + "name": "hours-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of hours in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-days-from-duration", + "examples": [ + { + "output": "10", + "command": "days-from-duration(xs:yearMonthDuration(\"P3DT10H\"))" + } + ], + "name": "hours-from-duration()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "time", + "type": "time?" + } + ], + "description": "Returns the hours component of an xs:time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-hours-from-time", + "examples": [ + { + "output": "21", + "command": "hours-from-time(xs:time(\"21:37:37\"))" + } + ], + "name": "hours-from-time()", + "output": "integer?" + }, + { + "arguments": [], + "description": "Returns the value of the implicit timezone property from the dynamic context.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-implicit-timezone", + "examples": [ + { + "command": "implicit-timezone()", + "output": "PT0S" + } + ], + "name": "implicit-timezone()", + "output": "dayTimeDuration" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the minutes component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-minutes-from-dateTime", + "examples": [ + { + "output": "20", + "command": "minutes-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))" + } + ], + "name": "minutes-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of minutes in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-minutes-from-duration", + "examples": [ + { + "output": "0", + "command": "minutes-from-duration(xs:yearMonthDuration(\"P3DT10H\"))" + } + ], + "name": "minutes-from-duration()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "time", + "type": "time?" + } + ], + "description": "Returns the minutes component of an xs:time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-minutes-from-time", + "examples": [ + { + "output": "37", + "command": "minutes-from-time(xs:time(\"21:37:37\"))" + } + ], + "name": "minutes-from-time()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + } + ], + "description": "Returns the month component of an xs:date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-month-from-date", + "examples": [ + { + "output": "5", + "command": "month-from-date(xs:date(\"1999-05-31\"))" + } + ], + "name": "month-from-date()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the month component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-month-from-dateTime", + "examples": [ + { + "output": "5", + "command": "month-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))" + } + ], + "name": "month-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of months in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-months-from-duration", + "examples": [ + { + "output": "3", + "command": "months-from-duration(xs:yearMonthDuration(\"P20Y15M\"))" + } + ], + "name": "months-from-duration()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the seconds component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-seconds-from-dateTime", + "examples": [ + { + "output": "1", + "command": "seconds-from-dateTime(xs:dateTime(\"1999-05-31T13:20:01-05:00\"))" + } + ], + "name": "seconds-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of seconds in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-seconds-from-duration", + "examples": [ + { + "output": "12.5", + "command": "seconds-from-duration(xs:yearMonthDuration(\"P3DT10H12.5S\"))" + } + ], + "name": "seconds-from-duration()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "time", + "type": "time?" + } + ], + "description": "Returns the seconds component of an xs:time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-seconds-from-time", + "examples": [ + { + "output": "37", + "command": "seconds-from-time(xs:time(\"21:37:37\"))" + } + ], + "name": "seconds-from-time()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + } + ], + "description": "Returns the timezone component of an xs:date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-timezone-from-date", + "examples": [ + { + "output": "-PT5H", + "command": "timezone-from-date(xs:date(\"1999-05-31-05:00\"))" + } + ], + "name": "timezone-from-date()", + "output": "dayTimeDuration?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the timezone component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-timezone-from-dateTime", + "examples": [ + { + "output": "-PT5H", + "command": "timezone-from-dateTime(xs:dateTime(\"1999-05-31T13:20:01-05:00\"))" + } + ], + "name": "timezone-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "time", + "type": "time?" + } + ], + "description": "Returns the timezone component of an xs:time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-timezone-from-time", + "examples": [ + { + "output": "-PT5H", + "command": "timezone-from-time(xs:time(\"21:37:37-05:00\"))" + } + ], + "name": "timezone-from-time()", + "output": "dayTimeDuration?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + } + ], + "description": "Returns the year component of an xs:date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-year-from-date", + "examples": [ + { + "output": "1999", + "command": "year-from-date(xs:date(\"1999-05-31\"))" + } + ], + "name": "year-from-date()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the year component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-year-from-dateTime", + "examples": [ + { + "output": "1999", + "command": "year-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))" + } + ], + "name": "year-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of years in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-years-from-duration", + "examples": [ + { + "output": "21", + "command": "years-from-duration(xs:yearMonthDuration(\"P20Y15M\"))" + } + ], + "name": "years-from-duration()", + "output": "integer" + } + ], + "name": "Date/Time" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$code", + "description": "Error code", + "type": "QName" + }, + { + "name": "$description", + "description": "Error description", + "type": "string" + }, + { + "name": "$eror-object", + "description": "Arbitrary value used to convey additional information about the error", + "type": "item()*" + } + ], + "description": "Calling the error function raises an application-defined error.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-error", + "examples": [ + { + "output": "Error signalled by application call on error()", + "command": "error()" + } + ], + "name": "error()", + "output": "Throws an error" + }, + { + "arguments": [ + { + "name": "$label", + "type": "string", + "description": "The label to put in tracing data" + }, + { + "name": "$value", + "type": "item()*", + "description": "The value to returns unchanged" + } + ], + "description": "Provides an execution trace intended to be used in debugging queries.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-trace", + "examples": [ + { + "output": "Returns data, if something changes returns label with value", + "command": "trace(//u:UserList[1]/u:User[last()]/u:DateOfDeath, 'the value is:')" + } + ], + "name": "trace()", + "output": "item()*" + } + ], + "name": "Error" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$f", + "description": "function to apply on every item in source collection", + "type": "function(item()*)" + }, + { + "name": "$seq", + "type": "item()*", + "description": "source collection" + } + ], + "description": "Returns those items from the sequence $seq for which the supplied function $f returns true.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-filter", + "examples": [ + { + "output": "(2, 4, 6, 8, 10)", + "command": "filter(1 to 10, function($a) {$a mod 2 = 0})" + } + ], + "name": "filter()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$f", + "description": "function to apply on item in squence", + "type": "function(item()*)" + }, + { + "name": "$seq", + "type": "item()*", + "description": "source collection" + }, + { + "name": "$zero", + "description": "if source collection is empty", + "type": "item()*" + } + ], + "description": "Processes the supplied sequence from left to right, applying the supplied function repeatedly to each item in turn, together with an accumulated result value.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-fold-left", + "examples": [ + { + "output": "210", + "command": "fold-left((2,3,5,7), 1, function($a, $b) { $a * $b })" + } + ], + "name": "fold-left()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$f", + "description": "function to apply on item in squence", + "type": "function(item()*)" + }, + { + "name": "$seq", + "type": "item()*", + "description": "source collection" + }, + { + "name": "$zero", + "description": "if source collection is empty", + "type": "item()*" + } + ], + "description": "Processes the supplied sequence from right to left, applying the supplied function repeatedly to each item in turn, together with an accumulated result value.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-fold-right", + "examples": [ + { + "output": "210", + "command": "fold-right((2,3,5,7), 1, function($a, $b) { $a * $b })" + } + ], + "name": "fold-right()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$f", + "description": "function to apply on every item in source collection", + "type": "function(item()*)" + }, + { + "name": "$seq", + "type": "item()*", + "description": "source collection" + } + ], + "description": "Applies the function item $f to every item from the sequence $seq in turn, returning the concatenation of the resulting sequences in order.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-for-each", + "examples": [ + { + "output": "(1, 4, 9, 16, 25)", + "command": "for-each(1 to 5, function($a) { $a * $a })" + } + ], + "name": "for-each()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$f", + "description": "function to apply on items in squence", + "type": "function(item()*)" + }, + { + "name": "$seq1", + "description": "first sequence", + "type": "item()*" + }, + { + "name": "$seq2", + "type": "item()*", + "description": "second sequence" + } + ], + "description": "Applies the function item $f to successive pairs of items taken one from $seq1 and one from $seq2, returning the concatenation of the resulting sequences in order.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-for-each-pair", + "examples": [ + { + "output": "(\"ax\", \"by\", \"cz\")", + "command": "for-each-pair((\"a\", \"b\", \"c\"), (\"x\", \"y\", \"z\"), concat#2)" + } + ], + "name": "for-each-pair()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$func", + "description": "function", + "type": "function(*)" + } + ], + "description": "Returns the arity of the function identified by a function item.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-function-arity", + "examples": [ + { + "output": "2", + "command": "function-arity(substring#2)" + } + ], + "name": "function-arity()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arity", + "type": "integer", + "description": "number of arguments" + }, + { + "name": "$name", + "description": "function Name", + "type": "QName" + } + ], + "description": "Returns the function having a given name and arity, if there is one.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-function-lookup", + "examples": [], + "name": "function-lookup()", + "output": "function(*)?" + }, + { + "arguments": [ + { + "name": "$func", + "description": "function", + "type": "function(*)" + } + ], + "description": "Returns the name of the function identified by a function item.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-function-name", + "examples": [ + { + "output": "fn:substring", + "command": "function-name(substring#2)" + } + ], + "name": "function-name()", + "output": "QName?" + } + ], + "name": "Loop/Conditional" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$paramQName", + "type": "QName parameter" + }, + { + "name": "$paramURI", + "type": "string?", + "description": "URI Parameter" + } + ], + "description": "Constructs an xs:QName value given a namespace URI and a lexical QName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-QName", + "examples": [ + { + "command": "QName(\"http://www.release11.com/schemas/Sample.xsd\", \"u:User\")", + "output": "u:User" + } + ], + "name": "QName()", + "output": "QName" + }, + { + "arguments": [], + "description": "Returns a list of environment variable names that are suitable for passing to environment-variable()", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-available-environment-variables", + "examples": [ + { + "output": "('PATH','HOSTNAME','JAVA_HOME','PWD','JAVA_VERSION','LANG','HOME')", + "command": "available-environment-variables()" + } + ], + "name": "available-environment-variables()", + "output": "string()*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "collection uri", + "type": "string()?" + } + ], + "description": "Returns a sequence of nodes representing a collection of documents indentified by a collection URI; or a default collection if no URI is supplied.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-collection", + "examples": [ + { + "command": "collection()", + "output": "No default collection has been defined" + } + ], + "name": "collection()", + "output": "boolean" + }, + { + "arguments": [], + "description": "Returns the value of the default collation property from the static context.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-default-collation", + "examples": [ + { + "command": "default-collation()", + "output": "http://www.w3.org/2005/xpath-functions/collation/codepoint" + } + ], + "name": "default-collation()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$uri", + "type": "string()?", + "description": "URI" + } + ], + "description": "Retrieves a document using a URI supplied as an xs:string, and returns the corresponding document node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-doc", + "examples": [ + { + "command": "doc(\"\")", + "output": "xml source" + } + ], + "name": "doc()", + "output": "document-node?" + }, + { + "arguments": [ + { + "name": "$uri", + "type": "string()?", + "description": "URI" + } + ], + "description": "The function returns true if and only if the function call fn:doc($uri) would return a document node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-doc-available", + "examples": [ + { + "command": "doc-available(\"http://api.nbp.pl/api/cenyzlota/today\")", + "output": "false" + } + ], + "name": "doc-available()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$uri-part", + "type": "string?", + "description": "uri part" + } + ], + "description": "Encodes reserved characters in a string that is intended to be used in the path segment of a URI.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-encode-for-uri", + "examples": [ + { + "command": "encode-for-uri(\"release 11 tools\")", + "output": "release%2011%20tools" + } + ], + "name": "encode-for-uri()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$name", + "description": "enviroment variable name", + "type": "string" + } + ], + "description": "Returns the value of a system environment variable, if it exists.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-environment-variable", + "examples": [ + { + "output": "C.UTF-8", + "command": "environment-variable(\"LANG\")" + } + ], + "name": "environment-variable()", + "output": "string()?" + }, + { + "arguments": [ + { + "name": "$uri", + "type": "string?", + "description": "uri" + } + ], + "description": "Escapes a URI in the same way that HTML user agents handle attribute values expected to contain URIs.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-escape-html-uri", + "examples": [ + { + "command": "escape-html-uri (\"http://www.example.com/00/Weather/CA/Los Angeles#ocean\")", + "output": "http://www.example.com/00/Weather/CA/Los Angeles#ocean" + } + ], + "name": "escape-html-uri()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$element", + "type": "element()", + "description": "scope to get prefix from" + } + ], + "description": "Returns the prefixes of the in-scope namespaces for an element node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-in-scope-prefixes", + "examples": [ + { + "output": "('u','xsi','xml')", + "command": "in-scope-prefixes(//u:UserList[1])" + } + ], + "name": "in-scope-prefixes()", + "output": "string*" + }, + { + "arguments": [ + { + "name": "$iri", + "description": "iri", + "type": "string?" + } + ], + "description": "Converts a string containing an IRI into a URI", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-iri-to-uri", + "examples": [ + { + "output": "http://tools.release11.com/?xpath&%20some%20additional%20data", + "command": "iri-to-uri(\"http://tools.release11.com/?xpath& some additional data\")" + } + ], + "name": "iri-to-uri()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$node", + "description": "node to test", + "type": "node()?" + }, + { + "name": "$testlang", + "description": "language", + "type": "string()?" + } + ], + "description": "This function tests whether the language of $node, or the context item if the second argument is omitted, as specified by xml:lang attributes is the same as, or is a sublanguage of, the language specified by $testlang.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-lang", + "examples": [ + { + "output": "false", + "command": "lang('pl',//u:UserList[1])" + } + ], + "name": "lang()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "QName", + "type": "QName?" + } + ], + "description": "Returns the local part of the supplied QName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-local-name-from-QName", + "examples": [ + { + "command": "local-name-from-QName(xs:QName(\"u:User\"))", + "output": "User" + } + ], + "name": "local-name-from-QName()", + "output": "NCName" + }, + { + "arguments": [ + { + "name": "$element", + "description": "element where namespace exist", + "type": "element()" + }, + { + "name": "$prefix", + "description": "namespace prefix", + "type": "string?" + } + ], + "description": "Returns the namespace URI of one of the in-scope namespaces for $element, identified by its namespace prefix.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-namespace-uri-for-prefix", + "examples": [ + { + "output": "http://www.release11.com/schemas/Sample.xsd", + "command": "namespace-uri-for-prefix(\"u\",//u:UserList[1])" + } + ], + "name": "namespace-uri-for-prefix()", + "output": "URI?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "QName", + "type": "QName?" + } + ], + "description": "Returns the namespace URI part of the supplied QName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-namespace-uri-from-QName", + "examples": [ + { + "output": "http://www.release11.com/schemas/Sample.xsd", + "command": "namespace-uri-from-QName(xs:QName(\"u:User\"))" + } + ], + "name": "namespace-uri-from-QName()", + "output": "URI?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "string?", + "description": "XML String" + } + ], + "description": "This function takes as input an XML document represented as a string, and returns the document node at the root of an XDM tree representing the parsed document.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-parse-xml", + "examples": [ + { + "command": "parse-xml(unparsed-text('http://api.nbp.pl/api/cenyzlota/today?format=xml'))", + "output": "Parsed as XML data from NBP Api" + } + ], + "name": "parse-xml()", + "output": "document-node(element(*))?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "string?", + "description": "XML Fragment String" + } + ], + "description": "This function takes as input an XML external entity represented as a string, and returns the document node at the root of an XDM tree representing the parsed document fragment.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-parse-xml-fragment", + "examples": [ + { + "output": "data XML, but as XML Document", + "command": "parse-xml-fragment('hello')" + } + ], + "name": "parse-xml-fragment()", + "output": "document-node()?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "QName", + "type": "QName?" + } + ], + "description": "Returns the prefix component of the supplied QName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-prefix-from-QName", + "examples": [ + { + "command": "prefix-from-QName(xs:QName(\"u:User\"))", + "output": "u" + } + ], + "name": "prefix-from-QName()", + "output": "NCName" + }, + { + "arguments": [ + { + "name": "$element", + "type": "element" + }, + { + "name": "$qname", + "description": "qname", + "type": "string?" + } + ], + "description": "Returns an xs:QName value (that is, an expanded-QName) by taking an xs:string that has the lexical form of an xs:QName", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-resolve-QName", + "examples": [ + { + "output": "hello", + "command": "resolve-QName(\"hello\", //u:UserList[1]/u:User[1]/u:Name)" + } + ], + "name": "resolve-QName()", + "output": "QName" + }, + { + "arguments": [ + { + "name": "$relative", + "description": "Source string", + "type": "string?" + } + ], + "description": "Resolves a relative IRI reference against an absolute IRI.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-resolve-uri", + "examples": [ + { + "command": " resolve-uri(\"u:User/u:Name\") ", + "output": "u:User/u:Name" + } + ], + "name": "resolve-uri()", + "output": "URI" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "input sequence", + "type": "item()*" + }, + { + "name": "$params", + "type": "element()?", + "description": "parameters" + } + ], + "description": "This function serializes the supplied input sequence $arg, returning the serialized representation of the sequence as a string.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-serialize", + "examples": [ + { + "output": "first users serialized to String", + "command": "serialize(//u:User[1])" + } + ], + "name": "serialize()", + "output": "string" + }, + { + "arguments": [], + "description": "This function returns the value of the Static Base URI property from the static context.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-static-base-uri", + "examples": [ + { + "output": "", + "command": "static-base-uri()" + } + ], + "name": "static-base-uri()", + "output": "URI" + }, + { + "arguments": [ + { + "name": "$encoding", + "description": "resource encoding", + "type": "string()?" + }, + { + "name": "$href", + "description": "external resource href", + "type": "string()?" + } + ], + "description": "Reads an external resource (for example, a file) and returns a string representation of the resource.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-unparsed-text", + "examples": [ + { + "command": "unparsed-text(\"https://api.nbp.pl/api/cenyzlota/today?format=xml\")", + "output": "XML data from nbp API" + } + ], + "name": "unparsed-text()", + "output": "string()?" + }, + { + "arguments": [ + { + "name": "$encoding", + "description": "resource encoding", + "type": "string()?" + }, + { + "name": "$href", + "description": "external resource href", + "type": "string()?" + } + ], + "description": "Because errors in evaluating the unparsed-text() function are non-recoverable, these two functions are provided to allow an application to determine whether a call with particular arguments would succeed", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available", + "examples": [ + { + "output": "true", + "command": "unparsed-text-available(\"https://api.nbp.pl/api/cenyzlota/today?format=xml\")" + } + ], + "name": "unparsed-text-available()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$encoding", + "description": "resource encoding", + "type": "string()?" + }, + { + "name": "$href", + "description": "external resource href", + "type": "string()?" + } + ], + "description": "reads an external resource (for example, a file) and returns its contents as a sequence of strings, one for each line of text in the string representation of the resource.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-lines", + "examples": [ + { + "command": "unparsed-text-lines(\"https://api.nbp.pl/api/cenyzlota/today?format=xml\")", + "output": "XML data from nbp API" + } + ], + "name": "unparsed-text-lines()", + "output": "string()*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "collection uri", + "type": "string()?" + } + ], + "description": "Returns a sequence of xs:anyURI values representing the URIs in a resource collection.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-uri-collection", + "examples": [ + { + "output": "No default collection has been defined", + "command": "uri-collection()" + } + ], + "name": "uri-collection()", + "output": "URI*" + } + ], + "name": "Misc" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$arg", + "description": "node to read base URI", + "type": "node()?" + } + ], + "description": "Returns the base URI of a node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-base-uri", + "examples": [ + { + "output": "", + "command": "base-uri()" + } + ], + "name": "base-uri()", + "output": "URI" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "items to get data from" + } + ], + "description": "Returns the result of atomizing a sequence, that is, replacing all nodes in the sequence by their typed values.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-data", + "examples": [ + { + "command": "data(//u:UserList[last()]/*[1])", + "output": "New \n \t Folder \n \t 2023-11-10" + } + ], + "name": "data()", + "output": "any" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read base URI", + "type": "node()?" + } + ], + "description": "Returns the URI of a resource where a document can be found, if available.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-document-uri", + "examples": [ + { + "output": "", + "command": "document-uri()" + } + ], + "name": "document-uri()", + "output": "URI" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "ID Value", + "type": "string*" + }, + { + "name": "$node", + "description": "node", + "type": "node?" + } + ], + "description": "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.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-element-with-id", + "examples": [], + "name": "element-with-id()", + "output": "element*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Node to generate id", + "type": "node?" + } + ], + "description": "This function returns a string that uniquely identifies a given node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-generate-id", + "examples": [ + { + "output": "d0e3", + "command": "generate-id(//u:UserList[1])" + } + ], + "name": "generate-id()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$node", + "description": "node to check children", + "type": "node()?" + } + ], + "description": "Returns true if the supplied node has one or more child nodes (of any kind).", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-has-children", + "examples": [ + { + "command": "has-children(//u:UserList[1])", + "output": "true" + } + ], + "name": "has-children()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "ID Value", + "type": "string*" + }, + { + "name": "$node", + "description": "node", + "type": "node?" + } + ], + "description": "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.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-id", + "examples": [], + "name": "id()", + "output": "element*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "ID Value", + "type": "string*" + }, + { + "name": "$node", + "description": "node", + "type": "node?" + } + ], + "description": "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", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-idref", + "examples": [], + "name": "idref()", + "output": "node*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read local name from", + "type": "node()?" + } + ], + "description": "Returns the local part of the name of $arg as an xs:string that is either the zero-length string, or has the lexical form of an xs:NCName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-local-name", + "examples": [ + { + "command": "local-name(//u:UserList[1])", + "output": "UserList" + } + ], + "name": "local-name()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read name from", + "type": "node()?" + } + ], + "description": "Returns the name of a node, as an xs:string that is either the zero-length string, or has the lexical form of an xs:QName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-name", + "examples": [ + { + "command": "name(//u:UserList[1])", + "output": "u:UserList" + } + ], + "name": "name()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read namespace uri from", + "type": "node()?" + } + ], + "description": "Returns the namespace URI part of the name of $arg, as an xs:anyURI value.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-namespace-uri", + "examples": [ + { + "output": "http://www.release11.com/schemas/Sample.xsd", + "command": "namespace-uri(//u:UserList[1])" + } + ], + "name": "namespace-uri()", + "output": "URI" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "node", + "description": "Node to check if nilled" + } + ], + "description": "Returns true for an element that is nilled", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-nilled", + "examples": [ + { + "output": "false", + "command": "nilled(/u:root)" + } + ], + "name": "nilled()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "node", + "description": "Node to getName from" + } + ], + "description": "Returns the name of a node", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-node-name", + "examples": [ + { + "command": "node-name(/u:root)", + "output": "u:root" + } + ], + "name": "node-name()", + "output": "QNname" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read path from", + "type": "node()?" + } + ], + "description": "Returns a path expression that can be used to select the supplied node relative to the root of its containing document.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-path", + "examples": [ + { + "output": "/Q{http://www.release11.com/schemas/Sample.xsd}root[1]/Q{http://www.release11.com/schemas/Sample.xsd}UserList[1]", + "command": "path(//u:UserList[1])" + } + ], + "name": "path()", + "output": "string()?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read namespace uri from", + "type": "node()?" + } + ], + "description": "Returns the root of the tree to which $arg belongs. This will usually, but not necessarily, be a document node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-root", + "examples": [], + "name": "root()", + "output": "node()?" + } + ], + "name": "Node-Set" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$arg", + "description": "Number to get absolute value from", + "type": "numeric?" + } + ], + "description": "Returns the absolute value of argument", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-abs", + "examples": [ + { + "output": "10.5", + "command": "abs(-10.5)" + } + ], + "name": "abs()", + "output": "numeric?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Number to round upwards", + "type": "numeric?" + } + ], + "description": "Rounds argument upwards to a whole number.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-ceiling", + "examples": [ + { + "output": "11", + "command": "ceiling(10.5)" + } + ], + "name": "ceiling()", + "output": "numeric?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Number to round downwards", + "type": "numeric?" + } + ], + "description": "Rounds argument downwards to a whole number.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-floor", + "examples": [ + { + "output": "10", + "command": "floor(10.5)" + } + ], + "name": "floor()", + "output": "numeric?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "any?", + "description": "Data to parse as number" + } + ], + "description": "Returns the value indicated by argument or, if argument is not specified, the context item after atomization, converted to an double.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-number", + "examples": [ + { + "output": "NaN", + "command": "number(//u:UserList[1]/u:User[1]/u:Name)" + }, + { + "output": "2137", + "command": "number(\"2137\")" + } + ], + "name": "number()", + "output": "double" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Number to round", + "type": "numeric?" + }, + { + "name": "$precision", + "type": "integer?", + "description": "precision for rounding" + } + ], + "description": "Rounds a value to a specified number of decimal places, rounding upwards if two such values are equally near.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-round", + "examples": [ + { + "output": "2", + "command": "round(2.49999)" + }, + { + "output": "1.13", + "command": "round(1.125,2)" + } + ], + "name": "round()", + "output": "numeric?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Number to round", + "type": "numeric?" + }, + { + "name": "$precision", + "type": "integer?", + "description": "precision for rounding" + } + ], + "description": "Rounds a value to a specified number of decimal places, rounding to make the last digit even if two such values are equally near.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-round-half-to-even", + "examples": [ + { + "output": "0", + "command": "round-half-to-even(0.5)" + }, + { + "output": "35600", + "command": "round-half-to-even(35612.25, -2)" + } + ], + "name": "round-half-to-even()", + "output": "numeric?" + } + ], + "name": "Numeric" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$flags", + "type": "string", + "description": "string to replace searched fragment with" + }, + { + "name": "$input", + "description": "Source string", + "type": "string?" + }, + { + "name": "$pattern", + "description": "regex", + "type": "string" + } + ], + "description": "Analyzes a string using a regular expression, returning an XML structure that identifies which parts of the input string matched or failed to match the regular expression, and in the case of matched substrings, which substrings matched each capturing group in the regular expression.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-analyze-string", + "examples": [ + { + "command": " analyze-string(\"A1,C15,,D24, X50,\", \"([A-Z])([0-9]+)\") ", + "output": "A1,C15,,D24, X50," + } + ], + "name": "analyze-string()", + "output": "element" + }, + { + "arguments": [ + { + "name": "$comparand1", + "description": "First comparand", + "type": "string?" + }, + { + "name": "$comparand2", + "description": "Second comparand", + "type": "string?" + } + ], + "description": "Returns true if two strings are equal, considered codepoint-by-codepoint.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-codepoint-equal", + "examples": [ + { + "command": "codepoint-equal(\"abcd\", \"abcd\")", + "output": "true" + }, + { + "command": "codepoint-equal(\"abcd\", \"abcd \")", + "output": "false" + } + ], + "name": "codepoint-equal()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Codepoints", + "type": "integer*" + } + ], + "description": "Creates an String from a sequence of codepoints.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-codepoints-to-string", + "examples": [ + { + "command": "codepoints-to-string(0)", + "output": "FOCH0001" + }, + { + "output": "( ͡° ͜ʖ ͡°)", + "command": "codepoints-to-string((40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41))" + } + ], + "name": "codepoints-to-string()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$collation", + "description": "Rules of collation", + "type": "string?" + }, + { + "name": "$comparand1", + "description": "First comparand", + "type": "string?" + }, + { + "name": "$comparand2", + "description": "Second comparand", + "type": "string?" + } + ], + "description": "Returns -1, 0, or 1, depending on whether $comparand1 collates before, equal to, or after $comparand2 according to the rules of a selected collation.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-compare", + "examples": [ + { + "output": "0", + "command": "compare('abc', 'abc')" + }, + { + "output": "1", + "command": "compare('Strassen', 'Straße')" + } + ], + "name": "compare()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg1", + "type": "any?", + "description": "First element to concat" + }, + { + "name": "$arg1", + "type": "any?", + "description": "Second element to concat" + }, + { + "name": "...", + "type": "any*", + "description": "Other elements to concat" + } + ], + "description": "Returns the concatenation of the string values of the arguments.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-concat", + "examples": [ + { + "command": "concat('un', 'grateful')", + "output": "ungrateful" + }, + { + "command": "concat('release11',' web',' tools')", + "output": "release11 web tools" + } + ], + "name": "concat()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Source string", + "type": "string?" + }, + { + "name": "$arg2", + "description": "searched string", + "type": "string?" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns true if the string $arg1 contains $arg2 as a substring, taking collations into account.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-contains", + "examples": [ + { + "command": "contains(\"release11Tools\",\"Tools\")", + "output": "true" + } + ], + "name": "contains()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Source string", + "type": "string?" + }, + { + "name": "$arg2", + "description": "searched string", + "type": "string?" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns true if the string $arg1 contains $arg2 as a trailing substring, taking collations into account.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-ends-with", + "examples": [ + { + "command": "ends-with(\"release11Tools\",\"ols\")", + "output": "true" + } + ], + "name": "ends-with()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$lang", + "description": "language to represent number", + "type": "string?" + }, + { + "name": "$picture", + "description": "format to represent number", + "type": "string" + }, + { + "name": "$value", + "description": "integer value to format", + "type": "integer?" + } + ], + "description": "Formats an integer according to a given picture string, using the conventions of a given natural language if specified.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-format-integer", + "examples": [ + { + "command": "format-integer(123, 'w')", + "output": "one hundred and twenty-three" + }, + { + "output": "21st", + "command": "format-integer(21, '1;o', 'en')" + } + ], + "name": "format-integer()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$decimal-format-name", + "description": "language to represent number", + "type": "string?" + }, + { + "name": "$picture", + "description": "format to represent number", + "type": "string" + }, + { + "name": "$value", + "description": "numeric value to format", + "type": "numeric?" + } + ], + "description": "Returns a string containing a number formatted according to a given picture string, taking account of decimal formats specified in the static context.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-format-number", + "examples": [ + { + "output": "12,345.60", + "command": "format-number(12345.6, '#,###.00')" + }, + { + "output": "-006", + "command": "format-number(-6, '000')" + } + ], + "name": "format-integer()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Source string", + "type": "string?" + } + ], + "description": "Converts a string to lower case.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-lower-case", + "examples": [ + { + "command": "lower-case(\"RELEASE11 TOOLS\")", + "output": "release11 tools" + } + ], + "name": "lower-case()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$flags", + "description": "regex flags", + "type": "string" + }, + { + "name": "$input", + "description": "Source string", + "type": "string?" + }, + { + "name": "$pattern", + "description": "regex", + "type": "string" + } + ], + "description": "Returns true if the supplied string matches a given regular expression.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-matches", + "examples": [ + { + "command": "matches(\"release11Tools\",\"^.*11T.*$\")", + "output": "true" + } + ], + "name": "matches()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Source string", + "type": "string?" + }, + { + "name": "$normalizationForm", + "description": "Normalization form", + "type": "string" + } + ], + "description": "Returns the value of $arg after applying Unicode normalization.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-normalize-unicode", + "examples": [ + { + "command": "normalize-unicode(\"release11Tools\",\"NFC\")", + "output": "release11Tools" + } + ], + "name": "normalize-unicode()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$input", + "description": "Source string", + "type": "string?" + }, + { + "name": "$pattern", + "description": "fragment to replace", + "type": "string" + }, + { + "name": "$replacement", + "type": "string", + "description": "string to replace searched fragment with" + } + ], + "description": "Returns a string produced from the input string by replacing any substrings that match a given regular expression with a supplied replacement string.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-replace", + "examples": [ + { + "output": "release 11 WebTools", + "command": "replace(\"release11Tools\",\"11T.*\",\" 11 WebTools\")" + } + ], + "name": "replace()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Source string", + "type": "string?" + }, + { + "name": "$arg2", + "description": "searched string", + "type": "string?" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns true if the string $arg1 contains $arg2 as a leading substring, taking collations into account.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-starts-with", + "examples": [ + { + "command": "starts-with(\"release11Tools\",\"rel\")", + "output": "true" + } + ], + "name": "starts-with()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item", + "description": "Item to represent as String" + } + ], + "description": "Returns the string value of an item", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-string", + "examples": [ + { + "output": "\"23\"", + "command": "string(23)" + }, + { + "output": "John", + "command": "string(/u:root/u:UserList[1]/u:User[last()]/u:Name)" + } + ], + "name": "string()", + "output": "String" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Stings to join", + "type": "string*" + }, + { + "name": "$arg2", + "description": "Separator", + "type": "string" + } + ], + "description": "Returns a string created by concatenating the items in a sequence, with a defined separator between adjacent items.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-concat", + "examples": [ + { + "output": "Now is the time ...", + "command": "string-join(('Now', 'is', 'the', 'time', '...'), ' ')" + }, + { + "output": "release11%%web%%tools", + "command": "string-join(('release11','web','tools'),'%%')" + } + ], + "name": "string-join()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Source string", + "type": "string?" + } + ], + "description": "Returns the number of characters in a string.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-string-length", + "examples": [ + { + "output": "45", + "command": "string-length(\"Harp not on that string, madam; that is past.\")" + }, + { + "output": "16", + "command": "string-length(\"Release 11 tools\")" + } + ], + "name": "string-length()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "String value", + "type": "string?" + } + ], + "description": "Returns the sequence of codepoints that constitute an string value.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-string-to-codepoints", + "examples": [ + { + "output": "(72, 101, 108, 108, 111)", + "command": "string-to-codepoints('Hello')" + }, + { + "output": "(40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41)", + "command": "string-to-codepoints('( ͡° ͜ʖ ͡°)')" + } + ], + "name": "string-to-codepoints()", + "output": "integer*" + }, + { + "arguments": [ + { + "name": "$length", + "type": "double", + "description": "length to substring" + }, + { + "name": "$sourceString", + "description": "Source string", + "type": "string?" + }, + { + "name": "$start", + "type": "double", + "description": "start index" + } + ], + "description": "Returns the portion of the value of $sourceString beginning at the position indicated by the value of $start and continuing for the number of ·characters· indicated by the value of $length.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-substring", + "examples": [ + { + "output": "car", + "command": "substring(\"motor car\", 6)" + }, + { + "output": "Release 11 tools <3", + "command": "substring(\"Release 11 tools <3 unnecesary words\",1,19)" + } + ], + "name": "substring()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Source string", + "type": "string?" + }, + { + "name": "$arg2", + "description": "searched string", + "type": "string?" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns the part of $arg1 that follows the first occurrence of $arg2, taking collations into account.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-substring-after", + "examples": [ + { + "output": "ease11Tools", + "command": "substring-after(\"release11Tools\",\"rel\")" + } + ], + "name": "substring-after()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Source string", + "type": "string?" + }, + { + "name": "$arg2", + "description": "searched string", + "type": "string?" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns the part of $arg1 that precedes the first occurrence of $arg2, taking collations into account.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-substring-before", + "examples": [ + { + "output": "release11To", + "command": "substring-before(\"release11Tools\",\"ols\")" + } + ], + "name": "substring-before()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$flags", + "type": "string", + "description": "string to replace searched fragment with" + }, + { + "name": "$input", + "description": "Source string", + "type": "string?" + }, + { + "name": "$pattern", + "description": "fragment to replace", + "type": "string" + } + ], + "description": "Returns a sequence of strings constructed by splitting the input wherever a separator is found; the separator is any substring that matches a given regular expression.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-tokenize", + "examples": [ + { + "output": "release\nTools", + "command": "tokenize(\"release11Tools\",\"11\")" + } + ], + "name": "tokenize()", + "output": "string*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Source string", + "type": "string?" + }, + { + "name": "$mapString", + "type": "string", + "description": "string to map" + }, + { + "name": "$transString", + "type": "string", + "description": "transition string" + } + ], + "description": "Returns the value of $arg modified by replacing or removing individual characters.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-translate", + "examples": [ + { + "output": "BAr", + "command": "translate(\"bar\",\"abc\",\"ABC\")" + } + ], + "name": "translate()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Source string", + "type": "string?" + } + ], + "description": "Converts a string to upper case.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-30/#func-upper-case", + "examples": [ + { + "output": "RELEASE11 TOOLS", + "command": "upper-case(\"release11 tools\")" + } + ], + "name": "upper-case()", + "output": "string" + } + ], + "name": "String" } ] \ No newline at end of file diff --git a/Frontend/src/assets/tooltips/xpath/xpath31.json b/Frontend/src/assets/tooltips/xpath/xpath31.json index 3f696bb..1f3d91f 100644 --- a/Frontend/src/assets/tooltips/xpath/xpath31.json +++ b/Frontend/src/assets/tooltips/xpath/xpath31.json @@ -1,40 +1,3328 @@ [ { - "name": "Number", "entries": [ { - "name": "sum", - "description": "The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number.", "arguments": [ { "name": "$arg", - "type": "node-set", - "description": "Data to sum" + "type": "item()*", + "description": "sequence of arguments" } ], - "output": "number", - "examples": [], - "documentationReferenceURL": "wwww.google.pl" - }, - { - "name": "floor", - "description": "The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.", - "arguments": [ - { - "name": "$arg", - "type": "number", - "description": "Data to round" - } - ], - "output": "number", + "description": "Computes the effective boolean value of the sequence $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-boolean", "examples": [ { - "command": "floor(3.6)", - "output": "3" + "command": "boolean(\"true\")", + "output": "true" } ], - "documentationReferenceURL": "wwww.google.pl" + "name": "boolean()", + "output": "boolean" + }, + { + "arguments": [], + "description": "Returns the xs:boolean value false.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-false", + "examples": [ + { + "output": "false", + "command": "false()" + } + ], + "name": "false()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "sequence of arguments" + } + ], + "description": "Returns true if the effective boolean value of $arg is false, or false if it is true", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-not", + "examples": [ + { + "output": "false", + "command": "not(\"true\")" + } + ], + "name": "not()", + "output": "boolean" + }, + { + "arguments": [], + "description": "Returns the xs:boolean value true.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-true", + "examples": [ + { + "output": "true", + "command": "true()" + } + ], + "name": "true()", + "output": "boolean" } - ] + ], + "name": "Boolean" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$arg", + "type": "any()*", + "description": "sequence" + } + ], + "description": "Returns the average of the values in the input sequence $arg, that is, the sum of the values divided by the number of values.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-avg", + "examples": [ + { + "output": "10", + "command": "avg( (5,10,15) )" + } + ], + "name": "avg()", + "output": "any?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "sequence" + } + ], + "description": "Returns the number of items in a sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-count", + "examples": [ + { + "output": "2", + "command": "count( ('release','11') )" + } + ], + "name": "count()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$collation", + "description": "collation", + "type": "string?" + }, + { + "name": "$parameter1", + "description": "first sequence", + "type": "item()*" + }, + { + "name": "$parameter2", + "type": "item()*", + "description": "second sequence" + } + ], + "description": "This function assesses whether two sequences are deep-equal to each other. To be deep-equal, they must contain items that are pairwise deep-equal", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-deep-equal", + "examples": [ + { + "command": "deep-equal( ('release','11') , ('release','11') )", + "output": "true" + } + ], + "name": "deep-equal()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "any()*", + "description": "base sequence" + }, + { + "name": "$collation", + "description": "collation", + "type": "string?" + } + ], + "description": "Returns the values that appear in a sequence, with duplicates eliminated.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-distinct-values", + "examples": [ + { + "output": "('release','11','tools')", + "command": "distinct-values(('release','release','11','tools'))" + } + ], + "name": "distinct-values()", + "output": "any()*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "input items", + "type": "item()*" + } + ], + "description": "Returns true if the argument is the empty sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-empty", + "examples": [ + { + "command": "empty(//u:UserList[1]/u:User[1111])", + "output": "true" + } + ], + "name": "empty()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "sequence" + } + ], + "description": "Returns $arg if it contains exactly one item. Otherwise, raises an error.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-exactly-one", + "examples": [ + { + "command": "exactly-one( ('release','11') )", + "output": "Raises an error" + } + ], + "name": "exactly-one()", + "output": "item" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "input items", + "type": "item()*" + } + ], + "description": "Returns true if the argument is a non-empty sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-empty", + "examples": [ + { + "command": "exists(//u:UserList[1]/u:User[1111])", + "output": "false" + } + ], + "name": "exists()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "input items", + "type": "item()*" + } + ], + "description": "Returns the first item in a sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-head", + "examples": [ + { + "output": "First item in UserList with childrens", + "command": "head(//u:UserList)" + } + ], + "name": "head()", + "output": "item()?" + }, + { + "arguments": [ + { + "name": "$collation", + "description": "collation", + "type": "string?" + }, + { + "name": "$search", + "type": "any", + "description": "item to find" + }, + { + "name": "$seq", + "type": "any()*", + "description": "base sequence" + } + ], + "description": "Returns a sequence of positive integers giving the positions within the sequence $seq of items that are equal to $search.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-index-of", + "examples": [ + { + "output": "(1,2)", + "command": "index-of(('release','release','11','tools'),'release')" + } + ], + "name": "index-of()", + "output": "integer*" + }, + { + "arguments": [ + { + "name": "$nodes", + "description": "input nodes", + "type": "node()*" + } + ], + "description": "Returns every node within the input sequence that is not an ancestor of another member of the input sequence; the nodes are returned in document order with duplicates eliminated.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-innermost", + "examples": [ + { + "command": "innermost(//u:UserList[1])", + "output": "node with childrens" + } + ], + "name": "innermost()", + "output": "node()*" + }, + { + "arguments": [ + { + "name": "$inserts", + "type": "item()*", + "description": "itemst to insert" + }, + { + "name": "$position", + "type": "integer", + "description": "position where insert data" + }, + { + "name": "$target", + "description": "base sequence", + "type": "item()*" + } + ], + "description": "Returns a sequence constructed by inserting an item or a sequence of items at a given position within an existing sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-insert-before", + "examples": [ + { + "output": "First UserList with 'hello' on the start", + "command": "insert-before(//u:UserList[1],1,\"hello\")" + } + ], + "name": "insert-before()", + "output": "item()*" + }, + { + "arguments": [], + "description": "Returns the context size from the dynamic context", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-last", + "examples": [ + { + "command": "//u:UserList[last()]", + "output": "Last UserList" + } + ], + "name": "last()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "any()*", + "description": "sequence" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns a value that is equal to the highest value appearing in the input sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-max", + "examples": [ + { + "output": "15", + "command": "max( (5,10,15) )" + } + ], + "name": "max()", + "output": "any?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "any()*", + "description": "sequence" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns a value that is equal to the lowest value appearing in the input sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-min", + "examples": [ + { + "output": "5", + "command": "min( (5,10,15) )" + } + ], + "name": "min()", + "output": "any?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "sequence" + } + ], + "description": "Returns $arg if it contains one or more items. Otherwise, raises an error.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-one-or-more", + "examples": [ + { + "output": "('release','11')", + "command": "one-or-more( ('release','11') )" + } + ], + "name": "one-or-more()", + "output": "item+" + }, + { + "arguments": [ + { + "name": "$nodes", + "description": "input nodes", + "type": "node()*" + } + ], + "description": "Returns every node within the input sequence that has no ancestor that is itself a member of the input sequence; the nodes are returned in document order with duplicates eliminated.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-outermost", + "examples": [ + { + "output": "node with childrens", + "command": "outermost(//u:UserList[1]/u:User[1])" + } + ], + "name": "outermost()", + "output": "node()*" + }, + { + "arguments": [], + "description": "Returns the context position from the dynamic context.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-position", + "examples": [ + { + "command": "//u:UserList[position() = 2]", + "output": "UserList with index 2" + } + ], + "name": "position()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$position", + "type": "integer", + "description": "position where insert data" + }, + { + "name": "$target", + "description": "base sequence", + "type": "item()*" + } + ], + "description": "Returns a new sequence containing all the items of $target except the item at position $position.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-remove", + "examples": [ + { + "output": "First UserList witout second User", + "command": "remove(//u:UserList[1]/*,2)" + } + ], + "name": "remove()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "base sequence", + "type": "item()*" + } + ], + "description": "Reverses the order of items in a sequence.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-reverse", + "examples": [ + { + "command": "reverse(//u:UserList[1]/*)", + "output": "Users from first UserList, but in reversed order(from Id=4 to Id=1)" + } + ], + "name": "reverse()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$collation", + "description": "collation", + "type": "string?" + }, + { + "name": "$input", + "type": "item()*", + "description": "source collection" + }, + { + "name": "$key", + "type": "function(item())*", + "description": "key sort function" + } + ], + "description": "Sorts a supplied sequence, based on the value of a sort key supplied as a function.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-sort", + "examples": [ + { + "output": "(1,-2,5,8,10,-10,10)", + "command": "sort((1, -2, 5, 10, -10, 10, 8), (), abs#1)" + } + ], + "name": "sort()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$length", + "type": "double", + "description": "lenght to subsequence" + }, + { + "name": "$startingLoc", + "type": "double", + "description": "starting location" + }, + { + "name": "$surceSeq", + "description": "base sequence", + "type": "item()*" + } + ], + "description": "Returns the contiguous sequence of items in the value of $sourceSeq beginning at the position indicated by the value of $startingLoc and continuing for the number of items indicated by the value of $length.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-subsequence", + "examples": [ + { + "command": "subsequence(//u:UserList[1]/*,3,1)", + "output": "User on position 3" + } + ], + "name": "subsequence()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "any()*", + "description": "sequence" + }, + { + "name": "$zero", + "type": "any?", + "description": "value to return when sum is 0" + } + ], + "description": "Returns a value obtained by adding together the values in $arg.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-sum", + "examples": [ + { + "output": "30", + "command": "sum( (5,10,15) )" + } + ], + "name": "sum()", + "output": "any?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "input items", + "type": "item()*" + } + ], + "description": "Returns all but the first item in a sequence", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-tail", + "examples": [ + { + "command": "tail(//u:UserList)", + "output": "UserList items without first element" + } + ], + "name": "tail()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$surceSeq", + "description": "base sequence", + "type": "item()*" + } + ], + "description": "Returns the items of $sourceSeq in an implementation dependent order.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-unordered", + "examples": [ + { + "command": "unordered(//u:UserList[1]/*)", + "output": "Users from UserList" + } + ], + "name": "unordered()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "sequence" + } + ], + "description": "Returns $arg if it contains zero or one items. Otherwise, raises an error.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-zero-or-one", + "examples": [ + { + "output": "raises an error", + "command": "zero-or-one( ('release','11') )" + } + ], + "name": "zero-or-one()", + "output": "item?" + } + ], + "name": "Collections" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + }, + { + "name": "$timezone", + "type": "dayTimeDuration?", + "description": "timezone" + } + ], + "description": "Adjusts an xs:date value to a specific timezone, or to no timezone at all; the result is the date in the target timezone that contains the starting instant of the supplied date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-adjust-date-to-timezone", + "examples": [ + { + "output": "2002-03-07-10:00", + "command": "adjust-date-to-timezone(xs:date(\"2002-03-07\"), $tz-10)" + } + ], + "name": "adjust-date-to-timezone()", + "output": "date?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "datetime", + "type": "datetime?" + }, + { + "name": "$timezone", + "type": "dayTimeDuration?", + "description": "timezone" + } + ], + "description": "Adjusts an xs:dateTime value to a specific timezone, or to no timezone at all.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-adjust-dateTime-to-timezone", + "examples": [ + { + "command": "adjust-dateTime-to-timezone(xs:dateTime('2002-03-07T10:00:00'), $tz-10)", + "output": "dateTime('2002-03-07T10:00:00-10:00')" + } + ], + "name": "adjust-dateTime-to-timezone()", + "output": "dateTime?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "time", + "type": "time?" + }, + { + "name": "$timezone", + "type": "dayTimeDuration?", + "description": "timezone" + } + ], + "description": "Adjusts an xs:time value to a specific timezone, or to no timezone at all.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-adjust-time-to-timezone", + "examples": [ + { + "output": "10:00:00-10:00", + "command": "adjust-time-to-timezone(xs:time(\"10:00:00\"), $tz-10)" + } + ], + "name": "adjust-time-to-timezone()", + "output": "time?" + }, + { + "arguments": [], + "description": "Returns the current date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-current-date", + "examples": [ + { + "output": "2023-08-17Z", + "command": "current-date()" + } + ], + "name": "current-date()", + "output": "date" + }, + { + "arguments": [], + "description": "Returns the current date and time (with timezone).", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-current-dateTime", + "examples": [ + { + "output": "2023-08-17T10:34:53.526001419Z", + "command": "current-dateTime()" + } + ], + "name": "current-dateTime()", + "output": "dateTimeStamp" + }, + { + "arguments": [], + "description": "Returns the current time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-current-time", + "examples": [ + { + "output": "10:36:53.154103936Z", + "command": "current-time()" + } + ], + "name": "current-time()", + "output": "time" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + }, + { + "name": "$arg2", + "description": "time", + "type": "time?" + } + ], + "description": "Returns an xs:dateTime value created by combining an xs:date and an xs:time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-dateTime", + "examples": [ + { + "output": "1999-12-31T12:00:00", + "command": "dateTime(xs:date(\"1999-12-31\"), xs:time(\"12:00:00\"))" + } + ], + "name": "dateTime()", + "output": "dateTime" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + } + ], + "description": "Returns the day component of an xs:date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-day-from-date", + "examples": [ + { + "output": "31", + "command": "day-from-date(xs:date(\"1999-05-31\"))" + } + ], + "name": "day-from-date()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the day component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-day-from-dateTime", + "examples": [ + { + "output": "31", + "command": "day-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))" + } + ], + "name": "day-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of days in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-days-from-duration", + "examples": [ + { + "output": "3", + "command": "days-from-duration(xs:yearMonthDuration(\"P3DT10H\"))" + } + ], + "name": "days-from-duration()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$calendar", + "description": "calendar", + "type": "string?" + }, + { + "name": "$language", + "description": "language", + "type": "string?" + }, + { + "name": "$picture", + "description": "picture", + "type": "string?" + }, + { + "name": "$place", + "description": "place", + "type": "string?" + }, + { + "name": "$value", + "description": "date", + "type": "date?" + } + ], + "description": "Returns a string containing an xs:date value formatted for display.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-format-date", + "examples": [], + "name": "format-date()", + "output": "string?" + }, + { + "arguments": [ + { + "name": "$calendar", + "description": "calendar", + "type": "string?" + }, + { + "name": "$language", + "description": "language", + "type": "string?" + }, + { + "name": "$picture", + "description": "picture", + "type": "string?" + }, + { + "name": "$place", + "description": "place", + "type": "string?" + }, + { + "name": "$value", + "description": "datetime", + "type": "dateTime?" + } + ], + "description": "Returns a string containing an xs:dateTime value formatted for display.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-format-dateTime", + "examples": [], + "name": "format-dateTime()", + "output": "string?" + }, + { + "arguments": [ + { + "name": "$calendar", + "description": "calendar", + "type": "string?" + }, + { + "name": "$language", + "description": "language", + "type": "string?" + }, + { + "name": "$picture", + "description": "picture", + "type": "string?" + }, + { + "name": "$place", + "description": "place", + "type": "string?" + }, + { + "name": "$value", + "description": "time", + "type": "time?" + } + ], + "description": "RReturns a string containing an xs:time value formatted for display.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-format-time", + "examples": [], + "name": "format-time()", + "output": "string?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the hours component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-hours-from-dateTime", + "examples": [ + { + "output": "13", + "command": "hours-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))" + } + ], + "name": "hours-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of hours in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-days-from-duration", + "examples": [ + { + "output": "10", + "command": "days-from-duration(xs:yearMonthDuration(\"P3DT10H\"))" + } + ], + "name": "hours-from-duration()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "time", + "type": "time?" + } + ], + "description": "Returns the hours component of an xs:time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-hours-from-time", + "examples": [ + { + "output": "21", + "command": "hours-from-time(xs:time(\"21:37:37\"))" + } + ], + "name": "hours-from-time()", + "output": "integer?" + }, + { + "arguments": [], + "description": "Returns the value of the implicit timezone property from the dynamic context.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-implicit-timezone", + "examples": [ + { + "command": "implicit-timezone()", + "output": "PT0S" + } + ], + "name": "implicit-timezone()", + "output": "dayTimeDuration" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the minutes component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-minutes-from-dateTime", + "examples": [ + { + "output": "20", + "command": "minutes-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))" + } + ], + "name": "minutes-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of minutes in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-minutes-from-duration", + "examples": [ + { + "output": "0", + "command": "minutes-from-duration(xs:yearMonthDuration(\"P3DT10H\"))" + } + ], + "name": "minutes-from-duration()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "time", + "type": "time?" + } + ], + "description": "Returns the minutes component of an xs:time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-minutes-from-time", + "examples": [ + { + "output": "37", + "command": "minutes-from-time(xs:time(\"21:37:37\"))" + } + ], + "name": "minutes-from-time()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + } + ], + "description": "Returns the month component of an xs:date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-month-from-date", + "examples": [ + { + "output": "5", + "command": "month-from-date(xs:date(\"1999-05-31\"))" + } + ], + "name": "month-from-date()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the month component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-month-from-dateTime", + "examples": [ + { + "output": "5", + "command": "month-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))" + } + ], + "name": "month-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of months in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-months-from-duration", + "examples": [ + { + "output": "3", + "command": "months-from-duration(xs:yearMonthDuration(\"P20Y15M\"))" + } + ], + "name": "months-from-duration()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the seconds component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-seconds-from-dateTime", + "examples": [ + { + "output": "1", + "command": "seconds-from-dateTime(xs:dateTime(\"1999-05-31T13:20:01-05:00\"))" + } + ], + "name": "seconds-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of seconds in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-seconds-from-duration", + "examples": [ + { + "output": "12.5", + "command": "seconds-from-duration(xs:yearMonthDuration(\"P3DT10H12.5S\"))" + } + ], + "name": "seconds-from-duration()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "time", + "type": "time?" + } + ], + "description": "Returns the seconds component of an xs:time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-seconds-from-time", + "examples": [ + { + "output": "37", + "command": "seconds-from-time(xs:time(\"21:37:37\"))" + } + ], + "name": "seconds-from-time()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + } + ], + "description": "Returns the timezone component of an xs:date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-timezone-from-date", + "examples": [ + { + "output": "-PT5H", + "command": "timezone-from-date(xs:date(\"1999-05-31-05:00\"))" + } + ], + "name": "timezone-from-date()", + "output": "dayTimeDuration?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the timezone component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-timezone-from-dateTime", + "examples": [ + { + "output": "-PT5H", + "command": "timezone-from-dateTime(xs:dateTime(\"1999-05-31T13:20:01-05:00\"))" + } + ], + "name": "timezone-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "time", + "type": "time?" + } + ], + "description": "Returns the timezone component of an xs:time.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-timezone-from-time", + "examples": [ + { + "output": "-PT5H", + "command": "timezone-from-time(xs:time(\"21:37:37-05:00\"))" + } + ], + "name": "timezone-from-time()", + "output": "dayTimeDuration?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "date?" + } + ], + "description": "Returns the year component of an xs:date.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-year-from-date", + "examples": [ + { + "output": "1999", + "command": "year-from-date(xs:date(\"1999-05-31\"))" + } + ], + "name": "year-from-date()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "date", + "type": "dateTime?" + } + ], + "description": "Returns the year component of an xs:dateTime.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-year-from-dateTime", + "examples": [ + { + "output": "1999", + "command": "year-from-dateTime(xs:dateTime(\"1999-05-31T13:20:00-05:00\"))" + } + ], + "name": "year-from-dateTime()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "duration", + "type": "duration()" + } + ], + "description": "Returns the number of years in a duration.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-years-from-duration", + "examples": [ + { + "output": "21", + "command": "years-from-duration(xs:yearMonthDuration(\"P20Y15M\"))" + } + ], + "name": "years-from-duration()", + "output": "integer" + } + ], + "name": "Date/Time" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$code", + "description": "Error code", + "type": "QName" + }, + { + "name": "$description", + "description": "Error description", + "type": "string" + }, + { + "name": "$eror-object", + "description": "Arbitrary value used to convey additional information about the error", + "type": "item()*" + } + ], + "description": "Calling the error function raises an application-defined error.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-error", + "examples": [ + { + "output": "Error signalled by application call on error()", + "command": "error()" + } + ], + "name": "error()", + "output": "Throws an error" + }, + { + "arguments": [ + { + "name": "$label", + "type": "string", + "description": "The label to put in tracing data" + }, + { + "name": "$value", + "type": "item()*", + "description": "The value to returns unchanged" + } + ], + "description": "Provides an execution trace intended to be used in debugging queries.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-trace", + "examples": [ + { + "output": "Returns data, if something changes returns label with value", + "command": "trace(//u:UserList[1]/u:User[last()]/u:DateOfDeath, 'the value is:')" + } + ], + "name": "trace()", + "output": "item()*" + } + ], + "name": "Error" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$array", + "description": "array of arguments", + "type": "array(*)" + }, + { + "name": "$function", + "description": "function to make call", + "type": "function(*)" + } + ], + "description": "Makes a dynamic call on a function with an argument list supplied in the form of an array. ", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-apply", + "examples": [ + { + "output": "abc", + "command": "apply(fn:concat#3, [\"a\", \"b\", \"c\"])" + } + ], + "name": "apply()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$f", + "description": "function to apply on every item in source collection", + "type": "function(item()*)" + }, + { + "name": "$seq", + "type": "item()*", + "description": "source collection" + } + ], + "description": "Returns those items from the sequence $seq for which the supplied function $f returns true.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-filter", + "examples": [ + { + "output": "(2, 4, 6, 8, 10)", + "command": "filter(1 to 10, function($a) {$a mod 2 = 0})" + } + ], + "name": "filter()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$f", + "description": "function to apply on item in squence", + "type": "function(item()*)" + }, + { + "name": "$seq", + "type": "item()*", + "description": "source collection" + }, + { + "name": "$zero", + "description": "if source collection is empty", + "type": "item()*" + } + ], + "description": "Processes the supplied sequence from left to right, applying the supplied function repeatedly to each item in turn, together with an accumulated result value.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-fold-left", + "examples": [ + { + "output": "210", + "command": "fold-left((2,3,5,7), 1, function($a, $b) { $a * $b })" + } + ], + "name": "fold-left()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$f", + "description": "function to apply on item in squence", + "type": "function(item()*)" + }, + { + "name": "$seq", + "type": "item()*", + "description": "source collection" + }, + { + "name": "$zero", + "description": "if source collection is empty", + "type": "item()*" + } + ], + "description": "Processes the supplied sequence from right to left, applying the supplied function repeatedly to each item in turn, together with an accumulated result value.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-fold-right", + "examples": [ + { + "output": "210", + "command": "fold-right((2,3,5,7), 1, function($a, $b) { $a * $b })" + } + ], + "name": "fold-right()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$f", + "description": "function to apply on every item in source collection", + "type": "function(item()*)" + }, + { + "name": "$seq", + "type": "item()*", + "description": "source collection" + } + ], + "description": "Applies the function item $f to every item from the sequence $seq in turn, returning the concatenation of the resulting sequences in order.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-for-each", + "examples": [ + { + "output": "(1, 4, 9, 16, 25)", + "command": "for-each(1 to 5, function($a) { $a * $a })" + } + ], + "name": "for-each()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$f", + "description": "function to apply on items in squence", + "type": "function(item()*)" + }, + { + "name": "$seq1", + "description": "first sequence", + "type": "item()*" + }, + { + "name": "$seq2", + "type": "item()*", + "description": "second sequence" + } + ], + "description": "Applies the function item $f to successive pairs of items taken one from $seq1 and one from $seq2, returning the concatenation of the resulting sequences in order.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-for-each-pair", + "examples": [ + { + "output": "(\"ax\", \"by\", \"cz\")", + "command": "for-each-pair((\"a\", \"b\", \"c\"), (\"x\", \"y\", \"z\"), concat#2)" + } + ], + "name": "for-each-pair()", + "output": "item()*" + }, + { + "arguments": [ + { + "name": "$func", + "description": "function", + "type": "function(*)" + } + ], + "description": "Returns the arity of the function identified by a function item.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-function-arity", + "examples": [ + { + "output": "2", + "command": "function-arity(substring#2)" + } + ], + "name": "function-arity()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arity", + "type": "integer", + "description": "number of arguments" + }, + { + "name": "$name", + "description": "function Name", + "type": "QName" + } + ], + "description": "Returns the function having a given name and arity, if there is one.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-function-lookup", + "examples": [], + "name": "function-lookup()", + "output": "function(*)?" + }, + { + "arguments": [ + { + "name": "$func", + "description": "function", + "type": "function(*)" + } + ], + "description": "Returns the name of the function identified by a function item.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-function-name", + "examples": [ + { + "output": "fn:substring", + "command": "function-name(substring#2)" + } + ], + "name": "function-name()", + "output": "QName?" + } + ], + "name": "Loop/Conditional" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$paramQName", + "type": "QName parameter" + }, + { + "name": "$paramURI", + "type": "string?", + "description": "URI Parameter" + } + ], + "description": "Constructs an xs:QName value given a namespace URI and a lexical QName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-QName", + "examples": [ + { + "command": "QName(\"http://www.release11.com/schemas/Sample.xsd\", \"u:User\")", + "output": "u:User" + } + ], + "name": "QName()", + "output": "QName" + }, + { + "arguments": [], + "description": "Returns a list of environment variable names that are suitable for passing to environment-variable()", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-available-environment-variables", + "examples": [ + { + "output": "('PATH','HOSTNAME','JAVA_HOME','PWD','JAVA_VERSION','LANG','HOME')", + "command": "available-environment-variables()" + } + ], + "name": "available-environment-variables()", + "output": "string()*" + }, + { + "arguments": [ + { + "name": "$collation", + "description": "Collation", + "type": "string?" + }, + { + "name": "$key", + "description": "Collation key string value", + "type": "string" + } + ], + "description": "Given a string value and a collation, generates an internal value called a collation key", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-collation-key", + "examples": [ + { + "output": "AAByAABhAABuAABkAABvAABtAABrAABlAAB5", + "command": "collation-key(\"randomkey\")" + } + ], + "name": "collation-key()", + "output": "base64binary" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "collection uri", + "type": "string()?" + } + ], + "description": "Returns a sequence of nodes representing a collection of documents indentified by a collection URI; or a default collection if no URI is supplied.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-collection", + "examples": [ + { + "command": "collection()", + "output": "No default collection has been defined" + } + ], + "name": "collection()", + "output": "boolean" + }, + { + "arguments": [], + "description": "Returns the value of the default collation property from the static context.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-default-collation", + "examples": [ + { + "command": "default-collation()", + "output": "http://www.w3.org/2005/xpath-functions/collation/codepoint" + } + ], + "name": "default-collation()", + "output": "string" + }, + { + "arguments": [], + "description": "Returns the value of the default language property from the dynamic context. ", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-default-language", + "examples": [ + { + "command": "default-language()", + "output": "en" + } + ], + "name": "default-language()", + "output": "language" + }, + { + "arguments": [ + { + "name": "$uri", + "type": "string()?", + "description": "URI" + } + ], + "description": "Retrieves a document using a URI supplied as an xs:string, and returns the corresponding document node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-doc", + "examples": [ + { + "command": "doc(\"\")", + "output": "xml source" + } + ], + "name": "doc()", + "output": "document-node?" + }, + { + "arguments": [ + { + "name": "$uri", + "type": "string()?", + "description": "URI" + } + ], + "description": "The function returns true if and only if the function call fn:doc($uri) would return a document node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-doc-available", + "examples": [ + { + "command": "doc-available(\"http://api.nbp.pl/api/cenyzlota/today\")", + "output": "false" + } + ], + "name": "doc-available()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$uri-part", + "type": "string?", + "description": "uri part" + } + ], + "description": "Encodes reserved characters in a string that is intended to be used in the path segment of a URI.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-encode-for-uri", + "examples": [ + { + "command": "encode-for-uri(\"release 11 tools\")", + "output": "release%2011%20tools" + } + ], + "name": "encode-for-uri()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$name", + "description": "enviroment variable name", + "type": "string" + } + ], + "description": "Returns the value of a system environment variable, if it exists.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-environment-variable", + "examples": [ + { + "output": "C.UTF-8", + "command": "environment-variable(\"LANG\")" + } + ], + "name": "environment-variable()", + "output": "string()?" + }, + { + "arguments": [ + { + "name": "$uri", + "type": "string?", + "description": "uri" + } + ], + "description": "Escapes a URI in the same way that HTML user agents handle attribute values expected to contain URIs.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-escape-html-uri", + "examples": [ + { + "command": "escape-html-uri (\"http://www.example.com/00/Weather/CA/Los Angeles#ocean\")", + "output": "http://www.example.com/00/Weather/CA/Los Angeles#ocean" + } + ], + "name": "escape-html-uri()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$element", + "type": "element()", + "description": "scope to get prefix from" + } + ], + "description": "Returns the prefixes of the in-scope namespaces for an element node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-in-scope-prefixes", + "examples": [ + { + "output": "('u','xsi','xml')", + "command": "in-scope-prefixes(//u:UserList[1])" + } + ], + "name": "in-scope-prefixes()", + "output": "string*" + }, + { + "arguments": [ + { + "name": "$iri", + "description": "iri", + "type": "string?" + } + ], + "description": "Converts a string containing an IRI into a URI", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-iri-to-uri", + "examples": [ + { + "output": "http://tools.release11.com/?xpath&%20some%20additional%20data", + "command": "iri-to-uri(\"http://tools.release11.com/?xpath& some additional data\")" + } + ], + "name": "iri-to-uri()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$href", + "description": "href to external JSON document", + "type": "string?" + }, + { + "name": "$options", + "description": "additional options", + "type": "map(*)" + } + ], + "description": "Reads an external resource containing JSON, and returns the result of parsing the resource as JSON.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-json-doc", + "examples": [ + { + "output": "[map{\"data\":\"2023-08-18\",\"cena\":2.5055e2}]", + "command": "json-doc('http://api.nbp.pl/api/cenyzlota/today?format=json')" + } + ], + "name": "json-doc()", + "output": "item()?" + }, + { + "arguments": [ + { + "name": "$json-text", + "description": "JSON string value", + "type": "string?" + }, + { + "name": "$options", + "description": "additional options", + "type": "map(*)" + } + ], + "description": "Parses a string supplied in the form of a JSON text, returning the results in the form of an XML document node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-json-to-xml", + "examples": [ + { + "output": "2023-08-182.5055e2", + "command": "json-to-xml('{\"data\":\"2023-08-18\",\"cena\":2.5055e2}')" + } + ], + "name": "json-to-xml()", + "output": "document-node()?" + }, + { + "arguments": [ + { + "name": "$node", + "description": "node to test", + "type": "node()?" + }, + { + "name": "$testlang", + "description": "language", + "type": "string()?" + } + ], + "description": "This function tests whether the language of $node, or the context item if the second argument is omitted, as specified by xml:lang attributes is the same as, or is a sublanguage of, the language specified by $testlang.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-lang", + "examples": [ + { + "output": "false", + "command": "lang('pl',//u:UserList[1])" + } + ], + "name": "lang()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "QName", + "type": "QName?" + } + ], + "description": "Returns the local part of the supplied QName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-local-name-from-QName", + "examples": [ + { + "command": "local-name-from-QName(xs:QName(\"u:User\"))", + "output": "User" + } + ], + "name": "local-name-from-QName()", + "output": "NCName" + }, + { + "arguments": [ + { + "name": "$element", + "description": "element where namespace exist", + "type": "element()" + }, + { + "name": "$prefix", + "description": "namespace prefix", + "type": "string?" + } + ], + "description": "Returns the namespace URI of one of the in-scope namespaces for $element, identified by its namespace prefix.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-namespace-uri-for-prefix", + "examples": [ + { + "output": "http://www.release11.com/schemas/Sample.xsd", + "command": "namespace-uri-for-prefix(\"u\",//u:UserList[1])" + } + ], + "name": "namespace-uri-for-prefix()", + "output": "URI?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "QName", + "type": "QName?" + } + ], + "description": "Returns the namespace URI part of the supplied QName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-namespace-uri-from-QName", + "examples": [ + { + "output": "http://www.release11.com/schemas/Sample.xsd", + "command": "namespace-uri-from-QName(xs:QName(\"u:User\"))" + } + ], + "name": "namespace-uri-from-QName()", + "output": "URI?" + }, + { + "arguments": [ + { + "name": "$json-text", + "type": "string?", + "description": "XML document" + }, + { + "name": "$options", + "description": "additional options", + "type": "map(*)?" + } + ], + "description": "Parses a string supplied in the form of a JSON text, returning the results typically in the form of a map or array.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-parse-json", + "examples": [], + "name": "parse-json()", + "output": "item()?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "string?", + "description": "XML String" + } + ], + "description": "This function takes as input an XML document represented as a string, and returns the document node at the root of an XDM tree representing the parsed document.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-parse-xml", + "examples": [ + { + "command": "parse-xml(unparsed-text('http://api.nbp.pl/api/cenyzlota/today?format=xml'))", + "output": "Parsed as XML data from NBP Api" + } + ], + "name": "parse-xml()", + "output": "document-node(element(*))?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "string?", + "description": "XML Fragment String" + } + ], + "description": "This function takes as input an XML external entity represented as a string, and returns the document node at the root of an XDM tree representing the parsed document fragment.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-parse-xml-fragment", + "examples": [ + { + "output": "data XML, but as XML Document", + "command": "parse-xml-fragment('hello')" + } + ], + "name": "parse-xml-fragment()", + "output": "document-node()?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "QName", + "type": "QName?" + } + ], + "description": "Returns the prefix component of the supplied QName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-prefix-from-QName", + "examples": [ + { + "command": "prefix-from-QName(xs:QName(\"u:User\"))", + "output": "u" + } + ], + "name": "prefix-from-QName()", + "output": "NCName" + }, + { + "arguments": [ + { + "name": "$element", + "type": "element" + }, + { + "name": "$qname", + "description": "qname", + "type": "string?" + } + ], + "description": "Returns an xs:QName value (that is, an expanded-QName) by taking an xs:string that has the lexical form of an xs:QName", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-resolve-QName", + "examples": [ + { + "output": "hello", + "command": "resolve-QName(\"hello\", //u:UserList[1]/u:User[1]/u:Name)" + } + ], + "name": "resolve-QName()", + "output": "QName" + }, + { + "arguments": [ + { + "name": "$relative", + "description": "Source string", + "type": "string?" + } + ], + "description": "Resolves a relative IRI reference against an absolute IRI.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-resolve-uri", + "examples": [ + { + "command": " resolve-uri(\"u:User/u:Name\") ", + "output": "u:User/u:Name" + } + ], + "name": "resolve-uri()", + "output": "URI" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "input sequence", + "type": "item()*" + }, + { + "name": "$params", + "type": "element()?", + "description": "parameters" + } + ], + "description": "This function serializes the supplied input sequence $arg, returning the serialized representation of the sequence as a string.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-serialize", + "examples": [ + { + "output": "first users serialized to String", + "command": "serialize(//u:User[1])" + } + ], + "name": "serialize()", + "output": "string" + }, + { + "arguments": [], + "description": "This function returns the value of the Static Base URI property from the static context.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-static-base-uri", + "examples": [ + { + "output": "", + "command": "static-base-uri()" + } + ], + "name": "static-base-uri()", + "output": "URI" + }, + { + "arguments": [ + { + "name": "$options", + "type": "map(*)", + "description": "XSLT transformation" + } + ], + "description": "Invokes a transformation using a dynamically-loaded XSLT stylesheet.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-transform", + "examples": [], + "name": "transform()", + "output": "map(*)" + }, + { + "arguments": [ + { + "name": "$encoding", + "description": "resource encoding", + "type": "string()?" + }, + { + "name": "$href", + "description": "external resource href", + "type": "string()?" + } + ], + "description": "Reads an external resource (for example, a file) and returns a string representation of the resource.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-unparsed-text", + "examples": [ + { + "command": "unparsed-text(\"https://api.nbp.pl/api/cenyzlota/today?format=xml\")", + "output": "XML data from nbp API" + } + ], + "name": "unparsed-text()", + "output": "string()?" + }, + { + "arguments": [ + { + "name": "$encoding", + "description": "resource encoding", + "type": "string()?" + }, + { + "name": "$href", + "description": "external resource href", + "type": "string()?" + } + ], + "description": "Because errors in evaluating the unparsed-text() function are non-recoverable, these two functions are provided to allow an application to determine whether a call with particular arguments would succeed", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-unparsed-text-available", + "examples": [ + { + "output": "true", + "command": "unparsed-text-available(\"https://api.nbp.pl/api/cenyzlota/today?format=xml\")" + } + ], + "name": "unparsed-text-available()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$encoding", + "description": "resource encoding", + "type": "string()?" + }, + { + "name": "$href", + "description": "external resource href", + "type": "string()?" + } + ], + "description": "reads an external resource (for example, a file) and returns its contents as a sequence of strings, one for each line of text in the string representation of the resource.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-unparsed-text-lines", + "examples": [ + { + "command": "unparsed-text-lines(\"https://api.nbp.pl/api/cenyzlota/today?format=xml\")", + "output": "XML data from nbp API" + } + ], + "name": "unparsed-text-lines()", + "output": "string()*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "collection uri", + "type": "string()?" + } + ], + "description": "Returns a sequence of xs:anyURI values representing the URIs in a resource collection.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-uri-collection", + "examples": [ + { + "output": "No default collection has been defined", + "command": "uri-collection()" + } + ], + "name": "uri-collection()", + "output": "URI*" + }, + { + "arguments": [ + { + "name": "$input", + "type": "node()?", + "description": "XML document" + }, + { + "name": "$options", + "description": "additional options", + "type": "map(*)" + } + ], + "description": "Converts an XML tree, whose format corresponds to the XML representation of JSON defined in this specification, into a string conforming to the JSON grammar.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-xml-to-json", + "examples": [], + "name": "xml-to-json()", + "output": "document-node()?" + } + ], + "name": "Misc" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$arg", + "description": "node to read base URI", + "type": "node()?" + } + ], + "description": "Returns the base URI of a node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-base-uri", + "examples": [ + { + "output": "", + "command": "base-uri()" + } + ], + "name": "base-uri()", + "output": "URI" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item()*", + "description": "items to get data from" + } + ], + "description": "Returns the result of atomizing a sequence, that is, replacing all nodes in the sequence by their typed values.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-data", + "examples": [ + { + "command": "data(//u:UserList[last()]/*[1])", + "output": "New \n \t Folder \n \t 2023-11-10" + } + ], + "name": "data()", + "output": "any" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read base URI", + "type": "node()?" + } + ], + "description": "Returns the URI of a resource where a document can be found, if available.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-document-uri", + "examples": [ + { + "output": "", + "command": "document-uri()" + } + ], + "name": "document-uri()", + "output": "URI" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "ID Value", + "type": "string*" + }, + { + "name": "$node", + "description": "node", + "type": "node?" + } + ], + "description": "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.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-element-with-id", + "examples": [], + "name": "element-with-id()", + "output": "element*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Node to generate id", + "type": "node?" + } + ], + "description": "This function returns a string that uniquely identifies a given node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-generate-id", + "examples": [ + { + "output": "d0e3", + "command": "generate-id(//u:UserList[1])" + } + ], + "name": "generate-id()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$node", + "description": "node to check children", + "type": "node()?" + } + ], + "description": "Returns true if the supplied node has one or more child nodes (of any kind).", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-has-children", + "examples": [ + { + "command": "has-children(//u:UserList[1])", + "output": "true" + } + ], + "name": "has-children()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "ID Value", + "type": "string*" + }, + { + "name": "$node", + "description": "node", + "type": "node?" + } + ], + "description": "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.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-id", + "examples": [], + "name": "id()", + "output": "element*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "ID Value", + "type": "string*" + }, + { + "name": "$node", + "description": "node", + "type": "node?" + } + ], + "description": "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", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-idref", + "examples": [], + "name": "idref()", + "output": "node*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read local name from", + "type": "node()?" + } + ], + "description": "Returns the local part of the name of $arg as an xs:string that is either the zero-length string, or has the lexical form of an xs:NCName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-local-name", + "examples": [ + { + "command": "local-name(//u:UserList[1])", + "output": "UserList" + } + ], + "name": "local-name()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read name from", + "type": "node()?" + } + ], + "description": "Returns the name of a node, as an xs:string that is either the zero-length string, or has the lexical form of an xs:QName.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-name", + "examples": [ + { + "command": "name(//u:UserList[1])", + "output": "u:UserList" + } + ], + "name": "name()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read namespace uri from", + "type": "node()?" + } + ], + "description": "Returns the namespace URI part of the name of $arg, as an xs:anyURI value.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-namespace-uri", + "examples": [ + { + "output": "http://www.release11.com/schemas/Sample.xsd", + "command": "namespace-uri(//u:UserList[1])" + } + ], + "name": "namespace-uri()", + "output": "URI" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "node", + "description": "Node to check if nilled" + } + ], + "description": "Returns true for an element that is nilled", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-nilled", + "examples": [ + { + "output": "false", + "command": "nilled(/u:root)" + } + ], + "name": "nilled()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "node", + "description": "Node to getName from" + } + ], + "description": "Returns the name of a node", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-node-name", + "examples": [ + { + "command": "node-name(/u:root)", + "output": "u:root" + } + ], + "name": "node-name()", + "output": "QNname" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read path from", + "type": "node()?" + } + ], + "description": "Returns a path expression that can be used to select the supplied node relative to the root of its containing document.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-path", + "examples": [ + { + "output": "/Q{http://www.release11.com/schemas/Sample.xsd}root[1]/Q{http://www.release11.com/schemas/Sample.xsd}UserList[1]", + "command": "path(//u:UserList[1])" + } + ], + "name": "path()", + "output": "string()?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "node to read namespace uri from", + "type": "node()?" + } + ], + "description": "Returns the root of the tree to which $arg belongs. This will usually, but not necessarily, be a document node.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-root", + "examples": [], + "name": "root()", + "output": "node()?" + } + ], + "name": "Node-Set" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$arg", + "description": "Number to get absolute value from", + "type": "numeric?" + } + ], + "description": "Returns the absolute value of argument", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-abs", + "examples": [ + { + "output": "10.5", + "command": "abs(-10.5)" + } + ], + "name": "abs()", + "output": "numeric?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Number to round upwards", + "type": "numeric?" + } + ], + "description": "Rounds argument upwards to a whole number.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-ceiling", + "examples": [ + { + "output": "11", + "command": "ceiling(10.5)" + } + ], + "name": "ceiling()", + "output": "numeric?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Number to round downwards", + "type": "numeric?" + } + ], + "description": "Rounds argument downwards to a whole number.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-floor", + "examples": [ + { + "output": "10", + "command": "floor(10.5)" + } + ], + "name": "floor()", + "output": "numeric?" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "any?", + "description": "Data to parse as number" + } + ], + "description": "Returns the value indicated by argument or, if argument is not specified, the context item after atomization, converted to an double.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-number", + "examples": [ + { + "output": "NaN", + "command": "number(//u:UserList[1]/u:User[1]/u:Name)" + }, + { + "output": "2137", + "command": "number(\"2137\")" + } + ], + "name": "number()", + "output": "double" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Number to round", + "type": "numeric?" + }, + { + "name": "$precision", + "type": "integer?", + "description": "precision for rounding" + } + ], + "description": "Rounds a value to a specified number of decimal places, rounding upwards if two such values are equally near.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-round", + "examples": [ + { + "output": "2", + "command": "round(2.49999)" + }, + { + "output": "1.13", + "command": "round(1.125,2)" + } + ], + "name": "round()", + "output": "numeric?" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Number to round", + "type": "numeric?" + }, + { + "name": "$precision", + "type": "integer?", + "description": "precision for rounding" + } + ], + "description": "Rounds a value to a specified number of decimal places, rounding to make the last digit even if two such values are equally near.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-round-half-to-even", + "examples": [ + { + "output": "0", + "command": "round-half-to-even(0.5)" + }, + { + "output": "35600", + "command": "round-half-to-even(35612.25, -2)" + } + ], + "name": "round-half-to-even()", + "output": "numeric?" + } + ], + "name": "Numeric" + }, + { + "entries": [ + { + "arguments": [ + { + "name": "$flags", + "type": "string", + "description": "string to replace searched fragment with" + }, + { + "name": "$input", + "description": "Source string", + "type": "string?" + }, + { + "name": "$pattern", + "description": "regex", + "type": "string" + } + ], + "description": "Analyzes a string using a regular expression, returning an XML structure that identifies which parts of the input string matched or failed to match the regular expression, and in the case of matched substrings, which substrings matched each capturing group in the regular expression.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-analyze-string", + "examples": [ + { + "command": " analyze-string(\"A1,C15,,D24, X50,\", \"([A-Z])([0-9]+)\") ", + "output": "A1,C15,,D24, X50," + } + ], + "name": "analyze-string()", + "output": "element" + }, + { + "arguments": [ + { + "name": "$comparand1", + "description": "First comparand", + "type": "string?" + }, + { + "name": "$comparand2", + "description": "Second comparand", + "type": "string?" + } + ], + "description": "Returns true if two strings are equal, considered codepoint-by-codepoint.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-codepoint-equal", + "examples": [ + { + "command": "codepoint-equal(\"abcd\", \"abcd\")", + "output": "true" + }, + { + "command": "codepoint-equal(\"abcd\", \"abcd \")", + "output": "false" + } + ], + "name": "codepoint-equal()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Codepoints", + "type": "integer*" + } + ], + "description": "Creates an String from a sequence of codepoints.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-codepoints-to-string", + "examples": [ + { + "command": "codepoints-to-string(0)", + "output": "FOCH0001" + }, + { + "output": "( ͡° ͜ʖ ͡°)", + "command": "codepoints-to-string((40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41))" + } + ], + "name": "codepoints-to-string()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$collation", + "description": "Rules of collation", + "type": "string?" + }, + { + "name": "$comparand1", + "description": "First comparand", + "type": "string?" + }, + { + "name": "$comparand2", + "description": "Second comparand", + "type": "string?" + } + ], + "description": "Returns -1, 0, or 1, depending on whether $comparand1 collates before, equal to, or after $comparand2 according to the rules of a selected collation.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-compare", + "examples": [ + { + "output": "0", + "command": "compare('abc', 'abc')" + }, + { + "output": "1", + "command": "compare('Strassen', 'Straße')" + } + ], + "name": "compare()", + "output": "integer?" + }, + { + "arguments": [ + { + "name": "$arg1", + "type": "any?", + "description": "First element to concat" + }, + { + "name": "$arg1", + "type": "any?", + "description": "Second element to concat" + }, + { + "name": "...", + "type": "any*", + "description": "Other elements to concat" + } + ], + "description": "Returns the concatenation of the string values of the arguments.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-concat", + "examples": [ + { + "command": "concat('un', 'grateful')", + "output": "ungrateful" + }, + { + "command": "concat('release11',' web',' tools')", + "output": "release11 web tools" + } + ], + "name": "concat()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Source string", + "type": "string?" + }, + { + "name": "$arg2", + "description": "searched string", + "type": "string?" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns true if the string $arg1 contains $arg2 as a substring, taking collations into account.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-contains", + "examples": [ + { + "command": "contains(\"release11Tools\",\"Tools\")", + "output": "true" + } + ], + "name": "contains()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$collation", + "description": "collation", + "type": "string" + }, + { + "name": "$input", + "description": "Source strings", + "type": "string*" + }, + { + "name": "$token", + "description": "regex", + "type": "string" + } + ], + "description": "Determines whether or not any of the supplied strings, when tokenized at whitespace boundaries, contains the supplied token, under the rules of the supplied collation.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-contains-token", + "examples": [ + { + "command": " contains-token(\"red green blue \", \"red\") ", + "output": "true" + } + ], + "name": "contains-token()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Source string", + "type": "string?" + }, + { + "name": "$arg2", + "description": "searched string", + "type": "string?" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns true if the string $arg1 contains $arg2 as a trailing substring, taking collations into account.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-ends-with", + "examples": [ + { + "command": "ends-with(\"release11Tools\",\"ols\")", + "output": "true" + } + ], + "name": "ends-with()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$lang", + "description": "language to represent number", + "type": "string?" + }, + { + "name": "$picture", + "description": "format to represent number", + "type": "string" + }, + { + "name": "$value", + "description": "integer value to format", + "type": "integer?" + } + ], + "description": "Formats an integer according to a given picture string, using the conventions of a given natural language if specified.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-format-integer", + "examples": [ + { + "command": "format-integer(123, 'w')", + "output": "one hundred and twenty-three" + }, + { + "output": "21st", + "command": "format-integer(21, '1;o', 'en')" + } + ], + "name": "format-integer()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$decimal-format-name", + "description": "language to represent number", + "type": "string?" + }, + { + "name": "$picture", + "description": "format to represent number", + "type": "string" + }, + { + "name": "$value", + "description": "numeric value to format", + "type": "numeric?" + } + ], + "description": "Returns a string containing a number formatted according to a given picture string, taking account of decimal formats specified in the static context.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-format-number", + "examples": [ + { + "output": "12,345.60", + "command": "format-number(12345.6, '#,###.00')" + }, + { + "output": "-006", + "command": "format-number(-6, '000')" + } + ], + "name": "format-integer()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Source string", + "type": "string?" + } + ], + "description": "Converts a string to lower case.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-lower-case", + "examples": [ + { + "command": "lower-case(\"RELEASE11 TOOLS\")", + "output": "release11 tools" + } + ], + "name": "lower-case()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$flags", + "description": "regex flags", + "type": "string" + }, + { + "name": "$input", + "description": "Source string", + "type": "string?" + }, + { + "name": "$pattern", + "description": "regex", + "type": "string" + } + ], + "description": "Returns true if the supplied string matches a given regular expression.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-matches", + "examples": [ + { + "command": "matches(\"release11Tools\",\"^.*11T.*$\")", + "output": "true" + } + ], + "name": "matches()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Source string", + "type": "string?" + }, + { + "name": "$normalizationForm", + "description": "Normalization form", + "type": "string" + } + ], + "description": "Returns the value of $arg after applying Unicode normalization.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-normalize-unicode", + "examples": [ + { + "command": "normalize-unicode(\"release11Tools\",\"NFC\")", + "output": "release11Tools" + } + ], + "name": "normalize-unicode()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$input", + "description": "Source string", + "type": "string?" + }, + { + "name": "$pattern", + "description": "fragment to replace", + "type": "string" + }, + { + "name": "$replacement", + "type": "string", + "description": "string to replace searched fragment with" + } + ], + "description": "Returns a string produced from the input string by replacing any substrings that match a given regular expression with a supplied replacement string.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-replace", + "examples": [ + { + "output": "release 11 WebTools", + "command": "replace(\"release11Tools\",\"11T.*\",\" 11 WebTools\")" + } + ], + "name": "replace()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Source string", + "type": "string?" + }, + { + "name": "$arg2", + "description": "searched string", + "type": "string?" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns true if the string $arg1 contains $arg2 as a leading substring, taking collations into account.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-starts-with", + "examples": [ + { + "command": "starts-with(\"release11Tools\",\"rel\")", + "output": "true" + } + ], + "name": "starts-with()", + "output": "boolean" + }, + { + "arguments": [ + { + "name": "$arg", + "type": "item", + "description": "Item to represent as String" + } + ], + "description": "Returns the string value of an item", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-string", + "examples": [ + { + "output": "\"23\"", + "command": "string(23)" + }, + { + "output": "John", + "command": "string(/u:root/u:UserList[1]/u:User[last()]/u:Name)" + } + ], + "name": "string()", + "output": "String" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Stings to join", + "type": "string*" + }, + { + "name": "$arg2", + "description": "Separator", + "type": "string" + } + ], + "description": "Returns a string created by concatenating the items in a sequence, with a defined separator between adjacent items.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-concat", + "examples": [ + { + "output": "Now is the time ...", + "command": "string-join(('Now', 'is', 'the', 'time', '...'), ' ')" + }, + { + "output": "release11%%web%%tools", + "command": "string-join(('release11','web','tools'),'%%')" + } + ], + "name": "string-join()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Source string", + "type": "string?" + } + ], + "description": "Returns the number of characters in a string.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-string-length", + "examples": [ + { + "output": "45", + "command": "string-length(\"Harp not on that string, madam; that is past.\")" + }, + { + "output": "16", + "command": "string-length(\"Release 11 tools\")" + } + ], + "name": "string-length()", + "output": "integer" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "String value", + "type": "string?" + } + ], + "description": "Returns the sequence of codepoints that constitute an string value.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-string-to-codepoints", + "examples": [ + { + "output": "(72, 101, 108, 108, 111)", + "command": "string-to-codepoints('Hello')" + }, + { + "output": "(40, 32, 865, 176, 32, 860, 662, 32, 865, 176, 41)", + "command": "string-to-codepoints('( ͡° ͜ʖ ͡°)')" + } + ], + "name": "string-to-codepoints()", + "output": "integer*" + }, + { + "arguments": [ + { + "name": "$length", + "type": "double", + "description": "length to substring" + }, + { + "name": "$sourceString", + "description": "Source string", + "type": "string?" + }, + { + "name": "$start", + "type": "double", + "description": "start index" + } + ], + "description": "Returns the portion of the value of $sourceString beginning at the position indicated by the value of $start and continuing for the number of ·characters· indicated by the value of $length.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-substring", + "examples": [ + { + "output": "car", + "command": "substring(\"motor car\", 6)" + }, + { + "output": "Release 11 tools <3", + "command": "substring(\"Release 11 tools <3 unnecesary words\",1,19)" + } + ], + "name": "substring()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Source string", + "type": "string?" + }, + { + "name": "$arg2", + "description": "searched string", + "type": "string?" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns the part of $arg1 that follows the first occurrence of $arg2, taking collations into account.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-substring-after", + "examples": [ + { + "output": "ease11Tools", + "command": "substring-after(\"release11Tools\",\"rel\")" + } + ], + "name": "substring-after()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg1", + "description": "Source string", + "type": "string?" + }, + { + "name": "$arg2", + "description": "searched string", + "type": "string?" + }, + { + "name": "$collation", + "description": "collation", + "type": "string" + } + ], + "description": "Returns the part of $arg1 that precedes the first occurrence of $arg2, taking collations into account.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-substring-before", + "examples": [ + { + "output": "release11To", + "command": "substring-before(\"release11Tools\",\"ols\")" + } + ], + "name": "substring-before()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$flags", + "description": "string to replace searched fragment with", + "type": "string?" + }, + { + "name": "$input", + "description": "Source string", + "type": "string?" + }, + { + "name": "$pattern", + "description": "fragment to replace", + "type": "string?" + } + ], + "description": "Returns a sequence of strings constructed by splitting the input wherever a separator is found; the separator is any substring that matches a given regular expression.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-tokenize", + "examples": [ + { + "output": "release\nTools", + "command": "tokenize(\"release11Tools\",\"11\")" + } + ], + "name": "tokenize()", + "output": "string*" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Source string", + "type": "string?" + }, + { + "name": "$mapString", + "type": "string", + "description": "string to map" + }, + { + "name": "$transString", + "type": "string", + "description": "transition string" + } + ], + "description": "Returns the value of $arg modified by replacing or removing individual characters.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-translate", + "examples": [ + { + "output": "BAr", + "command": "translate(\"bar\",\"abc\",\"ABC\")" + } + ], + "name": "translate()", + "output": "string" + }, + { + "arguments": [ + { + "name": "$arg", + "description": "Source string", + "type": "string?" + } + ], + "description": "Converts a string to upper case.", + "documentationReferenceURL": "https://www.w3.org/TR/xpath-functions-31/#func-upper-case", + "examples": [ + { + "output": "RELEASE11 TOOLS", + "command": "upper-case(\"release11 tools\")" + } + ], + "name": "upper-case()", + "output": "string" + } + ], + "name": "String" } ] \ No newline at end of file diff --git a/Frontend/src/assets/tooltips/xpath/xpathdiffs.json b/Frontend/src/assets/tooltips/xpath/xpathdiffs.json new file mode 100644 index 0000000..d0f4daf --- /dev/null +++ b/Frontend/src/assets/tooltips/xpath/xpathdiffs.json @@ -0,0 +1,46 @@ +{ + "universalInfo": + [ + { + "category":"What is XPath", + "description":"XPath is a query language used for selecting nodes from XML and processing them. It may perform operations on strings, numbers and boolean values." + } + ], + "VersionDiffs": + [ + { + "version":"2.0", + "diffs": + [ + "Added support for all XML simple types", + "Many new functions (tripled instruction count)", + "All expressions evaluate to sequence", + "Introduces conditional expressions and for-loops" + ] + }, + { + "version":"3.0", + "diffs": + [ + "Dynamic function calls (function may be called without being referenced by name (find function in collection and call)", + "Inline functions", + "Namespace literals - Namespace may be embedded into function name", + "Support for union types - collections containing elements of different types", + "Mapping operator - '!' performs evaluation for each element in sequence and concatenates results", + "Introduced maps" + ] + }, + { + "version":"3.1", + "diffs": + [ + "New operator for function chaining '=>' ", + "Introduced maps that store data in pair 'key:value' - 'map{ key : value, key : value }'", + "Introduced arrays - they differ from sequences in that they can be nested 'array{1, 5, 7, (10 to 20)}'" + ] + } + + ] + + +} \ No newline at end of file diff --git a/Frontend/src/components/xml/tooltips/TooltipComponent.vue b/Frontend/src/components/xml/tooltips/TooltipComponent.vue index dfc2424..25180f1 100644 --- a/Frontend/src/components/xml/tooltips/TooltipComponent.vue +++ b/Frontend/src/components/xml/tooltips/TooltipComponent.vue @@ -7,6 +7,8 @@ import xpath1 from '@/assets/tooltips/xpath/xpath1.json'; import xpath2 from '@/assets/tooltips/xpath/xpath2.json'; import xpath3 from '@/assets/tooltips/xpath/xpath3.json'; import xpath31 from '@/assets/tooltips/xpath/xpath31.json'; +import TooltipDiffsComponent from './TooltipDiffsComponent.vue'; + const props = defineProps({ version: { @@ -39,10 +41,12 @@ function toggleTooltips() {