RE: Passing parameters to xsl

Subject: RE: Passing parameters to xsl
From: Mike Dierken <mike@xxxxxxxxxxxxxxx>
Date: Mon, 3 May 1999 08:51:19 -0700
Modifying the DOM is one way. Another that I use is dynamic entity
Take a look at:
The example is in Java & uses the DataChannel XML parser, but the ideas are
applicable to other parsers & programming languages.

Mike D

-----Original Message-----
From: Joseph Alex [mailto:alex_jos@xxxxxxxxxxx]
Sent: Saturday, May 01, 1999 5:53 AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: Passing parameters to xsl


I had this problem sometime back and these are my solutions to this problem.

Am not sure whether this would solve your problems or whether they are 
absolutely correct. Anyway here it goes..

I am using IE5, IIS etc, for both client and server side combination of XML 
and XSL using ASPs. Since the XSL is used only during transformation, you 
really can't pass parameters to XSL. The only way to counter this would be 
dynamically generate XSL based on the requirements or have multiple XSLs 
ready if that is feasible, both of which I have tried successfully. Another 
way which I used extensively in my program was to manipulate the XML DOM 
using the ASP scripts. Depending on the parameter or whatever, when ASP 
processes XML and XSL, I appended a child node to the XML DOM object and the

XSL has the code in it to check which parameter it has etc and do the 
necessary action. And of course, XSL can certainly call the functions in the

ASP later which could alter the DOM, or whatever. In fact, I implemented 
client side and server side sorting entirely doing this.

Hope this helps. I don't think there is a more direct way to do this, if 
anybody knows of any, please let me know.


>From: Sunil Jain <sujain@xxxxxxxxx>
>Reply-To: xsl-list@xxxxxxxxxxxxxxxx
>To: XSL-List@xxxxxxxxxxxxxxxx
>Subject: Passing parameters to xsl
>Date: Fri, 30 Apr 1999 14:01:35 -0600
>is there any way to pass paramters to xsl so that it will behave 
>differently based on input parameters.
>for example if I have following xml :
>	<customer id="1">
>		<name/>
>	</customer>
>	<customer id="2">
>		<name/>
>	</customer>
>	<customer id="3">
>		<name/>
>	</customer>
>Now I want to generate three different html based on the parameter (1,2,3) 
>one for each customer id(1,2,3)
>Thanks in advance for responses.
>  XSL-List info and archive:

Get Your Private, Free Email at

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread