Creating Text

Returning to Listing 2.2, you’ll notice that following the <xsl:template match="/"> tag, there are several HTML tags. To recap, the template rule from Listing 2.2 is repeated here, in Listing 2.3.

Listing 2.3. The Root Template Rule from Listing 2.2
<!-- Root template rule --> 
<xsl:template match=”/”> 
         <TITLE>First XSLT Example</TITLE> 
         <P><B>Company: </B> 
            <xsl:value-of select=”invoice/clientName” /> 
         <P><B>Contact: </B> 
            <xsl:value-of select=”invoice/contact” /> 
         <P><B>Services Rendered: </B> 
            <xsl:value-of select=”invoice/descriptionOfServices” /> 
         <P><B>Total Due: </B>  
            $<xsl:value-of select=”invoice/costOfServices” /> 

Anything contained in a template ...

Get Special Edition Using XSLT now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.