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

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Frank Ralf
Posts: 452
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

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

Post 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
Frank Ralf
parson AG
www.parson-europe.com
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Frank Ralf
Posts: 452
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

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

Post by Frank Ralf »

Hi Radu,

Many thanks for your quick reply and the workaround suggestions.

Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
Post Reply