On Dec 6, 2005, at 20:46, Elmström Johan wrote:

I am having trouble generating a PDF when using XSLTC, I need to use xsl:templates to avoid a known bug when XSLTC creates its intermediate translet.

However, there’s as far as I can tell, a Catch 22 involved..

To be able to put fo:table contents into my xsl:template it needs to be inside the fo:page-sequence element.

This fo:page-sequence is inside the <xsl:template match="/">  tag.

So I need to put my xsl:template that generates my table content inside another xsl:template.

However, i just fpound out this is not allowed in XSLTC (http:// issues.apache.org/jira/browse/XALANJ-1733) .

Well, that's not specific to XSLTC. You can't do that in XSLT. You can call or apply templates from within another template, but not define a new template...

If I get your question correctly, your stylesheet needs to look something like:

<xsl:template match="/">
  ...
  <fo:page-sequence ...>
    <xsl:apply-templates select="whatever-nodes" />
  </fo:page-sequence>
</xsl:template>

<xsl:template match="whatever-nodes">
  <fo:table ...>
<!-- maybe some more xsl:apply-templates or xsl:call-template here... -->
  </fo:table>
</xsl:template>

The two templates are always defined independently of each other, and 'chained' together using xsl:apply-templates...

Hope you get the picture. If not, don't hesitate to re-post.

HTH!

Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to