XSLT Template Constructs

The XSLT vocabulary defines several template constructs that control the application of templates in XSL style sheets. These template constructs are actually elements that are defined in the XSL namespace. The following are some of the more commonly used XSLT elements:

  • xsl:value-of

  • xsl:if

  • xsl:for-each

  • xsl:apply-templates

The next few sections will examine these XSLT elements in more detail. You'll also learn how to use them in the context of practical XSL style sheets a little later in the chapter in the section titled "Developing XSL Style Sheets."

The xsl:value-of Element

The xsl:value-of element is used to insert the value of an element or attribute in the resulting output of the style sheet. It provides the mechanism ...

Get XML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.