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
0
 
Geert BormansInformation ArchitectCommented:
as to where to store the XSLTs
preferably in a non public location, the ASP will find them
0
 
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.

Thanks.
0
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:
http://www.saxonica.com/documentation/index.html#!using-xsl/embedding

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
http://www.saxonica.com/documentation/index.html#!samples

For learning XSLT
https://www.bookdepository.com/Beginning-XSLT-2-0-Jeni-Tennison/9781590593240
https://www.bookdepository.com/XSLT/9780596527211
The perfect reference
https://www.bookdepository.com/XSLT-2-0-and-XPath-2-0-Programmer-s-Reference/9780470192740
0
 
novice programmerAuthor Commented:
@Geert Bormans - thank you very much.
0
 
Geert BormansInformation ArchitectCommented:
welcome
0
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.