Listing 1
<quotedata>
<!-- Customer Information -->
<customer name="John Doe">
<address street="111 SW 1st Avenue" city="Portland" state="OR" country="United States"/>
<contact phone="503-999-9999"/>
</customer>
<!-- Coverage information -->
<coverage auto="Chrysler Town and Country">
<options>
<option cvtype="Bodily Injury" cvdescription="$100k/$300k Each Person/Each Incidence" cvprice="143.40"/>
<option cvtype="Uninsured Motorist" cvdescription="$100k/$300k Each Person/Each Occurrence" cvprice="36.00"/>
<option cvtype="Comprehensive" cvdescription="Deductible $500" cvprice="111.70"/>
<option cvtype="Collision" cvdescription="Deductible $500" cvprice="197.80"/>
</options>
</coverage>
<!-- summary of coverage -->
<summary total="488.90"/>
</quotedata>

Listing 2
FO namespace and layout settings:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- defines the layout master -->
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" ... 
<fo:region-body margin-top="1.5cm" margin-bottom="1.5cm"/>
<fo:region-before extent="1.5cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>

Define and format the title, footer and body sections of the PDF document (see Figure 2 for output):
<fo:page-sequence master-reference="first">
<!-- header -->
<fo:static-content flow-name="xsl-region-before">
<fo:block font-family="Helvetica" color="red" font-size="18pt" text-align="center">
*** Auto Policy - Coverage Details ***
</fo:block>
</fo:static-content>
<!-- footer -->
<fo:static-content flow-name="xsl-region-after">
<fo:block font-family="Helvetica" font-size="10pt" text-align="center">
Page <fo:page-number />
</fo:block>
</fo:static-content>
<!-- body -->
<fo:flow flow-name="xsl-region-body">
<!-- format the pieces (put everything from following templates here) -->
<xsl:apply-templates/>
<!-- end of fo document -->
</fo:flow>
</fo:page-sequence>
</fo:root>

Format the "Customer" section of the document. See Figure 2 for the resulting output (other templates suppressed for readability):
<xsl:template match="customer">
<xsl:if test="@name | contact | address"> 
Verify customer data exists before trying to format it
<!-- section heading -->
<fo:block font-size="16pt" font-family="sans-serif" space-after.optimum="15pt" text-align="center" ... Customer 
</fo:block>
<!-- table start -->
<fo:table space-after.optimum="30pt">
<fo:table-column column-width="80mm"/>
<fo:table-column column-width="80mm"/> 
<fo:table-body> 
<xsl:if test="@name"> <fo:table-row> 
<fo:table-cell> <fo:block>Name:</fo:block> 
</fo:table-cell> 
<fo:table-cell> 
<fo:block text-align="right" color="blue">
<xsl:value-of select="@name"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:if>
<xsl:apply-templates/>
</fo:table-body>
</fo:table>
<!-- table end -->
</xsl:if>
</xsl:template>