Re: [xsl] Dynamic stylesheet selection

Subject: Re: [xsl] Dynamic stylesheet selection
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 4 Apr 2001 13:43:12 +0100
> is it possible to choose one stylesheet or another based on input,

Not on input to XSL (it's too late by then) but of course your wrapper
API might allow such a thing.

> A subquestion of that is: is it possible to select different output
> types depending on input

Not in standard XSLT 1.0 but in the 1.1 proposals the attributes to
xsl:output become AVT's so can be changed on the fly.
However for the case you mention:

> for a certain XML document, I
> want to output XML, but for others, I want to output HTML. 

all you need do is not specify an output type, then if the top level
result element is html (any case) it will default to html output type,
otherwise it will use xml.


This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit

 XSL-List info and archive:

Current Thread