cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: esql logicsheet finished (?!)
Date Thu, 30 Nov 2000 21:59:10 GMT
On Wed, 29 Nov 2000, Giacomo Pati wrote:

> Donald Ball wrote:
> > 
> > On Wed, 29 Nov 2000, Paul Russell wrote:
> > 
> > > On Wed, Nov 29, 2000 at 07:40:19AM +0100, Giacomo Pati wrote:
> > > > > now, on to fix the c2 implementation.
> > > > Yes, +1024 :-)
> > >
> > > Hehe. Anything the rest of us can do to help? (other than
> > > finding intreguing ways to break it ;)
> > 
> > sure. you could do the port yourself so that i don't have to worry about
> > it. ;). really, the only tricky bits i don't know how to solve are:
> > 
> > 1. get-columns method. i need to create elements whose names i don't know
> > a priori. xsp doesn't give you a built-in way to do that, so i've been
> > messing with DOM directly.
> 
> Yes, this is bad habit of xsp. It must be rewritten in a SAX manner and
> this means we have to maintain both versions :(

hey, i just had a thought - how can an xsp page determine if it's running
in c1 v.s. c2? i can switch my logic blocks based on that if i can figure
out how to do it. ideally, it would be nice to determine this at xsp
logicsheet transformation time as well as xsp runtime. perhaps the xsp
engine could pass a variable to the xslt transformer that's applying the
logicsheets, e.g. xsp-environment and xsp-environment-version?

> > 2. get-xml method. i don't know how to ask c2 for a parser, or what to do
> > with the SAX events it will give me.
> 
> Well, look at the FileGenerator. It uses something like:
> 
>             Parser parser=(Parser)this.manager.lookup(Roles.PARSER);
>             parser.setContentHandler(this.contentHandler);
>             parser.setLexicalHandler(this.lexicalHandler);
>            
> parser.parse(super.resolver.resolveEntity(null,this.source));
> 
> I think something similar should be available to an xsp page.

i reckon that should work. is there an easy way to strip the root element
from the incoming SAX stream without writing a fullblown SAX filter? one
thing i offer with get-xml is the ability to add a root element so xml
fragments can be parsed properly. i'd like to offer the ability to have
that stripped as well. or can the parser be asked to parse an xml fragment
instead of an xml document?

- donald


Mime
View raw message