Re: Use Case 5.29: Large Document Subtree Iteration

Norman Walsh wrote:
> / Alex Milowski <alex@milowski.org> was heard to say:
> [...]
> |    <p:for-each select="section" over="large-doc" to="iteration">
> |       <!-- input isn't needed here because this "for-each" has
> |            to iterate over elements.  The input is identified by
> |            the 'over' attribute and the binding for each result
> |            element is specified by the 'to' attribute. -->
> |       <p:output name="final" from="transformed"/>
> |       <p:step kind="p:xmlbase">
> |          <p:input name="input" from="iteration"/>
> 
> I like this a lot better than the previous example which appeared to
> have the for-each pointing at an input. But I think this would be
> clearer this way:
> 
>     <p:for-each select="section" over="large-doc" name="iteration">
>        <p:output name="final" from="transformed"/>
>        <p:step kind="p:xmlbase">
>           <p:input name="input" from="iteration"/>
>           ...

    <p:for-each select="section" over="large-doc" to="iteration"
                replacement="transformed">
       <!-- input isn't needed here because this "for-each" has
            to iterate over elements.  The input is identified by
            the 'over' attribute and the binding for each result
            element is specified by the 'to' attribute. -->
       <p:output name="final" from="large-document"/>

The output of the step is the original input (in this case
the 'large-doc' labeled input.  The 'transformed' output is
the replacement for the matched element.


--Alex Milowski

Received on Thursday, 13 July 2006 15:13:43 UTC