writing to message view from xproc

Questions about XML that are not covered by the other forums should go here.
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

writing to message view from xproc

Post 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
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: writing to message view from xproc

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: writing to message view from xproc

Post 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
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: writing to message view from xproc

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply