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]

Re: Dynamic stylesheet selection



> 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.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 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]