Re: Viewport and nested selected nodes

On 10/25/06, Alex Milowski <> wrote:

> That use of 'select' is completely inconsistent with the use
> described for 'viewport'.

Alex, I agree: having 'select' work differently in both cases would
confuse me. And if we want to have two different behaviors, we should
at least use different attribute names.

Jeni, I see your use case, but it seems to me that even a
generalization of that use case can be handled fairly elegantly by:

1) First extracting the elements you are interested in with XSLT to
create a document that contains those elements under some root
2) Then iterating on the children of the root element with a <p:for-each>.

Having to choose between:

A) <p:viewport> and <p:for-each> are consistent. They are both
guaranteed to stream, so they can both be used on large documents.
B) <p:for-each> uses XPath and iterates over all the nodes so it can
be used to handle directly your use case.

I would go with A.

Blog (XML, Web apps, Open Source):

Received on Thursday, 26 October 2006 01:32:52 UTC