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: 365
Location: Hamburg

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

Thu Jun 15, 2017 1:56 pm

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: 5585

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

Thu Jun 15, 2017 2:18 pm

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: 365
Location: Hamburg

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

Thu Jun 15, 2017 3:09 pm

Hi Radu,

Many thanks for your quick reply and the workaround suggestions.

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

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 2 guests