Working with XML, XSLT as well as ASP


XML is a markup language that was originally conceived by a number of programmers doing work for IBM back in the 1980's, however at that time it had been referred to as SGML, later on as the digital era began it developed into XML.

The objective of XML was to provide for documents and information to be transferred over the web and viewed, to make this happen and much more, developers realised that a lot more capability was needed. 

What was needed was the ability to convert XML documents into different outputs like HTML, PDF etc, to ensure that it could offer extra capacity and adaptability than it might provide back then.

The developers were aware that applications that would make use of XML would at some time also must display or structure that info or data in some other types which might not be specified in the XML document itself.

The thing that was called for was a solution which would accept the XML data and change it into other formats, like HTML in addition to further developments into other forms of XML so that it may very well be utilized on any platform or with some other programming language. 

The developers developed a solution called XSLT (Extensible Stylesheet Language Transformation), XSLT has become massively effective enabling non XML related technologies such as ASP, HTML and even more to work with XML language.

With the internet increasingly becoming mobile and cross device, it has enabled XML to become utilized by a wide array of devices across various platforms and browsers, and from mobiles, to laptops, to tablets to PC's and more. 

In addition there are more benefits, as an example with XSLT, now you can also transform the structure of XML documents, that is ideal when the data doesn't fit with the applications data structure requirement, with XSLT you simply convert the structure of the XML document to match the requirement of the application.

So how does XSLT work what is the procedure for transforming XML documents? Well you'll find two main pieces, the first component is that you have to parse your xml file, utilizing a parsing engine. 

Parsing is where the XML document is loaded into a tree structure. The second element is where the tree structure is going to be additionally optimised for XSLT processing and will also be influenced by the processor type, ie whether it's a SAX or DOM processor.

It's also important to note that in order to process XML files, XSLT depends on templates so that it can create specific structures, on this topic, the W3C states;

A stylesheet contains a set of template rules. A template rule has two parts: a pattern which is matched against nodes in the source tree and a template which can be instantiated to form part of the result tree. This allows a stylesheet to be applicable to a wide class of documents that have similar source tree structures.

The advantage of utilising templates is that often its flexible and also efficient as well as a really good means of processing numerous XML structures.

Post a Comment