Okey,
The Elements telling the Document that something
has changed seems like a good approach,
I´ve been thinking about using the ElementHandler
at parsetime to look for the XHTML Event elements like "onevent" and based on
that instantiate an appropriate listener and add it to some kind of listener
stack. When the complete tree is in memory maybe there is a way to attach them
to the appropriate element. If the document is the responsible party it may be
simpler than that. An element could tell the document about a change in it´s
status according to some kind of eventinterface and the Document could fire the
appropriate eventlistener.
Could there be a problem with several events firing
and telling the Document that something has changed? I mean performance
wise?
I guess it could be modeled on the W3C DOM2 Events
but it should definitely be optional to have the events turned on or
off.
Is it possible at parse time to build the tree
structure with or without events turned on. Two different implementations of the
Node, one which implements some kind of eventhandling?
What are your ideas so far?
/Regards Mats
----- Original Message -----
|
- [dom4j-dev] DOM2 Events in DOM4J Mats Norén
- Re: [dom4j-dev] DOM2 Events in DOM4J James Strachan
- Re: [dom4j-dev] DOM2 Events in DOM4J Mats Norén
- Re: [dom4j-dev] DOM2 Events in DOM4J James Strachan