make XSLT overriding output specs in transformation scenario optional

Are you missing a feature? Request it's implementation here.
Martin de la Iglesia
Posts: 6

make XSLT overriding output specs in transformation scenario optional

Wed Sep 06, 2017 4:16 pm

When I created a custom transformation scenario, the HTML output didn't work at first, and it took me some time to figure out that the <xsl:result-document> in my XSLT stylesheet was overriding the settings I had set in the transformation scenario editing window. Therefore I'd like to suggest adding a checkbox to the transformation scenario editing window that specifies whether the XSLT should override the scenario settings or vice versa.
adrian
Posts: 2326

Re: make XSLT overriding output specs in transformation scenario optional

Wed Sep 06, 2017 5:37 pm

Hi,

Could you please clarify what exact settings are you referring to?
What settings did you set in the transformation scenario editing window and what attribute from the xsl:result-document overrode those settings?

This may not be an Oxygen matter, but an XSLT transformer (e.g. Saxon) matter. What you specify for xsl:result-document is for the XSLT transformer, so Oxygen is unlikely to be able to control what the transformer does with those settings.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Martin de la Iglesia
Posts: 6

Re: make XSLT overriding output specs in transformation scenario optional

Thu Sep 07, 2017 10:29 am

In the "Edit scenario" window (in oXygen 17.1 on Windows), all settings in the "Output" tab, such as "Prompt for file" and "Open in Browser/System Application", were ignored. This only changed when I removed the <xsl:result-document> from my stylesheet, so I assume the latter had been overriding the former.
adrian
Posts: 2326

Re: make XSLT overriding output specs in transformation scenario optional

Thu Sep 07, 2017 11:47 am

Hi,

"Prompt for file" and "Open in Browser/System Application" (with "Saved File") apply to the default output of the XSL transformation. They are not used for xsl:result-document which tells the transformer to output to a custom location and file specified by the @href attribute (xsl:result-document file location cannot be overridden). xsl:result-document is mostly used when you want to output to multiple files, each file by a xsl:result-document instruction.

If you want to open the output of a single xsl:result-document, you need to specify "Open in Browser/System Application" with "Other location" and specify there the location where the xsl:result-document writes the file.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Martin de la Iglesia
Posts: 6

Re: make XSLT overriding output specs in transformation scenario optional

Thu Sep 07, 2017 12:28 pm

If you want to open the output of a single xsl:result-document, you need to specify "Open in Browser/System Application" with "Other location" and specify there the location where the xsl:result-document writes the file.


This doesn't work for me: when I have a <xsl:result-document> in my stylesheet, the browser doesn't open. Only when I remove the <xsl:result-document> instruction from my XSLT, the "Open in Browser" option works.
adrian
Posts: 2326

Re: make XSLT overriding output specs in transformation scenario optional

Thu Sep 07, 2017 12:31 pm

Hi,

You need to specify the in the "Other location" field the file path of the file to be opened (that was created by xsl:result-document).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Martin de la Iglesia
Posts: 6

Re: make XSLT overriding output specs in transformation scenario optional

Thu Sep 07, 2017 12:53 pm

I had specified it, and at first it didn't work. However, I just closed and re-opened oXygen, and now it works. So, thank you for the hint, Adrian.
Still, I wish there was a short note, either displayed directly in the "Edit scenario" window or at least in the Help text (https://www.oxygenxml.com/doc/versions/ ... ialog.html), that warns the user of a potential conflict when a <xsl:result-document> is set.
adrian
Posts: 2326

Re: make XSLT overriding output specs in transformation scenario optional

Thu Sep 07, 2017 4:25 pm

Hi,
I had specified it, and at first it didn't work. However, I just closed and re-opened oXygen, and now it works.

I'm guessing you specified just the file name there, that's why it worked only after a restart. The folder path to the file is also required.
e.g. ${cfd}/myfilename.xml where ${cfd} is expanded by Oxygen to the "current file directory".

Still, I wish there was a short note, either displayed directly in the "Edit scenario" window or at least in the Help text (https://www.oxygenxml.com/doc/versions/ ... ialog.html), that warns the user of a potential conflict when a <xsl:result-document> is set.
I'll log your request, but note that there is no conflict. xsl:result-document by definition is meant to provide the possibility of output to a secondary output destination.
So it is expected that the XSLT transformation output settings that Oxygen provides for the default output does not apply to xsl:result-document.

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

Return to “Feature Request”

Who is online

Users browsing this forum: No registered users and 4 guests