cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [c2] bugs in xsp engine
Date Fri, 13 Apr 2001 08:34:44 GMT


Davanum Srinivas a écrit :
> 
> Donald,
> 
> As of right now, the code is sub-sub-sub-optimal as it loads each of the specified Logicsheets
in
> the XSP and also recursively loads all Logicsheet's referenced in those first set of
LogicSheet's.
> But now we know it can be done....Any thoughts on optimization? all the code is in addLogicSheet
> function of AbstractMarkupLanguage.java
> 
> Thanks,
> dims
> 
> --- Donald Ball <balld@webslingerZ.com> wrote:
> > On Thu, 12 Apr 2001, Davanum Srinivas wrote:
> >
> > > > * if you fail to declare a logicsheet namespace that's not used in your
> > > > source xsp page, but only in a logicsheet it calls, that logicsheet is
not
> > > > applied. i think this is a well known bug, is anyone working on it?
> > >
> > > Just fixed this. Please give it a shot.
> >
> > actually, i just found a bug in this... if i use elements in the esql
> > logicsheet both in my xsp page and in one of the logicsheets it calls, the
> > esql logicsheet is applied twice, causing compilation problems due to
> > duplicate method, variable, and inner class definitions. again, one
> > solution would be to pass a parameter to the logicsheet that indicates if
> > it's the first time it's been applied or not... can't decide if that's
> > optimal or not tho.
> >
> > - donald
> >
> >
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
> 

Dims, I looked at your changes at XSPMarkupLanguage et al, but didn't
understand how they solve Donald's problem. What I understand is that
there's a need for the logicsheet transformer (i.e. the XSL) to know
that it already has been applied in the generation process in order
avoid redeclaring some class-level elements (often implemented within a
<template match="xsp:page">).

If this is the problem, AbstractMarkupLanguage could give the logicsheet
a boolean parameter indicating if it's applied for the first time or
not. A logicsheet could then use it as follows :

<xsl:param name="first-time-applied"/>

<xsl:template match="xsp:page">
  <xsp:page>
    <xsl:apply-templates select="@*"/>
    <xsl:if test="$first-time-applied = 'true'>
      <xsp:structure>
        <!-- inner classes, methods and class members declarations -->
      </xsp:structure>
    </xsl:if>
    ...
  </xsp:page>
</xsl:template>

What do you think of it ?
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

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


Mime
View raw message