Extensible Stylesheet Language (XSL) Version 1 specification defines the features and syntax for the Extensible Stylesheet Language (XSL), a lan-guage for expressing stylesheets. ... Formatting Objects ...

  • Published on
    19-Feb-2018

  • View
    212

  • Download
    0

Transcript

  • Extensible Stylesheet Language(XSL)Version 1.1

    W3C Recommendation 05 December 2006

    This version:

    http://www.w3.org/TR/2006/REC-xsl11-20061205/

    Latest version:

    http://www.w3.org/TR/xsl11/

    Previous version:

    http://www.w3.org/TR/2006/PR-xsl11-20061006/

    Editor:

    Anders Berglund (IBM)

    Please refer to the errata for this document, which may include normative corrections.

    See also translations.

    This document is also available in these non-normative formats: PDF by RenderX and XML file.

    Copyright 2006 W3C (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, and document userules apply.

    http://www.w3.org/http://www.w3.org/TR/2006/REC-xsl11-20061205/http://www.w3.org/TR/xsl11/http://www.w3.org/TR/2006/PR-xsl11-20061006/mailto:alrb@us.ibm.comhttp://www.w3.org/2006/12/xsl11-errata.htmlhttp://www.w3.org/2003/03/Translations/byTechnology?technology=xsl11http://www.w3.org/TR/2006/REC-xsl11-20061205/xsl11.pdfhttp://www.w3.org/TR/2006/REC-xsl11-20061205/xslspec.xmlhttp://www.w3.org/Consortium/Legal/ipr-notice#Copyrighthttp://www.w3.org/http://www.csail.mit.edu/http://www.ercim.org/http://www.keio.ac.jp/http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimerhttp://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarkshttp://www.w3.org/Consortium/Legal/copyright-documents

  • Abstract

    This specification defines the features and syntax for the Extensible Stylesheet Language (XSL), a lan-guage for expressing stylesheets. It consists of two parts:

    1. a language for transforming XML documents (XSLT), and

    2. an XML vocabulary for specifying formatting semantics.

    An XSL stylesheet specifies the presentation of a class of XML documents by describing how aninstance of the class is transformed into an XML document that uses the formatting vocabulary.

    Status of this document

    This section describes the status of this document at the time of its publication. Other documents maysupersede this document. A list of current W3C publications and the latest revision of this technicalreport can be found in the W3C technical reports index at http://www.w3.org/TR/.

    Please see the Working Group's implementation report.

    This Recommendation supersedes [XSL 1.0], which was published 15 October 2001. New functionalityhas been added to support change marks, indexes, multiple flows, and bookmarks. Existing functionalityhas been extended in the areas of graphics scaling, "markers" and their retrieval in tables to support e.g.partial sums, and page number referencing. The changes made in this document are intended to meet therequirements for XSL 1.1 described in [XSL 1.1 Requirements]. A number of errata have been incorpo-rated into the text. See Appendix E Changes from XSL 1.0 on page 494.

    This document has been produced as part of the W3C XML Activity by the XSL Working Group.

    Please send comments about this document to xsl-editors@w3.org (with public archive).

    General public discussion of XSL takes place on the XSL-List and on the www-xsl-fo mailing lists.

    This document has been reviewed by W3C Members, by software developers, and by other W3C groupsand interested parties, and is endorsed by the Director as a W3C Recommendation. It is a stable docu-ment and may be used as reference material or cited from another document. W3C's role in making theRecommendation is to draw attention to the specification and to promote its widespread deployment.This enhances the functionality and interoperability of the Web.

    This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3Cmaintains a public list of any patent disclosures made in connection with the deliverables of the group;that page also includes instructions for disclosing a patent. An individual who has actual knowledge of apatent which the individual believes contains Essential Claim(s) must disclose the information in accor-dance with section 6 of the W3C Patent Policy.

    Extensible Stylesheet Language (XSL)

    ii

    http://www.w3.org/TR/http://www.w3.org/Style/XSL/2006/01/xsl11-implementationhttp://www.w3.org/XML/Activityhttp://www.w3.org/Style/XSL/mailto:xsl-editors@w3.orghttp://lists.w3.org/Archives/Public/xsl-editors/http://www.mulberrytech.com/xsl/xsl-list/index.htmlhttp://lists.w3.org/Archives/Public/www-xsl-fo/http://www.w3.org/Consortium/Patent-Policy-20040205/http://www.w3.org/Style/XSL/Disclosureshttp://www.w3.org/Consortium/Patent-Policy-20040205/#def-essentialhttp://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure

  • Table of Contents1. Introduction and Overview ......................................................................................................... 1

    1.1. Processing a Stylesheet ................................................................................................................ 11.1.1. Tree Transformations .......................................................................................................... 21.1.2. Formatting .......................................................................................................................... 3

    1.2. Benefits of XSL ........................................................................................................................... 81.2.1. Paging and Scrolling .......................................................................................................... 81.2.2. Selectors and Tree Construction ......................................................................................... 91.2.3. An Extended Page Layout Model .................................................................................... 101.2.4. A Comprehensive Area Model ......................................................................................... 101.2.5. Internationalization and Writing-Modes .......................................................................... 101.2.6. Linking ............................................................................................................................. 11

    2. XSL Transformation .................................................................................................................. 11

    2.1. Tree Construction ....................................................................................................................... 11

    2.2. XSL Namespace ......................................................................................................................... 12

    3. Introduction to Formatting ....................................................................................................... 12

    3.1. Conceptual Procedure ................................................................................................................ 14

    4. Area Model .................................................................................................................................. 15

    4.1. Introduction ................................................................................................................................ 15

    4.2. Rectangular Areas ...................................................................................................................... 164.2.1. Area Types ........................................................................................................................ 164.2.2. Common Traits ................................................................................................................. 164.2.3. Geometric Definitions ...................................................................................................... 184.2.4. Tree Ordering ................................................................................................................... 204.2.5. Stacking Constraints ......................................................................................................... 214.2.6. Font Baseline Tables ......................................................................................................... 28

    4.3. Spaces and Conditionality .......................................................................................................... 284.3.1. Space-resolution Rules ..................................................................................................... 294.3.2. Overconstrained space-specifiers ..................................................................................... 30

    4.4. Block-areas ................................................................................................................................ 304.4.1. Stacked Block-areas ......................................................................................................... 314.4.2. Intrusion Adjustments ....................................................................................................... 33

    4.5. Line-areas ................................................................................................................................... 35

    4.6. Inline-areas ................................................................................................................................. 364.6.1. Stacked Inline-areas ......................................................................................................... 374.6.2. Glyph-areas ...................................................................................................................... 37

    4.7. Ordering Constraints .................................................................................................................. 384.7.1. General Ordering Constraints ........................................................................................... 38

    Extensible Stylesheet Language (XSL)

    iii

  • 4.7.2. Line-building .................................................................................................................... 384.7.3. Inline-building .................................................................................................................. 39

    4.8. Keeps and Breaks ....................................................................................................................... 40

    4.9. Rendering Model ....................................................................................................................... 414.9.1. Geometry .......................................................................................................................... 414.9.2. Viewport Geometry .......................................................................................................... 414.9.3. Visibility ........................................................................................................................... 424.9.4. Border, Padding, and Background .................................................................................... 424.9.5. Intrinsic Marks ................................................................................................................. 424.9.6. Layering and Conflict of Marks ....................................................................................... 42

    4.10. Sample Area Tree ..................................................................................................................... 44

    5. Property Refinement / Resolution ............................................................................................ 44

    5.1. Specified, Computed, and Actual Values, and Inheritance ........................................................ 455.1.1. Specified Values ............................................................................................................... 455.1.2. Computed Values .............................................................................................................. 455.1.3. Actual Values .................................................................................................................... 465.1.4. Inheritance ........................................................................................................................ 46

    5.2. Shorthand Expansion ................................................................................................................. 46

    5.3. Computing the Values of Corresponding Properties .................................................................. 475.3.1. Border and Padding Properties ......................................................................................... 485.3.2. Margin, Space, and Indent Properties ............................................................................... 495.3.3. Height, and Width Properties ........................................................................................... 505.3.4. Overconstrained Geometry ............................................................................................... 52

    5.4. Simple Property to Trait Mapping ............................................................................................. 525.4.1. Background-position-horizontal and background-position-vertical Properties..................................................................................................................................................... 525.4.2. Column-number Property ................................................................................................. 525.4.3. Text-align Property ........................................................................................................... 525.4.4. Text-align-last Property .................................................................................................... 535.4.5. z-index Property ............................................................................................................... 535.4.6. Language Property ........................................................................................................... 53

    5.5. Complex Property to Trait Mapping .......................................................................................... 535.5.1. Word spacing and Letter spacing Properties .................................................................... 535.5.2. Reference-orientation Property ........................................................................................ 535.5.3. Writing-mode and Direction Properties ........................................................................... 535.5.4. Absolute-position Property ............................................................................................... 535.5.5. Relative-position Property ................................................................................................ 535.5.6. Text-decoration Property .................................................................................................. 545.5.7. Font Properties ................................................................................................................. 54

    5.6. Non-property Based Trait Generation ........................................................................................ 55

    5.7...

Recommended

View more >