Re: A Strange Viewport

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