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

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=”/”> 
   <HTML> 
      <HEAD> 
         <TITLE>First XSLT Example</TITLE> 
      </HEAD> 
      <BODY> 
         <P><B>Company: </B> 
            <xsl:value-of select=”invoice/clientName” /> 
         </P> 
         <P><B>Contact: </B> 
            <xsl:value-of select=”invoice/contact” /> 
         </P> 
         <P><B>Services Rendered: </B> 
            <xsl:value-of select=”invoice/descriptionOfServices” /> 
         </P> 
         <P><B>Total Due: </B>  
            $<xsl:value-of select=”invoice/costOfServices” /> 
         </P> 
      </BODY> 
   </HTML> 
</xsl:template> 

Anything contained in a template ...

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