Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
XSLT Help and Discussion
»
Conditional Imports
Topic
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
next
Subject:
Conditional Imports
Author:
Tadd Stuart
Date:
24 Jan 2007 10:23 AM
Is there a way to conditionally control the importing of child stylesheets? Here is the master stylesheet with what I would like to do.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:import href="ClassEligibility.xsl"/>
<xsl:import href="GeneralHeader.xsl"/>
<xsl:import href="GeneralPolicy.xsl"/>
<xsl:import href="ProposedRates.xsl"/>
<xsl:import href="Demographics.xsl"/>
<xsl:import href="StandardProvisions.xsl"/>
-- if (some condition is true)
<xsl:import href="ManualRates.xsl"/>
<xsl:import href="DiscountedRates.xsl"/>
-- end if
<xsl:output method="html"/>
<xsl:template match="/">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title>
<xsl:value-of select="Root/Heading/RequestName"/> 
<xsl:value-of select="Root/Heading/CreateDate"/> 
<xsl:value-of select="Root/Heading/CreateTime"/></title>
<link href="style/Output.css" type="text/css" rel="stylesheet"/>
</head>
<body oncontextmenu="return false">
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<!-- Overrides to the Default Sections -->
</xsl:stylesheet>
top
Subject:
Conditional Imports
Author:
Tony Lavinio
Date:
25 Jan 2007 01:05 PM
No. Imports are resolved at compile time, not runtime.
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
Powered by
Stylus Studio
, the world's leading
XML IDE
for
XML
,
XSLT
,
XQuery
,
XML Schema
,
DTD
,
XPath
,
WSDL
,
XHTML
,
SQL/XML
, and
XML Mapping
!
Go to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.