[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Hi,
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.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: Passing parameters to xsl
Subject: Re: Passing parameters to xsl From: "Joseph Alex" <alex_jos@xxxxxxxxxxx> Date: Sat, 01 May 1999 05:52:40 PDT |
Hi,
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.
THanks, Alex
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
Hi,
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 :
<customers>
<customer id="1">
<name/>
</customer>
<customer id="2">
<name/>
</customer>
<customer id="3">
<name/>
</customer>
</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.
Sunil.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Changing text "in place", David Carlisle | Thread | RE: Passing parameters to xsl, Mike Dierken |
Administrivia, XSL-List Owner | Date | Changing text "in place", Michel Goossens |
Month |