Hello,
I found a file that redefines the behavior of variablelist, and I would
like to use it as part of a customization layer. alas, I am not so
successful, and I would be glad if someone could provide some pointers.
I have my main xsl document: matt.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
extension-element-prefixes="fo"
version="1.0">
<xsl:import href="docbook.xsl"/>
<xsl:include href="variablelist.xsl"/>
</xsl:stylesheet>
which calls: variablelist.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:template match="variablelist">
<xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
<xsl:apply-templates name="variablelist"/>
</xsl:template>
<xsl:template match="varlistentry">
<xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
<fo:block xsl:use-attribute-sets="list.item.spacing">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="varlistentry/term">
<fo:inline><xsl:apply-templates/>, </fo:inline>
</xsl:template>
<xsl:template match="varlistentry/term[position()=last()]" priority="2">
<fo:inline>
<xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match="varlistentry/listitem">
<fo:block start-indent="{count(ancestor::*)*.05}in">
<xsl:apply-templates/></fo:block>
</xsl:template>
</xsl:stylesheet>
When running this through the fop blender, I get the following:
/usr/bin/xsltproc /home/matt/docbook-xsl-1.44/fo/matt.xsl main.xml > main.fo
Making portrait pages on USletter paper (8.5inx11in)
xsltApplyOneTemplate: failed to find extension block
xsltApplyOneTemplate: failed to find extension block
xsltApplyOneTemplate: failed to find extension block
xsltApplyOneTemplate: failed to find extension block
/usr/lib/j2sdk1.3/bin/java -classpath
/home/matt/test/classes.zip:/home/matt/test/xerces.jar:/home/matt/test/xalan.jar:/home/matt/test/batik-1.0/batik.jar:/home/matt/test/batik-1.0/batik-svgbrowser.jar:/home/matt/test/batik-1.0/batik-svgpp.jar:/home/matt/test/fop.jar
org.apache.fop.apps.Fop -fo main.fo -pdf main.pdf
security properties not found. using defaults.
FOP 0.19.0-CVS
using SAX parser org.apache.xerces.parsers.SAXParser
building formatting object tree
WARNING: property 'linefeed-treatment' ignored
setting up fonts
formatting FOs into areas
[1] [2]
rendering areas to PDF
writing out PDF
Presumably the patch is correct, so it must be the way I apply that
customization... Could you please indicate what I did wrong?
I have tried different xsl processor (xalan and xslt) and they both
stumble on that pb. I have also noticed that the extension block error
is linked to the <fo:block> in the template varlistentry.
It seems to me that the error is that by copying this chunk out of the
main xsl file, I loose some context information. But I don't know
exactly what it is.
Thank you in advance.
Matthieu
----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>