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

On Mon, Jul 25, 2011 at 3:47 PM, Norman Walsh <ndw@nwalsh.com> wrote:
> 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).

yes you can easily achieve the result but then you 'double up' if you
are taking advantage of p:use-when elsewhere ... I don't feel that
strongly about this.

ta, J

Received on Tuesday, 26 July 2011 20:11:28 UTC