W3C home > Mailing lists > Public > xproc-dev@w3.org > February 2011

Handle the first document in a sequence

From: Florent Georges <fgeorges@fgeorges.org>
Date: Wed, 2 Feb 2011 01:36:06 +0100
Message-ID: <AANLkTi=VzHW6UWgTB3MZemqQJTZpnBERa+=xg01OwnRv@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>

  I have a step that looks like the following:

    <p:declare-step type="..." name="mine">
       <p:input port="doc" primary="true"/>
       <p:input port="seq" sequence="true"/>
          <p:input port="source">
             <p:pipe port="seq" step="mine"/>

  Basically, it declares 2 ports: one is the primary, and the
other accepts a sequence of documents.  It has to store the first
document in the sequence.  Of course, the above excerpt is wrong,
because the source port of p:store does not accept sequences.

  How can p:store access only to the first doc?

  I thought about using p:for-each and p:iteration-position() (to
test if the current doc is the first doc), but I thought there
must be something simpler.

  Did I miss something?  Regards,

Florent Georges
Received on Wednesday, 2 February 2011 00:36:59 UTC

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