W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000

RE: adding addressing capabilities to the DOM

From: <keshlam@us.ibm.com>
Date: Mon, 24 Apr 2000 12:42:04 -0400
To: www-dom@w3.org
Message-ID: <852568CB.005BB33D.00@D51MTA03.pok.ibm.com>
> > SAX events (I'm really unclear about how a query interface for SAX
would
> > work--sounds more like a filter than a query), etc.
> >
> parser.parse("/descendant::invoice/lineitem[@price > 50]");
>
> ...and the processor only calls back into your application on the
> information items that match the expression. This would greatly simplify
> processing at the application level in SAX.

In other words, yes, it is like a filter. But that's the only kind of
querying one can meaningfully apply to a stream. If you want to apply more
than one query, you need to either run through the stream again, or build a
persistant model of some sort. See the DOM FAQ's entry on tradeoffs between
DOM and SAX.

Remember, one could feed the output of a SAX query/filter into a DOM tree
builder, or the output of a DOM query into a SAX stream generator. (Modulo
any remaining impedence mismatches between the two representations.) It
doesn't necessarily have to be an either-or choice.

______________________________________
Joe Kesselman  / IBM Research
Received on Monday, 24 April 2000 12:42:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT