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:

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@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
'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








 

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

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