Extensible Stylesheet Language (XSL). Brian Temple. about:XSL. XSL is a language for expressing stylesheets a language for transforming XML documents an XML vocabulary for specifying formatting semantics. But, why XSL?. Unlike HTML, XML element names have no intrinsic presentation semantics - PowerPoint PPT Presentation
Extensible Stylesheet Language(XSL)Brian Templeabout:XSLXSL is a language for expressing stylesheetsa language for transforming XML documentsan XML vocabulary for specifying formatting semanticsBut, why XSL?Unlike HTML, XML element names have no intrinsic presentation semanticsBuilds on prior work of CSS2, DSSSLCan be extendedAn Example XML Document Matthias Hauswirth 4500 Brookfield Dr. Boulder CO 80303 Brian Temple 1234 Strasse Boulder CO 80302 Brian pays Porsche 1 129400.00 Need a new one Ferrari 2 189000.25 1999-05-21 Simple XSL DocumentSimple XSL ResultsXSL:CHOOSEXSL:CHOOSE ResultsProcessing a stylesheetFormatting processBuild formatting object treeProduce refined formatting object treemapping from properties to traitsshorthand expansion into individual propertiesmapping of corresponding propertiesdetermining computed valuesinheritanceConstruct area treeThe Area ModelA Typical Area TreeFe Fi FO Fum This is an important word in this sentence that also refers to a variable. ... Examples of Formatting Objectsbidi-override block block-container character color-profile conditional-page-master-reference declarations external-graphic float flow footnote footnote-body initial-property-set inline inline-container instream-foreign-object layout-master-set leader list-block list-item list-item-body list-item-label marker multi-case multi-properties multi-property-set multi-switch multi-toggle page-number page-number-citation page-sequence page-sequence-master region-after region-before region-body region-end region-start repeatable-page-master-alternatives repeatable-page-master-reference retrieve-marker root simple-link simple-page-master single-page-master-reference static-contenttable table-and-caption table-body table-caption table-cell table-column table-footer table-header table-row title wrapper CSS2 : Cascading Style SheetsDSSSL : Document Style Semantics and Specification LanguageXSL introduces a model for pagination and layout that extends what is current available and that in turn be extended, in a straightforward way, to page structures beyond the simple page models described in the w3c xsl specification.Tree transformation constructs the result tree - element and attribute tree - primarily in the formatting object (fo) namespaceWith tree transformation, the structure of the result tree can be quite different from the structure of the source treeIn constructing the result tree, the source tree can be filtered and reordered, and arbitrary structure and generated content can be added.The formatter generates an ordered tree, the area tree, which describes a geometric structuring of the output medium.Each area tree node other than the root is called an area and is associated to a rectangula portion of the output medium.Areas are not formatting objects; rather, a formatting object generates zero or more rectangular areas.An area has a content-rectangle and optional padding and borderEach area has a set of traits, a mapping of names to values, in the way elements have attributes and formatting objects have properties.Traiets are either directly derived or indirectly derived from the formatting properties on the generating formatting object, other traits on this area, or other interacting areas (ancestors, parent, siblings, and/or children) and/or one or more values constructed by the formatter.There are two types of areas: block-areas, and inline-areas.The fo:wrapper formatting object is used to specify inherited properties for a group of formatting objects.