[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Selecting stylesheet at runtime?

Subject: Re: Selecting stylesheet at runtime?
From: "Steve Muench" <smuench@xxxxxxxxxxxxx>
Date: Thu, 3 Feb 2000 14:13:44 -0800
apply stylesheet at runtime
You cannot conditionally include .xsl stylesheets
but conceivable you could use modes to solve
this problem where templates with mode="smoke"
would be used when you did a conditional:

<xsl:apply-templates mode="smoke"/>


_________________________________________________________
Steve Muench, Consulting Product Manager & XML Evangelist
Business Components for Java Development Team

----- Original Message ----- 
From: "Martin Rothschink, AxoNet Software" <Martin.Rothschink@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Thursday, February 03, 2000 2:37 AM
Subject: Selecting stylesheet at runtime?


| Hi,
| 
| I need to select the stylesheet at runtime, depending on my XML data.
| I tried to use something like
| 
| <xsl:template match="/">
| <xsl:apply-templates select="/RESULTS/RESULT" mode="switch"/>
| </xsl:template>
| 
| <xsl:template match="RESULT" mode="switch">
| <xsl:choose>
| <xsl:when test="@OBJECT='EMISSION' and @METHOD != 'SMOKE'">
| <xsl:include href="gas.xsl"/>
| </xsl:when>
| <xsl:when test="@OBJECT='EMISSION' and @METHOD = 'SMOKE'">
| <xsl:include href="smoke.xsl"/>
| </xsl:when>
| <xsl:otherwise>
| <xsl:include href="generic.xsl"/>
| </xsl:otherwise>
| </xsl:choose>
| </xsl:template>
| 
| But the xsl:include doesn't work. 
| 
| Regards
| Martin Rothschink
| 
| 
|  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| 


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.