diff --git a/Frontend/src/assets/tooltips/xpath/xpath3.json b/Frontend/src/assets/tooltips/xpath/xpath3.json new file mode 100644 index 0000000..3f696bb --- /dev/null +++ b/Frontend/src/assets/tooltips/xpath/xpath3.json @@ -0,0 +1,40 @@ +[ + { + "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" + } + ], + "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", + "examples": [ + { + "command": "floor(3.6)", + "output": "3" + } + ], + "documentationReferenceURL": "wwww.google.pl" + } + ] + } +] \ No newline at end of file diff --git a/Frontend/src/assets/tooltips/xpath/xpath31.json b/Frontend/src/assets/tooltips/xpath/xpath31.json new file mode 100644 index 0000000..3f696bb --- /dev/null +++ b/Frontend/src/assets/tooltips/xpath/xpath31.json @@ -0,0 +1,40 @@ +[ + { + "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" + } + ], + "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", + "examples": [ + { + "command": "floor(3.6)", + "output": "3" + } + ], + "documentationReferenceURL": "wwww.google.pl" + } + ] + } +] \ 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 e5eeb4e..a49cd7c 100644 --- a/Frontend/src/components/xml/tooltips/TooltipComponent.vue +++ b/Frontend/src/components/xml/tooltips/TooltipComponent.vue @@ -5,6 +5,8 @@ import tooltipEntryComponent from '@components/xml/tooltips/TooltipEntryComponen 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'; const props = defineProps({ version: { @@ -16,10 +18,17 @@ const props = defineProps({ const areTooltipsHidden = ref(true) function selectXPathVersion() { - if (props.version == "1.0") { - return xpath1; + switch(props.version) { + case "1.0": + return xpath1; + case "2.0": + return xpath2; + case "3.0": + return xpath3; + case "3.1": + default: + return xpath31; } - else return xpath2; } function toggleTooltips() {