[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: MSXML calling external object
Check the "msxsl:script" element in the SDK. The IXSLProcessor::addObject() method documentation in the SDK does not help much, but if you use the SDK search on "addObject" you get an interesting sample at: /"XML and XSL Samples"/"XML Code Examples"/ ..."Code Examples in Microsoft JScript"/"XSLTemplate Examples" Have fun, Paulo Gaspar **** Sample from the SDK: **** * Passing Objects ** Passing an object in XSL: <xsl:stylesheet xmlns:xsl="..." xmlns:myObjNSPrefix="myObjURI"> ... <xsl:value-of select="myObjNSPrefix:someMethod()" /> <xsl:value-of select="myObjNSPrefix:get-someProperty()" /> ... <msxsl:script implements-prefix="foo"> myObjNSPrefix.someMethod(); myObjNSPrefix.someProperty = "bar"; <msxsl:script> </xsl:stylesheet> Passing an object in script: function someMethod() { ... } var myObj = new Object; myObj.someMethod = someMethod; myObj.someProperty = 123; //...load XML, XSL, and create xslTemplate var myProc = myTemplate.createProcessor(); myProc.input = xmldoc; myProc.addObject(myObj, "myObjURI"); //...now do the transformation... > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Steven Livingstone > Sent: Thursday, July 27, 2000 03:32 > To: xsl-list@xxxxxxxxxxxxxxxx > Subject: MSXML calling external object > > > Not sure if this is possible yet, although I am hoping it is. > Using MSXML 3.0 May parser. > > I have a line of XSL that gets a value from my XML and it is a integer > value. This value maps to a name in the database and I want to > call out from > my XSL to get this name. I guess I would simply call a COM or > SOAP interface > and it should return the string - that's all simple stuff - just not sure > hwo to make the extern call. > > Is this currently possible and any example on how I could implement this? > > thanks - > Steven > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > 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
|