XSL

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email
In the previous chapter you were introduced to CSS. In this chapter, we will work with XSL to create style sheets based on formatting rules. XSL, which stands for eXtensible Stylesheet Language, is a very powerful tool for transforming XML documents into a separate tree structure. XSL is primarily used to transform XML semantics into a display format, such as the kind of display you are used to seeing in Web browsers.

Unlike the case of HTML, element names in XML have no intrinsic presentation semantics. In the absence of a style sheet, a processor could not possibly know how to render the content of an XML document other than as an undifferentiated string of characters. XSL provides. a comprehensive model and a vocabulary for writing such style sheets using the XML syntax.

XSL is intended for complex formatting where the content of the document might be displayed in multiple places; for example, the text of a heading might also appear in a dynamically generated table of contents. CSS is intended for dynamic formatting of online documents for multiple media; its strictly declarative nature limits its capabilities but also makes it efficient and easy to generate and modify in the contentgeneration workflow. So they are two different tools; for some tasks, CSS is the appropriate. choice and for some tasks, XSL.

XSL also uses style sheets. It can accomplish the same level of formatting and flexibility as CSS, but it uses a different approach. XSL is built on the notion of templates, which are in some ways similar to CSS style rules. XSL templates provide the mechanism for applying formatting information to data that matches a specific pattern.

XSL is a technology for transforming and styling XML XSL comprises two main elements a transformation language and a formatting language. The transformation language takes a well formed XML document and it can also be a valid document and transforms it into an alternative XMI format. The formatting language is analogous to CSS, in that it describes how the information provided by the transformation should be formatted for display. In fact, this language is derived in many aspects from CSS, one difference being that it uses XML syntax rather than the CSS syntax. Displaying an XML document with XSL is thus a two stage process, as shown in the following figure 5 1. The first stage, the transformation, is the major difference from CSS as it allows us to reorganise the content of the document . Apart from leaving out some content, we can add content and move content around. It is this that gives XSL much of its power.

CSS is targeted entirely at the Web, while XSL is intended for a variety of output media. Using the XSL formatting objects also creates a neater style sheet since the transformational and formatting aspects are expressed in the same XML syntax. IE5 implements only the transformational aspects of the working draft.



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.