Witten
Bainbridge
Nichols
HOME HELP PREFERENCES SEARCHFIGURESTABLES

XSL style sheet illustrating tables and lists

<?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:import href="un_basic.xsl"/>
<xsl:template match="Title">
  <fo:list-block> 
    <fo:list-item>
      <fo:list-item-label end-indent="label-end()">
        <fo:block font-family="ZapfDingbats" font-size="9pt">
        ●
        </fo:block>
      </fo:list-item-label>
      <fo:list-item-body start-indent="body-start()">
        <fo:block> 
          <xsl:apply-imports/>
        </fo:block>
      </fo:list-item-body>
    </fo:list-item>
  </fo:list-block>
</xsl:template>
<xsl:template match="Body">
  <fo:table table-layout="auto" background-color="silver"
    border-style="outset 5pt" border-collapse="separate"
             Border-spacing="10pt">
    <fo:table-body>
      <xsl:apply-templates/>
    </fo:table-body>
  </fo:table>
</xsl:template>
<xsl:template match="Agency">
  <fo:table-row space-before="8pt" space-after="3pt" 
        font-size="16pt" font-family="Helvetica"
        margin-left="0.2in" margin-right="5mm">
     <xsl:apply-templates/>
  </fo:table-row>
</xsl:template>
<xsl:template match="Name">
  <fo:table-cell padding="4pt" background-color="white"
         border-style="inset 2pt" display-align="center">
     <fo:block>
       <xsl:apply-imports/>
     </fo:block>
  </fo:table-cell>
</xsl:template>
<xsl:template match="Abbrev">
  <fo:table-cell padding="4pt" background-color="white"
         border-style="dotted black" text-align="center"
         display-align="center">
    <fo:block>
      <xsl:apply-imports/>
    </fo:block>
  </fo:table-cell>
</xsl:template>
<xsl:template match="Photo">
  <fo:table-cell width="60pt" background-color="white" 
         display-align="center">
    <fo:block>
       Photo available <xsl:apply-imports/>
    </fo:block>
  </fo:table-cell>
</xsl:template>
</xsl:stylesheet>

Figure 4.15: XSL style sheet illustrating tables and lists;