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

Re: p:replace

From: Alex Milowski <alex@milowski.org>
Date: Sun, 30 Jul 2006 12:43:32 -0700
Message-ID: <44CD0BE4.3030603@milowski.org>
To: public-xml-processing-model-wg@w3.org

Norman Walsh wrote:
> p:replace takes a primary document, an XPath expression, and a
> document sequence and performs the following transformation:
> the first (in document order) set of contiguous nodes in the primary
> input document that matches the XPath expression is replaced with
> the contents of the first document in the document sequence.
> The second set of nodes is replaced by the second, etc., until
> all of the matched areas have been replaced.

This seems very complicated and error prone to me.

One technical problem that it does not address is that it
assumes the document sequence (e.g. replacement) can be produced
externally.

In all of my uses of my 'subtree' step in smallx, I take the
element that matched and use it to *produce* the replacement.  As
such, the above component, as described, would not work.

Also, this kind of component is practically impossible to stream.

--Alex Milowski
Received on Sunday, 30 July 2006 19:43:51 GMT

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