XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Jerry JanofskySubject: Dynamic include
Author: Jerry Janofsky
Date: 01 Oct 2006 09:58 AM

Is it possible to have a dynamic include? I want a stylesheet to include another stylesheet based on a parameter. I've tried something similar to the example below, but it doesn't work. Am I doing something wrong? If I can't do this, is there another way?

Your help will be appreciated.

Jerry J
Satuit Systems


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet>

<xsl:param name="style" select="'default-style.xsl'" />

<xsl:include href="{$style}" />

</xsl:stylesheet>

Postnext
Ivan PedruzziSubject: Dynamic include
Author: Ivan Pedruzzi
Date: 02 Oct 2006 08:39 AM
Hi Jerry,

XSLT does not allow to compute include/import at run-time.

An alternative approach could be to generate your XSLT
programmatically using XSLT.

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Posttop
Jerry JanofskySubject: Dynamic include
Author: Jerry Janofsky
Date: 02 Oct 2006 08:46 AM
I do understand that now.

Thanks again Ivan.

Jerry J

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! 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

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
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.