9. Exercise 2
In this exercise, you’ll run your first XSLT 3.0 transformation in the browser with SaxonJS! We’ll cover how you compile an XSLT stylesheet into a “SEF” file in the next exercise.
Open
index.htmlin your favorite editor.Add a script link to SaxonJS in the
headof the document:<script type="text/javascript" src="/js/SaxonJS2.rt.js"></script>Add a script to run the
ex02.xslstylesheet in its compiled form:ex02.sef.json:<script>window.onload = function() {SaxonJS.transform({ stylesheetLocation: "ex02.sef.json" },"async");}</script>Load the answer into your browser http://localhost:9000/exercises/ex02
Did it work?