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

RE: Problems passing parameters using MSXML 3.0

Subject: RE: Problems passing parameters using MSXML 3.0
From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx>
Date: Mon, 12 Apr 2004 16:34:46 -0500
msxml parameter passing
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

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.