[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Passing a param to a stylesheet using MSXML3
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
|
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
|