Listing 1. The main.xsl stylesheet
<!
-- XSL Imports. -->
<xsl:import href="plainPageLayout.xsl"/>
<xsl:import href="lookandfeel.xsl"/>
<xsl:output
method="XML"
indent="yes" />
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<fo:root
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:apply-templates/>
</fo:root>
</xsl:template>
Listing 2. The plainPageLayout.xsl document
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:xalan="http://xml.apache.org/xslt"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:strip-space elements="*"/>
<xsl:template match="Presentation">
<fo:layout-master-set>
<fo:simple-page-master
master-name="Title"
xsl:use-attribute-sets="titlePageLayout">
<fo:region-body/>
<fo:region-after
extent="1in"/>
</fo:simple-page-master>
<fo:simple-page-master
master-name="Page"
xsl:use-attribute-sets="otherPageLayout">
<fo:region-before extent="1in"/>
<fo:region-body margin-top=".75in"/>
<fo:region-after extent=".75in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence
master-reference="Title">
<fo:static-content
flow-name="xsl-region-after">
<fo:block text-align="right">
<fo:external-graphic
src="{CorporateLogo}"
height="auto"
width="auto"/>
</fo:block>
</fo:static-content>
<fo:flow
flow-name="xsl-region-body">
<fo:block
xsl:use-attribute-sets="mainTitleBlock">
<xsl:value-of select="Title"/>
</fo:block>
<fo:block
xsl:use-attribute-sets="subTitleBlock">
<xsl:value-of select="Author"/>
</fo:block>
<!-- Shows how to override attributes. -->
<fo:block
xsl:use-attribute-sets="plainTextBlock"
text-align="center">
<xsl:value-of select="Date"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
<xsl:apply-templates select="Page">
<xsl:sort select="Position"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="Page[@style='bullet']">
<fo:page-sequence
master-reference="Page">
<fo:static-content
flow-name="xsl-region-after">
<fo:block text-align="right">
<fo:external-graphic
src="{../CorporateLogo}"
height="auto"
width="auto"/>
</fo:block>
</fo:static-content>
<fo:flow
flow-name="xsl-region-body">
<fo:block
xsl:use-attribute-sets="titleBlock">
<xsl:value-of select="Title"/>
</fo:block>
<fo:block color="white">space</fo:block>
<fo:block color="white">space</fo:block>
<xsl:apply-templates select="Concept"/>
</fo:flow>
</fo:page-sequence>
</xsl:template>
<xsl:template match="Concept">
<fo:list-block
xsl:use-attribute-sets="bullets">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>
<fo:inline font-family="Symbol">•</fo:inline>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block><xsl:value-of select="."/></fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</xsl:template>
</xsl:stylesheet>