Additional XSLT stylesheets - how does it work

Here should go questions about transforming XML with XSLT and FOP.
maglid
Posts: 65
Joined: Mon Sep 28, 2009 8:10 am

Additional XSLT stylesheets - how does it work

Post by maglid » Wed Nov 04, 2020 1:58 am

I'm using Oxygen 22.1 to run the standard Docbook to DITA transform, and I noticed that it runs two XSLTs. The second XSLT is specified by the "Additional XSLT stylesheets" and this all seems to work. But I have a couple questions.

1. Does "Additional XSLT stylesheets" require that each XSLT use only standard XSLT output? What if the XLST creates new files using <xsl:result-document>?

2. Does it run them in the order you specify?

3. Can I configure it to do something with a file created by <xsl:result-document>? Like maybe with a parameter to a subsequent XSLT?

4. What would a command line equivalent of this be? I assume it uses some Java feature.

A couple old forum posts talk about it, but I still have questions. The docs page for this does not give many details:
https://www.oxygenxml.com/doc/versions/ ... hing2.html

Thanks,
Mark

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

Re: Additional XSLT stylesheets - how does it work

Post by Radu » Wed Nov 04, 2020 7:31 am

Hi Mark,

Please see some answers below:
1. Does "Additional XSLT stylesheets" require that each XSLT use only standard XSLT output? What if the XLST creates new files using <xsl:result-document>?
Yes, it only works with standard XSLT output
2. Does it run them in the order you specify?
Yes it does.
3. Can I configure it to do something with a file created by <xsl:result-document>? Like maybe with a parameter to a subsequent XSLT?
No. For this you might need to use an ANT build file which can be configured to apply XSLT in a more flexible manner. You can create ANT build files in Oxygen and also run them from inside Oxygen. An ANT build file as an <xslt> task which can be used to run XSLT transformations: https://ant.apache.org/manual/Tasks/style.html
Or you can try to use an XProc script, again Oxygen allows you to edit and transform XProc using the bundled Calabash engine.
4. What would a command line equivalent of this be? I assume it uses some Java feature.
We just apply in sequence XSLT stylesheets over the result of the previous XSLT. You can do the same from the command line by invoking the command line multiple times on the output obtained from a previous command line.

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

Post Reply