Page 1 of 1

XSLT transformation: Use ${ask} parameter value also in output file name

Posted: Thu Jun 15, 2017 1:56 pm
by Frank Ralf
Hello,

I'm using the ${ask} editor variable in an XSLT transformation to set a parameter value:

Code: Select all

${ask('Product version', radio, ('A':'A';'B':'B'))}
Is there a way to use this value not only as parameter for the XSLT script but also in the output file name of the transformation scenario itself (so the script would create different named output files for product A and product B)? I suppose I must store the ${ask} value somewhere temporarily so the transformation scenario can access the value?

Any pointers welcome.

Best regards,
Frank

Re: XSLT transformation: Use ${ask} parameter value also in output file name

Posted: Thu Jun 15, 2017 2:18 pm
by Radu
Hi Frank,

The only workaround I see are:

1) Write from the XSLT stylesheet the result file using the xsl:result-document construct so that you can control the place where the result is stored.

2) Create an ANT build file which invokes the XSLT and then saves the contents to a place depending on the parameters that you send to the ANT build file.

Regards,
Radu

Re: XSLT transformation: Use ${ask} parameter value also in output file name

Posted: Thu Jun 15, 2017 3:09 pm
by Frank Ralf
Hi Radu,

Many thanks for your quick reply and the workaround suggestions.

Best regards,
Frank