OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Push and Pull?

[ Lists Home | Date Index | Thread Index ]

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'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).

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



News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS