W3C home > Mailing lists > Public > www-xsl-fo@w3.org > November 2001

Re: Please help generating a fo from a xml and xsl

From: Max Froumentin <mf@w3.org>
Date: Fri, 16 Nov 2001 14:50:42 +0100
To: "Dudley Butt (ZA)" <Dudley.Butt@za.didata.com>
Cc: "'www-xsl-fo@w3.org'" <www-xsl-fo@w3.org>
Message-ID: <87d72izux9.fsf@sophia.inria.fr>
You wrote:

> I need to generate a .fo file for FOP, here is a snippet i wrote by hand of
> part of my .fo file

Argh. Hand-written FO files. That's masochism!

The FO namespace is meant to be used with XSLT, which should do
what you need. You could have an input XML file such as:

<headers>
  <header>Client Details</header>
  <header>Contact Details And Numbers</header>
</headers>
      
and an XSL stylesheet:

<xsl:template match="headers">
  <fo:table-header font-family="ArialBold" font-size="10pt" >
    <fo:table-row >
      <xsl:apply-templates/>
    </fo:table-row>
  </fo:table-header>
</xsl:template>

<xsl:template match="header">
  <fo:table-cell border-style="solid" ...>
    <xsl:apply-templates/>
  </fo:table-cell>
</xsl:template>

Max.
Received on Friday, 16 November 2001 08:50:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:08 GMT