Skip to Content
Special Edition Using XML, Second Edition
book

Special Edition Using XML, Second Edition

by - et al. David Gulbransen
July 2002
Intermediate to advanced
864 pages
22h 32m
English
Que
Content preview from Special Edition Using XML, Second Edition

Templates

If you look at the earlier stylesheet examples in this chapter, you will notice that the majority of the information contained in the stylesheets themselves is contained in elements called templates, which take the following form:

<xsl:template match="description"> 
 <i><xsl:value-of select="."/></i>
 <br/>
</xsl:template>

The “xsl:” is simply the Namespace prefix that identifies the element as part of the XSL Stylesheet Namespace.

The template itself consists of two major parts—the first is the match attribute, which makes use of an XPath pattern to specify the component being selected by the template for transformation. The second part is the content, or body, of the template, which is where the transformation information is specified. ...

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 Pocket Reference, 3rd Edition

XML Pocket Reference, 3rd Edition

Simon St. Laurent, Michael Fitzgerald
Essential XML: Beyond Markup

Essential XML: Beyond Markup

Don Box, Aaron Skonnard, John Lam

Publisher Resources

ISBN: 078972748XPurchase book