Frans Germishuizen wrote:
<snip/>
Currently ive got a lot of when statements conditioned to the
<template-name> node, then to call a hard coded template name e.g
<xsl:when test=”name=’the_test’”>
<xsl:call-template name=”the_test”>
</xsl:when>
What ive tried is:
<xsl:for-each select="/req/page-template-set/page-template">
<xsl:variable name="template">
<xsl:value-of
select="/req/page-template-set/page-template/name"/>
</xsl:variable>
<fo:flow flow-name="xsl-region-body">
<xsl:call-template name="{$template}"/>
</fo:flow>
</xsl:for-each>
But I get a invalid usage error.
This is a pure XSLT question. I'm not 100% certain but I think you will
have to stick with the approach of using a xsl:when because you can't
dynamically build XSLT using XSLT variables. A similiar problem arises
when you have a whole bunch of attribute-sets (representing a set of
styles), and the XML dictates which style should be applied. You can't do
<fo:block xsl:use-attribute-set="{$stylename}">
<xsl:apply-templates/>
<fo:block>
You will be able to get more help on XSLT questions on the mulberry list:
http://www.mulberrytech.com/xsl/xsl-list/
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]