This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
conditionals not allowed at top-level
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] conditionals not allowed at top-level
- From: Mark Nahabedian <naha at ai dot mit dot edu>
- Date: Wed, 25 Apr 2001 10:00:22 -0400 (EDT)
- Reply-To: xsl-list at lists dot mulberrytech dot com
I trust this is an appropriate forum to suggest changes to the XSL
specification.
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 top-level (within the <stylesheet> element) <param>
element to control 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>).
I'd like to confine my code to a single file, but I suppose, as a
workaround, I could have separate XSLT files for the html table and
the SVG output formats and include the common code from yet a third
file.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list