cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [c2] bugs in xsp engine
Date Fri, 13 Apr 2001 13:02:37 GMT
Davanum Srinivas wrote:
> 
> Berin,
> 
> > When I posted my general algorithm, it was with two assumptions:
> >
> > 1) The Logicsheet application order is set up BEFORE any processing takes place--hense
the
> > declarations in "cocoon.xconf" so the XSP engine has that information.
> > 2) Each logicsheet would be applied once and only once.
> >
> 
> I have taken care of both conditions in the code that i checked in this morning. :)

Cool!  I will check it out now.

> 
> Thanks,
> dims
> 
> PS: Though am still not handling recursions :(

When I said recursions, it was in the setup context.  If you were to set up a
special Set object that inherited from OrderedSet, and overrode the add() method,
all you would have to do is add all dependancies with the same add() method:

class LogicSheetSet extends OrderedSet {
     boolean add(Object obj) {
         if (obj instanceof LogicSheet) {
             LogicSheet ls = (LogicSheet) obj;
             boolean retVal = super.add(ls);

             LogicSheet[] dependancies = ls.getDependancies();

             for (int i = 0; i < dependancies.length; i++) {
                 super.add(dependancies[i]);
             }

             return retVal;
         }

         return false; // never add anything that isn't a LogicSheet
     }
}

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


Mime
View raw message