diff --git a/Frontend/src/assets/tooltips/xpath/xpath2.json b/Frontend/src/assets/tooltips/xpath/xpath2.json index 8e5eb2d..b201f65 100644 --- a/Frontend/src/assets/tooltips/xpath/xpath2.json +++ b/Frontend/src/assets/tooltips/xpath/xpath2.json @@ -933,6 +933,28 @@ { "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? (Optional)", + "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.", @@ -1016,6 +1038,163 @@ } ], "documentationReferenceURL": "https://www.w3.org/TR/xquery-operators/#func-sum" + }, + { + "name": "abs()", + "description": "Returns the absolute value of $arg.", + "arguments": [ + { + "type": "numeric? (Optional)", + "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? (Optional)", + "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? (Optional)", + "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? (Optional)", + "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? (Optional)", + "description": "$arg" + }, + { + "type": "numeric? (Optional)", + "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": "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" } ] }