26.01.2019 Views

XML Simplified

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Module 6<br />

XSL and XSLT<br />

Concepts<br />

6.2.1 XSL Templates<br />

A template is the main component of a style sheet. Templates are defined with the help of rules. A<br />

template rule is used to control the output of the XSLT processor. It defines the method by which an<br />

<strong>XML</strong> element node is transformed into an XSL element node. A template rule consists of a pattern that<br />

identifies the <strong>XML</strong> node and an action that selects and transforms the node.<br />

Each template rule is represented by the xsl:template element. The xsl:template is an element<br />

that defines an action for producing output from a source document.<br />

Figure 6.4 shows an example of XSL template.<br />

Figure 6.4: XSL Template<br />

Version 1.0 © Aptech Limited<br />

<strong>XML</strong> <strong>Simplified</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!