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


From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Sat, 29 Jul 2006 17:15:42 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <87vepg15a9.fsf@nwalsh.com>
Having described for-each, I spent some time trying to decide how to
describe p:viewport or p:peephole. In the end, I decided it was really
hard to do given that there may be multiple documents on any given
pipe. I think we can describe such an element if we want to, but I
convinced myself that Richard's suggestion at the last telcon of
another component for this purpose was a cleaner solution.

I imagine the p:replace element, or whatever we call it, would have
the following signature:

  <p:declare-component name="p:replace">
    <p:declare-input port="input"/>
    <p:declare-input port="replacement"/>

I'm sort of imagining the select attribute would be on the p:replace
element, which means we'll have to find some way of declaring that in
a component declaration.

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.

It is an error if number of matches is not the same as the number
of documents in the document sequence.

                                        Be seeing you,

Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Saturday, 29 July 2006 21:15:54 UTC

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