Re: [xsl] Invoking XSLT 2.0

Subject: Re: [xsl] Invoking XSLT 2.0
From: "Rashmi Rubdi" <rashmi.sub@xxxxxxxxx>
Date: Wed, 25 Apr 2007 18:44:26 -0400
On 4/25/07, Colin Adams <colinpauladams@xxxxxxxxxxx> wrote:

>From: "Rashmi Rubdi" <rashmi.sub@xxxxxxxxx>


>
>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.

I just noticed this thread and thought I'll try the above mentioned option since I was interested in knowing if it's possible to have a standalone XSLT.

It worked as follows:

java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar -it something
standalone.xsl > output1.xml

In the above case "something" is the name of the named template inside
standalone.xsl.

I guess invoking a standalone stylesheet on a named template within it
makes sense because a styesheet can have multiple templates.

Also the output file could be omitted, in which case the output is
printed on the console.


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


(I don't know Altova).


-Regards Rashmi

Current Thread