Skip to Content
Special Edition Using XSLT
book

Special Edition Using XSLT

by Michael Floyd
January 2002
Intermediate to advanced
480 pages
11h 5m
English
Que
Content preview from Special Edition Using XSLT

Templates and Template Rules

Templates are the individual statements you’ll use to create a transformation. A collection of templates are grouped together into what’s called a template rule. Listing 2.2 contains just one template rule. This begins with

<xsl:template match="/"> 

and ends with the closing tag

</xsl:template> 

This template rule is called the root template rule, because it processes the root element of the source document (see Listing 2.1). All style sheets must contain a root template rule. Later, you’ll learn how you can add other template rules to process additional elements from the source document.

Template rules contain a match attribute that specifies which element or elements you are processing. The root template rule’s ...

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

Special Edition Using XML, Second Edition

Special Edition Using XML, Second Edition

- et al. David Gulbransen
XML for Publishers

XML for Publishers

Keith Fahlgren

Publisher Resources

ISBN: 0789725053Purchase book