cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: cvs commit: cocoon-2.1/src/webapp/WEB-INF cocoon.xconf
Date Fri, 10 Oct 2003 10:51:19 GMT
On Thu, 2003-10-09 at 23:50, Antonio Gallardo wrote:
> Stefano Mazzocchi dijo:
> >
> > On Thursday, Oct 9, 2003, at 22:30 Europe/Rome, Antonio Gallardo wrote:
> >
> >>> antonio     2003/10/09 13:12:35
> >>>
> >>>   Modified:    src/webapp/WEB-INF cocoon.xconf
> >>>   Log:
> >>>   Fixing bug related to woody form handling posted
> >>>   by Carlos Chávez. Bruno Dumon suggested the fix
> >>>   and it works back again.
> >>>
> >>>   Revision  Changes    Path
> >>>   1.31      +1 -1      cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf
> >>>
> >>>   Index: cocoon.xconf
> >>>   ===================================================================
> >>> RCS file: /home/cvs//cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf,v
> >>> retrieving revision 1.30
> >>>   retrieving revision 1.31
> >>>   diff -u -r1.30 -r1.31
> >>>   --- cocoon.xconf	6 Oct 2003 16:10:55 -0000	1.30
> >>>   +++ cocoon.xconf	9 Oct 2003 20:12:35 -0000	1.31
> >>>   -    <parameter name="reuse-parsers" value="true"/>
> >>>   +    <parameter name="reuse-parsers" value="false"/>
> >>
> >> Next time we need to be more carefully :)
> >
> > i don't get it. if the above breaks woody, this is a hack, not a fix.
> > we need to really fix the bug, not to route around it. any info on
> > where the problem is?
> 
> This problem does not breaks woody. It breaks Flow, continuations, woody
> and maybe other areas that I am not using. Maybe someone else can post
> other related problems.

Well it has nothing to do with any of those. What I noticed is that if
reuse-parsers is set to true, I got a SAX comment event of a comment
that appeared in an XSL stylesheet which turned up in the SAX pipeline. 

I checked the javadoc of the XMLReader class (which is the thing being
reused) and it mentions "Once a parse is complete, an application may
reuse the same XMLReader object, possibly with a different input
source". So the XMLReader can be reused.

What's likely the problem (but I can't spend time on this right now) is
that the JaxpParser component only sets the lexicalhandler property on
the parser if it has one. If the parser is being reused, and no
lexicalhandler is being provided, the previous lexicalhandler will
remain used. This can probably be solved by setting it explicitely to
null.

So until someone has time to try this out and update the
excalibur-xmlutil package, we're stuck with reuse-parsers set to false.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message