Page 1 of 1

batch XSLT messages

Posted: Fri Oct 15, 2010 3:49 pm
by gpm2a
When running an XSLT transformation on a directory of XML files, as opposed to a single file, the "Messages" pane at the bottom of the editor window that shows messages from <xsl:message> elements in the stylesheet does NOT remain open if the last file processed doesn't generate any messages. That is, the Messages pane opens individually for each file processed, rather than once for the whole batch. There doesn't even appear to be a way to open the Messages pane manually to see if any messages were generated during the batch process. Any suggestions?

Re: batch XSLT messages

Posted: Fri Oct 15, 2010 4:13 pm
by adrian
Hello,

It's a bug. The Messages pane was meant for debugging/transforming one stylesheet at a time. When batch transformations were introduced this pane was overlooked. As a result the Messages pane is cleared before running each of the batch transformations.

I've added this to our issue tracking tool and we will fix it in a future version of Oxygen.

Regards,
Adrian

Re: batch XSLT messages

Posted: Fri Oct 15, 2010 5:03 pm
by gpm2a
Adrian,

Thanks for the quick reply. I'm glad to know it's on your list.

In the meantime, is there a way to redirect <xsl:message> output to a file? Couldn't find anything obvious in Preferences. I also tried using <xsl:message terminate="yes"> but that results in a generic error message from Saxon that supersedes/overwrites my <xsl:message> message which is what I need to see.

Thanks,
Greg

Re: batch XSLT messages

Posted: Fri Oct 15, 2010 5:26 pm
by adrian
Greg,

I'm afraid Oxygen doesn't provide an option for this. Maybe you can find something in the configuration file of the Saxon-PE/EE to redirect the xsl:message output to a file.

Another solution would be to configure the XSLT processor as a custom engine(Options -> Preferences -> XML -> XSLT-FO-XQuery -> Custom Engines) and then check the Warnings pane(xsl:message messages are redirected to stderr).

For Saxon 6.5.5 you can use this command line:

Code: Select all

java -jar saxon.jar -o "${out}" "${xml}" "${xsl}"
Use the "lib" folder from Oxygen as the working directory.

Regards,
Adrian