[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Anouncement: EXSLT support for MSXML4


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

https://sourceforge.net/project/showfiles.php?group_id=53841&release_id=164017


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

  common:
           node-set()

  sets:
           intersection()
           difference()
           has-same-node()
           distinct()
           leading()
           trailing()

Below is the contents of the Readme.txt file:


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

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
'4.0*ex'


    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
following:


  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

    xslproc.Transform

    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;
        xslDoc.load("E:\\xml\\EXSLT\\VB6\\Tests\\testExsltCommon.xsl");

 xslt.stylesheet = xslDoc;

 var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
 xmlDoc.async = false;
 xmlDoc.load("E:\\xml\\EXSLT\\VB6\\Tests\\testDistinct100.xml");

 var xslProc;
 xslProc = xslt.createProcessor();
 xslProc.input = xmlDoc;
 xslProc.transform();
 alert(xslProc.output);
 }


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:
http://www.microsoft.com/downloads/details.aspx?FamilyId=2FB55371-C94E-4373-B0E9-DB4816552E41&displaylang=en

     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.


Enjoy!

Dimitre Novatchev.








 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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.