A generalisation of delete and unwrap

Delete and unwrap could be subsumed by a more general "replace"
component, which uses an XPath to specify the replacement.  The XPath
would be evaluated relative to the selected node.  So replacing //foo
by nothing deletes foo elements; replacing //foo by node() unwraps the
children of foo elements.

(There isn't a trivial XPath expression for "nothing", though many
can be constructed.  But an empty XPath would be an obvious choice.)

-- Richard

Received on Thursday, 11 January 2007 23:03:11 UTC