Page 1 of 1

Get Input params of xsl file

Posted: Tue Jun 08, 2021 8:21 am
by msambasiva
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.

Re: Get Input params of xsl file

Posted: Tue Jun 08, 2021 8:55 am
by Radu
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

Re: Get Input params of xsl file

Posted: Tue Jun 08, 2021 10:01 am
by msambasiva
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.

Re: Get Input params of xsl file

Posted: Tue Jun 08, 2021 11:01 am
by Radu
Hi,

I'm afraid I do not know another way.

Regards,
Radu