diff --git a/new-frontend/src/components/XmlTool.vue b/new-frontend/src/components/XmlTool.vue index 37cc37a..c227da5 100644 --- a/new-frontend/src/components/XmlTool.vue +++ b/new-frontend/src/components/XmlTool.vue @@ -3,18 +3,25 @@ import { onMounted, ref, watch } from 'vue'; const xml = ref(''); const transform = ref(''); -const transformPlaceholder = ref('') -const result = ref('') +const transformPlaceholder = ref(''); +const engine = ref(''); +const result = ref(''); -const activeXmlTool = ref('') +const activeXmlTool = ref(''); async function submit() { - const url = document.location.protocol + "//" + document.location.hostname + "/java/" + activeXmlTool.value; + const engineEndpoint = engine.value == "libxml" ? "libxml" : "java" + const url = document.location.protocol + "//" + document.location.hostname + "/" + engineEndpoint + "/" + activeXmlTool.value; + + var version = "1.0"; + if (engine.value == "saxon") + version = "3.0" + var requestBody = JSON.stringify({ "data": xml.value, "process": transform.value, - "processor": "xalan", - "version": "3.0" + "processor": engine.value, + "version": version }); var request = new Request(url, { @@ -61,6 +68,12 @@ onMounted(() => {

+ +