Tim Larson wrote:

On Fri, Apr 09, 2004 at 06:40:27PM +0200, Marc Portier wrote:

[EMAIL PROTECTED] wrote:

mpo         2004/04/09 09:36:00
Modified:    src/blocks/forms/java/org/apache/cocoon/forms/transformation
                      EffectPipe.java

<snip/>


IMHO it could not be the case: AFAIU the whole purpose of the efectpipe is to build a stack of these elements
that lives across SAX-EVENTS, this would mean that the current impl only works with a SAX parser impl that
allocates a new Attributes instance for each sax event (lucky us?)


In that light I'm doubthing if the added complexity of the late attribute-cloning offers us that much.
(doesn't it need to happen anyway?)


It saves creating some objects, but when looking at it again I agree
that we should just go ahead and always clone the attributes.


ok, I'll make the change then



IMHO we should consider making the attrs final and thus cloning the lot at Element-constructot-time.


IIUC, that would mean we could not add attributes via the handlers,
or do you have a different solution for this?


nope, you can still add attributes, only the reference to the actual AttributesImpl can never change during the life of the Element.


regards,
-marc=
--
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
[EMAIL PROTECTED]                              [EMAIL PROTECTED]

Reply via email to