Subject: Re: Using XSLT parameters with ASP
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 30 Jan 2001 12:16:07 -0800 (PST)
|
Hi Glen,
Below is a simple example:
var objStylesheetParam =
style.selectSingleNode("/xsl:stylesheet/xsl:param[@name='yourName']");
objStylesheetParam.setAttribute("select", yourParameterValue);
// Repeat the above for as many xsl:param-s as necessary
source.transformNodeToObject(style, Response);
Hope this helped,
Dimitre Novatchev.
Mazza, Glen wrote:
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?
__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|