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 ]



> -----Original Message-----
> From: Joe English [mailto:jenglish@flightlab.com] 
> Sent: Friday, January 25, 2002 1:30 PM
> To: xml-dev@lists.xml.org
> Subject: Re: [xml-dev] 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@flightlab.com
> 
> -----------------------------------------------------------------
> 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>




 

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

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