Hmm.. det virkede ikke...
output :
D:\Dev\Java\Extensions\FOP>java -cp build\fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\xerces-1.2.3.jar;lib\avalon-framework-4.0.jar;lib\logkit-1.0.jar;lib\jimi-1.0.jar org.apache.fop.apps.Fop -c conf\userconfig.xml simple.fo sim.pdf
[INFO]: FOP 0.20.3
[INFO]: building formatting object tree
[ERROR]: Unknown formatting object
http://www.w3.org/1999/XSL/Transform^attribute-set[ERROR]: Unknown formatting object
http://www.w3.org/1999/XSL/Transform^attribute[ERROR]: property 'xsl:use-attribute-sets' ignored
[ERROR]: property 'xsl:use-attribute-sets' ignored
[ERROR]: property 'xsl:use-attribute-sets' ignored
[INFO]: [1]
[INFO]: Parsing of document complete, stopping renderer
.fo-filen ser således ud :
<?xml version="1.0" encoding="utf-8"?>
<fo:root
xmlns:fo="
http://www.w3.org/1999/XSL/Format" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"> <fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="29.7cm"
page-width="21cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-body margin-top="3cm"/>
<fo:region-before extent="3cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<xsl:attribute-set name="header">
<xsl:attribute name="font-size">18pt</xsl:attribute>
<xsl:attribute name="font-family">courier</xsl:attribute>
<xsl:attribute name="line-height">24pt</xsl:attribute>
<xsl:attribute name="space-after.optimum">15pt</xsl:attribute>
<xsl:attribute name="text-align">center</xsl:attribute>
<xsl:attribute name="background-color">blue</xsl:attribute>
<xsl:attribute name="color">white</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="normal">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="font-family">courier</xsl:attribute>
<xsl:attribute name="line-height">15pt</xsl:attribute>
<xsl:attribute name="space-after.optimum">3pt</xsl:attribute>
<xsl:attribute name="text-align">left</xsl:attribute>
</xsl:attribute-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block xsl:use-attribute-sets="header">
TEST
</fo:block>
<fo:block xsl:use-attribute-sets="normal">
Et afsnit for sig selv....
</fo:block>
<fo:block xsl:use-attribute-sets="normal">
Et andet afsnit.... bla, bla, bla...
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>