Page 1 of 1

writing to message view from xproc

Posted: Fri Dec 12, 2014 1:54 pm
by Patrik
Hi,

from within my xslt transformations I used xsl:message to give some feedback to the user (for intance something like "file xxx generated").

Now that I started using xproc I'd like to produce the same kind of feedback. I know you can write content to an output port and display it as the result but this is quite less "beautiful". And I don't get any output from the xsl:message inside the xproc/p:xsl as well.

So, is there any way to write to message-window from xproc?

Thanks and regards,

Patrik

Re: writing to message view from xproc

Posted: Fri Dec 12, 2014 4:38 pm
by adrian
Hi,

It doesn't look like that's possible. There's a discussion on the xproc-dev about this.
http://lists.w3.org/Archives/Public/xpr ... /0003.html

If you're using Oxygen and want to see XProc messages please make sure you have enabled in Options > Preferences, XML / XProc, the option Show XProc messages.

Regards,
Adrian

Re: writing to message view from xproc

Posted: Mon Dec 15, 2014 11:21 am
by Patrik
Hi Adrian,

thanks for the hint. With "Show XProc messages" and cx:message as well as p:error I get an output that feels acceptable.

However, i will have to implement some custome xproc-steps in the next weeks anyway. Thus, I'm wondering if it is possible to implement an xproc-step in java that writes to the oxygen message view? What method fomr the oxygen api would I have to call to write such a mesage?

Thanks and regards,

Patrik

Re: writing to message view from xproc

Posted: Mon Dec 15, 2014 4:32 pm
by adrian
Hi,

Unfortunately there is no public API that does this (write a log in the results panel).
And even if it did exist, you would need an Oxygen plugin in order to have access to the necessary Java objects, because there is very little static API.

If you go the Java way, you might as well write the log to a file (use a logging library like log4j) and keep the log file open in Oxygen (you can dock it at the bottom of the editor area to make it look like a log). You may need to click in that editor to trigger Oxygen to reload it.

Regards,
Adrian