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 » Fri May 29, 2020 1:53 pm

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: 6981
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to get transformation parameters in XSLT

Post by Radu » Fri May 29, 2020 2:48 pm

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 » Fri Jun 05, 2020 6:20 am

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: 6981
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to get transformation parameters in XSLT

Post by Radu » Fri Jun 05, 2020 6:44 am

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