writing to message view from xproc

Questions about XML that are not covered by the other forums should go here.
Patrik
Posts: 227
Location: Hamburg/Germany

writing to message view from xproc

Fri Dec 12, 2014 1:54 pm

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: 2388

Re: writing to message view from xproc

Fri Dec 12, 2014 4:38 pm

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: 227
Location: Hamburg/Germany

Re: writing to message view from xproc

Mon Dec 15, 2014 11:21 am

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: 2388

Re: writing to message view from xproc

Mon Dec 15, 2014 4:32 pm

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

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests