Added tooltips for XPath 1.0
This commit is contained in:
@@ -3,30 +3,447 @@
|
||||
"name": "Node-Set",
|
||||
"entries": [
|
||||
{
|
||||
"name": "last",
|
||||
"description": "The last function returns a number equal to the context size from the expression evaluation context.",
|
||||
"arguments": [],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "last()",
|
||||
"output": "blablabla"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.bing.pl"
|
||||
},
|
||||
{
|
||||
"name": "position",
|
||||
"description": "The position function returns a number equal to the context position from the expression evaluation context.",
|
||||
"name": "position()",
|
||||
"description": "Returns the position of the current context node.",
|
||||
"arguments": [],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "position()",
|
||||
"output": "blablabla"
|
||||
"output": "3"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "wwww.google.pl"
|
||||
"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": "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",
|
||||
"examples": [
|
||||
{
|
||||
"command": "boolean('Release11')",
|
||||
"output": "true"
|
||||
},
|
||||
{
|
||||
"command": "boolean('')",
|
||||
"output": "false"
|
||||
},
|
||||
{
|
||||
"command": "boolean(2334)",
|
||||
"output": "true"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions"
|
||||
},
|
||||
{
|
||||
"name": "not()",
|
||||
"description": "The not function returns true if its argument is false, and false otherwise.",
|
||||
"arguments": [],
|
||||
"output": "boolean",
|
||||
"examples": [
|
||||
{
|
||||
"command": "not('text')",
|
||||
"output": "false"
|
||||
},
|
||||
{
|
||||
"command": "not('')",
|
||||
"output": "true"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions"
|
||||
},
|
||||
{
|
||||
"name": "true()",
|
||||
"description": "The true function returns true.",
|
||||
"arguments": [],
|
||||
"output": "boolean",
|
||||
"examples": [
|
||||
{
|
||||
"command": "true()",
|
||||
"output": "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": "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": "String",
|
||||
"entries": [
|
||||
{
|
||||
"name": "string()",
|
||||
"description": "The string function converts an object to a string",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "object",
|
||||
"description": "The object to convert to a string"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "string(10)",
|
||||
"output": "10"
|
||||
},
|
||||
{
|
||||
"command": "string('Release11')",
|
||||
"output": "Release11"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"name": "concat()",
|
||||
"description": "The concat function returns the concatenation of its arguments.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string* (One or More)",
|
||||
"description": "Strings to concatenate"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "concat('Release', 11)",
|
||||
"output": "Release11"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
}
|
||||
,
|
||||
{
|
||||
"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",
|
||||
"description": "String to test"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String that first string has to contain"
|
||||
}
|
||||
],
|
||||
"output": "boolean",
|
||||
"examples": [
|
||||
{
|
||||
"command": "contains('Release11', 'eas')",
|
||||
"output": "true"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String that splits first string"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "substring-before('Release11', '11')",
|
||||
"output": "Release"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "substring-after('Release11', 'le')",
|
||||
"output": "ase11"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"description": "String to split"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Starting index"
|
||||
},
|
||||
{
|
||||
"type": "number? (Optional)",
|
||||
"description": "Length of target substring"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "substring('12345',2)",
|
||||
"output": "2345"
|
||||
},
|
||||
{
|
||||
"command": "substring('12345',2,3)",
|
||||
"output": "234"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"name": "string-length()",
|
||||
"description": "The string-length returns the number of characters in the string.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string? (Optional)",
|
||||
"description": "String to test"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "string-length('abcdef')",
|
||||
"output": "6"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "normalize-space(' abc def ')",
|
||||
"output": "abc def"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String to insert characters from second argument"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "translate('bar','abc','ABC')",
|
||||
"output": "BAr"
|
||||
},
|
||||
{
|
||||
"command": "translate('--aaa--','abc-','ABC')",
|
||||
"output": "AAA"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -34,47 +451,97 @@
|
||||
"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.",
|
||||
"name": "number()",
|
||||
"description": "The number function converts its argument to a number",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "$arg",
|
||||
"type": "node-set",
|
||||
"description": "Data to sum"
|
||||
"type": "object",
|
||||
"description": "The object to convert to a number"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "sum()",
|
||||
"output": "56"
|
||||
"command": "number(10)",
|
||||
"output": "10"
|
||||
},
|
||||
{
|
||||
"command": "sum()",
|
||||
"output": "2137"
|
||||
"command": "number('')",
|
||||
"output": "NaN"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "wwww.google.pl"
|
||||
"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.",
|
||||
"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": "number",
|
||||
"description": "Data to round"
|
||||
"type": "node-set",
|
||||
"description": "Node set to sum"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "floor(3.6)",
|
||||
"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": "wwww.google.pl"
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-row">
|
||||
<button class="grow-0 tool-button "><</button>
|
||||
<div id="content" class="w-1/3">fdfgjoejgioej</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -34,12 +34,10 @@ function entryHasExamples() {
|
||||
<h4 v-if="entryHasArguments()" class="text-xl mt-4 mb-2 font-bold">Arguments</h4>
|
||||
<table v-if="entryHasArguments()" class="w-full">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr v-for="arg in props.entryData.arguments">
|
||||
<td class="text-center">{{ arg.name }}</td>
|
||||
<td class="text-center">{{ arg.type }}</td>
|
||||
<td class="text-center">{{ arg.description }}</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user