Page 1 of 1

Ant + XSLT Debug

Posted: Tue Jul 17, 2018 7:31 am
by msambasiva
Hi,
I've been assigned with XML to dita conversion tool. For that, I've given a try to write ANT script which in turn calling XSLTs. Everything is working fine.

Now I want to debug the Ant script and XSLT in Oxygen XML editor in the same flow of execution. Some how I am able to debug XSLT but not ANT script on Oxygen Editor 18.0.

Because some input parameters passing from ANT sctipr to XSLT. I want to check the input parameter values in debug mode.

It would be great help, if you can suggest any clue on this.

Below is sample Ant, XSLT and XML
https://en.wikibooks.org/wiki/Apache_Ant/XSLT

Thanks,
Samba.

Re: Ant + XSLT Debug

Posted: Tue Jul 17, 2018 8:10 am
by Radu
Hi,

I'm sorry but Oxygen does not have an ANT debugger.
Maybe you can use the ANT echo task to log all those parameter values sent to the XSLT:

https://ant.apache.org/manual/Tasks/echo.html

and then use our XSLT debugger along with manually setting in the XSLT transformation scenario those XSLT parameters to their respective values.

Regards,
Radu

Re: Ant + XSLT Debug

Posted: Tue Jul 17, 2018 10:06 am
by msambasiva
Thanks for quick response!

As you said, we can use echo statements to log the information from ANT script. But I am not clear on "use our XSLT debugger along with manually setting in the XSLT transformation scenario". How can we manually set XSLT Debuuger in the XSLT transformation scenario?

Could you be more specific on the process?

It would be great if you can share any reference of this usecase.

Thanks.

Re: Ant + XSLT Debug

Posted: Tue Jul 17, 2018 10:10 am
by msambasiva
Thanks for quick response!
Could you be more specific on the setting ' XSLT debugger along with manually setting in the XSLT transformation scenario'
We can use echo statements to log the info in the ANT script. But how can we change the debugger on the fly?

Re: Ant + XSLT Debug

Posted: Tue Jul 17, 2018 10:44 am
by Radu
Hi,

I'm not sure what you mean by this:
But how can we change the debugger on the fly?
So right now what you can do is to create a transformation scenario for an XML with an XSLT, in the transformation edit dialog scenario to click the Parameters button and manually set values for each parameter. Then you can debug using this newly created transformation scenario.

Regards,
Radu

Re: Ant + XSLT Debug

Posted: Thu Jul 19, 2018 1:17 pm
by msambasiva
HI,

I have build process with invoking different xslts as below.

Below is one of the xslt from ANT script

Code: Select all


    <xslt in="${dita.temp.dir}${file.separator}dummy.map" out="${dita.temp.dir}${file.separator}merged${file.separator}Merged.xml" style="${dita.plugin.uae.dita.oer.dir}${file.separator}xsl${file.separator}merge.xsl">
<xslt in="${dita.temp.dir}${file.separator}merged${file.separator}Merged.xml" out="${dita.temp.dir}${file.separator}Merged2.html" style="${dita.plugin.uae.dita.oer.dir}${file.separator}xsl${file.separator}build_ditamap_fbdi.xsl">
<param name="file.separator" expression="${file.separator}"/>
<param name="dita.temp.dir" expression="${dita.temp.dir}"/>
</xslt>
I am thinking, it's difficult to debug the individual xslts by setting the parameters as you suggested below.

It would be great help if you can suggest best way to debug all the xslts in the same execution process flow.

Thanks,
Samba.

Re: Ant + XSLT Debug

Posted: Thu Jul 19, 2018 2:04 pm
by Radu
Hi Samba,

Sorry but with two stylesheets you will need to run two XSLT debug sessions, once for each stylesheet.

Regards,
Radu