Hi David,
Using -i flags is not in fact similar with passing parameters, because when you specify an initial template for instance then you should not specify an XML source for the transformation. But we will consider adding support in the transformation scenario for that.
I gave may suggestion to set up a custom XSLT processor to use initial mode a try. It worked ok, below you have the steps I took. I configured Saxon 8 to run a stylesheet starting with an initial template called main.
Go to Options->Preferences -- XML -- XML-FO-XQuery -- Custom Engines
Click on New and specify:
Engine type: XSLT
Name: Saxon8Bmain
Command line: java -jar lib/saxon8.jar -it main -o ${out} ${xsl}
Click Ok.
Create for test a stylesheet like below:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template name="main">
<result>test</result>
</xsl:template>
</xsl:stylesheet>
Configure a transformation scenario that has the following settings:
XML URL: ${currentFileURL}
(that means we set the stylesheet as input - we need any XML there as the XML will in fact not be used because the engine will start with an initial template and no XML)
XSL URL: ${currentFileURL}
Transformer: Saxon8Bmain
Then execute the transformation (here there is a small glitch in oXygen that will be solved - it shows an warning that the transformer is not for 2.0, it wrongly considers that custome engines are for 1.0, just click Yes in that warning dialog to continue).
You should be able to see the result:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?><result>test</result>
Best Regards,
George