Re: Use Case 5.15: Parse and/or Serialize RSS descriptions

Alex,

On 7/12/06, Alex Milowski <alex@milowski.org> wrote:
> The component defines an output called 'result'.  That element maps
> that output name to a name that can be referenced in the pipeline.

OK, got it now. But still, as mentioned in my previous email, I would
find it easier to understand if it was:

<p:output name="result" label="parsed"/>

Instead of:

<p:output name="parsed" from="result"/>

> In this case, the for-each is iterating over sub-trees.  It takes each
> matching element and makes a temporary document out of that for
> the contained steps where that temporary document is labeled with
> the input label specified in 'to'.
>
> The missing bit was the 'replacement' attribute that I sent out in
> some corrected examples.  The replacement attribute specifies an
> output label for one of the contained steps.  The document element of
> that output will be the replacement element for the input's subtree.

Again, this is a purely syntactic consideration, but what would you think of:

<p:for-each select="description" over="feed" to="iteration"
        replacement="parsed" label="final">
    <p:step kind="p:parse">
        <p:input name="document" from="iteration"/>
        <p:output name="result" label="parsed"/>
        <!-- Parameters here -->
    </p:step>
</p:for-each>

Instead of:

<p:for-each select="description" over="feed" to="iteration"
        replacement="parsed">
    <p:output name="final" from="feed"/>
    <p:step kind="p:parse">
        <p:input name="document" from="iteration"/>
        <p:output name="parsed" from="result"/>
        <!-- Parameters here -->
    </p:step>
</p:for-each>

What is different:

1) Change as discussed earlier for the <p:output> inside the step.
2) Label on <p:for-each> instead of <p:output> inside the
<p:for-each>. Benefits: lighter syntax, avoid the asymmetry where
there would be a <p:output> but no <p:input>.

Alex
-- 
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/

Received on Thursday, 13 July 2006 02:54:03 UTC