Witten
Bainbridge
Nichols
HOME HELP PREFERENCES SEARCHFIGURESTABLES

XSL style sheet for the basic United Nations Agencies example

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:output method="xml"/>
<xsl:template match="NGODoc">
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> 
    <fo:layout-master-set> 
      <fo:simple-page-master master-name="UN-page" page-width="7.5in">
        <fo:region-body/>
      </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-name="UN-page"> 
      <fo:flow flow-name="xsl-region-body" background-color="white"> 
  <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
  </fo:root>
</xsl:template>
<xsl:template match="Title">
  <fo:block font-family="Times" font-size="25pt"
            margin-left="0.2in" margin-right="5mm">
     <xsl:apply-templates/>
  </fo:block>
</xsl:template>
<xsl:template match="Agency">
  <fo:block space-before="8pt" space-after="3pt" font-size="16pt" 
            font-family="Helvetica"
            margin-left="0.2in" margin-right="5mm">
     <xsl:apply-templates/>
  </fo:block>
</xsl:template>
<xsl:template match="Head|Body">
  <fo:block margin-left="0.2in" margin-right="5mm" space-before="6pt">
     <xsl:apply-templates/>
  </fo:block>
</xsl:template>
<xsl:template match="Abbrev">
  <fo:inline font-style="italic">
    (<xsl:value-of select="."/>)
  </fo:inline>
</xsl:template>
</xsl:stylesheet>

Figure 4.14: XSL style sheet for the basic United Nations Agencies example;