XSL Debugger: Quickly diff result against source

Are you missing a feature? Request it's implementation here.
dcramer
Posts: 138

XSL Debugger: Quickly diff result against source

Tue Dec 05, 2017 4:50 am

After running an xslt in the debugger, I'd love it if there were a button that would open the output and the source document for that transform in the xml diff tool. That way I can quickly confirm that the transform changed what I wanted it to change and didn't touch anything it wasn't supposed to. As it is, I have to save the result to a file, then open both in the diff tool.

Regards,
David
adrian
Posts: 2333

Re: XSL Debugger: Quickly diff result against source

Tue Dec 05, 2017 4:19 pm

Hi,

Thank you for the feedback.
While diffing the output against the input may be useful for a specific use case, it is a very specific use case (input and output need to be very similar).
I'll log it as a feature request, but IMHO, since this has a very limited use, it won't be adopted.

As it is, I have to save the result to a file, then open both in the diff tool.
Maybe you can simplify this to some extent. Configure the scenario you are debugging to write the output to a file (so you won't have to manually save it every time). The debugger will save to the same output file, if you start the debugging session using Debug scenario.
You could use a pattern for the output file of the transformation scenario, so you can use the same pattern for the diff tool.
e.g.

Code: Select all

${cfd}/${cfn}-result.xml
will write the file in the same folder as the source with a name similar to the source, but the suffix "-result.xml"

You can then configure the diffFiles tool as an external tool in Options >Preferences, External Tools. Add a new external tool, give it a name and use the command line:

Code: Select all

"${oxygenInstallDir}/diffFiles" "${cfd}/${cfne}" "/path/to/my/result.xml"
If you've used a pattern for the output file of the transformation scenario, you can use the same pattern here instead of the absolute /path/to/my/result.xml. e.g. "${cfd}/${cfn}-result.xml"
If you'd rather use the keyboard you can assign a shortcut key to the external tool action now.

Last step is to make the external tools toolbar visible in the debugger. Switch to the debugger perspective, right click in the top toolbar area and Configure Toolbars, check the box for Tools.

When you want to run the diff, make sure the focus is in the source file (that's used as the first argument) and use the toolbar to run your custom external tool.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
dcramer
Posts: 138

Re: XSL Debugger: Quickly diff result against source

Thu Dec 07, 2017 3:13 am

That works. I didn't ever know Debug Scenarios were a thing.

Thanks,
David
dcramer
Posts: 138

Re: XSL Debugger: Quickly diff result against source

Thu Dec 07, 2017 3:13 am

s/ever/even/

Return to “Feature Request”

Who is online

Users browsing this forum: No registered users and 0 guests