This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Using XSLT parameters with ASP
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Using XSLT parameters with ASP
- From: "Bowen, Randy" <Randy dot Bowen at HomeStore dot com>
- Date: Tue, 30 Jan 2001 14:02:08 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
Using the latest version, you need to create an instance of IXSLTemplate,
then use createProcessor to create an instance of IXSLProcessor. The latter
interface has an "addParameter" method that will allow you to pass in
parameters.
Randy Bowen
Application Architect
Homestore.com
randy.bowen@homestore.com
-----Original Message-----
From: Mazza, Glen [mailto:glen.mazza@eds.com]
Sent: Tuesday, January 30, 2001 11:10 AM
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] Using XSLT parameters with ASP
Hello,
I want to use ASP to do server-side XML/XSLT translation to return HTML to
the client. I'd like to use a value from an ASP Request object to populate
a parameter to pass into my XSLT stylesheet, but I can't find the syntax or
command for it. Jeni Tennison's answer at
http://www.dpawson.co.uk/xsl/n5982.html nicely explains how to use
parameters within XSLT, but getting values into the XSLT from the ASP page
is my current problem.
Given Jeni's sample parameter of "<xsl:param name = "foo" />" within my .xsl
file, and the Microsoft example of doing ASP translation:
<%@ LANGUAGE = JScript %>
<%
// Set the source and style sheet locations here
var sourceFile = Server.MapPath("sample.xml");
var styleFile = Server.MapPath("sample.xsl");
// Load the XML
var source = Server.CreateObject("Msxml2.DOMDocument");
source.async = false;
source.load(sourceFile);
// Load the XSL
var style = Server.CreateObject("Msxml2.DOMDocument");
style.async = false;
style.load(styleFile);
source.transformNodeToObject(style, Response);
%>
How do I pass in the value of the foo parameter, before calling
.transformNodeToObject?
Thanks!
Glen Mazza
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list