RE: Passing a param to a stylesheet using MSXML3

Subject: RE: Passing a param to a stylesheet using MSXML3
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 24 Aug 2000 13:00:49 -0700 (PDT)
Setting the value of a parameter from outside a stylesheet (e.g. from
VB) is not too much different from the way this is done in the
published VBScript examples.

Basically you use the XML DOM to locate the necessary xsl:param node
(e.g. via the SelectSingleNode() method) that has a specific @name
attribute.

Then you set it's @select attribute to the desired value and once
you're finished with the rest of the parameters you can perform the
transformation.

In the more complex case when the value of the parameter must be
non-scalar (e.g. a node(set)) you'll have to remove the @select
attribute and add child nodes to the xsl:param node. In this case it
would be more convenient to use the method described in the next
paragraph.

An even more easy way of setting the value of parameters is through
IXSLProcessor::AddParameter().

The article "Getting Value out of XSL PArameters" by Kurt Cagle
(http://msdn.microsoft.com/xml/articles/xml06192000.asp) is a good
source despite some typos.

For a simple VB example see
http://www.inquiry.com/techtips/xml_pro/answer.asp?pro=xml_pro&docID=4461
("Ask the XML Pro").

Cheers,
Dimitre Novatchev.

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/


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


Current Thread