Introduction to XSL

The idea of stylesheets is not a new concept; and, in fact, stylesheets have been around for a long time, both in the structured markup world and in the world of computing applications in general.

In many computing applications, data is not separated from display information. For example, in word processing documents, the text of the document is integrated with information about the typeface, font size, and special formatting information such as tabs, justification, and so on. The same is true for documents on the World Wide Web. HTML documents contain both the information that is to be displayed and the markup that details how the information is to be displayed.

However, there are many benefits of separation of data and display markup. Separation of the two tasks enables you to edit the data without the hindrance of visual markup information. And having separate display information also enables you to apply the same formatting information to multiple documents, which can be a real timesaving device when working with large amounts of data that is all similarly formatted. Separating the data from the display markup also makes it easier for developers to write applications that interact directly with the data, in essence making it easier for machines to read as well.

That is why Cascading Stylesheets have become popular on the Web—they make it easier to maintain complex Web sites. And as we saw in Chapter 7, “Using XML with Existing Stylesheet Technologies (CSS),” CSS can be used in conjunction with XML.

However, stylesheets for structured markup predate XML, going back to SGML. The mechanism for creating stylesheets with SGML is called Document Style Semantics and Specification Language (DSSSL). DSSSL is a very powerful stylesheet language, which is very near to an actual procedural programming language.

Although CSS can be used to create stylesheets for XML, the W3C recognized the utility of a stylesheet system that was more flexible and specifically created to work with XML. As was the case with SGML, the W3C also recognized that the complexity and power of DSSSL would be a bar to entry for many Web users, and that a simpler, yet still powerful technology should be developed.

That gave rise to the Extensible Stylesheet Language (XSL) which is designed to facilitate the display of XML in a variety of applications, from display on the Web to print output.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.166.101