Tutorial :Real World Application of XPath & XSLT



Question:

Can any professional please specify some real world application, where he / she has used this XPath & XSLT for any logic / view?

It creates a great query among some of the people I've communicated with, and so I myself also wants to know about this. I wish that this question will create a starting point from where new developers will take home some practical experience.

Any help is greatly appreciated.

If possible, please try to provide how XPath & XSLT interpret your data for your application, which you want to share with us. This will be helpful for others to understand both the power of XSLT (& XPath), and also of your application.


Solution:1

The Amaxus, Sitecore and Umbraco content management systems all use XSLT as a method of rendering content into markup. I use it for these purposes frequently. Can you be more specific on what you want to know?


Solution:2

My company's primary application is a data-entry program used by courtroom clerks. The data's entered into an in-memory ADO.NET data set, and the program generates many different read-only views of the data (including minute orders and probation orders) in the UI. Those views are produced in HTML by running various XSLT transforms on the data set's XML representation.

XSLT and XPath are extremely well-suited to this sort of problem. There's a small amount of preprocessing that we have to perform on the data (if a defendant is given 18 months on one charge and 25 months on another the order should say he's sentenced to three years and seven months, and while it may be possible to do that kind of calculation in XSLT it's not worth figuring out how), but by and large any business rule that the users have thrown at us over the course of the last few years have been simple to implement. ("The sentence on the extradition order that indicates that the defendant will be transported to the new jurisdiction if he's in custody also needs to indicate that he's excused from future court appearances, if there are any scheduled appearances at which the court required him to appear" turns out to be something that a simple XPath query can handle.)

And it's fast. We re-generate the HTML for a read-only view every time the user clicks on the tab containing the view, and you really can't tell.


Solution:3

Not really sure what you are trying to get back. But I've used XPath and XSLT in a medium sized banking application. Mainly because the architects had designated we must use SOAP/JMS or SOAP/HTTP and the platform was WebSphere Process Server and WebSphere Message Broker.


Solution:4

OpenOffice.org uses XSLT filters to export its XML native format into a bunch of different formats (including PDF).


Solution:5

We use XSLT as almost a middleware because we have a lot of data available to us in XML (mostly articles etc.). So, to transform those XML files into xHTML, or at least some part of those, we use XSLT. So,

XML File --> (XSLT + some additional HTML) --> Transitional xHTML pages.

Also, there are some internal comparisons and conversion of one article format to the other.

Hope this helps.


Solution:6

I used xslt/xpath extensively in one my projects. we were developing a windows gadget which gets an xml response to a web service. This xml is then parsed to xhtml.

Check out this open source project umbraco. They use xslt for templating. Check it for one of the widely used examples.


Solution:7

Starcraft 2 (view source)


Solution:8

I use it for building websites as a replacement for .aspx pages, and as a View Engine on MVC:

http://maxtoroq.github.io/myxsl/


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »