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

Re[4]: Transformation using Saxon.Net-1.0-RC1

Subject: Re[4]: Transformation using Saxon.Net-1.0-RC1
From: Arthur Maloney <ArthurM@xxxxxxxxxx>
Date: Sat, 2 Apr 2005 08:04:05 +0100
xmlhelper.cs
Hello Michael,

Thursday, March 31, 2005, 10:09:16 PM, you wrote:

MK> I know of a number of people who would be interested in a version of Saxon
MK> that's integrated natively into the .NET platform. It's not clear to me at
MK> the moment how deep the integration needs to be (for example, is it
MK> necessary to support the System.Xml.Xsl APIs), or whether it is technically
MK> possible to achieve the required level of integration without forking the
MK> source (something that I regard as an anathema).
...

Just bought Xpath2 & XSLT2 3rdEd, and hope MK is once again enjoying his
daffodils.

Before getting into serious digestive mode.
I thought a few comments on this developer's mileage, might be of interest.

Last October I decided to move from Visual Basic to C# on v1.1 of .Net
technology (I did consider Java  but, despite the excellent insights I gained
from "Beginning Java Objects" decided on C#).

In old mode I used VB & MSXML

With C# I no longer use MSXML

typically I use a sealed class I wrote.

/*
*       Name:   Sei.XmlHelper.cs        
*       Description:    Code library for xml and xsl.
*       History: Built by Arthur Maloney 2004-07-23 05:44
*/

using System;
using System.Xml;
using System.Xml.Xsl;
using System.IO;

using System.Data;
using System.Data.SqlClient;
using System.Collections;


namespace Sei.Xml
{
        public sealed class XmlHelper
                /*
                *       Name:   XmlHelper
                *       Description:    A Helper class intended for common uses of XML and XSL.
                *       History:        Built by Arthur Maloney 2004-09-23 06:52
                */
        {               

                // private constructor to avoid new instances.
                private XmlHelper() {}
 ....
 ....
 


public static string applyXslWithParams(XmlDocument doc, string urlXslFile, XsltArgumentList XslParams)
        /*
        *       Name:   applyXslWithParams
        *       Description:    Overload that transforms xml file with xsl stylesheet optionally passing parameters.
        *       e.g.:
        *       Create the XsltArgumentList.
        *       XsltArgumentList XslParams = new XsltArgumentList();
        *       XslParams.AddParam("title", "", "Test Title");
        *       string xml = applyXslWithParams( XmlDocument, " URL to XSL file", XslParams);
        *       History:        Built by Arthur Maloney 2004-10-16 18:18
        */              
{
        XslTransform objTransform=new XslTransform();
        StringWriter objStream=new StringWriter();

        objTransform.Load(urlXslFile);
        
        objTransform.Transform(doc, XslParams, objStream,null);
        return objStream.ToString();
}


If I had decided Java, I would along with the books have bought the commercial
version. It is affordable, and has a good quality reputation.

I'm not sure what Forks and Windows API's actually means.

If Microsoft Corporation  had a XslTransform or whatever, that was Xslt2/Xpath2
standards/recommendations compliant and it didn't clunck to much I would
probably use it.

The reason I have bought the books is because I want to move on to the new
standards. If that means installing Java runtime, and dlls written by Saxonica,
or whoever/whatever so be it.

Note: I simply wish to write code in C#
Whether it calls Saxonica dlls which
call Java is of no significance to me.
Although I do recognize the cross-platform advantages

Very Important:
Say Saxonica free or bought gave me access to e.g. XslTransform
so that I write C# sharp and use it through Saxoncia.
I just simply wouldn't bother,I would do it direct.

The idea that I would use e.g. XslTransform (API or parser or whatever it is) a less
standards compliant thing through, third party software, is just plain silly.


-- 
Best regards,
 Arthur                            mailto:ArthurM@xxxxxxxxxx

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.