W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > July 2006

Re: Use Case 5.29: Large Document Subtree Iteration

From: Alex Milowski <alex@milowski.org>
Date: Thu, 13 Jul 2006 08:13:28 -0700
Message-ID: <44B66318.90000@milowski.org>
To: public-xml-processing-model-wg@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:48 GMT