W3C home > Mailing lists > Public > xproc-dev@w3.org > April 2010

Re: Debugging xproc files

From: Dave Pawson <dave.pawson@gmail.com>
Date: Fri, 16 Apr 2010 12:02:53 +0100
Message-ID: <h2k711a73df1004160402nbe5aba96k2bceebb5d93ac999@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
On 16 April 2010 11:56, Norman Walsh <ndw@nwalsh.com> wrote:

> The p:log step is sometimes useful. Giving steps names is often useful.
> The cx:message and cx:tee steps are often useful.
>
> The cx:message step is an XML Calabash extension,
>
> <p:declare-step type="cx:message">
>  <p:input port="source"/>
>  <p:output port="result"/>
>  <p:option name="message" required="true"/>
> </p:declare-step>

So I could 'slip that in between' two steps? 'Splice' is the appropriate term
I think! At least for ropes.


>
> but cx:tee is an ordinary pipeline.
>
> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
>                xmlns:cx="http://xmlcalabash.com/ns/extensions"
>                type="cx:tee" name="main" version="1.0">
>  <p:input port="source" sequence="true" primary="true"/>
>  <p:output port="result" sequence="true" primary="true"/>
>  <p:option name="href" required="true"/>
>  <p:option name="debug" select="0"/>
>
>  <p:choose>
>    <p:when test="$debug != 0">
>      <p:store name="saving-debugging-output" method="xml" indent="true">
>        <p:with-option name="href" select="$href"/>

??? Insert the .. xml debug output? in here?


>      </p:store>
>    </p:when>

Like it! memories of xslt  ;-)
Only dump output when $debug is true.


>    <p:otherwise>
>      <p:sink name="discarding-debugging-output"/>
>    </p:otherwise>
>  </p:choose>
>
>  <p:identity name="identity">
>    <p:input port="source">
>      <p:pipe step="main" port="source"/>
>    </p:input>
>  </p:identity>
> </p:declare-step>
>
> Working on improving the error messages in XML Calabash is about
> medium high on my list.

It is the one thing that sets Saxon apart IMHO, great debugging info.


regards

-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
Received on Friday, 16 April 2010 11:03:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 16 April 2010 11:03:26 GMT