[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|