From 1229abc0b954d7b7702c057c93d51e8ce3e54587 Mon Sep 17 00:00:00 2001
From: Adam Bem
Date: Mon, 26 Jun 2023 14:29:07 +0200
Subject: [PATCH] Finished logic
---
.../src/assets/tooltips/xpath/xpath1.json | 7 ++++++-
.../src/assets/tooltips/xpath/xpath2.json | 7 +------
.../xml/XmlOutputFieldComponent.vue | 8 +++++++-
.../xml/tooltips/TooltipComponent.vue | 19 +++++++++++++++++--
.../xml/tooltips/TooltipEntryComponent.vue | 6 +++---
Frontend/src/views/XPathView.vue | 9 +++++++--
6 files changed, 41 insertions(+), 15 deletions(-)
diff --git a/Frontend/src/assets/tooltips/xpath/xpath1.json b/Frontend/src/assets/tooltips/xpath/xpath1.json
index 5f66284..031de3b 100644
--- a/Frontend/src/assets/tooltips/xpath/xpath1.json
+++ b/Frontend/src/assets/tooltips/xpath/xpath1.json
@@ -45,8 +45,13 @@
"examples": [
{
"command": "sum()",
- "output": "blablabla"
+ "output": "56"
+ },
+ {
+ "command": "sum()",
+ "output": "2137"
}
+
]
},
{
diff --git a/Frontend/src/assets/tooltips/xpath/xpath2.json b/Frontend/src/assets/tooltips/xpath/xpath2.json
index d78fb81..fde2214 100644
--- a/Frontend/src/assets/tooltips/xpath/xpath2.json
+++ b/Frontend/src/assets/tooltips/xpath/xpath2.json
@@ -13,12 +13,7 @@
}
],
"output": "number",
- "examples": [
- {
- "command": "sum()",
- "output": "blablabla"
- }
- ]
+ "examples": []
},
{
"name": "floor",
diff --git a/Frontend/src/components/xml/XmlOutputFieldComponent.vue b/Frontend/src/components/xml/XmlOutputFieldComponent.vue
index 85c80df..5591d85 100644
--- a/Frontend/src/components/xml/XmlOutputFieldComponent.vue
+++ b/Frontend/src/components/xml/XmlOutputFieldComponent.vue
@@ -10,6 +10,8 @@ const props = defineProps(
}
)
+const emit = defineEmits(["update"]);
+
const result = ref('');
var enginesForCurrentTool = ref(["saxon", "xalan", "libxml"]);
@@ -118,6 +120,10 @@ function clear() {
result.value = "";
}
+function emitVersionChange() {
+ emit("update", version.value);
+}
+
@@ -128,7 +134,7 @@ function clear() {
-
- Arguments
+ Arguments
| Name |
@@ -46,8 +46,8 @@ function entryHasExamples() {
Output: {{ props.entryData.output }}
- Example
-
+ Example
+
| Command |
Output |
diff --git a/Frontend/src/views/XPathView.vue b/Frontend/src/views/XPathView.vue
index 51d9a61..43755d6 100644
--- a/Frontend/src/views/XPathView.vue
+++ b/Frontend/src/views/XPathView.vue
@@ -7,6 +7,11 @@ import { ref } from 'vue';
const xml = ref('');
const query = ref('');
+const version = ref('');
+
+function updateVersion(newVersion: string) {
+ version.value = newVersion;
+}
@@ -16,7 +21,7 @@ const query = ref('');
{xml = data}">
{query = data}">
-
-
+ updateVersion(version)">
+
\ No newline at end of file