XSL is a W3C Recommendation XSL or CSS is essential for XML presentation and XSL far more powerful and complicated than CSS. |
XSL permits : |
• element reordering
• selection of source elements • text generation • processing source elements multiple times • Transformation is independent of the target result type |
• Most people are more familiar with HTML so many of the examples in this tutorial use HTML
• The XSL implementation in IE5 is incomplete. The examples in this tutorial will not work in IE5 • The techniques apply equally well to XSL Formatting Objects or other tag sets • XSLT is a tree-to-tree transformation process • Serialization may vary depending on the selected output method |
• There is a distinction between HTML element names and HTML
• XSL uses XML syntax, i.e., XSL is an XML vocabulary • it uses the namespace http://www.w3.org/1999/XSL/Transform, usually with prefix xsl: |
• rather than rules of CSS like • CD { … } • composer { … } XSL uses template rules like <xsl:template match=”CD”> |
• unlike CSS, XSL rules do not just apply styles to elements
• XSL is a language for transforming an input document to an output document |
• given an XSL rule like
<xsl:template match=”composer”> |
• the value of the match attribute (e.g., composer) is a pattern for matching part of the input document
• the contents of the template element (e.g., …) is a sequence of instructions for constructing part of the output document |