Possible bug with xsl:result-document

Here should go questions about transforming XML with XSLT and FOP.
Mathias Müller
Posts: 2

Possible bug with xsl:result-document

Wed Mar 18, 2015 1:18 pm

(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">

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

Could someone of the Oxygen staff look into this?
Posts: 2389

Re: Possible bug with xsl:result-document

Wed Mar 18, 2015 4:25 pm


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.

Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
Mathias Müller
Posts: 2

Re: Possible bug with xsl:result-document

Wed Mar 18, 2015 5:28 pm

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!

Posts: 5379

Re: Possible bug with xsl:result-document

Tue Apr 28, 2015 10:40 am

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.

Radu Coravu
<oXygen/> XML Editor

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 1 guest