Hi Michael,
        I was studying the facts you were asking me to follow and got an
understanding about what Events, event capture, event bubbling,
etc are [1][2] and went through the spec for EventListener and EventTraget
interfaces. Also I noticed the DocumentImpl and NodeImpl classes are having
event processing aspects and they represent the root of the document of the
tree and structure of the tree(nodes) respectively. In [2], it depicts how
an event occurred is dispatched down the tree explaining event capture and
event bubbling. But I am not clear how this "dispatching event" is happening
and need some help from you to figure it out.

        The W3C specification indicates, that events supported by
asynchronous LSParser objects are LSLoadEvent and LSProgressEvent. So, are
these the only Event classes that we have to
implement(in org.apache.xerces.dom.events package) in order to support async
LSParser?

         I also have an issue of LSLoadEvent. In the spec it clearly
describes the asynchronous property of LSProgressevent with an example. But
I cannot imagine such an example where LSParser behaves asynchronously with
LSLoadEvent because, LSLoadEvent is intended to signal the completion of a
document load where it does not imply an async property(for example, if it
signals the progress of loading the document we can assume that it is async
as it was in LSLoadProgressevent). I want to clarify this too(anyway I may
be wrong and may have misunderstood the case.)

         I will go through the DOM implementation some more in upcoming days
and if I have to cover any other specific areas related to the project, I
hope you will guide me through.

[1] http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event
[2]
http://www.w3.org/TR/2010/NOTE-xml-events2-20101216/#s_event_module_elements

Thanks.

On Mon, Feb 14, 2011 at 11:52 AM, Michael Glavassevich
<[email protected]>wrote:

