Extensible Stylesheet Language (XSL) By Example Tony Wat 9 October 2002
Outline XSL Basics Real-life Example Simple Example Conclusion
XSL Basics XSL is a language for expressing style sheets Styling requires a source XML document, containing the information that the style sheet will display and the style sheet itself which describes how to display a document of a given type
Flow Diagram XML store data XSL store layout information XSL Processor
Real-life Example i-view web client
Based on XML data Browser perform the XSL translation and display the result Can use different XSL files for different layouts
Simple Example Data can be expressed in structural form. XSL perform the generation of layout based on the data This example only applies to XSL Transformation by Internet Explorer
Starting with Simple XML Current Ph.D. Students
A simple XSL <xsl:stylesheet version="1.0" xmlns:xsl=" My Fellow Students
The Result
XML Data Current Ph.D. Students AAAA BBBB CCCC abc.jpg Presentation This is a topic ……
Second XSL My Fellow Students.... #....
Second Result
Third XSL My Fellow Students.....
Third XSL (2) #
Third XSL (3)
Third Result
Fourth XSL
Fourth Result
Final Result By completing the XML file The browser will use the XSL to generate the tables, images, text according to the XML data
Conclusion This example may not be a good situation to apply XSL There are user-friendly web page editing tools for managing such information However, website of large amount of heterogeneous data requiring a consistent layout maybe of advantage e.g. i-view web client
The End