type attribute is for:
<script src="xslt2.js" defer></script> <script src="docbook.xsl" type="text/xsl" data-source="article.xml"></script>
For this to work you need to include xslt2.js once too. It is considered a best practice to include that
<script> element for xslt2.js as on of the last elements in your HTML page.
You can also specify what mode to use for the initial template:
<script src="docbook.xsl" type="text/xsl" data-source="article.xml" data-mode="svg-clock"> </script>
Or your template doens't require any particular input, just call a named template:
<script src="article.xsl" type="text/xsl" data-template="svg-clock"></script>
The above example is essentially an
<xsl:call-template name="svg-clock"/> for use in HTML.
Note: for compatibility with Saxon-CE you can also use data-source instead of data-input, data-initial-template instead of data-template and
data-initial-mode instead of
|Where your |
|Must be either |
|Don't use the |