cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Sinjiashvili <sl...@swes.sarenergo.ru>
Subject Recursive logicsheets
Date Mon, 20 Oct 2003 10:10:04 GMT
Hello,

I'm using logicsheets extensively in my cocoon application. 
I don't know - maybe I use them for the things that should be done in
some other way - but that does not bother me for now (I'm trying to grok
cocoon).

Here's the problem:
Let's say I have a template in my logicsheet called <my:first/>.
I would like to create another template in my logicsheet called
<my:second/> which uses <my:first/>. The following (naive?) approach
does not seem to work:

<xsl:template match="my:second">
  <my:first/>
</xsl:template>

I can use other logicsheets' elements in my logicsheet - but seems like
I just can't use definitions from the logicsheet that is applied at the
time (don't know how to call it - template-time? ;). 
My guess is that XSP processor applies every logicsheet needed just once
and does not care that there might be a need to make another run. 

I'd like to know what you guys do in those situations?

For now I'm using quite an ugly hack - I name templates so I could call
them later:
<xsl:template match="my:first" name="my:first">
 <!-- ... something here ... -->
</xsl:template>

<xsl:template match="my:second">
  <xsl:call-template name="my:first">
</xsl:template>

That rapidly becomes more ugly when I need to pass parameters to those
templates.

I guess I could also use <xsp:element name="my:first"/>.

Any ideas would be appreciated,

-- Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message