Ajax: Data interchange and manipulation using XML and XSLT
Oct 13, 2008
Extensible Markup Language or XML is an extensible language because developers that use it can define their own elements through it. Its general purpose specification is to create custom markup languages and it facilitates the share of structured data through different information systems, like via Internet, being subject to use for both encoding of documents and serialization of data. Application languages can be implemented in XML, by adding semantic constraints, and such languages start at XHTML, RSS, MathML, Scalable Vector Graphics and continue to thousands more.
Along with XML comes an entire range of supporting technologies that have individual purposes. These technologies have emerged mostly because an XML document does not contain information on how it should be displayed or searched, so once the data is rendered as an XML document, developers usually need other supporting technologies to search and display information from it. Browsers like Internet Explorer and Firefox contain XML and XSLT engines, and can parse XML documents.
In 1998 XML was defined early as a markup language in order to represent structured content independent of its presentation, due to previous experiences with SGML in the print publishing environment. The tags used within XML are entirely user defined, being intended to relate to objects in specific domains of interests, like persons, places, prices or dates. If in HTML the elements are basically typographic, although just at an abstract level, XML aims at describing real-world object through elements.
As XML, XSLT is also a standard supported by the World Wide Web Consortium. As stated above, although IE and Firefox have XSLT processors, XSLT documents are not always subject to the same treatment. This is because XSLT uses another type of language, the Xpath, in order to query the XML document when applying it transformations. Xpath queries can be used to locate specific items or groups of items within an XML document, by using a syntax that appears similar to the way browsers locate web pages.
The advantage of these methods is that they can be used to retrieve sections of data for display on the web page, thus offering instant updates in the browser without the need to access the server. XSLT was designed to separate information content from presentation on the web and as the web filled with commercial content, publishers grasped for the same control over quality of output as in printed medium. The use of concrete presentation controls like explicit fonts and absolute positioning of material on the web page kept increasing, but directly proportional with this trend so has the difficulty of delivering the same content to alternative devices such as digital TV sets and WAP phones, which would otherwise would be called "repurposing" in the jargon of publishing trade.
The common known benefit stated for the above high-level languages is development productivity. In reality, the true value comes from their potential to adjustments. An XSLT application that transforms XML data structures can be designed to be much more resilient to changes in the details of the XML documents than a procedural application coded that uses the low-level DOM and SAX interfaces. In database jargon this capability is known as "data independence" , and it was this trait that acted as the golden fleece for development argonauts that successfully created declarative languages like SQL, putting aside older navigational data access languages.
It is also known that, as with all declarative languages, there is a slight performance penalty. But nevertheless, for the wider majority of applications, the performance of present days XSLT processors is already good enough to meet application requirements, and it's getting better and better.
Read more about it:
Ajax Technology - an Introduction
1. Standards-based presentation using XHTML and CSS
2. Dynamic display and interaction using Document Object Model
3. Data interchange and manipulation using XML and XSLT
4. Asynchronous data retrieval using XMLHttpRequest