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

Re: Debugging xproc files

From: Norman Walsh <ndw@nwalsh.com>
Date: Fri, 16 Apr 2010 06:56:34 -0400
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <m2aat3d5st.fsf@nwalsh.com>
Dave Pawson <dave.pawson@gmail.com> writes:
> How to you debug your xproc .. files?

With some difficulty. Like Vojtech, I sometimes bring out the java
debugger, but of course that's not an option for most folks :-)

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"/>

but cx:tee is an ordinary pipeline.

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
                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:when test="$debug != 0">
      <p:store name="saving-debugging-output" method="xml" indent="true">
        <p:with-option name="href" select="$href"/>
      <p:sink name="discarding-debugging-output"/>

  <p:identity name="identity">
    <p:input port="source">
      <p:pipe step="main" port="source"/>

Working on improving the error messages in XML Calabash is about
medium high on my list.

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com> | Pleasure is seldom found where it is
http://nwalsh.com/            | sought; our brightest blazes of
                              | gladness are commonly kindled by
                              | unexpected sparks.--Dr. Johnson

Received on Friday, 16 April 2010 10:57:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:06 UTC