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

Re: A Strange Viewport

From: Alex Milowski <alex@milowski.org>
Date: Tue, 03 Oct 2006 14:16:57 -0700
Message-ID: <4522D349.4030607@milowski.org>
To: public-xml-processing-model-wg@w3.org

Richard Tobin wrote:
>> The contained step 'a' should be executed as many times as there
>> are 'x' subtrees but it doesn't use as input anything in the
>> viewport and doesn't contribute to the viewport's output.
> I am reminded of the hack used in XSLT 1 to do something ten times:
> get a node-set with 10 nodes in it - (//node())[position() < 10] 
> perhaps - and do a for-each on them.
> I don't think we should ban it, but perhaps we should provide some
> other simple iteration construct.

I actually found a non-pathological example where you want to find
all instances of a element and replace it with a constant
document.  Inside the viewport you just have an identity step.  So, it
is also an example of a real use of the identity component.

Also, this case of non-traceable inputs comes up when you have
components whose inputs are statically bound.  In theory, they can
run at anytime and so inside an iteration you need to control that.
Once you've figured that out, this example is quite easy to implement.

--Alex Milowski
Received on Tuesday, 3 October 2006 21:17:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:41 UTC