Re: Output of cx:message on Oxygen

On 13/11/2017 21:29, Andreas Mixich wrote:
> Hi,
> 
> it seems, I can not get the output of |cx:message| on Oxygen.
> 
> |<p:for-each> <p:iteration-source
> select="//c:file[contains(@name,'.epub')]"/> <p:output port="result"
> sequence="true"/> <cx:message> <p:with-option name="message"
> select="'Blah'"/> </cx:message> </p:for-each> |
> 
> “Blah” simply doesn’t appear anywhere. I have enabled “Messages from
> XProc” in the Oxygen prefs.
> Am I doing it wrong?

I run XProc from the command line most of the time, therefore I’m not 
familiar with oXygen’s behavior in this regard.

The oXygen documentation says on 
https://www.oxygenxml.com/doc/versions/19.1/ug-editor/topics/preferences-xproc-engines.html

“When Show XProc messages is selected all messages emitted by the XProc 
processor during a transformation will be presented in the Results view.”

I’ve just tested it. It is apparently not true for oXygen 19.1. Maybe 
the oXygen folks can investigate this.

> 
> Then I thought, that |cx:message| doesn’t go to the console/message
> pane, but I must route it to an output, so I tried:
> 
> |<p:output port="message" primary="false"> <p:pipe port="result"
> step="msg" sequence="true"/> </p:output> [..] <p:for-each>
> <p:iteration-source select="//c:file[contains(@name,'.epub')]"/>
> <p:output port="result" sequence="true"/> <cx:message name="msg">
> <p:with-option name="message" select="'blah'"/> </cx:message>
> </p:for-each> |
> 
> The error Calabash gives me is:
> 
> |XE0001 : Unreadable port: result on msg |

Two issues here:

1. The result port of cx:message replicates the input. It’s a p:identity 
with the side effect of writing a message to the console. So you can’t 
get the message on an ouput port of cx:message.

2. The step named 'msg' is not visible at the location where you declare 
the 'message' output port. This is because the 'msg' step is wrapped in 
a p:for-each. You need to declare an output port of the p:for-each and 
connect it to an ouput port of the 'msg' step in order to make it 
available to the scope outside p:for-each. This explains XE0001.

Gerrit

> 
> ​
> 

-- 
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit.imsieke@le-tex.de, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschäftsführer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vöckler

Received on Monday, 13 November 2017 20:53:45 UTC