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

Re: p:use-when with p:template ?

From: Norman Walsh <ndw@nwalsh.com>
Date: Mon, 25 Jul 2011 09:47:05 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <m2d3gy5v6u.fsf@nwalsh.com>
James Fuller <jim@webcomposite.com> writes:
> consider the following;
>
> <p:identity>
> <p:input port="source">
> <p:inline>
> <root>
>    <doc p:use-when='$somevar eq 1'>Hello world!</doc>
>    <doc>Hello world!</doc>
>    <doc>Hello world!</doc>
> </root>
> </p:inline>
> </p:input>
> </p:identity>
>
> in current xproc definition we do not allow conditional element
> exclusion inside of p:inline [1]
>
> which I understand from reviewing email archive the merits have been debated
>
> but perhaps we should consider their usage in p:template [2] ?

I'd be reluctant to change the rules for p:inline based on context.
You can easily achieve the result you want by passing the body through
a p:delete step (or some other pipeline).

> Jim Fuller
>
> [1] XProc conditional element exclusion http://www.w3.org/TR/xproc/#use-when
> [2] p:template W3C Note http://www.w3.org/TR/xproc-template/

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 413 624 6676
www.marklogic.com

Received on Monday, 25 July 2011 13:47:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 25 July 2011 13:47:40 GMT