Subject: [xsl] Anouncement: EXSLT support for MSXML4 From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Fri, 6 Jun 2003 23:11:10 +0200 |
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@xxxxxxxxx Welcome to this implementation of EXSLT for MSXML4. II. 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"]% The same can be done with other popular XSLT IDEs -- when you find out how, please, let me know, so I can include this valuable info in the Readme.txt file. 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] [ANN] Voting open for the 200, Eric Promislow | Thread | [xsl] Announcement: FXSL for XSLT 2, Dimitre Novatchev |
[xsl] [ANN] Voting open for the 200, Eric Promislow | Date | RE: [xsl] Transferring xmlns aliase, Lars Huttar |
Month |