Subject: RE: [xsl] Problems passing parameters using MSXML 3.0 From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx> Date: Mon, 12 Apr 2004 16:34:46 -0500 |
Hi Jon, > Do any of you have code laying around that passes parameters to a transform using MSXML 3.0? > Any example would be greatly appreciated, web-page script or not! I used to use the following function in my older classic ASP apps, using MSXML 3.0, and Jscript. The compiled processor 'srcDoc' was created in the Global.asa file, and passed into the function as a parameter. Note that the parameter 'IdCd' needed to be casted to a string because it was passed in as part of the QueryString (I remember well that passing it in "as was" didn't work even if you would expect it to work). // transforms the XML using the compiled XSL Stylesheet // in this case, the response object is used to output the result tree function transformDataS(srcDoc,xslProc,IdCd,Fecha,Hora,Fecha1,Fecha2,Fecha3,Fecha4) { // point to the compiled processor xslProc.input = srcDoc; // add the parameters used inside the stylesheet xslProc.addParameter("Hora", Hora, ""); xslProc.addParameter("Fecha", Fecha, ""); xslProc.addParameter("Fecha1", Fecha1, ""); xslProc.addParameter("Fecha2", Fecha2, ""); xslProc.addParameter("Fecha3", Fecha3, ""); xslProc.addParameter("Fecha4", Fecha4, ""); xslProc.addParameter("IdCd", IdCd.toString(), ""); // perform the XSL Transformation xslProc.transform(); // write result to browser Response.Write(xslProc.output); return true; } If you need more help let us know. HTH, Pieter
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Problems passing parameters u, Jon Schwartz \(Volt\ | Thread | [xsl] Re: Problems passing paramete, Dimitre Novatchev |
RE: [xsl] encoding problem, Michael Kay | Date | RE: [xsl] encoding problem, Pieter Reint Siegers |
Month |