[Home] [By Thread] [By Date] [Recent Entries]
> -----Original Message----- > From: Joe English [mailto:jenglish@f...] > Sent: Friday, January 25, 2002 1:30 PM > To: xml-dev@l... > Subject: Re: Push and Pull? > > > > Clark C . Evans wrote: > > On Sun, Nov 25, 2001 at 11:43:49AM -0800, Dare Obasanjo wrote: > > | No. The pull model has *nothing* to do with an in-memory > > | representation of the document. > > > > Yes. Random vs. sequential access is an othogonal issue. > > > > > > Sequential Random > > +---------------------------------------------------------- > > | > > Push | SAX (recursive visitor) > > | > > Pull | Pull Parser DOM > > | > > +------------------------------------------------------- > > > > The confusion arises since SAX and DOM are different > > in two regards: (a) processing model (push vs pull) > > and (b) access model (random vs sequential). > > > The way I see it the DOM is more of a "slurp" model -- > the application doesn't get involved during parsing, instead > it gets the whole tree in one big gulp. I can agree with this. > > I'd describe the main difference as "event-driven" vs. > "tree-based". Event-driven processing models can have a > "push" interface (like SAX, where the parser calls the > application) or a "pull" interface (where the application > calls the parser). Thanks, Joe. This is very clear. Ilya > > There are interesting variants on the tree-based model too: > with the DOM the application crawls caterpillar-like from > node to node, and in XSLT it iterates over node sets > generated from XPath statements. With DOM and XSLT the > entire document is accessible from any node, but in other > models (HaXml, possibly XQuery) you can only access the > children and descendants of a node. > > > --Joe English > > jenglish@f... > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org > <http://www.xml.org>, an initiative of OASIS <http://www.oasis-open.org> The list archives are at http://lists.xml.org/archives/xml-dev/ To subscribe or unsubscribe from this list use the subscription manager: <http://lists.xml.org/ob/adm.pl>
|

Cart



