How to use a template named xsl:initial-template with XSLT 3.0 and oXygen 19
Posted: Thu Apr 06, 2017 12:49 pm
oXygen 19 now supports Saxon 9.7 EE or PE to run XSLT 3.0 transformations, a new feature in XSLT 3.0 is the predefined template name xsl:initial-template for a named template e.g.
When you run Saxon from the command line the -it option suffices to select that template as the initially executed starting point of the transformation. How can I achieve that in oXygen 19 with Saxon 9.7 EE selected as the transformer? I can set the initial template in the options to that name but when I try to run the transformation I get the errors
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:math="http://www.w3.org/2005/xpath-functions/math"
exclude-result-prefixes="xs math"
expand-text="yes"
version="3.0">
<xsl:param name="seq" as="xs:string*" select="'c', 'a', 'b', 'z'"/>
<xsl:template name="xsl:initial-template">
This is a test {sort($seq)}
</xsl:template>
</xsl:stylesheet>
Code: Select all
System ID: C:\Users\User\Somepath\test2017040601.xsl
Scenario: test2017040601
XSL file: C:\Users\User\Somepath\test2017040601.xsl
Engine name: Saxon-EE 9.7.0.15
Severity: error
Description: The requested initial template xsl:initial-template does not exist
System ID: C:\Users\User\Somepath\test2017040601.xsl
Scenario: test2017040601
XSL file: C:\Users\User\Somepath\test2017040601.xsl
Engine name: Saxon-EE 9.7.0.15
Severity: fatal
Description: XTDE0040: The requested initial template xsl:initial-template does not exist
URL: http://www.w3.org/TR/xslt20/#err-XTDE0040