Skip to Content
XML in a Nutshell, 3rd Edition
book

XML in a Nutshell, 3rd Edition

by Elliotte Rusty Harold, W. Scott Means
September 2004
Intermediate to advanced
712 pages
24h 45m
English
O'Reilly Media, Inc.
Content preview from XML in a Nutshell, 3rd Edition

XSLT Elements

XSLT defines 36 elements, which break down into three overlapping categories:

  • Two root elements:

    xsl:stylesheet
    xsl:transform
  • Twelve top-level elements, which may appear as immediate children of the root and are the following:

    xsl:attribute-set          xsl:decimal-format
    xsl:import                 xsl:include
    xsl:key                    xsl:namespace-alias
    xsl:output                 xsl:param
    xsl:preserve-space         xsl:strip-space
    xsl:template               xsl:variable
  • Twenty-two instruction elements, which appear in the content of elements that contain templates. Here, we don’t mean the xsl:template element. We mean the content of that and several other elements, such as xsl:for-each and xsl:message, which are composed of literal result elements, character data, and XSLT instructions that are processed to produce part of the result tree. These elements are as follows:

    xsl:apply-imports          xsl:apply-templates
    xsl:attribute              xsl:call-template
    xsl:choose                 xsl:comment
    xsl:copy                   xsl:copy-of
    xsl:element                xsl:fallback
    xsl:for-each               xsl:if
    xsl:message                xsl:number
    xsl:otherwise              xsl:processing-instruction 
    xsl:sort                   xsl:text
    xsl:value-of               xsl:variable
    xsl:with-param             xsl:when

Most XSLT processors also provide various nonstandard extension elements and allow you to write your own extension elements in languages such as Java and JavaScript.

Elements in this section are arranged alphabetically from xsl:apply-imports to xsl:with-param. Each element begins with a synopsis in the following form:

<xsl:elementName
               attribute1 = "allowed attribute values"
   attribute2 = "allowed attribute ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

XML: Visual QuickStart Guide, Second Edition

XML: Visual QuickStart Guide, Second Edition

Kevin Howard Goldberg
XML Hacks

XML Hacks

Michael Fitzgerald

Publisher Resources

ISBN: 0596007647Errata PageSupplemental Content