January 2002
Intermediate to advanced
480 pages
11h 5m
English
Chapter 2 covered the overall structure of a style sheet in detail. However, let’s briefly reexamine the overall structure of a style sheet. Listing 4.1 presents a simple style sheet that transforms an XML document to HTML.
<?xml version=”1.0” ?> <xsl:stylesheet version=”1.0” xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”> <xsl:output method=”html” /> <!-- 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” ... |