- From: Alex Milowski <alex@milowski.org>
- Date: Fri, 10 Nov 2006 08:07:57 -0800
- To: public-xml-processing-model-wg@w3.org
Jeni Tennison wrote: > > Hi, > > Alex Milowski wrote: >> Norman Walsh wrote: >>> / Alex Milowski <alex@milowski.org> was heard to say: >>> | I'm not certain we have a good way to do this because a viewport >>> | always requires an output for the replacement. >>> | >>> | Any ideas how we might solve this? >>> >>> With an p:empty component that takes no inputs and returns an empty >>> document sequence? >> >> I thought about that... but we don't say how empty sequences are >> handled. >> >> I suppose we could say that a viewport's replacement must either >> be a singleton sequence or an empty sequence. An empty sequence >> has the effect of deleting the matching subtree. > > I was assuming that we'd allow an empty <p:output> if we wanted the > output to be bound to an empty sequence. Note that this is required > within <p:when>/<p:otherwise> as well, for situations where the > <p:choose> is effectively splitting a sequence of documents onto two > output ports. > > <p:choose step="previous" source="result"> > <p:when test="/foo"> > <p:output port="foos" step="previous" source="result" /> > <p:output port="bars" /> > </p:when> > <p:otherwise> > <p:output port="foos" /> > <p:output port="bars" step="previous" source="result" /> > </p:otherwise> > </p:choose> > > I was also assuming that a viewport's replacement could be a sequence of > documents, in which case the original element is replaced by the > concatenation of that sequence. This makes it easy to use viewport to > insert elements into a document. > > I agree with Henry that we need a 'delete' built-in component as well. > This is all good and right in line with my thinking. I had both a delete component in smallx as well as the ability to replace an element with a sequence of elements in a viewport. I think we should add a delete and/or empty step. I'll try to put something into the standard component list. --Alex Milowski
Received on Friday, 10 November 2006 16:08:08 UTC