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

Re: A generalisation of delete and unwrap

From: Innovimax SARL <innovimax@gmail.com>
Date: Sat, 13 Jan 2007 15:07:53 +0100
Message-ID: <546c6c1c0701130607n78a9de4cx2d170fe0a534a19f@mail.gmail.com>
To: "Richard Tobin" <richard@inf.ed.ac.uk>
Cc: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>

Richard,

I think this "replace" is a little bit too powerful

what will be the behaviour of
replace("//foo", "@bar") in a document where "bar" is a required
attribute of "foo" ?
or
replace("//foo", "..") ?
or even
replace("//foo", "following::foo") ? and the orther one with preceding axis ?

Mohamed



On 1/12/07, Richard Tobin <richard@inf.ed.ac.uk> wrote:
>
> 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
>
>


-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 8 72 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 
Received on Saturday, 13 January 2007 14:08:03 GMT

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