Skip to content

Commit

Permalink
Updating interactive test per #116.
Browse files Browse the repository at this point in the history
  • Loading branch information
leonelsanchesdasilva committed Dec 6, 2024
1 parent e72fb76 commit 88ce51e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions interactive-tests/xslt.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
}

window.test_xslt = function() {
const xml = globalThis.XsltProcessor.xmlParse(el('xml').value);
const xslt = globalThis.XsltProcessor.xmlParse(el('xslt').value);
const xmlParser = new globalThis.XsltProcessor.XmlParser();
const xml = xmlParser.xmlParse(el('xml').value);
const xslt = xmlParser.xmlParse(el('xslt').value);
const xsltClass = new globalThis.XsltProcessor.Xslt();
const html = await xsltClass.xsltProcess(xml, xslt);
el('html').value = html;
el('htmldisplay').innerHTML = html;
xsltClass.xsltProcess(xml, xslt).then(html => {
el('html').value = html;
el('htmldisplay').innerHTML = html;
});
return false;
}

window.cleanxml = function() {
Expand All @@ -32,7 +35,7 @@
</script>
</head>
<body onload="cleanxml()">
<form onsubmit="test_xslt();return false">
<form onsubmit="test_xslt()">
<table>
<tr>
<td>
Expand Down

0 comments on commit 88ce51e

Please sign in to comment.