W3C home > Mailing lists > Public > xproc-dev@w3.org > October 2008

Re: calabash p:delete not working

From: Josh Matthews <joshmatthews@gmail.com>
Date: Sun, 5 Oct 2008 18:47:38 -0400
Message-ID: <ffee23380810051547n1987279eh67da6d1105225b2c@mail.gmail.com>
To: "Florent Georges" <fgeorges@fgeorges.org>
Cc: mozer <xmlizer@gmail.com>, "Norman Walsh" <ndw@nwalsh.com>, "XProc Dev" <xproc-dev@w3.org>
On Sun, Oct 5, 2008 at 11:46 AM, Josh Matthews <joshmatthews@gmail.com>wrote:

> On Sun, Oct 5, 2008 at 5:47 AM, Florent Georges <fgeorges@fgeorges.org>wrote:
>
>>
>>
>  What about the following:
>>
>>    <p:delete>
>>        <p:with-option name="match" select="
>>            if ( exists(//a) ) then //a else '/..'"/>
>>    </p:delete>
>
>
> Well, yes, that would work - but that comes back to my original point about
> XML flexibility.
>

Another clarification: that actually wouldn't work. "if (...) then ..." is
not a valid XSLT Pattern.

So you would have to wrap in a <p:choose> or a <p:try> to do that.

Cheers,
Josh Matthews
Received on Sunday, 5 October 2008 22:48:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 5 October 2008 22:48:14 GMT