conditionals not allowed at top-level

Conditional XSLT elements like <choose> and <if> are not currently
allowed as direct children of <stylesheet>.  I'm writing to request
that this restriction be relaxed.

I'm working on a stylesheet which is to transform its input data for
presentation as either SVG (if I ever get that to work) or as an HTML
table.

I've defined a <param> element that's a direct child of my
<stylesheet> element to select the output format.  I attempted to have
a top-level <choose> element to select what <output> element should be
generated depending on the value of that parameter.  Alas, the
processor complained, and rightly so, as I see from the DTD in the
XSLT spec that <choose> is not allowed directly within <stylesheet>.

I wonder if there is any particular reason for this restriction.  It
seems to me that there are several top-level elements which one might
like to conditionalize, though there are others which the processor
might find difficult to treat conditionally (e.g. <template>).

Please reconsider whether conditionals like <choose> and <if> can be
allowed directly under <stylesheet>.

Received on Saturday, 28 April 2001 02:51:19 UTC