>  Hi Thiwanka,
>
> You're on the right track. The asynchronous version of the LSParser could
> probably be implemented as an extension of DOMParserImpl. You'll find
> details about EventListeners and EventTargets in the DOM Level 2 Events [1]
> specification. You may get some ideas for the design by having a look at
> Xerces DOM implementation. org.apache.xerces.dom.NodeImpl and 
> org.apache.xerces.dom.DocumentImpl
> have methods relevant to event processing. The Events currently implemented
> by Xerces are located under org.apache.xerces.dom.events.*. You could
> extend the base EventImpl class for supporting LSProgressEvent and
> LSLoadEvent.
>
> Once you've had a look at that we can talk more about parseWithContext.
>
> Thanks.
>
> [1]
> http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Registration-interfaces
>
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: [email protected]
> E-mail: [email protected]
>
> Thiwanka Somasiri <[email protected]> wrote on 02/09/2011 11:33:45 AM:
>
> > Hi Michael,
>
> >              I read the functional details on [1] [2] and went
> > through the last year student's discussion [3] about the
> > "Asynchronous LSParser and parseWithContext" project. As I
> > understood by referring these materials, still there are two things
> > to be completed.
> >
> >             1. Implement asynchronous version LSParser (where
> >  boolean async is "true" or asynchronous mode enabled)
> >             2. Implement the parseWithContext functionality in
> DOMParserImpl
> >
> > According the W3C recommendation LSParser objects (DOMParserImpl in
> > this case) are expected to implement EventTarget interface [1] to
> > make event listeners registered in asynchronous mode of LSparser. As
> > I understood, implementation of the Asynchronous version will also
> > influence the return values of the "parse" and "parseURI" methods,
> > since the return values of them as the LSParser is in Asynchronous
> > mode should be "null". This is because of the Document object is not
> > still be constructed when this method returns.
> >
> > Implementing parseWithContext function will give support to parse a
> > fragment of an XML document through LSInput into an existing
> > document in a specified position according to the arguments passed
> > with the method itself which needs more attention (as I guess)
> > because the inserting source document is a fragment of an XML
> > document [2] (ie anything except a complete XML document).
> >
> > At the moment I am studying about these two strategies in an
> > implementation perspective and studying the LSParser related classes
> > such as DOMParserImpl, AbstractDOMParser, etc as you suggested. I am
> > also trying to cover the area for EventTarget, EventListeners stuff
> > (which I think may important for future work) to create a proper
> > background for the project. So can you tell me where I can find
> > materials to study EventListeners and other critical areas needed?
> >
> > This is the brief idea I have got at the moment. So I hope your
> > advice to guide me to go somewhat deeper from where I am at the moment.
> >
> > [1] http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-
> > save.html#LS-LSParser
> > [2] http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-
> > save.html#LS-LSParser-parseWithContext
> > [3] http://markmail.org/thread/ool7dyyzffor6o7b
> >
> > Thanks.
> >
> > On Tue, Feb 8, 2011 at 12:04 AM, Michael Glavassevich <
> [email protected]
> > > wrote:
> > Hi Thiwanka,
> >
> > You'll find the functional details [1][2] in the DOM Level 3 Load
> > and Save specification. From an implementation perspective I would
> > suggest familiarizing yourself with the classes in Xerces which
> > compose the LSParser (e.g. XMLDocumentFragmentScannerImpl,
> > XMLDocumentScannerImpl, AbstractDOMParser, DOMParserImpl, etc...).
> >
> > There's a discussion [3] from last year with a student who was
> > considering doing this project that you might also find informative.
> >
> > Thanks.
> >
> > [1] http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-
> > save.html#LS-LSParser
> > [2] http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-
> > save.html#LS-LSParser-parseWithContext
> > [3] http://markmail.org/thread/ool7dyyzffor6o7b
> >
> >
> > Michael Glavassevich
> > XML Parser Development
> > IBM Toronto Lab
> > E-mail: [email protected]
> > E-mail: [email protected]
>
> > Thiwanka Somasiri <[email protected]> wrote on 02/06/2011 11:18:46
> PM:
> >
> > > Hi Michael,
> >
> > >                  First thank you for your reply. Now I am getting
> > > familiar to Apache Xerces little by little according to your steps
> > > in the first reply. Can you guide me to the specific areas that I
> > > should refer to create a proper background to the "Asynchronous
> > > LSParser and parseWithContext" project.
> > >
> > > Thanks.
> >
> > > On Sun, Feb 6, 2011 at 10:35 PM, Michael Glavassevich <
> [email protected]
> > > > wrote:
> > > Hi Thiwanka,
> > >
> > > Thiwanka Somasiri <[email protected]> wrote on 02/05/2011 11:53:36
> PM:
> > >
> > > > Hi Michael,
> > >
> > > >           I started to follow the steps you have asked me to study.
> > > > Also I noticed the GSoC project ideas list in 2009 and some of them
> > > > were done in 2009 and 2010. As I saw the "Asynchronous LSParser and
> > > > parseWithContext" project is not done as a GSoC project yet. Is this
> > > > project available now? If so, can I attempt to do this project
> > forGSoC 2011?
> >
> > > Yes, this project would still be available for 2011. We may also
> > > brainstorm some new project ideas and post those as well.
> > >
> > > It's still fairly early. GSoC 2011 was only announced a few weeks
> > > ago. Apache is just starting [1] to work out the logistics for this
> > > year. We may use JIRA again for posting ideas, though the admins may
> > > agree that we should be using something else (e.g. going back to
> > Wikis again).
> > >
> > > > Thanks.
> > >
> > > Thanks.
> > >
> > > [1] http://markmail.org/message/hhvszpjotnkmjxcv
> > >
> > >
> > > Michael Glavassevich
> > > XML Parser Development
> > > IBM Toronto Lab
> > > E-mail: [email protected]
> > > E-mail: [email protected]
> > >
> > >
> > >
> > > --
> > >
> > > Regards
> > >
> > > A.S.Thiwanka Somasiri
> > >
> > > Skype : executionerwild
> > > MSN   : [email protected]
> >
> >
> >
> > --
> >
> > Regards
> >
> > A.S.Thiwanka Somasiri
> >
> > Skype : executionerwild
> > MSN   : [email protected]
>
>


-- 

Regards

A.S.Thiwanka Somasiri

Skype : executionerwild
MSN   : [email protected]
<[email protected]>

Reply via email to