This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

conditionals not allowed at top-level



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]