spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / authoring / languages / xml / insidexslt / chap2 / 3 current pageTo page 2To page 3To page 4To page 5
[next]

Inside XSLT

Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source

The <xsl:template> Element

XSL templates enable you to specify how you want your transformation to work. Each <sxl:template> element is set up to match one node (which may contain other nodes) or a number of nodes in the source document, and to specify exactly how that node should be transformed.

The following list describes the attributes of <xsl:template>:

Each such <xsl:template> element is called a rule. In general, the <xsl:template> element can contain zero or more <xsl:param> elements (which you'll see in Chapter 9), followed by the template body, which specifies how you want the transformation to take place.

Template Bodies

Templates have very specific rules. They can contain <xsl:param> elements, followed by a template body, which can contain PCDATA, XSLT instructions, extension elements, and literal result elements.

XSLT Instructions

A number of XSLT elements, called instructions, may appear in a template body:

No other XSLT element may appear directly in a template body. As you'll see in Chapter 9, the <xsl:param> element may appear in a template before the template body, but it is not called an XSLT instruction. In addition, other XSLT elements, such as <xsl:sort>, <xsl:otherwise>, <xsl:with-param>, can appear in templates, but only at specific locations, so W3C doesn't call them instructions. You'll see how to use each of these instructions throughout this book.

Extension Elements

Extension elements are covered in Chapter 5; these elements are defined by the user or the XSLT processor, and extend XSLT. Many XSLT processors have defined their own extensions, and that's one of the reasons W3C has introduced the XSLT 1.1 working draft, where the extension mechanism is more regulated. Presumably, this functionality will be incorporated into XSLT 2.0.


home / authoring / languages / xml / insidexslt / chap2 / 3 current pageTo page 2To page 3To page 4To page 5
[next]

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Working with the DOM Stylesheets Collection · Administering RBAC in PHP 5 CMS Framework · xref: Automatic Cross Referencing Script
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Combine BottomCount() with Other MDX Functions to Add Sophistication · Creating a Daemon with Python · The Coming Voice-over-WiMAX Revolution

Created: September 26, 2001
Revised: September 26, 2001


URL: http://webreference.com/authoring/languages/xml/insidexslt/chap2/3/