How to get transformation parameters in XSLT

Here should go questions about transforming XML with XSLT and FOP.
christianbrugeron
Posts: 2
Joined: Fri May 29, 2020 1:47 pm

How to get transformation parameters in XSLT

Post by christianbrugeron »

Hello

I try to use the ask function for a parameter in my XSLT.
What is the syntax to get the user value into a variable?

Thanks
CB
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to get transformation parameters in XSLT

Post by Radu »

Hi,

You cannot use Oxygen editor variables directly in the XSLT, Oxygen will not expand those.
What you can do is to edit the transformation scenario, click the "Parameters" button and add a parameter having as value content which can contain Oxygen editor variables.
When the transformation scenario is run, Oxygen will expand the editor variables in the parameter values and then pass the values to the XSLT stylesheets where the <xsl:param>s defined there will use the value further.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
christianbrugeron
Posts: 2
Joined: Fri May 29, 2020 1:47 pm

Re: How to get transformation parameters in XSLT

Post by christianbrugeron »

Hi

Thanks

In my case, I wanted to inject 2 parameters in an XSLT, 20 times, with different transformation parameters (output file names).

And from the command line?

cb
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to get transformation parameters in XSLT

Post by Radu »

Hi,

You cannot use our Oxygen-specific ask editor variables from the command line. But you can probably use the command line to prompt the user for input and then use that input in parameters passed to the stylesheets.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply