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

RE: xsl:include with parameter?

Subject: RE: xsl:include with parameter?
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 18 Jun 2004 23:45:27 +0100
xsl include parameter
This is a FAQ, and the answer is that it can't be done. As in most other
programming languages, you can't change the code of the program based on the
data that it reads at run-time.

You'll have to find a different solution to your problem. If you describe
the problem, I expect someone will help with it.

Michael Kay 

> -----Original Message-----
> From: yguaba@xxxxxxxxxxxx [mailto:yguaba@xxxxxxxxxxxx] 
> Sent: 18 June 2004 23:32
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  xsl:include with parameter?
> 
> Hi all,
> 
> I would like to be able to include a file with additional XSL 
> templates in a primary XSL file. That's easy. However, I would like 
> the URI for the "include" file to come from a field in the XML 
> document being processed.
> 
> 
> Example:
> 
> XML snippet:
> 
> <ROOT>
> 	<Parameters>
> 		
> <additional_xsl>/library/xsl/add_stylesheet.xsl</additional_xsl>
> 	</Parameters>
> </ROOT>
> 
> 
> XSL snippet:
> 
> <xsl:param name="additional_xsl" 
> select="/ROOT/Parameters/additional_xsl"/>
> <xsl:include href="{$additional_xsl}"/>
> 
> 
> This doesn't work. It's occurred to me that the XSL document may need 
> to be parsed in its entirety before the XML document is processed. Is 
> that true? Or is there hope for me still? Does anyone have any other 
> ingenious suggestions?
> 
> Thanks in advance,
> 
> Erik
> 
> --+------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> --+--
> 
> 


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.