Handle the first document in a sequence

  Hi,

  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:store>
          <p:input port="source">
             <p:pipe port="seq" step="mine"/>
          </p:input>
       </p:store>
       ...

  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
http://fgeorges.org/

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