OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Anouncement: EXSLT support for MSXML4

[ Lists Home | Date Index | Thread Index ]

This can be downloaded from the project page of FXSL
(https://sourceforge.net/projects/fxsl) or directly from:


The following modules/functions are implemented in this initial release:



Below is the contents of the Readme.txt file:

              EXSLT support for MSXML4 (Exslt-Msxml4),
            by Dimitre Novatchev, dnovatchev@yahoo.com

Welcome to this implementation of EXSLT for MSXML4.

I. Installation.

Run Setup.exe.

The installation will create the folder:

          C:\Program Files\EXSLT for MSXML4\msEXSLT

This contains the following two files:

  1. exMsxsl.exe -- a version of the msxsl.exe command-line utility
     with added support for EXSLT

  2. EXSLTOK.dll -- the actual implementation of EXSLT for Msxml4

II. Using Exslt-Msxml4

 1. To use the EXSLT implementation from exMsxsl.exe, specify

   -u '4.0*ex' on the command line.

    An example of a complete command line is:

    exMsxsl my.xml my.xsl -o my.result -t -u '4.0*ex'

    I have added a separate "exMsxml4" engine to my Xselerator like this:

    Options --> Environment Options --> Transformation --> Add

    Executable: C:\Program Files\EXSLT for MSXML4\exMsxsl.exe

    Parameters: %xml% %xsl% -o %out% -t -u '4.0*ex' %param[name="value"]%

   To integrate with XML-Spy, do the following (sent by Oleg Tkachenko):

  Tools --> Options --> XSL
  External XSL transformation program:
  C:\Program Files\EXSLT for MSXML4\msEXSLT\exMsxsl.exe %1 %3 -o %2 -u

    Once this new transformation engine is added, one can perform
    single-click transformations that use the EXSLT support for MSXML4.

    Or one could create a .bat file and use exMsxsl.exe from the DOS window.

 2. The other way to use the EXSLT implementation is programmatically.

    The easiest way to do it is just as using MSXML4 before, with the
    only difference that instead of creating an IXSLTemplate object with
    ProgID "Msxml2.XSLTemplate.4.0", one will now create an
    IEXSLTemplate object with ProgID "EXSLT.EXSLTemplate".

Two typical examples of using Exslt-Msxml4 programmatically are the

  2.1 From VB

    Option Explicit

    Dim xslt As New EXSLTLib.EXSLTemplate

    Dim xsldoc As New MSXML2.FreeThreadedDOMDocument40
    Dim xmldoc As New MSXML2.FreeThreadedDOMDocument40
    Dim xslproc As MSXML2.IXSLProcessor

    xsldoc.Load "E:\xml\EXSLT\VB6\Tests\testExsltCommon.xsl"
    Set xslt.stylesheet = xsldoc.documentElement
    Set xslproc = xslt.createProcessor
    xmldoc.Load "E:\xml\EXSLT\VB6\Tests\testDistinct100.xml"
    xslproc.input = xmldoc


    MsgBox xslproc.output

  2.2 From JavaScript

 function transform()
 var xslt = new ActiveXObject("EXSLT.EXSLTemplate");

 var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0");
 xslDoc.async = false;

 xslt.stylesheet = xslDoc;

 var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
 xmlDoc.async = false;

 var xslProc;
 xslProc = xslt.createProcessor();
 xslProc.input = xmlDoc;

III. Acknowledgements

  1. I would like to thank Jeni Tennison for her suggestions -- the current
     version benefited greatly from implementing them.

  2. exMsxml is an adaptation of the source code of the msxsl.exe
      command-line utility by Microsoft, as published at:

     I'd like to thank the developers of this utility, which makes easy and
     convenient for everyone to perform XSLT transformations. While I learnt
     a lot from their nice programming style, any bugs and mistakes in
exMsxsl are
     entirely mine.


Dimitre Novatchev.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS