XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition

Book description

This book is primarily a practical reference book for professional XSLT developers. It assumes no previous knowledge of the language, and many developers have used it as their first introduction to XSLT; however, it is not structured as a tutorial, and there are other books on XSLT that provide a gentler approach for beginners.

The book does assume a basic knowledge of XML, HTML, and the architecture of the Web, and it is written for experienced programmers. There's no assumption that you know any particular language such as Java or Visual Basic, just that you recognize the concepts that all programming languages have in common.

The book is suitable both for XSLT 1.0 users upgrading to XSLT 2.0, and for newcomers to XSLT. The book is also equally suitable whether you work in the Java or .NET world.

As befits a reference book, a key aim is that the coverage should be comprehensive and authoritative. It is designed to give you all the details, not just an overview of the 20 percent of the language that most people use 80 percent of the time. It's designed so that you will keep coming back to the book whenever you encounter new and challenging programming tasks, not as a book that you skim quickly and then leave on the shelf. If you like detail, you will enjoy this book; if not, you probably won't.

But as well as giving the detail, this book aims to explain the concepts, in some depth. It's therefore a book for people who not only want to use the language but who also want to understand it at a deep level.

The book aims to tell you everything you need to know about the XSLT 2.0 language. It gives equal weight to the things that are new in XSLT 2.0 and the things that were already present in version 1.0. The book is about the language, not about specific products. However, there are appendices about Saxon (the author's own implementation of XSLT 2.0), about the Altova XSLT 2.0 implementation, and about the Java and Microsoft APIs for controlling XSLT transformations, which will no doubt be upgraded to handle XSLT 2.0 as well as 1.0. A third XSLT 2.0 processor, Gestalt, was released shortly before the book went to press, too late to describe it in any detail. But the experience of XSLT 1.0 is that there has been a very high level of interoperability between different XSLT processors, and if you can use one of them, then you can use them all.

In the previous edition we split XSLT 2.0 and XPath 2.0 into separate volumes. The idea was that some readers might be interested in XPath alone. However, many bought the XSLT 2.0 book without its XPath companion and were left confused as a result; so this time, the material is back together. The XPath reference information is in self-contained chapters, so it should still be accessible when you use XPath in contexts other than XSLT.

The book does not cover XSL Formatting Objects, a big subject in its own right. Nor does it cover XML Schemas in any detail. If you want to use these important technologies in conjunction with XSLT, there are other books that do them justice.

This book contains twenty chapters and eight appendixes (the last of which is a glossary) organized into four parts. The following section outlines what you can find in each part, chapter, and appendix.

Part I: Foundations: The first part of the book covers essential concepts. You should read these before you start coding. If you ignore this advice, as most people do, then you read them when you get to that trough of despair when you find it impossible to make the language do anything but the most trivial tasks. XSLT is different from other languages, and to make it work for you, you need to understand how it was designed to be used.

Chapter 1: XSLT in Context: This chapter explains how XSLT fits into the big picture: how the language came into being and how it sits alongside other technologies. It also has a few simple coding examples to keep you alert.

Chapter 2: The XSLT Processing Model: This is about the architecture of an XSLT processor: the inputs, the outputs, and the data model. Understanding the data model is perhaps the most important thing that distinguishes an XSLT expert from an amateur; it may seem like information that you can't use immediately, but it's knowledge that will stop you making a lot of stupid mistakes.

Chapter 3: Stylesheet Structure: XSLT development is about writing stylesheets, and this chapter takes a bird's eye view of what stylesheets look like. It explains the key concepts of rule-based programming using templates, and explains how to undertake programming-in-the-large by structuring your application using modules and pipelines.

Chapter 4: Stylesheets and Schemas: A key innovation in XSLT 2.0 is that stylesheets can take advantage of knowledge about the structure of your input and output documents, provided in the form of an XML Schema. This chapter provides a quick overview of XML Schema to describe its impact on XSLT development. Not everyone uses schemas, and you can skip this chapter if you fall into that category.

Chapter 5: The Type System: XPath 2.0 and XSLT 2.0 offer strong typing as an alternative to the weak typing approach of the 1.0 languages. This means that you can declare the types of your variables, functions, and parameters, and use this information to get early warning of programming errors. This chapter explains the data types available and the mechanisms for creating user-defined types.

Part II: XSLT and XPath Reference: This section of the book contains reference material, organized in the hope that you can easily find what you need when you need it. It's not designed for sequential reading, though you might well want to leaf through the pages to discover what's there.

Chapter 6: XSLT Elements: This monster chapter lists all the XSLT elements you can use in a stylesheet, in alphabetical order, giving detailed rules for the syntax and semantics of each element, advice on usage, and examples. This is probably the part of the book you will use most frequently as you become an expert XSLT user. It's a "no stone unturned" approach, based on the belief that as a professional developer you need to know what happens when the going gets tough, not just when the wind is in your direction.

Chapter 7: XPath Fundamentals: This chapter explains the basics of XPath: the low-level constructs such as literals, variables, and function calls. It also explains the context rules, which describe how the evaluation of XPath expressions depends on the XSLT processing context in which they appear.

Chapter 8: XPath: Operators on Items: XPath offers the usual range of operators for performing arithmetic, boolean comparison, and the like. However, these don't always behave exactly as you would expect, so it's worth reading this chapter to see what's available and how it differs from the last language that you used.

Chapter 9: XPath: Path Expressions: Path expressions are what make XPath special; they enable you to navigate around the structure of an XML document. This chapter explains the syntax of path expressions, the 13 axes that you can use to locate the nodes that you need, and associated operators such as union, intersection, and difference.

Chapter 10: XPath: Sequence Expressions: Unlike XPath 1.0, in version 2.0 all values are sequences (singletons are just a special case). Some of the most important operators in XPath 2.0 are those that manipulate sequences, notably the "for" expression, which translates one sequence into another by applying a mapping.

Chapter 11: XPath: Type Expressions: The type system was explained in Chapter 5; this chapter explains the operations that you can use to take advantage of types. This includes the "cast" operation which is used to convert values from one type to another.A big part of this chapter is devoted to the detailed rules for how these conversions are done.

Chapter 12: XSLT Patterns: This chapter returns from XPath to a subject that's specific to XSLT. Patterns are used to define template rules, the essence of XSLT's rule-based programming approach. The reason for explaining them now is that the syntax and semantics of patterns depends strongly on the corresponding rules for XPath expressions.

Chapter 13: The Function Library: XPath 2.0 includes a library of functions that can be called from any XPath expression; XSLT 2.0 extends this with some additional functions that are available only when XPath is used within XSLT. The library has grown immensely since XPath 1.0. This chapter provides a single alphabetical reference for all these functions.

Chapter 14: Regular Expressions: Processing of text is an area where XSLT 2.0 and XPath 2.0 are much more powerful than version 1.0, and this is largely through the use of constructs that exploit regular expressions. If you're familiar with regexes from languages such as Perl, this chapter tells you how XPath regular expressions differ. If you're new to the subject, it explains it from first principles.

Chapter 15: Serialization: Serialization in XSLT means the ability to generate a textual XML document from the tree structure that's manipulated by a stylesheet. This isn't part of XSLT processing proper, so (following W3C's lead) it's separated it into its own chapter. You can control serialization from the stylesheet using an declaration, but many products also allow you to control it directly via an API.

  • Part III: Exploitation: The final section of the book is advice and guidance on how to take advantage of XSLT to write real applications. It's intended to make you not just a competent XSLT coder, but a competent designer too. The best way of learning is by studying the work of others, so the emphasis here is on practical case studies.

  • Chapter 16: Extensibility: This chapter describes the "hooks" provided in the XSLT specification to allow vendors and users to plug in extra functionality. The way this works will vary from one implementation to another, so we can't cover all possibilities, but one important aspect that the chapter does cover is how to use such extensions and still keep your code portable.

  • Chapter 17: Stylesheet Design Patterns: This chapter explores a number of design and coding patterns for XSLT programming, starting with the simplest "fill-in-the-blanks" stylesheet, and extending to the full use of recursive programming in the functional programming style, which is needed to tackle problems of any computational complexity. This provides an opportunity to explain the thinking behind functional programming and the change in mindset needed to take full advantage of this style of development.

  • Chapter 18: Case Study: XMLSpec: XSLT is often used for rendering documents, so where better to look for a case study than the stylesheets used by the W3C to render the XML and XSLT specifications, and others in the same family, for display on the web? The resulting stylesheets are typical of those you will find in any publishing organization that uses XML to develop a series of documents with a compatible look-and-feel.

  • Chapter 19: Case Study: A Family Tree: Displaying a family tree is another typical XSLT application. This example with semi-structured data—a mixture of fairly complex data and narrative text—that can be presented in many different ways for different audiences. It also shows how to tackle another typical XSLT problem, conversion of the data into XML from a legacy text-based format. As it happens, this uses nearly all the important new XSLT 2.0 features in one short stylesheet. But another aim of this chapter is to show a collection of stylesheets doing different jobs as part of a complete application.

  • Chapter 20: Case Study: Knight's Tour: Finding a route around a chessboard where a knight visits every square without ever retracing its steps might sound a fairly esoteric application for XSLT, but it's a good way of showing how even the most complex of algorithms are within the capabilities of the language. You may not need to tackle this particular problem, but if you want to construct an SVG diagram showing progress against your project plan, then the problems won't be that dissimilar.

  • Part IV: Appendices: Appendix A: XPath 2.0 Syntax Summary: Collects the XPath grammar rules and operator precedences into one place for ease of reference.

  • Appendix B: Error Codes: A list of all the error codes defined in the XSLT and XPath language specifications, with brief explanations to help you understand what's gone wrong.

  • Appendix C: Backward Compatibility: The list of things you need to look out for when converting applications from XSLT 1.0.

  • Appendix D: Microsoft XSLT Processors: Although the two Microsoft XSLT processors don't yet support XSLT 2.0, we thought many readers would find it useful to have a quick summary here of the main objects and methods used in their APIs.

  • Appendix E: JAXP: the Java API for XML Processing: JAXP is an interface rather than a product. Again, it doesn't have explicit support yet for XSLT 2.0, but Java programmers will often be using it in XSLT 2.0 projects, so the book includes an overview of the classes and methods available.

  • Appendix F: Saxon: At the time of writing Saxon (developed by the author of this book) provides the most comprehensive implementation of XSLT 2.0 and XPath 2.0, so its interfaces and extensions are covered in some detail.

  • Appendix G: Altova: Altova, the developers of XML Spy, have an XSLT 2.0 processor that can be used either as part of the development environment or as a freestanding component. This appendix gives details of its interfaces.

  • Appendix H: Glossary

  • Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.

  • Table of contents

    1. Copyright
    2. About the Author
    3. Credits
    4. Acknowledgments
    5. Introduction
      1. Who This Book Is For
      2. What This Book Covers
      3. How This Book Is Structured
        1. Part I: Foundations
          1. Chapter 1: XSLT in Context
          2. Chapter 2: The XSLT Processing Model
          3. Chapter 3: Stylesheet Structure
          4. Chapter 4: Stylesheets and Schemas
          5. Chapter 5: The Type System
        2. Part II: XSLT and XPath Reference
          1. Chapter 6: XSLT Elements
          2. Chapter 7: XPath Fundamentals
          3. Chapter 8: XPath: Operators on Items
          4. Chapter 9: XPath: Path Expressions
          5. Chapter 10: XPath: Sequence Expressions
          6. Chapter 11: XPath: Type Expressions
          7. Chapter 12: XSLT Patterns
          8. Chapter 13: The Function Library
          9. Chapter 14: Regular Expressions
          10. Chapter 15: Serialization
        3. Part III: Exploitation
          1. Chapter 16: Extensibility
          2. Chapter 17: Stylesheet Design Patterns
          3. Chapter 18: Case Study: XMLSpec
          4. Chapter 19: Case Study: A Family Tree
          5. Chapter 20: Case Study: Knight's Tour
        4. Part IV: Appendices
          1. Appendix A: XPath 2.0 Syntax Summary
          2. Appendix B: Error Codes
          3. Appendix C: Backward Compatibility
          4. Appendix D: Microsoft XSLT Processors
          5. Appendix E: JAXP: The Java API for XML Processing
          6. Appendix F: Saxon
          7. Appendix G: Altova
          8. Appendix H: Glossary
          9. Index
      4. What You Need to Use This Book
      5. Conventions
      6. Downloading the Code
      7. Errata
      8. p2p.wrox.com
    6. List of Examples
      1. Chapter 1
      2. Chapter 2
      3. Chapter 3
      4. Chapter 4
      5. Chapter 6
      6. Chapter 12
      7. Chapter 13
      8. Chapter 15
      9. Chapter 16
      10. Chapter 17
      11. Chapter 18
      12. Chapter 19
      13. Chapter 20
      14. Appendix F
    7. I. Foundations
      1. 1. XSLT in Context
        1. 1.1. What Is XSLT?
          1. 1.1.1. Why Version 2.0?
          2. 1.1.2. A Scenario: Transforming Music
        2. 1.2. How Does XSLT Transform XML?
          1. 1.2.1. XSLT and SQL: An Analogy
          2. 1.2.2. XSLT Processors
          3. 1.2.3. A Simple XSLT Stylesheet
          4. 1.2.4. An XSLT 2.0 Stylesheet
        3. 1.3. The Place of XSLT in the XML Family
          1. 1.3.1. XSLT and XSL Formatting Objects
          2. 1.3.2. XSLT and XPath
          3. 1.3.3. XSLT and XML Namespaces
          4. 1.3.4. XSLT and CSS
          5. 1.3.5. XSLT and XML Schemas
          6. 1.3.6. XSLT and XQuery
        4. 1.4. The History of XSL
          1. 1.4.1. Prehistory
          2. 1.4.2. The First XSL Proposal
          3. 1.4.3. Saxon
          4. 1.4.4. Beyond XSLT 1.0
          5. 1.4.5. Convergence with XQuery
          6. 1.4.6. The Development of XSLT 2.0 and XPath 2.0
        5. 1.5. XSLT 2.0 as a Language
          1. 1.5.1. Use of XML Syntax
          2. 1.5.2. No Side Effects
          3. 1.5.3. Rule-Based
          4. 1.5.4. Types Based on XML Schema
          5. 1.5.5. A Two-Language System: XSLT and XPath
        6. 1.6. Summary
      2. 2. The XSLT Processing Model
        1. 2.1. XSLT: A System Overview
          1. 2.1.1. A Simplified Overview
          2. 2.1.2. Trees, Not Documents
          3. 2.1.3. Different Output Formats
          4. 2.1.4. Multiple Inputs and Outputs
        2. 2.2. The XDM Tree Model
          1. 2.2.1. XML as a Tree
            1. 2.2.1.1. Nodes in the Tree Model
            2. 2.2.1.2. The Name of a Node
            3. 2.2.1.3. The String Value of a Node
            4. 2.2.1.4. The Typed Value of a Node
            5. 2.2.1.5. The Type Annotation of a Node
            6. 2.2.1.6. The Base URI of a Node
            7. 2.2.1.7. The Children of a Node
            8. 2.2.1.8. The Parent of a Node
            9. 2.2.1.9. The Attributes of a Node
            10. 2.2.1.10. The Namespaces of a Node
          2. 2.2.2. Completing the UML Class Diagram
          3. 2.2.3. Document Order
          4. 2.2.4. Names and Namespaces
            1. 2.2.4.1. Namespaces: An Overview
            2. 2.2.4.2. Namespaces in the Data Model
            3. 2.2.4.3. Namespace Sensitive Content
          5. 2.2.5. IDs and IDREFs
          6. 2.2.6. Characters in the Data Model
          7. 2.2.7. What Does the Tree Leave Out?
          8. 2.2.8. From Textual XML to a Data Model
          9. 2.2.9. Controlling Serialization
        3. 2.3. The Transformation Process
          1. 2.3.1. Invoking a Transformation
          2. 2.3.2. Template Rules
            1. 2.3.2.1. Contents of a Template Rule
            2. 2.3.2.2. Sequence Constructors
            3. 2.3.2.3. Nested Sequence Constructors
          3. 2.3.3. Push Processing
          4. 2.3.4. Controlling Which Nodes to Process
          5. 2.3.5. Modes
          6. 2.3.6. Built-In Template Rules
          7. 2.3.7. Conflict Resolution Policy
        4. 2.4. Error Handling
        5. 2.5. Variables and Expressions
          1. 2.5.1. Variables
          2. 2.5.2. Parameters
          3. 2.5.3. Expressions
          4. 2.5.4. Context
          5. 2.5.5. Temporary Documents
        6. 2.6. Summary
      3. 3. Stylesheet Structure
        1. 3.1. Changes in XSLT 2.0
        2. 3.2. The Modular Structure of a Stylesheet
        3. 3.3. The <xsl:stylesheet> Element
        4. 3.4. The <?xml-stylesheet?> Processing Instruction
        5. 3.5. Embedded Stylesheets
        6. 3.6. Declarations
          1. 3.6.1. XSLT-Defined Declarations
          2. 3.6.2. Implementor-Defined Declarations
          3. 3.6.3. User-Defined Top-Level Elements
        7. 3.7. Instructions
          1. 3.7.1. XSLT Instructions
          2. 3.7.2. Extension Instructions
          3. 3.7.3. Literal Result Elements
            1. 3.7.3.1. Format
            2. 3.7.3.2. Position
            3. 3.7.3.3. Attributes
            4. 3.7.3.4. Content
            5. 3.7.3.5. Effect
            6. 3.7.3.6. Usage
            7. 3.7.3.7. Attributes of a Literal Result Element
            8. 3.7.3.8. Namespaces for a Literal Result Element
            9. 3.7.3.9. Namespace Inheritance
            10. 3.7.3.10. Namespace Prefixes
            11. 3.7.3.11. Namespace Aliasing
          4. 3.7.4. Attribute Value Templates
        8. 3.8. Simplified Stylesheets
        9. 3.9. Writing Portable Stylesheets
          1. 3.9.1. Conditional Compilation
          2. 3.9.2. Version Compatibility
            1. 3.9.2.1. Forward Compatibility in XSLT 1.0
            2. 3.9.2.2. Backward Compatibility in XSLT 2.0
          3. 3.9.3. Extensibility
            1. 3.9.3.1. Extension Functions
            2. 3.9.3.2. Extension Instructions
        10. 3.10. Whitespace
          1. 3.10.1. The Effect of Stripping Whitespace Nodes
          2. 3.10.2. Whitespace Nodes in the Stylesheet
          3. 3.10.3. Solving Whitespace Problems
            1. 3.10.3.1. Too Much Whitespace
            2. 3.10.3.2. Too Little Whitespace
        11. 3.11. Summary
      4. 4. Stylesheets and Schemas
        1. 4.1. XML Schema: An Overview
          1. 4.1.1. Simple Type Definitions
          2. 4.1.2. Elements with Attributes and Simple Content
          3. 4.1.3. Elements with Mixed Content
          4. 4.1.4. Elements with Element-Only Content
          5. 4.1.5. Defining a Type Hierarchy
          6. 4.1.6. Substitution Groups
        2. 4.2. Declaring Types in XSLT
        3. 4.3. Validating the Source Document
        4. 4.4. Validating the Result Document
        5. 4.5. Validating a Temporary Document
        6. 4.6. Validating Individual Elements
        7. 4.7. Validating Individual Attributes
        8. 4.8. The default-validation Attribute
        9. 4.9. Importing Schemas
        10. 4.10. Using xsi:type
        11. 4.11. Nillability
        12. 4.12. Summary
      5. 5. Types
        1. 5.1. What Is a Type System?
        2. 5.2. Changes in 2.0
        3. 5.3. Sequences
        4. 5.4. Atomic Values
        5. 5.5. Atomic Types
          1. 5.5.1. The Major Atomic Types
            1. 5.5.1.1. xs:anyURI
            2. 5.5.1.2. xs:boolean
            3. 5.5.1.3. xs:date
            4. 5.5.1.4. xs:dateTime
            5. 5.5.1.5. xs:decimal
            6. 5.5.1.6. xs:double
            7. 5.5.1.7. xs:integer
            8. 5.5.1.8. xs:QName
            9. 5.5.1.9. xs:string
            10. 5.5.1.10. xs:time
            11. 5.5.1.11. xs:dayTimeDuration and xs:yearMonthDuration
          2. 5.5.2. The Minor Atomic Types
            1. 5.5.2.1. The Partial Date Types
            2. 5.5.2.2. Binary Types
            3. 5.5.2.3. Single-Precision Floating Point
            4. 5.5.2.4. The xs:duration Type
            5. 5.5.2.5. The xs:NOTATION Type
          3. 5.5.3. Derived Numeric Types
          4. 5.5.4. Derived String Types
          5. 5.5.5. Untyped Atomic Values
          6. 5.5.6. xs:NMTOKENS, xs:IDREFS, and xs:ENTITIES
        6. 5.6. Schema Types and XPath Types
        7. 5.7. The Type Matching Rules
        8. 5.8. Static and Dynamic Type Checking
        9. 5.9. Summary
    8. II. XSLT and XPath Reference
      1. 6. XSLT Elements
        1. 6.1. xsl:analyze-string
          1. 6.1.1. Changes in 2.0
          2. 6.1.2. Format
            1. 6.1.2.1. Position
            2. 6.1.2.2. Attributes
            3. 6.1.2.3. Content
          3. 6.1.3. Effect
            1. 6.1.3.1. Regular Expression Syntax
            2. 6.1.3.2. Captured Groups
          4. 6.1.4. Usage and Examples
            1. 6.1.4.1. A Single-Match Example
            2. 6.1.4.2. A Multiple-Match Example
          5. 6.1.5. See Also
        2. 6.2. xsl:apply-imports
          1. 6.2.1. Changes in 2.0
          2. 6.2.2. Format
            1. 6.2.2.1. Position
            2. 6.2.2.2. Attributes
            3. 6.2.2.3. Content
          3. 6.2.3. Effect
          4. 6.2.4. Usage and Examples
          5. 6.2.5. See Also
        3. 6.3. xsl:apply-templates
          1. 6.3.1. Changes in 2.0
          2. 6.3.2. Format
            1. 6.3.2.1. Position
            2. 6.3.2.2. Attributes
            3. 6.3.2.3. Content
          3. 6.3.3. Effect
            1. 6.3.3.1. The select Attribute
            2. 6.3.3.2. Sorting
            3. 6.3.3.3. Choosing a Template Rule
            4. 6.3.3.4. Parameters
            5. 6.3.3.5. Result
          4. 6.3.4. Usage and Examples
            1. 6.3.4.1. <xsl:apply-templates> versus <xsl:for-each>
            2. 6.3.4.2. Modes
            3. 6.3.4.3. Simulating Higher Order Functions
          5. 6.3.5. See Also
        4. 6.4. xsl:attribute
          1. 6.4.1. Changes in 2.0
          2. 6.4.2. Format
            1. 6.4.2.1. Position
            2. 6.4.2.2. Attributes
            3. 6.4.2.3. Content
          3. 6.4.3. Effect
            1. 6.4.3.1. The Name of the Attribute
            2. 6.4.3.2. Using the New Attribute Node
            3. 6.4.3.3. The Value of the Attribute
            4. 6.4.3.4. Validating and Annotating the Attribute
          4. 6.4.4. Usage
            1. 6.4.4.1. Different Ways of Creating Attributes
            2. 6.4.4.2. Creating an Attribute Whose Value Is a QName
          5. 6.4.5. Examples
          6. 6.4.6. See Also
        5. 6.5. xsl:attribute-set
          1. 6.5.1. Changes in 2.0
          2. 6.5.2. Format
            1. 6.5.2.1. Position
            2. 6.5.2.2. Attributes
            3. 6.5.2.3. Content
          3. 6.5.3. Effect
          4. 6.5.4. Usage
          5. 6.5.5. Examples
          6. 6.5.6. See Also
        6. 6.6. xsl:call-template
          1. 6.6.1. Changes in 2.0
          2. 6.6.2. Format
            1. 6.6.2.1. Position
            2. 6.6.2.2. Attributes
            3. 6.6.2.3. Content
          3. 6.6.3. Effect
            1. 6.6.3.1. The Template Name
            2. 6.6.3.2. Parameters
            3. 6.6.3.3. Context
          4. 6.6.4. Usage and Examples
            1. 6.6.4.1. Using the Result
            2. 6.6.4.2. Changing the Context Item
            3. 6.6.4.3. Recursion: Processing a List of Values
          5. 6.6.5. See Also
        7. 6.7. xsl:character-map
          1. 6.7.1. Changes in 2.0
          2. 6.7.2. Format
            1. 6.7.2.1. Position
            2. 6.7.2.2. Attributes
            3. 6.7.2.3. Content
          3. 6.7.3. Effect
          4. 6.7.4. Usage and Examples
          5. 6.7.5. See Also
        8. 6.8. xsl:choose
          1. 6.8.1. Changes in 2.0
          2. 6.8.2. Format
            1. 6.8.2.1. Position
            2. 6.8.2.2. Attributes
            3. 6.8.2.3. Content
          3. 6.8.3. Effect
          4. 6.8.4. Usage
          5. 6.8.5. Examples
          6. 6.8.6. See Also
        9. 6.9. xsl:comment
          1. 6.9.1. Changes in 2.0
          2. 6.9.2. Format
            1. 6.9.2.1. Position
            2. 6.9.2.2. Attributes
            3. 6.9.2.3. Content
          3. 6.9.3. Effect
          4. 6.9.4. Usage
          5. 6.9.5. Examples
            1. 6.9.5.1. Example 1: Showing the Date and Time of Transformation
            2. 6.9.5.2. Example 2: Generating Commented-Out JavaScript
            3. 6.9.5.3. Example 3: Generating Comments Containing Markup
        10. 6.10. xsl:copy
          1. 6.10.1. Changes in 2.0
          2. 6.10.2. Format
            1. 6.10.2.1. Position
            2. 6.10.2.2. Attributes
            3. 6.10.2.3. Content
          3. 6.10.3. Effect
          4. 6.10.4. Usage
          5. 6.10.5. Examples
          6. 6.10.6. See Also
        11. 6.11. xsl:copy-of
          1. 6.11.1. Changes in 2.0
          2. 6.11.2. Format
            1. 6.11.2.1. Position
            2. 6.11.2.2. Attributes
            3. 6.11.2.3. Content
          3. 6.11.3. Effect
          4. 6.11.4. Usage and Examples
            1. 6.11.4.1. Copying Nodes to and from Temporary Trees
            2. 6.11.4.2. Deep Copy
            3. 6.11.4.3. Copying Namespace Nodes
            4. 6.11.4.4. Copying Type Annotations
          5. 6.11.5. See Also
        12. 6.12. xsl:decimal-format
          1. 6.12.1. Changes in 2.0
          2. 6.12.2. Format
            1. 6.12.2.1. Position
            2. 6.12.2.2. Attributes
            3. 6.12.2.3. Content
          3. 6.12.3. Effect
          4. 6.12.4. Usage
          5. 6.12.5. Examples
            1. 6.12.5.1. Example 1: Comma as a Decimal Separator
            2. 6.12.5.2. Example 2: Non-Western Digits
            3. 6.12.5.3. Example 3: NaN and Infinity
          6. 6.12.6. See Also
        13. 6.13. xsl:document
          1. 6.13.1. Changes in 2.0
          2. 6.13.2. Format
            1. 6.13.2.1. Position
            2. 6.13.2.2. Attributes
            3. 6.13.2.3. Content
          3. 6.13.3. Effect
            1. 6.13.3.1. The Content of the Document
            2. 6.13.3.2. Validating and Annotating the Document
          4. 6.13.4. Usage and Examples
          5. 6.13.5. See Also
        14. 6.14. xsl:element
          1. 6.14.1. Changes in 2.0
          2. 6.14.2. Format
            1. 6.14.2.1. Position
            2. 6.14.2.2. Attributes
            3. 6.14.2.3. Content
          3. 6.14.3. Effect
            1. 6.14.3.1. The Name of the Element
            2. 6.14.3.2. The Content of the Element
            3. 6.14.3.3. Namespace Fixup
            4. 6.14.3.4. Namespace Inheritance
            5. 6.14.3.5. Validating and Annotating the Element
          4. 6.14.4. Usage and Examples
          5. 6.14.5. See Also
        15. 6.15. xsl:fallback
          1. 6.15.1. Changes in 2.0
          2. 6.15.2. Format
            1. 6.15.2.1. Position
            2. 6.15.2.2. Attributes
            3. 6.15.2.3. Content
          3. 6.15.3. Effect
          4. 6.15.4. Usage
          5. 6.15.5. Examples
            1. 6.15.5.1. Example 1: XSLT Forward Compatibility
            2. 6.15.5.2. Example 2: Vendor Portability
            3. 6.15.5.3. Example 3: Temporary Trees
          6. 6.15.6. See Also
        16. 6.16. xsl:for-each
          1. 6.16.1. Changes in 2.0
          2. 6.16.2. Format
            1. 6.16.2.1. Position
            2. 6.16.2.2. Attributes
            3. 6.16.2.3. Content
          3. 6.16.3. Effect
            1. 6.16.3.1. The select Attribute
            2. 6.16.3.2. Sorting
          4. 6.16.4. Usage and Examples
            1. 6.16.4.1. Iterating over a Sequence of Nodes
            2. 6.16.4.2. Changing the Context Item
          5. 6.16.5. See Also
        17. 6.17. xsl:for-each-group
          1. 6.17.1. Changes in 2.0
          2. 6.17.2. Format
            1. 6.17.2.1. Position
            2. 6.17.2.2. Attributes
            3. 6.17.2.3. Content
          3. 6.17.3. Effect
            1. 6.17.3.1. group-by
            2. 6.17.3.2. group-adjacent
            3. 6.17.3.3. group-starting-with
            4. 6.17.3.4. group-ending-with
            5. 6.17.3.5. Sorting the Groups
          4. 6.17.4. Usage and Examples
            1. 6.17.4.1. Using group-by
            2. 6.17.4.2. Using group-adjacent
            3. 6.17.4.3. Using group-starting-with
            4. 6.17.4.4. Using group-ending-with
            5. 6.17.4.5. Arranging Data in Tables
          5. 6.17.5. See Also
        18. 6.18. xsl:function
          1. 6.18.1. Changes in 2.0
          2. 6.18.2. Format
            1. 6.18.2.1. Position
            2. 6.18.2.2. Attributes
            3. 6.18.2.3. Content
          3. 6.18.3. Effect
            1. 6.18.3.1. The override Attribute
          4. 6.18.4. Usage and Examples
            1. 6.18.4.1. Functions versus Named Templates
            2. 6.18.4.2. Recursion
          5. 6.18.5. See Also
        19. 6.19. xsl:if
          1. 6.19.1. Changes in 2.0
          2. 6.19.2. Format
            1. 6.19.2.1. Position
            2. 6.19.2.2. Attributes
            3. 6.19.2.3. Content
          3. 6.19.3. Effect
          4. 6.19.4. Usage
          5. 6.19.5. Examples
          6. 6.19.6. See Also
        20. 6.20. xsl:import
          1. 6.20.1. Changes in 2.0
          2. 6.20.2. Format
            1. 6.20.2.1. Position
            2. 6.20.2.2. Attributes
            3. 6.20.2.3. Content
          3. 6.20.3. Effect
            1. 6.20.3.1. Locating the Stylesheet Module
            2. 6.20.3.2. Determining the Import Precedence
            3. 6.20.3.3. Effect of Import Precedence
          4. 6.20.4. Usage
          5. 6.20.5. Examples
          6. 6.20.6. See Also
        21. 6.21. xsl:import-schema
          1. 6.21.1. Changes in 2.0
          2. 6.21.2. Format
            1. 6.21.2.1. Position
            2. 6.21.2.2. Attributes
            3. 6.21.2.3. Content
          3. 6.21.3. Effect
          4. 6.21.4. Usage
          5. 6.21.5. Examples
        22. 6.22. xsl:include
          1. 6.22.1. Changes in 2.0
          2. 6.22.2. Format
            1. 6.22.2.1. Position
            2. 6.22.2.2. Attributes
            3. 6.22.2.3. Content
          3. 6.22.3. Effect
          4. 6.22.4. Usage and Examples
          5. 6.22.5. See Also
        23. 6.23. xsl:key
          1. 6.23.1. Changes in 2.0
          2. 6.23.2. Format
            1. 6.23.2.1. Position
            2. 6.23.2.2. Attributes
            3. 6.23.2.3. Content
          3. 6.23.3. Effect
          4. 6.23.4. Usage and Examples
            1. 6.23.4.1. Keys versus IDs
            2. 6.23.4.2. Using a Simple Key
            3. 6.23.4.3. Multivalued Keys
            4. 6.23.4.4. Multiple Named Keys
            5. 6.23.4.5. Multiple Definitions for the Same Key
            6. 6.23.4.6. Composite Keys
            7. 6.23.4.7. Using Keys for Grouping
          5. 6.23.5. See Also
        24. 6.24. xsl:matching-substring
          1. 6.24.1. Changes in 2.0
          2. 6.24.2. Format
            1. 6.24.2.1. Position
            2. 6.24.2.2. Attributes
            3. 6.24.2.3. Content
          3. 6.24.3. Effect
          4. 6.24.4. Usage and Examples
          5. 6.24.5. See Also
        25. 6.25. xsl:message
          1. 6.25.1. Changes in 2.0
          2. 6.25.2. Format
            1. 6.25.2.1. Position
            2. 6.25.2.2. Attributes
            3. 6.25.2.3. Content
          3. 6.25.3. Effect
          4. 6.25.4. Usage
          5. 6.25.5. Examples
            1. 6.25.5.1. Localized Messages
          6. 6.25.6. See Also
        26. 6.26. xsl:namespace
          1. 6.26.1. Changes in 2.0
          2. 6.26.2. Format
            1. 6.26.2.1. Position
            2. 6.26.2.2. Attributes
            3. 6.26.2.3. Content
          3. 6.26.3. Effect
          4. 6.26.4. Usage and Examples
          5. 6.26.5. See Also
        27. 6.27. xsl:namespace-alias
          1. 6.27.1. Changes in 2.0
          2. 6.27.2. Format
            1. 6.27.2.1. Position
            2. 6.27.2.2. Attributes
            3. 6.27.2.3. Content
          3. 6.27.3. Effect
          4. 6.27.4. Usage and Examples
            1. 6.27.4.1. Aliasing the XML Namespace
            2. 6.27.4.2. Choice of Prefixes in the Result Document
          5. 6.27.5. See Also
        28. 6.28. xsl:next-match
          1. 6.28.1. Changes in 2.0
          2. 6.28.2. Format
            1. 6.28.2.1. Position
            2. 6.28.2.2. Attributes
            3. 6.28.2.3. Content
          3. 6.28.3. Effect
          4. 6.28.4. Usage and Examples
          5. 6.28.5. See Also
        29. 6.29. xsl:non-matching-substring
          1. 6.29.1. Changes in 2.0
          2. 6.29.2. Format
            1. 6.29.2.1. Position
            2. 6.29.2.2. Attributes
            3. 6.29.2.3. Content
          3. 6.29.3. Effect
          4. 6.29.4. Usage and Examples
          5. 6.29.5. See Also
        30. 6.30. xsl:number
          1. 6.30.1. Changes in 2.0
          2. 6.30.2. Format
            1. 6.30.2.1. Position
            2. 6.30.2.2. Attributes
            3. 6.30.2.3. Content
          3. 6.30.3. Effect
            1. 6.30.3.1. Determining a Sequence Number
            2. 6.30.3.2. Analyzing the Format String
            3. 6.30.3.3. Formatting the Numbers
            4. 6.30.3.4. Outputting the Number
          4. 6.30.4. Usage and Examples
            1. 6.30.4.1. level = "single"
            2. 6.30.4.2. level = "any"
            3. 6.30.4.3. level = "multiple"
          5. 6.30.5. See Also
        31. 6.31. xsl:otherwise
          1. 6.31.1. Changes in 2.0
          2. 6.31.2. Format
            1. 6.31.2.1. Position
            2. 6.31.2.2. Attributes
            3. 6.31.2.3. Content
          3. 6.31.3. Effect
          4. 6.31.4. Usage and Examples
          5. 6.31.5. See Also
        32. 6.32. xsl:output
          1. 6.32.1. Changes in 2.0
          2. 6.32.2. Format
            1. 6.32.2.1. Position
            2. 6.32.2.2. Attributes
          3. 6.32.3. Content
          4. 6.32.4. Effect
          5. 6.32.5. Examples
          6. 6.32.6. See Also
        33. 6.33. xsl:output-character
          1. 6.33.1. Changes in 2.0
          2. 6.33.2. Format
            1. 6.33.2.1. Position
            2. 6.33.2.2. Attributes
            3. 6.33.2.3. Content
          3. 6.33.3. Effect
          4. 6.33.4. See Also
        34. 6.34. xsl:param
          1. 6.34.1. Changes in 2.0
          2. 6.34.2. Format
            1. 6.34.2.1. Format for Stylesheet Parameters
            2. 6.34.2.2. Format for Template Parameters
            3. 6.34.2.3. Format for Function Parameters
            4. 6.34.2.4. Position
            5. 6.34.2.5. Attributes
            6. 6.34.2.6. Content
          3. 6.34.3. Effect
            1. 6.34.3.1. The Type of the Parameter
            2. 6.34.3.2. The Default Value of the Parameter
            3. 6.34.3.3. The Name of the Parameter
            4. 6.34.3.4. Tunnel Parameters
          4. 6.34.4. Usage
            1. 6.34.4.1. Using Stylesheet Parameters
            2. 6.34.4.2. Using Template Parameters
            3. 6.34.4.3. Using Tunnel Parameters
          5. 6.34.5. Examples
          6. 6.34.6. See Also
        35. 6.35. xsl:perform-sort
          1. 6.35.1. Changes in 2.0
          2. 6.35.2. Format
            1. 6.35.2.1. Position
            2. 6.35.2.2. Attributes
            3. 6.35.2.3. Content
          3. 6.35.3. Effect
          4. 6.35.4. Usage and Examples
          5. 6.35.5. See Also
        36. 6.36. xsl:preserve-space
          1. 6.36.1. Changes in 2.0
          2. 6.36.2. Format
            1. 6.36.2.1. Position
            2. 6.36.2.2. Attributes
            3. 6.36.2.3. Content
          3. 6.36.3. Effect
          4. 6.36.4. Usage
          5. 6.36.5. Examples
          6. 6.36.6. See Also
        37. 6.37. xsl:processing-instruction
          1. 6.37.1. Changes in 2.0
          2. 6.37.2. Format
            1. 6.37.2.1. Position
            2. 6.37.2.2. Attributes
            3. 6.37.2.3. Content
          3. 6.37.3. Effect
          4. 6.37.4. Usage
          5. 6.37.5. Examples
        38. 6.38. xsl:result-document
          1. 6.38.1. Changes in 2.0
          2. 6.38.2. Format
            1. 6.38.2.1. Position
            2. 6.38.2.2. Attributes
            3. 6.38.2.3. Content
          3. 6.38.3. Effect
          4. 6.38.4. Usage
          5. 6.38.5. Examples
          6. 6.38.6. See Also
        39. 6.39. xsl:sequence
          1. 6.39.1. Changes in 2.0
          2. 6.39.2. Format
            1. 6.39.2.1. Position
            2. 6.39.2.2. Attributes
            3. 6.39.2.3. Content
          3. 6.39.3. Effect
          4. 6.39.4. Usage and Examples
          5. 6.39.5. See Also
        40. 6.40. xsl:sort
          1. 6.40.1. Changes in 2.0
          2. 6.40.2. Format
            1. 6.40.2.1. Position
            2. 6.40.2.2. Attributes
            3. 6.40.2.3. Content
          3. 6.40.3. Effect
            1. 6.40.3.1. Collations
          4. 6.40.4. Usage
            1. 6.40.4.1. Using Collations
            2. 6.40.4.2. Dynamic Sort Keys
          5. 6.40.5. Examples
          6. 6.40.6. See Also
        41. 6.41. xsl:strip-space
          1. 6.41.1. Changes in 2.0
          2. 6.41.2. Format
            1. 6.41.2.1. Position
            2. 6.41.2.2. Attributes
            3. 6.41.2.3. Content
          3. 6.41.3. Effect, Usage, and Examples
          4. 6.41.4. See Also
        42. 6.42. xsl:stylesheet
          1. 6.42.1. Changes in 2.0
          2. 6.42.2. Format
            1. 6.42.2.1. Position
            2. 6.42.2.2. Namespace Declarations
            3. 6.42.2.3. Attributes
            4. 6.42.2.4. Content
          3. 6.42.3. The id Attribute
            1. 6.42.3.1. Effect
            2. 6.42.3.2. Usage
          4. 6.42.4. The default-collation Attribute
            1. 6.42.4.1. Effect
            2. 6.42.4.2. Usage
          5. 6.42.5. The default-validation Attribute
            1. 6.42.5.1. Effect
            2. 6.42.5.2. Usage
          6. 6.42.6. The exclude-result-prefixes Attribute
            1. 6.42.6.1. Effect
              1. 6.42.6.1.1. What exclude-result-prefixes Does
              2. 6.42.6.1.2. What exclude-result-prefixes Doesn't Do
            2. 6.42.6.2. Usage
          7. 6.42.7. The extension-element-prefixes Attribute
            1. 6.42.7.1. Effect
            2. 6.42.7.2. Usage
          8. 6.42.8. The input-type-annotations Attribute
            1. 6.42.8.1. Effect
            2. 6.42.8.2. Usage
          9. 6.42.9. The use-when Attribute
            1. 6.42.9.1. Effect
            2. 6.42.9.2. Usage
          10. 6.42.10. The version Attribute
            1. 6.42.10.1. Effect
            2. 6.42.10.2. Usage
          11. 6.42.11. The xpath-default-namespace Attribute
            1. 6.42.11.1. Effect
            2. 6.42.11.2. Usage
          12. 6.42.12. See Also
        43. 6.43. xsl:template
          1. 6.43.1. Changes in 2.0
          2. 6.43.2. Format
            1. 6.43.2.1. Position
            2. 6.43.2.2. Attributes
            3. 6.43.2.3. Content
          3. 6.43.3. Effect
            1. 6.43.3.1. The match Attribute
            2. 6.43.3.2. The name Attribute
            3. 6.43.3.3. The priority Attribute
            4. 6.43.3.4. The mode Attribute
            5. 6.43.3.5. Evaluating a Template
          4. 6.43.4. Usage and Examples
            1. 6.43.4.1. Using Template Rules
            2. 6.43.4.2. Using Modes
          5. 6.43.5. See Also
        44. 6.44. xsl:text
          1. 6.44.1. Changes in 2.0
          2. 6.44.2. Format
            1. 6.44.2.1. Position
            2. 6.44.2.2. Attributes
            3. 6.44.2.3. Content
          3. 6.44.3. Effect
          4. 6.44.4. Usage
            1. 6.44.4.1. Whitespace Control
            2. 6.44.4.2. Examples
          5. 6.44.5. See Also
        45. 6.45. xsl:transform
          1. 6.45.1. Format
          2. 6.45.2. See Also
        46. 6.46. xsl:value-of
          1. 6.46.1. Changes in 2.0
          2. 6.46.2. Format
            1. 6.46.2.1. Position
            2. 6.46.2.2. Attributes
            3. 6.46.2.3. Content
          3. 6.46.3. Effect
          4. 6.46.4. Usage
            1. 6.46.4.1. Avoiding Surprises
          5. 6.46.5. Examples
          6. 6.46.6. See Also
        47. 6.47. xsl:variable
          1. 6.47.1. Changes in 2.0
          2. 6.47.2. Format
            1. 6.47.2.1. Position
            2. 6.47.2.2. Attributes
            3. 6.47.2.3. Content
          3. 6.47.3. Effect
            1. 6.47.3.1. The Name of the Variable
            2. 6.47.3.2. The Value of the Variable
            3. 6.47.3.3. Standard Conversion Rules
          4. 6.47.4. Usage
          5. 6.47.5. Examples
            1. 6.47.5.1. Convenience Variables
            2. 6.47.5.2. Variables to Capture Context-Sensitive Values
            3. 6.47.5.3. Variables to Hold Intermediate Results
            4. 6.47.5.4. Avoiding Trivial Documents
          6. 6.47.6. See Also
        48. 6.48. xsl:when
          1. 6.48.1. Changes in 2.0
          2. 6.48.2. Format
            1. 6.48.2.1. Position
            2. 6.48.2.2. Attributes
            3. 6.48.2.3. Content
          3. 6.48.3. Effect
          4. 6.48.4. Usage and Examples
          5. 6.48.5. See Also
        49. 6.49. xsl:with-param
          1. 6.49.1. Changes in 2.0
          2. 6.49.2. Format
            1. 6.49.2.1. Position
            2. 6.49.2.2. Attributes
            3. 6.49.2.3. Content
          3. 6.49.3. Effect
          4. 6.49.4. Usage and Examples
          5. 6.49.5. See Also
        50. 6.50. Summary
      2. 7. XPath Fundamentals
        1. 7.1. Notation
        2. 7.2. Where to Start
        3. 7.3. Expressions
          1. 7.3.1. Examples
        4. 7.4. Lexical Constructs
          1. 7.4.1. Comments
            1. 7.4.1.1. Changes in XPath 2.0
          2. 7.4.2. Numeric Literals
            1. 7.4.2.1. Examples
            2. 7.4.2.2. Changes in XPath 2.0
          3. 7.4.3. String Literals
            1. 7.4.3.1. Examples
            2. 7.4.3.2. Changes in XPath 2.0
            3. 7.4.3.3. XSLT Usage
          4. 7.4.4. Names
            1. 7.4.4.1. Examples
            2. 7.4.4.2. XSLT Usage
          5. 7.4.5. Operators
        5. 7.5. Primary Expressions
          1. 7.5.1. Examples
        6. 7.6. Variable References
          1. 7.6.1. Usage
          2. 7.6.2. Examples
        7. 7.7. Parenthesized Expressions
          1. 7.7.1. Changes in XPath 2.0
        8. 7.8. Context Item Expressions
          1. 7.8.1. Changes in XPath 2.0
          2. 7.8.2. Usage
        9. 7.9. Function Calls
          1. 7.9.1. Identifying the Function to Be Called
          2. 7.9.2. Converting the Arguments and the Result
          3. 7.9.3. Changes in XPath 2.0
          4. 7.9.4. Side Effects
          5. 7.9.5. Examples
        10. 7.10. Conditional Expressions
          1. 7.10.1. Changes in XPath 2.0
          2. 7.10.2. Examples
        11. 7.11. The XPath Evaluation Context
          1. 7.11.1. The Static Context
            1. 7.11.1.1. XPath 1.0 Compatibility Mode
            2. 7.11.1.2. In-Scope Namespaces
            3. 7.11.1.3. Default Namespaces
            4. 7.11.1.4. In-Scope Schema Definitions
            5. 7.11.1.5. In-Scope Variables
            6. 7.11.1.6. In-Scope Functions
            7. 7.11.1.7. Collations
            8. 7.11.1.8. Base URI
            9. 7.11.1.9. Statically Known Documents and Collections
          2. 7.11.2. The Dynamic Context
            1. 7.11.2.1. The Focus
            2. 7.11.2.2. Variable Values
            3. 7.11.2.3. Function Implementations
            4. 7.11.2.4. Current dateTime
            5. 7.11.2.5. Implicit Timezone
            6. 7.11.2.6. Available Documents and Collections
        12. 7.12. Summary
      3. 8. XPath: Operators on Items
        1. 8.1. Arithmetic Operators
          1. 8.1.1. Syntax
          2. 8.1.2. Type Promotion
          3. 8.1.3. Changes in XPath 2.0
          4. 8.1.4. Effect
          5. 8.1.5. Arithmetic Using Numbers
            1. 8.1.5.1. Integer Arithmetic
            2. 8.1.5.2. Decimal Arithmetic
            3. 8.1.5.3. Floating-Point Arithmetic
          6. 8.1.6. Examples of Numeric Arithmetic
          7. 8.1.7. Arithmetic Using Durations
            1. 8.1.7.1. Date/Time Plus Duration
            2. 8.1.7.2. Duration Plus Duration
            3. 8.1.7.3. Duration Times Number
            4. 8.1.7.4. Date/Time Minus Date/Time
            5. 8.1.7.5. Duration Divided by Duration
        2. 8.2. Value Comparisons
          1. 8.2.1. Permitted Operand Types
          2. 8.2.2. Type Checking for Value Comparisons
          3. 8.2.3. Examples of Value Comparisons
        3. 8.3. General Comparisons
          1. 8.3.1. Changes in XPath 2.0
          2. 8.3.2. Rules for General Comparisons
          3. 8.3.3. Existential Comparison
          4. 8.3.4. Examples of General Comparisons
        4. 8.4. Node Comparisons
          1. 8.4.1. The «is» Operator
          2. 8.4.2. The operators «<<» and «>>»
          3. 8.4.3. Changes in XPath 2.0
        5. 8.5. Boolean Expressions
          1. 8.5.1. Shortcut Semantics
          2. 8.5.2. Examples
        6. 8.6. Summary
      4. 9. XPath: Path Expressions
        1. 9.1. Examples of Path Expressions
        2. 9.2. Changes in XPath 2.0
        3. 9.3. Document Order and Duplicates
        4. 9.4. The Binary « /» Operator
          1. 9.4.1. Syntax
          2. 9.4.2. Effect
          3. 9.4.3. Examples of the Binary «/» Operator
          4. 9.4.4. Associativity of the «/» Operator
        5. 9.5. Axis Steps
          1. 9.5.1. Syntax of Axis Steps
          2. 9.5.2. Effect
          3. 9.5.3. Examples of Axis Steps
          4. 9.5.4. Axes
          5. 9.5.5. Node Tests
            1. 9.5.5.1. Usage
            2. 9.5.5.2. Examples of Node Tests
          6. 9.5.6. Name Tests
            1. 9.5.6.1. Syntax
            2. 9.5.6.2. Usage
            3. 9.5.6.3. Examples of Name Tests
          7. 9.5.7. Kind Tests
            1. 9.5.7.1. Usage
            2. 9.5.7.2. Examples of Kind Tests
          8. 9.5.8. Predicates
          9. 9.5.9. Abbreviated Axis Steps
            1. 9.5.9.1. Syntax
            2. 9.5.9.2. Defaulting the Axis Name in a Step
            3. 9.5.9.3. The «@» Abbreviation
              1. 9.5.9.3.1. Examples
            4. 9.5.9.4. The «..» Abbreviation
              1. 9.5.9.4.1. Examples in Context
            5. 9.5.9.5. The Root Expression «/»
        6. 9.6. Rooted Path Expressions
          1. 9.6.1. Syntax
          2. 9.6.2. Examples of Rooted Paths
        7. 9.7. The « //» Abbreviation
          1. 9.7.1. Examples Using «//»
          2. 9.7.2. Comparing «//» with «/descendant::»
        8. 9.8. Combining Sets of Nodes
          1. 9.8.1. Syntax
          2. 9.8.2. Examples
          3. 9.8.3. Usage
          4. 9.8.4. Set Intersection and Difference in XPath 1.0
          5. 9.8.5. Sets of Atomic Values
        9. 9.9. Summary
      5. 10. XPath: Sequence Expressions
        1. 10.1. The Comma Operator
          1. 10.1.1. Examples
        2. 10.2. Numeric Ranges: The «to» Operator
          1. 10.2.1. Examples
        3. 10.3. Filter Expressions
          1. 10.3.1. Examples
        4. 10.4. The «for» Expression
          1. 10.4.1. Mapping a Sequence
          2. 10.4.2. Examples
          3. 10.4.3. The Context Item in a «for» Expression
          4. 10.4.4. Combining Multiple Sequences
          5. 10.4.5. Example
        5. 10.5. Simple Mapping Expressions
        6. 10.6. The «some» and «every» Expressions
          1. 10.6.1. Examples
          2. 10.6.2. Quantification and the «=» Operator
          3. 10.6.3. Errors in «some» and «every» Expressions
        7. 10.7. Summary
      6. 11. XPath: Type Expressions
        1. 11.1. Converting Atomic Values
          1. 11.1.1. Converting between Primitive Types
            1. 11.1.1.1. Converting from anyURI
            2. 11.1.1.2. Converting from base64Binary
            3. 11.1.1.3. Converting from boolean
            4. 11.1.1.4. Converting from date
            5. 11.1.1.5. Converting from dateTime
            6. 11.1.1.6. Converting from decimal
            7. 11.1.1.7. Converting from double
            8. 11.1.1.8. Converting from duration
            9. 11.1.1.9. Converting from float
            10. 11.1.1.10. Converting from gDay
            11. 11.1.1.11. Converting from gMonth
            12. 11.1.1.12. Converting from gMonthDay
            13. 11.1.1.13. Converting from gYear
            14. 11.1.1.14. Converting from gYearMonth
            15. 11.1.1.15. Converting from hexBinary
            16. 11.1.1.16. Converting from NOTATION
            17. 11.1.1.17. Converting from QName
            18. 11.1.1.18. Converting from string
            19. 11.1.1.19. Converting from time
            20. 11.1.1.20. Converting from untypedAtomic
          2. 11.1.2. Converting between Derived Types
            1. 11.1.2.1. Casting from xs:string to a Derived Type
            2. 11.1.2.2. Converting Non-string Values to a Derived Type
            3. 11.1.2.3. Casting to an xs:integer
            4. 11.1.2.4. Casting to xs:yearMonthDuration and xs:dayTimeDuration
        2. 11.2. Sequence Type Descriptors
          1. 11.2.1. Matching Atomic Values
          2. 11.2.2. Matching Nodes
          3. 11.2.3. Matching Elements and Attributes
            1. 11.2.3.1. Using Global Element and Attribute Declarations
            2. 11.2.3.2. Examples
        3. 11.3. The «instance of» Operator
        4. 11.4. The «treat as» Operator
        5. 11.5. Summary
      7. 12. XSLT Patterns
        1. 12.1. Patterns and Expressions
        2. 12.2. Changes in XSLT 2.0
        3. 12.3. The Formal Definition
          1. 12.3.1. Applying the Definition in Practice
          2. 12.3.2. An Algorithm for Matching Patterns
          3. 12.3.3. Patterns Containing Predicates
        4. 12.4. An Informal Definition
        5. 12.5. Conflict Resolution
        6. 12.6. Matching Parentless Nodes
        7. 12.7. The Syntax of Patterns
          1. 12.7.1. Pattern
            1. 12.7.1.1. Syntax
            2. 12.7.1.2. Effect
            3. 12.7.1.3. Usage
            4. 12.7.1.4. Examples
          2. 12.7.2. PathPattern
            1. 12.7.2.1. Syntax
            2. 12.7.2.2. Effect
            3. 12.7.2.3. Usage
            4. 12.7.2.4. Examples
          3. 12.7.3. RelativePathPattern
            1. 12.7.3.1. Syntax
            2. 12.7.3.2. Effect
            3. 12.7.3.3. Usage
            4. 12.7.3.4. Examples
          4. 12.7.4. PatternStep
            1. 12.7.4.1. Syntax
            2. 12.7.4.2. Effect
              1. 12.7.4.2.1. The PatternAxis
              2. 12.7.4.2.2. The NameTest
              3. 12.7.4.2.3. The KindTest
              4. 12.7.4.2.4. KindTests for Element Nodes
              5. 12.7.4.2.5. KindTests for Attribute Nodes
              6. 12.7.4.2.6. KindTests for Document Nodes
              7. 12.7.4.2.7. Using KindTests
              8. 12.7.4.2.8. Predicates
            3. 12.7.4.3. Examples
          5. 12.7.5. IdKeyPattern
            1. 12.7.5.1. Syntax
            2. 12.7.5.2. Usage
            3. 12.7.5.3. Examples
        8. 12.8. Summary
      8. 13. The Function Library
        1. 13.1. A Word about Naming
        2. 13.2. Functions by Category
          1. 13.2.1. Boolean Functions
          2. 13.2.2. Numeric Functions
          3. 13.2.3. String Functions
          4. 13.2.4. Date and Time Functions
          5. 13.2.5. Duration Functions
          6. 13.2.6. Aggregation Functions
          7. 13.2.7. Functions on URIs
          8. 13.2.8. Functions on QNames
          9. 13.2.9. Functions on Sequences
          10. 13.2.10. Functions That Return Properties of Nodes
          11. 13.2.11. Functions That Find Nodes
          12. 13.2.12. Functions That Return Context Information
          13. 13.2.13. Diagnostic Functions
          14. 13.2.14. Functions That Return Information about the XSLT Environment
          15. 13.2.15. Functions That Assert a Static Type
        3. 13.3. Notation
        4. 13.4. Code Samples
        5. 13.5. Function Definitions
          1. 13.5.1. abs
            1. 13.5.1.1. Signature
            2. 13.5.1.2. Effect
            3. 13.5.1.3. Examples
          2. 13.5.2. adjust-date-to-timezone, adjust-dateTime-to-timezone, adjust-time-to-timezone
            1. 13.5.2.1. Signature
            2. 13.5.2.2. Effect
            3. 13.5.2.3. Examples
            4. 13.5.2.4. Usage
            5. 13.5.2.5. See Also
          3. 13.5.3. avg
            1. 13.5.3.1. Signature
            2. 13.5.3.2. Effect
            3. 13.5.3.3. Examples
            4. 13.5.3.4. See Also
          4. 13.5.4. base-uri
            1. 13.5.4.1. Signature
            2. 13.5.4.2. Effect
            3. 13.5.4.3. Usage and Examples
            4. 13.5.4.4. See Also
          5. 13.5.5. boolean
            1. 13.5.5.1. Changes in 2.0
            2. 13.5.5.2. Signature
            3. 13.5.5.3. Effect
            4. 13.5.5.4. Examples
            5. 13.5.5.5. Usage
            6. 13.5.5.6. XSLT Examples
            7. 13.5.5.7. See Also
          6. 13.5.6. ceiling
            1. 13.5.6.1. Changes in 2.0
            2. 13.5.6.2. Signature
            3. 13.5.6.3. Effect
            4. 13.5.6.4. Examples
            5. 13.5.6.5. Usage
            6. 13.5.6.6. See Also
          7. 13.5.7. codepoint-equal
            1. 13.5.7.1. Signature
            2. 13.5.7.2. Effect
            3. 13.5.7.3. Examples
            4. 13.5.7.4. See Also
          8. 13.5.8. codepoints-to-string
            1. 13.5.8.1. Signature
            2. 13.5.8.2. Effect
            3. 13.5.8.3. Examples
            4. 13.5.8.4. Usage
            5. 13.5.8.5. See Also
          9. 13.5.9. collection
            1. 13.5.9.1. Signature
            2. 13.5.9.2. Effect
            3. 13.5.9.3. See Also
          10. 13.5.10. compare
            1. 13.5.10.1. Signature
            2. 13.5.10.2. Effect
            3. 13.5.10.3. Examples
            4. 13.5.10.4. Usage
            5. 13.5.10.5. See Also
          11. 13.5.11. concat
            1. 13.5.11.1. Changes in 2.0
            2. 13.5.11.2. Signature
            3. 13.5.11.3. Effect
            4. 13.5.11.4. Examples
            5. 13.5.11.5. Usage in XSLT
            6. 13.5.11.6. See Also
          12. 13.5.12. contains
            1. 13.5.12.1. Changes in 2.0
            2. 13.5.12.2. Signature
            3. 13.5.12.3. Effect
            4. 13.5.12.4. Examples
            5. 13.5.12.5. Usage
            6. 13.5.12.6. See Also
          13. 13.5.13. count
            1. 13.5.13.1. Changes in 2.0
            2. 13.5.13.2. Signature
            3. 13.5.13.3. Effect
            4. 13.5.13.4. Examples
            5. 13.5.13.5. Usage
            6. 13.5.13.6. See Also
          14. 13.5.14. current
            1. 13.5.14.1. Changes in 2.0
            2. 13.5.14.2. Signature
            3. 13.5.14.3. Effect
            4. 13.5.14.4. Usage
            5. 13.5.14.5. Example
          15. 13.5.15. current-date, current-dateTime, current-time
            1. 13.5.15.1. Signature
            2. 13.5.15.2. Effect
            3. 13.5.15.3. Examples
            4. 13.5.15.4. Usage
            5. 13.5.15.5. See Also
          16. 13.5.16. current-group
            1. 13.5.16.1. Signature
            2. 13.5.16.2. Effect
            3. 13.5.16.3. Usage and Examples
            4. 13.5.16.4. See Also
          17. 13.5.17. current-grouping-key
            1. 13.5.17.1. Signature
            2. 13.5.17.2. Effect
            3. 13.5.17.3. Usage and Examples
            4. 13.5.17.4. See Also
          18. 13.5.18. current-time
          19. 13.5.19. data
            1. 13.5.19.1. Signature
            2. 13.5.19.2. Effect
            3. 13.5.19.3. Examples
            4. 13.5.19.4. Usage
            5. 13.5.19.5. See Also
          20. 13.5.20. dateTime
            1. 13.5.20.1. Signature
            2. 13.5.20.2. Effect
            3. 13.5.20.3. Examples
            4. 13.5.20.4. See Also
          21. 13.5.21. day-from-date, day-from-dateTime
            1. 13.5.21.1. Signature
            2. 13.5.21.2. Effect
            3. 13.5.21.3. Examples
            4. 13.5.21.4. See Also
          22. 13.5.22. days-from-duration
            1. 13.5.22.1. Signature
            2. 13.5.22.2. Effect
            3. 13.5.22.3. Examples
            4. 13.5.22.4. See Also
          23. 13.5.23. deep-equal
            1. 13.5.23.1. Signature
            2. 13.5.23.2. Effect
            3. 13.5.23.3. Examples
            4. 13.5.23.4. Usage
          24. 13.5.24. default-collation
            1. 13.5.24.1. Signature
            2. 13.5.24.2. Usage
            3. 13.5.24.3. See Also
          25. 13.5.25. distinct-values
            1. 13.5.25.1. Signature
            2. 13.5.25.2. Effect
            3. 13.5.25.3. Examples
            4. 13.5.25.4. Usage
            5. 13.5.25.5. See Also
          26. 13.5.26. doc, doc-available
            1. 13.5.26.1. Changes in 2.0
            2. 13.5.26.2. Signatures
              1. 13.5.26.2.1. The doc() function
              2. 13.5.26.2.2. The doc-available() function
            3. 13.5.26.3. Effect
            4. 13.5.26.4. Usage and Examples
            5. 13.5.26.5. See Also
          27. 13.5.27. document
            1. 13.5.27.1. Changes in 2.0
            2. 13.5.27.2. Signature
            3. 13.5.27.3. Effect
            4. 13.5.27.4. Resolving the URI
            5. 13.5.27.5. Parsing the Document
            6. 13.5.27.6. URIs Held in Nodes
              1. 13.5.27.6.1. Usage: document() Applied to Nodes
            7. 13.5.27.7. URIs as Atomic Values
              1. 13.5.27.7.1. Usage: document() Applied to Atomic Values
            8. 13.5.27.8. Supplying an Explicit Base URI
            9. 13.5.27.9. See Also
          28. 13.5.28. document-uri
            1. 13.5.28.1. Signature
            2. 13.5.28.2. Effect
            3. 13.5.28.3. Usage
            4. 13.5.28.4. See Also
          29. 13.5.29. element-available
            1. 13.5.29.1. Changes in 2.0
            2. 13.5.29.2. Signature
            3. 13.5.29.3. Effect
            4. 13.5.29.4. Usage and Examples
              1. 13.5.29.4.1. Testing for Features Available in Later XSLT Versions
            5. 13.5.29.5. Testing for Vendor Extensions
            6. 13.5.29.6. See Also
          30. 13.5.30. empty
            1. 13.5.30.1. Signature
            2. 13.5.30.2. Effect
            3. 13.5.30.3. Examples
            4. 13.5.30.4. Usage
            5. 13.5.30.5. See Also
          31. 13.5.31. encode-for-uri
            1. 13.5.31.1. Signature
            2. 13.5.31.2. Effect
            3. 13.5.31.3. Examples
            4. 13.5.31.4. Usage
            5. 13.5.31.5. See Also
          32. 13.5.32. ends-with
            1. 13.5.32.1. Signature
            2. 13.5.32.2. Effect
            3. 13.5.32.3. Examples
            4. 13.5.32.4. Usage
            5. 13.5.32.5. See Also
          33. 13.5.33. error
            1. 13.5.33.1. Signature
            2. 13.5.33.2. Effect
            3. 13.5.33.3. Examples
            4. 13.5.33.4. Usage
            5. 13.5.33.5. See Also
          34. 13.5.34. escape-html-uri
            1. 13.5.34.1. Signature
            2. 13.5.34.2. Effect
            3. 13.5.34.3. Examples
            4. 13.5.34.4. Usage
            5. 13.5.34.5. See Also
          35. 13.5.35. exactly-one
            1. 13.5.35.1. Signature
            2. 13.5.35.2. Effect
            3. 13.5.35.3. Examples
            4. 13.5.35.4. Usage
            5. 13.5.35.5. See Also
          36. 13.5.36. exists
            1. 13.5.36.1. Signature
            2. 13.5.36.2. Effect
            3. 13.5.36.3. Examples
            4. 13.5.36.4. Usage
            5. 13.5.36.5. See Also
          37. 13.5.37. false
            1. 13.5.37.1. Changes in 2.0
            2. 13.5.37.2. Signature
            3. 13.5.37.3. Usage
            4. 13.5.37.4. XSLT Example
            5. 13.5.37.5. See Also
          38. 13.5.38. floor
            1. 13.5.38.1. Changes in 2.0
            2. 13.5.38.2. Signature
            3. 13.5.38.3. Effect
            4. 13.5.38.4. Examples
            5. 13.5.38.5. Usage
            6. 13.5.38.6. See Also
          39. 13.5.39. format-date, format-dateTime, format-time
            1. 13.5.39.1. Signature
            2. 13.5.39.2. Effect
              1. 13.5.39.2.1. The Picture Argument
              2. 13.5.39.2.2. The Language Argument
              3. 13.5.39.2.3. The Calendar Argument
              4. 13.5.39.2.4. The Country Argument
            3. 13.5.39.3. Usage and Examples
            4. 13.5.39.4. See Also
          40. 13.5.40. format-number
            1. 13.5.40.1. Changes in 2.0
            2. 13.5.40.2. Signature
            3. 13.5.40.3. Effect
              1. 13.5.40.3.1. The decimal-format Name
              2. 13.5.40.3.2. The Picture String
            4. 13.5.40.4. Usage
            5. 13.5.40.5. Examples
            6. 13.5.40.6. See Also
          41. 13.5.41. format-time
          42. 13.5.42. function-available
            1. 13.5.42.1. Changes in 2.0
            2. 13.5.42.2. Signature
            3. 13.5.42.3. Effect
            4. 13.5.42.4. Usage
              1. 13.5.42.4.1. Testing for the Existence of System-Defined Functions
              2. 13.5.42.4.2. Testing for Vendor or Third-Party Extensions
            5. 13.5.42.5. See Also
          43. 13.5.43. generate-id
            1. 13.5.43.1. Changes in 2.0
            2. 13.5.43.2. Signature
            3. 13.5.43.3. Effect
            4. 13.5.43.4. Usage and Examples
            5. 13.5.43.5. See Also
          44. 13.5.44. hours-from-dateTime, hours-from-time
            1. 13.5.44.1. Signature
            2. 13.5.44.2. Effect
            3. 13.5.44.3. Examples
            4. 13.5.44.4. See Also
          45. 13.5.45. hours-from-duration
            1. 13.5.45.1. Signature
            2. 13.5.45.2. Effect
            3. 13.5.45.3. Examples
            4. 13.5.45.4. See Also
          46. 13.5.46. id
            1. 13.5.46.1. Changes in 2.0
            2. 13.5.46.2. Signature
            3. 13.5.46.3. Effect
            4. 13.5.46.4. IDs and Validation
            5. 13.5.46.5. Usage and Examples
            6. 13.5.46.6. See Also
          47. 13.5.47. idref
            1. 13.5.47.1. Signature
            2. 13.5.47.2. Effect
            3. 13.5.47.3. IDs and Validation
            4. 13.5.47.4. Example
            5. 13.5.47.5. See Also
          48. 13.5.48. implicit-timezone
            1. 13.5.48.1. Signature
            2. 13.5.48.2. Effect
            3. 13.5.48.3. Example
            4. 13.5.48.4. See Also
          49. 13.5.49. index-of
            1. 13.5.49.1. Signature
            2. 13.5.49.2. Effect
            3. 13.5.49.3. Examples
          50. 13.5.50. in-scope-prefixes
            1. 13.5.50.1. Changes in 2.0
            2. 13.5.50.2. Signature
            3. 13.5.50.3. Effect
            4. 13.5.50.4. Examples
            5. 13.5.50.5. Usage
            6. 13.5.50.6. See Also
          51. 13.5.51. insert-before
            1. 13.5.51.1. Signature
            2. 13.5.51.2. Effect
            3. 13.5.51.3. Examples
            4. 13.5.51.4. Usage
            5. 13.5.51.5. See Also
          52. 13.5.52. iri-to-uri
            1. 13.5.52.1. Signature
            2. 13.5.52.2. Effect
            3. 13.5.52.3. Examples
            4. 13.5.52.4. Usage
            5. 13.5.52.5. See Also
          53. 13.5.53. key
            1. 13.5.53.1. Changes in 2.0
            2. 13.5.53.2. Signature
            3. 13.5.53.3. Effect
            4. 13.5.53.4. Usage and Examples
              1. 13.5.53.4.1. Using Keys to Find Nodes by Value
            5. 13.5.53.5. Using Keys for Grouping
            6. 13.5.53.6. See Also
          54. 13.5.54. lang
            1. 13.5.54.1. Changes in 2.0
            2. 13.5.54.2. Signature
            3. 13.5.54.3. Effect
            4. 13.5.54.4. Examples
            5. 13.5.54.5. Usage
          55. 13.5.55. last
            1. 13.5.55.1. Changes in 2.0
            2. 13.5.55.2. Signature
            3. 13.5.55.3. Effect
            4. 13.5.55.4. Usage
            5. 13.5.55.5. Usage in XSLT
            6. 13.5.55.6. See Also
          56. 13.5.56. local-name
            1. 13.5.56.1. Changes in 2.0
            2. 13.5.56.2. Signature
            3. 13.5.56.3. Effect
            4. 13.5.56.4. Examples
            5. 13.5.56.5. Usage
            6. 13.5.56.6. XSLT Example
            7. 13.5.56.7. See Also
          57. 13.5.57. local-name-from-QName
            1. 13.5.57.1. Signature
            2. 13.5.57.2. Effect
            3. 13.5.57.3. Examples
            4. 13.5.57.4. See Also
          58. 13.5.58. lower-case
            1. 13.5.58.1. Signature
            2. 13.5.58.2. Effect
            3. 13.5.58.3. Examples
            4. 13.5.58.4. Usage
            5. 13.5.58.5. See Also
          59. 13.5.59. matches
            1. 13.5.59.1. Signature
            2. 13.5.59.2. Effect
            3. 13.5.59.3. Examples
            4. 13.5.59.4. Usage
            5. 13.5.59.5. See Also
          60. 13.5.60. max, min
            1. 13.5.60.1. Signature
            2. 13.5.60.2. Effect
            3. 13.5.60.3. Examples
            4. 13.5.60.4. Usage
          61. 13.5.61. min
          62. 13.5.62. minutes-from-dateTime, minutes-from-time
            1. 13.5.62.1. Signature
            2. 13.5.62.2. Effect
            3. 13.5.62.3. Examples
            4. 13.5.62.4. See Also
          63. 13.5.63. minutes-from-duration
            1. 13.5.63.1. Signature
            2. 13.5.63.2. Effect
            3. 13.5.63.3. Examples
            4. 13.5.63.4. See Also
          64. 13.5.64. minutes-from-time
          65. 13.5.65. month-from-date, month-from-dateTime
            1. 13.5.65.1. Signature
            2. 13.5.65.2. Effect
            3. 13.5.65.3. Examples
            4. 13.5.65.4. See Also
          66. 13.5.66. months-from-duration
            1. 13.5.66.1. Signature
            2. 13.5.66.2. Effect
            3. 13.5.66.3. Examples
            4. 13.5.66.4. See Also
          67. 13.5.67. name
            1. 13.5.67.1. Changes in 2.0
            2. 13.5.67.2. Signature
            3. 13.5.67.3. Effect
            4. 13.5.67.4. Usage
            5. 13.5.67.5. Examples
            6. 13.5.67.6. See Also
          68. 13.5.68. namespace-uri
            1. 13.5.68.1. Changes in 2.0
            2. 13.5.68.2. Signature
            3. 13.5.68.3. Effect
            4. 13.5.68.4. Examples
            5. 13.5.68.5. Usage
            6. 13.5.68.6. See Also
          69. 13.5.69. namespace-uri-for-prefix
            1. 13.5.69.1. Changes in 2.0
            2. 13.5.69.2. Signature
            3. 13.5.69.3. Effect
            4. 13.5.69.4. Example
            5. 13.5.69.5. Usage
            6. 13.5.69.6. See Also
          70. 13.5.70. namespace-uri-from-QName
            1. 13.5.70.1. Signature
            2. 13.5.70.2. Effect
            3. 13.5.70.3. Examples
            4. 13.5.70.4. See Also
          71. 13.5.71. nilled
            1. 13.5.71.1. Signature
            2. 13.5.71.2. Effect
            3. 13.5.71.3. Examples
            4. 13.5.71.4. Usage
          72. 13.5.72. node-name
            1. 13.5.72.1. Signature
            2. 13.5.72.2. Effect
            3. 13.5.72.3. Examples
            4. 13.5.72.4. Usage
            5. 13.5.72.5. See Also
          73. 13.5.73. normalize-space
            1. 13.5.73.1. Changes in 2.0
            2. 13.5.73.2. Signature
            3. 13.5.73.3. Effect
            4. 13.5.73.4. Examples
            5. 13.5.73.5. Usage
            6. 13.5.73.6. XSLT Example
            7. 13.5.73.7. See Also
          74. 13.5.74. normalize-unicode
            1. 13.5.74.1. Signature
            2. 13.5.74.2. Effect
            3. 13.5.74.3. Usage
            4. 13.5.74.4. See Also
          75. 13.5.75. not
            1. 13.5.75.1. Changes in 2.0
            2. 13.5.75.2. Signature
            3. 13.5.75.3. Effect
            4. 13.5.75.4. Examples
            5. 13.5.75.5. Usage
            6. 13.5.75.6. XSLT Examples
            7. 13.5.75.7. See Also
          76. 13.5.76. number
            1. 13.5.76.1. Changes in 2.0
            2. 13.5.76.2. Signature
            3. 13.5.76.3. Effect
            4. 13.5.76.4. Examples
            5. 13.5.76.5. Usage
            6. 13.5.76.6. See Also
          77. 13.5.77. one-or-more
            1. 13.5.77.1. Signature
            2. 13.5.77.2. Effect
            3. 13.5.77.3. Examples
            4. 13.5.77.4. Usage
            5. 13.5.77.5. See Also
          78. 13.5.78. position
            1. 13.5.78.1. Changes in 2.0
            2. 13.5.78.2. Signature
            3. 13.5.78.3. Effect
            4. 13.5.78.4. Usage in XSLT
              1. 13.5.78.4.1. Displaying the Current Position
              2. 13.5.78.4.2. Testing the Current Position
            5. 13.5.78.5. See Also
          79. 13.5.79. prefix-from-QName
            1. 13.5.79.1. Signature
            2. 13.5.79.2. Effect
            3. 13.5.79.3. Usage
            4. 13.5.79.4. Examples
            5. 13.5.79.5. See Also
          80. 13.5.80. QName
            1. 13.5.80.1. Signature
            2. 13.5.80.2. Effect
            3. 13.5.80.3. Examples
            4. 13.5.80.4. Usage
            5. 13.5.80.5. See Also
          81. 13.5.81. regex-group
            1. 13.5.81.1. Signature
            2. 13.5.81.2. Effect
            3. 13.5.81.3. Usage and Examples
            4. 13.5.81.4. See Also
          82. 13.5.82. remove
            1. 13.5.82.1. Signature
            2. 13.5.82.2. Effect
            3. 13.5.82.3. Examples
            4. 13.5.82.4. Usage
            5. 13.5.82.5. See Also
          83. 13.5.83. replace
            1. 13.5.83.1. Signature
            2. 13.5.83.2. Effect
            3. 13.5.83.3. Examples
            4. 13.5.83.4. Usage
            5. 13.5.83.5. See Also
          84. 13.5.84. resolve-QName
            1. 13.5.84.1. Signature
            2. 13.5.84.2. Effect
            3. 13.5.84.3. Examples
            4. 13.5.84.4. Usage
            5. 13.5.84.5. See Also
          85. 13.5.85. resolve-uri
            1. 13.5.85.1. Signature
            2. 13.5.85.2. Effect
            3. 13.5.85.3. Examples
            4. 13.5.85.4. Usage
            5. 13.5.85.5. See Also
          86. 13.5.86. reverse
            1. 13.5.86.1. Signature
            2. 13.5.86.2. Effect
            3. 13.5.86.3. Examples
            4. 13.5.86.4. See Also
          87. 13.5.87. root
            1. 13.5.87.1. Signature
            2. 13.5.87.2. Effect
            3. 13.5.87.3. Examples
            4. 13.5.87.4. Usage
            5. 13.5.87.5. See Also
          88. 13.5.88. round
            1. 13.5.88.1. Changes in 2.0
            2. 13.5.88.2. Signature
            3. 13.5.88.3. Effect
            4. 13.5.88.4. Examples
            5. 13.5.88.5. Usage
            6. 13.5.88.6. See Also
          89. 13.5.89. round-half-to-even
            1. 13.5.89.1. Signature
            2. 13.5.89.2. Effect
            3. 13.5.89.3. Examples
            4. 13.5.89.4. Usage
            5. 13.5.89.5. See Also
          90. 13.5.90. seconds-from-dateTime, seconds-from-time
            1. 13.5.90.1. Signature
            2. 13.5.90.2. Effect
            3. 13.5.90.3. Examples
            4. 13.5.90.4. See Also
          91. 13.5.91. seconds-from-duration
            1. 13.5.91.1. Signature
            2. 13.5.91.2. Effect
            3. 13.5.91.3. Examples
            4. 13.5.91.4. See Also
          92. 13.5.92. seconds-from-time
          93. 13.5.93. starts-with
            1. 13.5.93.1. Changes in 2.0
            2. 13.5.93.2. Signature
            3. 13.5.93.3. Effect
            4. 13.5.93.4. Examples
            5. 13.5.93.5. Usage
            6. 13.5.93.6. See Also
          94. 13.5.94. static-base-uri
            1. 13.5.94.1. Signature
            2. 13.5.94.2. Effect
            3. 13.5.94.3. Usage
            4. 13.5.94.4. See Also
          95. 13.5.95. string
            1. 13.5.95.1. Changes in 2.0
            2. 13.5.95.2. Signature
            3. 13.5.95.3. Effect
            4. 13.5.95.4. Examples
            5. 13.5.95.5. Usage
            6. 13.5.95.6. See Also
          96. 13.5.96. string-join
            1. 13.5.96.1. Signature
            2. 13.5.96.2. Effect
            3. 13.5.96.3. Examples
            4. 13.5.96.4. Usage
            5. 13.5.96.5. See Also
          97. 13.5.97. string-length
            1. 13.5.97.1. Changes in 2.0
            2. 13.5.97.2. Signature
            3. 13.5.97.3. Effect
            4. 13.5.97.4. Examples
            5. 13.5.97.5. Usage
            6. 13.5.97.6. See Also
          98. 13.5.98. string-to-codepoints
            1. 13.5.98.1. Signature
            2. 13.5.98.2. Effect
            3. 13.5.98.3. Examples
            4. 13.5.98.4. See Also
          99. 13.5.99. subsequence
            1. 13.5.99.1. Signature
            2. 13.5.99.2. Effect
            3. 13.5.99.3. Examples
            4. 13.5.99.4. See Also
          100. 13.5.100. substring
            1. 13.5.100.1. Changes in 2.0
            2. 13.5.100.2. Signature
            3. 13.5.100.3. Effect
            4. 13.5.100.4. Examples
            5. 13.5.100.5. Usage
              1. 13.5.100.5.1. Using substring() as a Conditional Expression
            6. 13.5.100.6. See Also
          101. 13.5.101. substring-after
            1. 13.5.101.1. Changes in 2.0
            2. 13.5.101.2. Signature
            3. 13.5.101.3. Effect
            4. 13.5.101.4. Examples
            5. 13.5.101.5. Usage
            6. 13.5.101.6. XSLT Example
            7. 13.5.101.7. See Also
          102. 13.5.102. substring-before
            1. 13.5.102.1. Changes in 2.0
            2. 13.5.102.2. Signature
            3. 13.5.102.3. Effect
            4. 13.5.102.4. Examples
            5. 13.5.102.5. Usage and Examples
            6. 13.5.102.6. See Also
          103. 13.5.103. sum
            1. 13.5.103.1. Changes in 2.0
            2. 13.5.103.2. Signature
            3. 13.5.103.3. Effect
            4. 13.5.103.4. Examples
            5. 13.5.103.5. Usage
            6. 13.5.103.6. See Also
          104. 13.5.104. system-property
            1. 13.5.104.1. Changes in 2.0
            2. 13.5.104.2. Signature
            3. 13.5.104.3. Effect
            4. 13.5.104.4. Usage
            5. 13.5.104.5. Examples
            6. 13.5.104.6. See Also
          105. 13.5.105. timezone-from-date, timezone-from-dateTime, timezone-from-time
            1. 13.5.105.1. Signature
            2. 13.5.105.2. Effect
            3. 13.5.105.3. Examples
            4. 13.5.105.4. See Also
          106. 13.5.106. tokenize
            1. 13.5.106.1. Signature
            2. 13.5.106.2. Effect
            3. 13.5.106.3. Examples
            4. 13.5.106.4. Usage
            5. 13.5.106.5. See Also
          107. 13.5.107. trace
            1. 13.5.107.1. Signature
            2. 13.5.107.2. Effect
            3. 13.5.107.3. Usage and Examples
            4. 13.5.107.4. See Also
          108. 13.5.108. translate
            1. 13.5.108.1. Changes in 2.0
            2. 13.5.108.2. Signature
            3. 13.5.108.3. Effect
            4. 13.5.108.4. Examples
            5. 13.5.108.5. Usage and Examples
            6. 13.5.108.6. See Also
          109. 13.5.109. true
            1. 13.5.109.1. Changes in 2.0
            2. 13.5.109.2. Signature
            3. 13.5.109.3. Effect
            4. 13.5.109.4. Usage
            5. 13.5.109.5. XSLT Example
            6. 13.5.109.6. See Also
          110. 13.5.110. type-available
            1. 13.5.110.1. Signature
            2. 13.5.110.2. Effect
            3. 13.5.110.3. Usage
            4. 13.5.110.4. See Also
          111. 13.5.111. unordered
            1. 13.5.111.1. Signature
            2. 13.5.111.2. Effect
            3. 13.5.111.3. Usage and Examples
          112. 13.5.112. unparsed-entity-public-id, unparsed-entity-uri
            1. 13.5.112.1. Changes in 2.0
            2. 13.5.112.2. Signatures
              1. 13.5.112.2.1. The unparsed-entity-public-id() function
              2. 13.5.112.2.2. The unparsed-entity-uri() function
            3. 13.5.112.3. Effect
            4. 13.5.112.4. Usage
            5. 13.5.112.5. Examples
            6. 13.5.112.6. See Also
          113. 13.5.113. unparsed-text, unparsed-text-available
            1. 13.5.113.1. Signatures
              1. 13.5.113.1.1. The unparsed-text() function
              2. 13.5.113.1.2. The unparsed-text-available() function
            2. 13.5.113.2. Effect
            3. 13.5.113.3. Usage and Examples
              1. 13.5.113.3.1. Up-Conversion
            4. 13.5.113.4. XML Envelope/Payload Applications
            5. 13.5.113.5. HTML Boilerplate Generation
          114. 13.5.114. See Also
          115. 13.5.115. upper-case
            1. 13.5.115.1. Signature
            2. 13.5.115.2. Effect
            3. 13.5.115.3. Examples
            4. 13.5.115.4. Usage
            5. 13.5.115.5. See Also
          116. 13.5.116. year-from-date, year-from-dateTime
            1. 13.5.116.1. Signature
            2. 13.5.116.2. Effect
            3. 13.5.116.3. Examples
            4. 13.5.116.4. See Also
          117. 13.5.117. years-from-duration
            1. 13.5.117.1. Signature
            2. 13.5.117.2. Effect
            3. 13.5.117.3. Examples
            4. 13.5.117.4. See Also
          118. 13.5.118. zero-or-one
            1. 13.5.118.1. Signature
            2. 13.5.118.2. Effect
            3. 13.5.118.3. Examples
            4. 13.5.118.4. Usage
            5. 13.5.118.5. See Also
        6. 13.6. Summary
      9. 14. Regular Expressions
        1. 14.1. Branches and Pieces
        2. 14.2. Quantifiers
        3. 14.3. Atoms
        4. 14.4. Subexpressions
        5. 14.5. Back-References
        6. 14.6. Character Groups
        7. 14.7. Character Ranges
        8. 14.8. Character Class Escapes
        9. 14.9. Character Blocks
        10. 14.10. Character Categories
        11. 14.11. Flags
          1. 14.11.1. The «i» flag
          2. 14.11.2. The «m» flag
          3. 14.11.3. The «s» flag
          4. 14.11.4. The «x» flag
        12. 14.12. Disallowed Constructs
        13. 14.13. Summary
      10. 15. Serialization
        1. 15.1. The XML Output Method
        2. 15.2. The HTML Output Method
        3. 15.3. The XHTML Output Method
        4. 15.4. The Text Output Method
        5. 15.5. Using the <xsl:output> declaration
        6. 15.6. Character Maps
          1. 15.6.1. Usage
          2. 15.6.2. Choosing Characters to Map
          3. 15.6.3. Limitations of Character Maps
        7. 15.7. Disable Output Escaping
          1. 15.7.1. Reasons to Disable Output Escaping
          2. 15.7.2. Why disable-output-escaping Is Deprecated
          3. 15.7.3. Using disable-output-escaping to Wrap HTML in CDATA
          4. 15.7.4. Character Maps as a Substitute for disable-output-escaping
        8. 15.8. Summary
    9. III. Exploitation
      1. 16. Extensibility
        1. 16.1. What Vendor Extensions Are Allowed?
        2. 16.2. Extension Functions
          1. 16.2.1. When Are Extension Functions Needed?
          2. 16.2.2. When Are Extension Functions Not Needed?
          3. 16.2.3. Calling Extension Functions
          4. 16.2.4. What Language Is Best?
          5. 16.2.5. Client-Side Script
          6. 16.2.6. Binding Extension Functions
            1. 16.2.6.1. Binding in MSXML
            2. 16.2.6.2. Binding by Namespace in Java Processors
            3. 16.2.6.3. Binding Using External Objects in the Microsoft .NET Processor
            4. 16.2.6.4. Binding to Assemblies in Saxon on .NET
            5. 16.2.6.5. Binding to Extension Functions in Gestalt
          7. 16.2.7. XPath Trees and the DOM
          8. 16.2.8. Calling External Functions within a Loop
          9. 16.2.9. Functions with Uncontrolled Side Effects
        3. 16.3. Keeping Extensions Portable
        4. 16.4. Summary
      2. 17. Stylesheet Design Patterns
        1. 17.1. Fill-in-the-Blanks Stylesheets
        2. 17.2. Navigational Stylesheets
        3. 17.3. Rule-Based Stylesheets
        4. 17.4. Computational Stylesheets
          1. 17.4.1. Programming without Assignment Statements
          2. 17.4.2. So Why Are They Called Variables?
          3. 17.4.3. Avoiding Assignment Statements
            1. 17.4.3.1. Conditional Initialization
            2. 17.4.3.2. Avoid Doing Two Things at Once
            3. 17.4.3.3. Don't Iterate, Recurse
            4. 17.4.3.4. Recursion: Summary
        5. 17.5. Summary
      3. 18. Case Study: XMLSpec
        1. 18.1. Formatting the XML Specification
        2. 18.2. Preface
        3. 18.3. Creating the HTML Outline
        4. 18.4. Formatting the Document Header
        5. 18.5. Creating the Table of Contents
        6. 18.6. Creating Section Headers
        7. 18.7. Formatting the Text
        8. 18.8. Producing Lists
        9. 18.9. Making Cross-References
        10. 18.10. Setting Out the Production Rules
        11. 18.11. Overlay Stylesheets
          1. 18.11.1. diffspec.xsl
          2. 18.11.2. REC-xml.xsl
        12. 18.12. Stylesheets for Other Specifications
          1. 18.12.1. xslt.xsl
          2. 18.12.2. xsltdiff.xsl
          3. 18.12.3. funcproto.xsl
          4. 18.12.4. xsl-query.xsl
          5. 18.12.5. xmlspec.xsl
        13. 18.13. Summary
      4. 19. Case Study: A Family Tree
        1. 19.1. Modeling a Family Tree
          1. 19.1.1. The GEDCOM Data Model
          2. 19.1.2. Creating a Schema for GEDCOM 6.0
          3. 19.1.3. The GEDCOM 6.0 Schema
            1. 19.1.3.1. Individuals
            2. 19.1.3.2. Events
            3. 19.1.3.3. Families
            4. 19.1.3.4. Dates
            5. 19.1.3.5. Places
            6. 19.1.3.6. Personal Names
        2. 19.2. Creating a Data File
          1. 19.2.1. Converting GEDCOM Files to XML
          2. 19.2.2. Converting from GEDCOM 5.5 to 6.0
            1. 19.2.2.1. Top-Level Processing
            2. 19.2.2.2. Creating Family Records
            3. 19.2.2.3. Creating Individual Records
            4. 19.2.2.4. Creating Event Records
            5. 19.2.2.5. Debugging the Stylesheet
        3. 19.3. Displaying the Family Tree Data
          1. 19.3.1. The Stylesheet
          2. 19.3.2. Putting It Together
            1. 19.3.2.1. Publishing Static HTML
            2. 19.3.2.2. Generating HTML Pages from a Servlet
            3. 19.3.2.3. Installing and Configuring the Servlet
            4. 19.3.2.4. Generating HTML Using ASP.NET Pages
            5. 19.3.2.5. Generating HTML in the Browser
        4. 19.4. Summary
      5. 20. Case Study: Knight's Tour
        1. 20.1. The Problem
        2. 20.2. The Algorithm
          1. 20.2.1.
            1. 20.2.1.1. The Initial Template
        3. 20.3. Placing the Knight
        4. 20.4. Displaying the Final Board
        5. 20.5. Finding the Route
          1. 20.5.1. Finding the Possible Moves
          2. 20.5.2. Trying the Possible Moves
          3. 20.5.3. Selecting the Best Move
        6. 20.6. Running the Stylesheet
        7. 20.7. Observations
        8. 20.8. Summary
    10. IV. Appendices
      1. A. XPath 2.0 Syntax Summary
        1. A.1. Whitespace and Comments
        2. A.2. Tokens
        3. A.3. Syntax Productions
        4. A.4. Operator Precedence
      2. B. Error Codes
        1. B.1. Functions and Operators (FO)
        2. B.2. XPath Errors (XP)
        3. B.3. XSLT Errors (XT)
      3. C. Backward Compatibility
        1. C.1. Stage 1: Backward-Compatibility Mode
          1. C.1.1. Deprecated Facilities
          2. C.1.2. Error Handling
          3. C.1.3. Comparing Strings
          4. C.1.4. Numeric Formats
          5. C.1.5. Other XPath Changes
          6. C.1.6. Serialization Changes
        2. C.2. Stage 2: Setting version="2.0"
          1. C.2.1. The First Node Rule
          2. C.2.2. Type Checking of Function Arguments
          3. C.2.3. Comparison Operators
          4. C.2.4. Arithmetic
          5. C.2.5. The Empty Sequence
          6. C.2.6. Error Semantics for «and» and «or»
          7. C.2.7. Other XSLT Differences
        3. C.3. Stage 3: Adding a Schema
        4. C.4. Summary
      4. D. Microsoft XSLT Processors
        1. D.1. MSXML
          1. D.1.1. Objects
          2. D.1.2. IXMLDOMDocument and IXMLDOMDocument2
          3. D.1.3. Additional Methods
          4. D.1.4. Additional Properties
          5. D.1.5. IXMLDOMNode
          6. D.1.6. Methods
          7. D.1.7. Properties
          8. D.1.8. IXMLDOMNodeList
          9. D.1.9. Methods
          10. D.1.10. Properties
          11. D.1.11. IXMLDOMParseError
          12. D.1.12. Properties
          13. D.1.13. IXMLDOMSelection
          14. D.1.14. Methods
          15. D.1.15. Properties
          16. D.1.16. IXSLProcessor
          17. D.1.17. Methods
          18. D.1.18. Properties
          19. D.1.19. IXSLTemplate
          20. D.1.20. Methods
          21. D.1.21. Properties
          22. D.1.22. Putting it Together
          23. D.1.23. Restrictions
        2. D.2. System.Xml
          1. D.2.1. XPathDocument
          2. D.2.2. XmlNode
          3. D.2.3. IXPathNavigable
          4. D.2.4. XPathNavigator
          5. D.2.5. XSLTransform
        3. D.3. Summary
      5. E. JAXP: The Java API for Transformation
        1. E.1. The JAXP Parser API
          1. E.1.1. JAXP Support for SAX
            1. E.1.1.1. javax.xml.parsers.SAXParserFactory
            2. E.1.1.2. javax.xml.parsers.SAXParser
          2. E.1.2. JAXP Support for DOM
            1. E.1.2.1. javax.xml.parsers.DocumentBuilderFactory
            2. E.1.2.2. javax.xml.parsers.DocumentBuilder
        2. E.2. The JAXP Transformation API
          1. E.2.1.
            1. E.2.1.1. javax.xml.transform.dom.DOMLocator
            2. E.2.1.2. javax.xml.transform.dom.DOMResult
            3. E.2.1.3. javax.xml.transform.dom.DOMSource
            4. E.2.1.4. javax.xml.transform.ErrorListener
            5. E.2.1.5. javax.xml.transform.OutputKeys
            6. E.2.1.6. javax.xml.transform.Result
            7. E.2.1.7. javax.xml.transform.sax.SAXResult
            8. E.2.1.8. javax.xml.transform.sax.SAXSource
            9. E.2.1.9. javax.xml.transform.sax.SAXTransformerFactory
            10. E.2.1.10. javax.xml.transform.Source
            11. E.2.1.11. javax.xml.transform.SourceLocator
            12. E.2.1.12. javax.xml.transform.stream.StreamSource
            13. E.2.1.13. javax.xml.transform.Templates
            14. E.2.1.14. javax.xml.transform.sax.TemplatesHandler
            15. E.2.1.15. javax.xml.transform.Transformer
            16. E.2.1.16. javax.xml.transform.TransformerConfigurationException
            17. E.2.1.17. javax.xml.transform.TransformerException
            18. E.2.1.18. javax.xml.transform.TransformerFactory
            19. E.2.1.19. javax.xml.transform.TransformerFactoryConfigurationError
            20. E.2.1.20. javax.xml.transform.sax.TransformerHandler
            21. E.2.1.21. javax.xml.transform.URIResolver
        3. E.3. Examples of JAXP Transformations
          1. E.3.1. Example 1: Transformation Using Files
          2. E.3.2. Example 2: Supplying Parameters and Output Properties
          3. E.3.3. Example 3: Holding Documents in Memory
          4. E.3.4. Example 4: Using the <?xml-stylesheet?> Processing Instruction
          5. E.3.5. Example 5: A SAX Pipeline
        4. E.4. Summary
      6. F. Saxon
        1. F.1. Using Saxon from the Command Line
        2. F.2. Using Saxon from a Java Application
          1. F.2.1. Using Saxon via JAXP Interfaces
            1. F.2.1.1. Running XSLT Transformations
            2. F.2.1.2. The Schema Validation API
            3. F.2.1.3. Using XPath Expressions in Saxon
          2. F.2.2. The s9api Interface
        3. F.3. Using Saxon from a .NET Application
        4. F.4. Saxon Tree Models
        5. F.5. Extensibility
          1. F.5.1. Writing Extension Functions in Java
          2. F.5.2. Writing Extension Functions under .NET
          3. F.5.3. Collations
        6. F.6. Extensions
          1. F.6.1. Serialization Extensions
          2. F.6.2. Extension Attributes
          3. F.6.3. Extension Instructions
          4. F.6.4. Extension Functions
        7. F.7. The evaluate() Extension
        8. F.8. Summary
      7. G. Altova
        1. G.1. Running from within XMLSpy
        2. G.2. Conformance
        3. G.3. Extensions and Extensibility
        4. G.4. The Command Line Interface
        5. G.5. Using the API
          1. G.5.1. The COM API
            1. G.5.1.1. XMLValidator
            2. G.5.1.2. XSLT2
          2. G.5.2. The Java API
          3. G.5.3. The .NET API
        6. G.6. Summary
      8. H. Glossary

    Product information

    • Title: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
    • Author(s):
    • Release date: May 2008
    • Publisher(s): Wrox
    • ISBN: 9780470192740