xsl-list
[Top] [All Lists]

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

2005-04-02 00:04:05
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(_at_)seipas(_dot_)com


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>