diff --git a/Frontend/src/assets/tooltips/xpath/xpath2.json b/Frontend/src/assets/tooltips/xpath/xpath2.json index 3f696bb..f8e1d02 100644 --- a/Frontend/src/assets/tooltips/xpath/xpath2.json +++ b/Frontend/src/assets/tooltips/xpath/xpath2.json @@ -1,39 +1,255 @@ [ { - "name": "Number", + "name": "Node-Set", "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": "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": [ { - "name": "$arg", - "type": "node-set", - "description": "Data to sum" + "type": "node? (Optional)", + "description": "Node to display name" } ], - "output": "number", - "examples": [], - "documentationReferenceURL": "wwww.google.pl" + "output": "xs:string", + "examples": [ + { + "command": "name(/u:root)", + "output": "u:root" + } + ], + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-name" }, { - "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": "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": [ { - "name": "$arg", - "type": "number", - "description": "Data to round" + "type": "node? (Optional)", + "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? (Optional)", + "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? (Optional)", + "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? (Optional)", + "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? (Optional)", + "description": "$testlang (Look description)" + }, + { + "type": "node? (Optional)", + "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? (Optional)", + "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()* (One or more)", + "description": "$arg (Look description)" } ], "output": "number", "examples": [ { - "command": "floor(3.6)", + "command": "count(//u:UserList)", "output": "3" + }, + { + "command": "count(//u:UserList/u:User)", + "output": "10" } ], - "documentationReferenceURL": "wwww.google.pl" + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-root" + } + ] + }, + { + "name": "Number", + "entries": [ + { + "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* (One or more)", + "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* (One or more)", + "description": "$arg" + }, + { + "type": "xs:string? (Optional)", + "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* (One or more)", + "description": "$arg" + }, + { + "type": "xs:string? (Optional)", + "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* (One or more)", + "description": "$arg" + }, + { + "type": "xs:anyAtomicType? (Optional)", + "description": "$zero" + } + ], + "output": "xs:anyAtomicType", + "examples": [ + { + "command": "sum(//u:User/@Id)", + "output": "26" + } + ], + "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-sum" } ] }