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

FW: p:store and default readable ports

From: Philip Fennell <Philip.Fennell@marklogic.com>
Date: Thu, 25 Nov 2010 04:12:29 -0800
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <D20C296D14127D4EBD176AD949D8A75A471550F1@EXCHG-BE.marklogic.com>

Did you mean to reply-all?

From: Alex Muir [mailto:alex.g.muir@gmail.com]
Sent: 25 November, 2010 11:28 AM
To: Philip Fennell
Subject: Re: p:store and default readable ports

I asked this question a while back and based on response from James Sulak


I use the following:

The code uses a declared step which handles the identity and then accepts a boolean to determine if the output should be written using the passed href parameter as the file name.

 <p:declare-step name="saveDocument" type="mh:save-output">
    <p:input port="source" primary="true"/>
    <p:output port="result">
      <p:pipe port="result" step="ident"/>
    <p:option name="step-name" required="true"/>
    <p:option name="save" select="'false'"/>
    <p:option name="href" required="true"/>
    <p:identity name="ident"/>

      <p:when test="$save = 'true'">
          <p:with-option name="href" select="$href">
            <p:pipe port="result" step="ident"/>

And use it in the code.

         <mh:save-output step-name="debug1">
            <p:with-option name="save" select="~~~debug~~~"/>
            <p:with-option name="href"

replace the ~~~debug~~~ with true() or false()


Some good music
On Wed, Nov 24, 2010 at 4:41 PM, Philip Fennell <Philip.Fennell@marklogic.com<mailto:Philip.Fennell@marklogic.com>> wrote:

As I myself found out recently, the p:store step doesn't have a primary output port so that you don't have to explicitly bind the following step to it. Your subsequent step can use a p:pipe on its input source to bind it to the result of the step before the p:store.

<p:http-request name="request"/>
<p:store href="foo.xml"/>
  <p:input port="source">
    <p:pipe port="result" step="request"/>

Something like that.



From: xproc-dev-request@w3.org<mailto:xproc-dev-request@w3.org> [mailto:xproc-dev-request@w3.org<mailto:xproc-dev-request@w3.org>] On Behalf Of Tony Rogers
Sent: 24 November, 2010 4:17 PM
To: XProc Dev
Subject: p:store and default readable ports

I know that the p:store step does not have a primary output.

My general question:
            Does this mean that in a pipeline that flows in the default order (top to bottom of pipeline document), p:store cannot be used in the middle of things?

My pipeline specifics:
            I have a pipeline that does an HTTP request.  I want to store the results of that request, AND I also want to perform some further processing on those results immediately after storing them.
            The problem is that if I store them, p:store does not have a primary output, so the automatic flow of my pipeline stops.  :(

Received on Thursday, 25 November 2010 12:13:00 UTC

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