Subject: RE: MSXML calling external object From: "Paulo Gaspar" <paulo.gaspar@xxxxxxxxxxxx> Date: Thu, 27 Jul 2000 18:35:07 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
MSXML calling external object, Steven Livingstone | Thread | Number of spaces linked to an attri, Paul Terray |
XHTML to PDF ( was Re: RTF and PDF , Jerome Thebert | Date | RE: Handling Attributes with no val, Julian Reschke |
Month |