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: Scripts with Saxon


With MSXML 3.0, you don't actually need JavaScript. It let's you associate
COM objects with a namespace URI that can be leveraged throughout the
transformation like any extension. To do this, you need to add it to your
processor's context before calling transform as follows:

Set obj = CreateObject("mylib.myobject")
processor.addObject obj, "urn:mylib"
processor.Transform

See the IXSLProcessor and IXSLTempalte interfaces for more details. If the
mylib.myobject component supports a method called 'method1()' and a property
called 'property1' you could use them as follows:

<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:mylib="urn:mylib">
   <xsl:template match="/">
     method1 returns: <xsl:value-of select="mylib:method1()"/>
     property1 returns: <xsl:value-of select="mylib:get-property1()"/>
   </xsl:template>
</xsl:transform>

-aaron

> -----Original Message-----
> From: owner-xsl-list@mulberrytech.com
> [mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Kay Michael
> Sent: Friday, June 30, 2000 3:27 AM
> To: 'xsl-list@mulberrytech.com'
> Subject: RE: Scripts with Saxon
>
>
> > With a little help (actually a lot) from this list
> > I have outputted the data to a file which is processed
> > afterwards with a C-program.
> >
> > Now I would like to know if it's possible to accomplish
> > this processing within a stylesheet.
> >
> > I've been told that this is possible with MSXML
> >   1 Is that true?
> >   2 Can it be done with Saxon?
> >
> Saxon allows you to call external functions written in Java
> (only). I think
> MSXML allows JScript and hence access to any external COM object.
>
> Mike Kay
>
>
>  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]