XSLT processing

I am getting lot of XML files from different clients with similar data structured differently or say , all of them follow different schemas but the actual data is same.

I want to develop a website, where clients can upload their XML files and I can extract information that I need from those XML files for processing client's request.

I want to make use of the XSLT transformation, where I can write XSL stylesheets and transform different schemas (coming from clients) into my own schema.

I am a C# developer and I know .NET has its XSLT processor. Has anyone done something like this?  where should I store the XSL files on the server and how do we apply those XSL stylesheets to the XML, once clients uploads them.

Also, I have heard of other XSLT processors, like Saxon. If I want to go with something other than the .NET XSLT processor. how should I go about it ?
novice programmerAsked:
Who is Participating?
Geert BormansConnect With a Mentor Information ArchitectCommented:
I assume that as a C# developer you can use ASP on your webserver to set something up like this
I have done various projects exposing XSLT transforms through a webform
Never did that in .net however
But it is fairly simple, make sure the client can upload a file, potentially some metadata to find the right transformer if you can not derive that from the XML. Should be as straightforward in .net too, try doing this in ASP

About Saxon.
First a big YES for not using the XSLT from MicroSoft, it is XSLT 1.0 only, you will get a lot more functionality from an XSLT2 processor
The .NET port from Saxon is a good choice. The Home Edition is free of charge and the manual of the .net port is clear enough
(download the samples file and all you need is in the examples C#)
Not being a C# developer at all, I did a C# integration for a proof of concept for a customer last week,
I had the enterprise edition working, streaming, passing parsed XML objects as parameters and validating the result XML,
in half a day (most of the time consumed by finding out how to read the license file dynamically :-)
Anyway, just to indicate that integrating Saxon will be easier than de XSLT you will have to do
Geert BormansInformation ArchitectCommented:
as to where to store the XSLTs
preferably in a non public location, the ASP will find them
novice programmerAuthor Commented:
@Geert Bormans - Thank you so much. this was really helpful.

I did some research myself and found few articles regarding this. At first, I thought , we had to buy third party XSLT processors and install it into our web servers to use it, but it looks like I can add Saxon api library from Nuget package manager in visual studio , so that I can use it with my C# application. I am going to try it myself.

Also, I am assuming , when you say ".Net port from saxon" , you mean saxon api for .NET.  However I didn't see any good article with C# example. but if you know of a book or a tutorial , do let me know.

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Geert BormansInformation ArchitectCommented:

Saxon.Api (.net) indeed
Saxon is developed in Java. The .net api is a port, sorry for being confusing about it
just add the .dll in your packet manager and
using Saxon.Api

Open in new window

is all you need

For samples on invoking saxon

For learning XSLT
The perfect reference
novice programmerAuthor Commented:
@Geert Bormans - thank you very much.
Geert BormansInformation ArchitectCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.