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

RE: Has document(string) in MSXML 3 (July preview) worked fo

Subject: RE: Has document(string) in MSXML 3 (July preview) worked for any one?
From: Ben Robb <Ben@xxxxxxxxxx>
Date: Tue, 19 Sep 2000 10:20:18 +0100
namespaceuri msxml
Sara wrote:

I'm posting my solution, in case someone else needs this. 
The solution, which seems rather extreme to me, is to change
the stylesheet in memory using DOM. Microsoft apparently has no
way to pass in a parameter in the call to the parser/XLST processor
which is what I would have preferred as a solution (is anyone 
from Microsoft listening? :-)



Ben replies:

Not true - use the XSLProcessor and the XSLTemplate objects in the DOM:

	Set objTemplate = Server.CreateObject("MSXML2.XSLTemplate")
	Set objTemplate.stylesheet = objXSL
	Set objProcessor = objTemplate.createProcessor
	objProcessor.input = objXML
	objProcessor.output = Response
	objProcessor.addParameter "aParameter", aParameterValue, "" 
	objProcessor.transform


As you can see, the objProcessor object (which is an instance of the XSL
processor) has a method called "addParameter" which can be called:

objXSLProcessor.addParameter(baseName, parameter, [namespaceURI])

where

baseName = The name that will be used inside the style sheet to identify the
parameter context. 

parameter = A number, boolean, string, XMLDOMNodeList, or XMLDOMNode.
Passing in a single node will produce a node list that contains one node
(shortcut). 

namespaceURI = Optional namespace.

Hope this helps,

Ben


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.