xsl-list
[Top] [All Lists]

RE: Multiple output types (text and XML)

2002-12-12 03:14:56
I've got a stylesheet that depending on a parameter outputs 
either text or XML.  Since xsl:output only takes "xml", 
"html", "text", or a qname, I'm currently manually changing 
the stylesheet as appropriate to output a different type.

Does anyone have any suggestions for getting around this?  I 
know XSLT2 makes the method attribute an AVT, but right now 
I'm working with v1.

Actually, in the latest XSLT 2.0 drafts we've withdrawn that capability,
though we've made it possible to have multiple named xsl:output
declarations from which you can choose at run-time.

Java (JAXP) processors allow you to override the xsl:output properties
from the API before invoking the transformation. If you're in the MSXML
world, it's probably another of those cases where you modify the DOM
representing the stylesheet before you compile it.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>