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

RE: Re: opinions on ease of use with EXSLT for .NET

Subject: RE: Re: opinions on ease of use with EXSLT for .NET
From: kakridge@xxxxxxxxxxxxx
Date: Thu, 18 Dec 2003 20:51:02 -0500
how to use exslt
Dimitre,

I really appreciate your feedback on this.  I'm still pretty new to
XSLT, so you are correct; I do not have a solid understanding of a lot
of the technologies available.  I appreciate the information about
nxslt.  I am going to integrate that into Xselerator for testing. 

Thanks,

Kenny Akridge

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Dimitre
Novatchev
Sent: Thursday, December 18, 2003 2:35 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Re: opinions on ease of use with EXSLT for .NET


<kakridge@xxxxxxxxxxxxx> wrote in message
news:001701c3c521$54a5cad0$02fea8c0@xxxxxxxxx
> How difficult is it to use EXSLT for .NET.  Right now, I have a lot of
> code in place already for handling translations.  This isn't like the
> non-.NET EXSLT where you can just import a template/function?

You do not understand what EXSLT really is. Its idea is to be
implemented by
the vendors of XSLT processors (as it is done in the majority of cases
-- 
e.g. Saxon, Xalan, JD, xsltProc, etc...) or by third parties, so that
the
XSLT
programmer only has to declare the necessary EXSLT namespace and use the
EXSLT functions in XPath expressions.

Recently EXSLT has been implemented for .Net xsltTransform and partially
(the Common and Sets modules) for MSXML4.

No importing of templates is necessary and in fact nothing should be
imported.

The xslt stylesheets provided at the EXSLT site are to be used only with
XSLT processors, for which there is no other known implementation. Often
these stylesheets do not implement all functions or implement them with
limited capabilities.

> Do I have
> to rebuild some of the classes that handle my transformations?

You just install EXSLT.Net.Read the MSDN articles on EXSLT:

"EXSLT: Enhancing the Power of XSLT"
at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml
/html/xml05192003.asp

and

"EXSLT Meets XPath"
at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml
/html/xml11172003.asp

 To use EXSLT.Net one typically writes the following code (which is
almost
identical to the code when EXSLT is not used). This code snippet is
copied
from the first article above:

using System.IO;
using System.Xml.XPath;
using System.Xml.Xsl;
using System.Xml;
using Exslt;
using System;

public class Test{

  private const String filename = "test.xml";
  private const String stylesheet = "test.xsl";

  public static void Main(string[] args){

    try{

      //Create the XslTransform and load the stylesheet.
      ExsltTransform exslt = new ExsltTransform();
      exslt.Load(stylesheet);

      //Load the XML data file.
      XPathDocument doc = new XPathDocument(filename);

      //Create an XsltArgumentList.
      XsltArgumentList xslArg = new XsltArgumentList();

      //Create an XmlTextWriter to output to the console.
      XmlTextWriter writer = new XmlTextWriter(Console.Out);

      //Transform the file.
      exslt.Transform(doc, xslArg, writer);
      writer.Close();

     }catch(Exception e){
      Console.WriteLine("UNEXPECTED ERROR: " + e.ToString());
    }
  }
}

While just testing the transformation one may use tools like XSelerator
or
XML SPY and integrate the Nxslt.exe commad-line utility -- then running
.Net
xsltTransform is just a one-click job.


Hope this helped.

Dimitre Novatchev,
FXSL developer

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html




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


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


Current Thread

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
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.