Connected frontend and backend
This commit is contained in:
@@ -135,6 +135,24 @@ function fillDefaultXSLT() {
|
||||
} )
|
||||
}
|
||||
|
||||
/**
|
||||
* The `fillDefaultXQuery()` function fetches a default XQuery from the server and sets the value of the element with id "transformArea" to the fetched template.
|
||||
*
|
||||
* @function
|
||||
* @name fillDefaultXQuery
|
||||
* @kind function
|
||||
* @returns {void}
|
||||
*/
|
||||
function fillDefaultXQuery() {
|
||||
const serverAddress = window.location.protocol + "//" + window.location.hostname;
|
||||
fetch(serverAddress + "/assets/samples/sampleXQuery.xquery")
|
||||
.then( response => response.text() )
|
||||
.then( (XQueryTemplate) => {
|
||||
document.getElementById('transformArea').innerText = XQueryTemplate;
|
||||
highlightSyntax("transformArea");
|
||||
} )
|
||||
}
|
||||
|
||||
/**
|
||||
* It sets default content for the element an changes it's color to grey
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user