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

Re: Viewport and nested selected nodes

From: Alessandro Vernet <avernet@orbeon.com>
Date: Wed, 25 Oct 2006 18:32:40 -0700
Message-ID: <4828ceec0610251832r11d30386ocbfb05f0bdf1d03a@mail.gmail.com>
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>

On 10/25/06, Alex Milowski <alex@milowski.org> 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
element.
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.

Alex
-- 
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/
Received on Thursday, 26 October 2006 01:32:52 GMT

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