W3C home > Mailing lists > Public > xproc-dev@w3.org > August 2015

Re: Simple way to produce a message?

From: Imsieke, Gerrit, le-tex <gerrit.imsieke@le-tex.de>
Date: Wed, 19 Aug 2015 17:20:56 +0200
To: xproc-dev@w3.org
Message-ID: <55D49ED8.4060003@le-tex.de>
For Calabash:
…
xmlns:cx="http://xmlcalabash.com/ns/extensions"
…
<p:import href="http://xmlcalabash.com/extension/steps/library-1.0.xpl"/>

And then (example):

<cx:message>
  <p:with-option name="message" select="'NNNNNNNNNNN ', /*/name()"/>
</cx:message>

Sometimes it will be necessary to connect the source port of cx:message
explicitly, as in

<cx:message>
  <p:input port="source">
    <p:pipe port="result" step="other"/>
  </p:input>
<p:with-option name="message" select="'GGGGGGGGGGGG ', string-join(for
$n in /c:response/c:body/* return (name($n), for $a in $n/@* return
concat(name($a), '=', $a)), ' ')"/>
</cx:message>

and also add p:sink in between as necessary.

Sometimes you have to make sure that a message is emitted before another
step runs. If that other step does not consume what’s on the messages
result port, the processor might execute the other step before executing
cx:message. In these cases, add a @name to that cx:message and make the
other step depend on the message:

<cx:message name="msg1">
…
</cx:message>

<p:sink/>

<my:other-step cx:depends-on="msg1">
…


On 19.08.2015 17:08, dvint@dvint.com wrote:
> I'm trying to debug my XPROC script. I'm looking for a way to produce a
> simple message that might have a variable result and such to follow the
> flow through my script. I'm not finding anything. The closes I came was
> error, but that stops the flow of the script.
> 
> Any tricks or suggestions?
> 
> ..dan
> 
> 

-- 
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 Wednesday, 19 August 2015 15:21:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:25 UTC