W3C home > Mailing lists > Public > xproc-dev@w3.org > July 2009

Refer to current node in p:for-each

From: Florent Georges <fgeorges@fgeorges.org>
Date: Tue, 21 Jul 2009 16:09:16 +0200
Message-ID: <ebaca5bf0907210709r3fcd039ak5ea62b8a3d916ff7@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
  Hi,

  Within a p:for-each, I need to use the element I am looping
over in two steps:

    <p:for-each>

       <p:iteration-source select="//book"/>

       <!-- implicitly use as input the current book -->
       <p:xslt>
          <p:input port="stylesheet">
             ...
          </p:input>
       </p:xslt>

       <!-- need also to use the current book as input -->
       <p:xslt>
          <p:input port="source">
             <!--
                what can I use here to refer to current book?
             -->
          </p:input>
          <p:input port="stylesheet">
             ...
          </p:input>
       </p:xslt>

       ...

  How can I refer to the current book in the source port of the
second XSLT step?

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/
Received on Tuesday, 21 July 2009 14:09:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 21 July 2009 14:10:00 GMT