Re: XSLTC template problem

2005-12-07 Thread Johan

 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
 
Yeah, but the problem I had with that was always that it complains that the fo
in fo:table inside the whatever temoplate is not bound.
(The prefix fo for element fo:table is not bound., 'Could not compile
stylesheet')
But then I noticed that the xmlns:fo= declaration was inside the fo:root node.

I moved it, it works .

Sorry for taking up your time with this. I should have seen that ages ago.

/Johan




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



Re: XSLTC template problem

2005-12-06 Thread Andreas L Delmelle

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]