This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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@mulberrytech.com
> [mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Steven Livingstone
> Sent: Thursday, July 27, 2000 03:32
> To: xsl-list@mulberrytech.com
> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]