Get Input params of xsl file

Here should go questions about transforming XML with XSLT and FOP.
msambasiva
Posts: 78
Joined: Tue Jul 17, 2018 6:57 am

Get Input params of xsl file

Post by msambasiva » Tue Jun 08, 2021 8:21 am

Hi,

XSLT 2.0

Below is the command to invoke xslt from java using SAXParser.Is it possible to get the list of params passed to xsl file(xml2dita.xsl) . I need to know the output path in my xsl file

java/current/bin/java \
'TransformUsingXMLSchema' \
'/staging/docs/03/X20062603/en/20062603c.xml' \
'/custom/doctypes/CommonDita/xsl/xml2dita.xsl' \
'/staging/docs/03/X20062603/en/myoutput/20062603c.dita

Thanks in advance,
Samba.

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

Re: Get Input params of xsl file

Post by Radu » Tue Jun 08, 2021 8:55 am

Hi Samba,

You can try to define a custom xsl:parameter in your XSLT stylesheet and set a value for this parameter when you create the XSLT transformer.

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

msambasiva
Posts: 78
Joined: Tue Jul 17, 2018 6:57 am

Re: Get Input params of xsl file

Post by msambasiva » Tue Jun 08, 2021 10:01 am

Thanks Radu! Some how, I don't have control on java code. Is there any option to get output file/directory location in XSL without setting the params in java.

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

Re: Get Input params of xsl file

Post by Radu » Tue Jun 08, 2021 11:01 am

Hi,

I'm afraid I do not know another way.

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

Post Reply