Re: [xsl] Invoking XSLT 2.0

Subject: Re: [xsl] Invoking XSLT 2.0
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 25 Apr 2007 13:10:19 +0200
Colin Adams wrote:



I don't think there's an option to call an XSL stylesheet without an input XML,


It is a requirement of XSLT 2.0 that the initial template can be specified by QName, rather than chosen by a match on the initial context node, which is not required), and therefore no input XML document is required.

With the Saxon command line, this is the -it option.

With Gestalt/gexslt, it is the --initial-template option.

(I don't know Altova).

I do, and it is not compliant in this: it does not provide any means for setting the initial mode or the initial template. As a result, it is not possible to start a stylesheet without an initial context.


(((The first time I noticed this Altova replied on this list saying you can workaround this by supplying the XSLT stylesheet as input. Which made me believe that Altova people were not really aware of the differences this brings as compared to no initial context or a defined starting point for your transformation. Recently they changed a sentence on their website: on the homepage, they now "fully support the REC of XSLT 2.0", on the details page, they say they support some CR of June 2006... (in fact, they support neither fully, and remarks and critique are alas still left unanswered, let alone an honest overview of the level of compliance).)))

Note that Saxon also has a way of specifying an input source *and* an initial template (which is allowed according to the spec). You must use the -s option, added, I believe, in the 8.9 version of Saxon.

-- Abel

Current Thread