Page 1 of 1

Possible bug with xsl:result-document

Posted: Wed Mar 18, 2015 1:18 pm
by Mathias Müller
(This is a cross post, the original question is: http://stackoverflow.com/questions/2907 ... ot-working)

When using the result-document facility of XSLT 2.0, "a.xml" does not work as the file name of the output document, that is, then, this document does not appear in the file system. Any other file name works, the problem is only with "a.xml".

The following code can be used to reproduce the problem, the input XML document does not matter.

Code: Select all

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<xsl:result-document method="xml" standalone="yes" href="a.xml">
<hello></hello>
</xsl:result-document>
</xsl:template>

</xsl:stylesheet>
Version information: <oXygen/> XML Editor 16.1, build 2014112517, Saxon-EE 9.5.1.7 as the XSLT processor.

Could someone of the Oxygen staff look into this?

Re: Possible bug with xsl:result-document

Posted: Wed Mar 18, 2015 4:25 pm
by adrian
Hi,

It worked for me in v16.1 with a transformation scenario created for the XSL. The file 'a.xml' was created in the same folder as the .xsl.

Regarding xsl:result-document/@href, note that:
If the effective value is a relative URI, then it is resolved relative to the base output URI.
Did you specify an output file in the transformation scenario configuration (Output tab)?
Please check if you already have a folder named 'a.xml' in the same folder. If there's already a folder with that name, it won't be able to create a file of the same name.

Regards,
Adrian

Re: Possible bug with xsl:result-document

Posted: Wed Mar 18, 2015 5:28 pm
by Mathias Müller
Hi Adrian

Thank you for your answer. In the meantime, I realized that the problem was something completely different: The file was always created but the Finder window on Mac OS X did not properly refresh and sort the files. But from the terminal they are always visible.

By the way: Command line Saxon has an option "-t" which traces files that are read and written. I could not find this option in Oxygen. If it is really absent, perhaps it would be a good idea to include it in future versions?

Sorry for causing you extra work!
Regards

Mathias

Re: Possible bug with xsl:result-document

Posted: Tue Apr 28, 2015 10:40 am
by Radu
Hi Mathias,

Sorry for the delay, we'll consider this.
In the meantime you can also switch to the debugger perspective and do a "Run to End", it will open tabs for each document saved using the result-document feature.

Regards,
Radu