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] Streaming XML (WAS: More on taming SAX (was Re: [xm

[ Lists Home | Date Index | Thread Index ]

* Daniela Florescu <dflorescu@mac.com> [2004-12-27 16:31]:
> >    I've gotten pretty good at assembling a SAX engine quickly by
> >    composing one using resuable strategies.
> Alan,
> you didn't answer my question. Besides the personal interest and
> fun, where there any technical reasons why Xquery/XSLT wouldn't
> have been the right choice ?

    There are reasons for programming besides personal intereset
    and fun? Explain.

> Instead of writing Java over SAX, isn't it more convenient
> to write:

> for $x in //foobar
> where some:predicate($x)
> return my:function($x)

    I don't know XQuery. There might be some genius in that
    statement that I'm missing, but...
    I can't see where I'm supposed to put logic that invokes Java
    reflection in the above statement. Now I have to write a huge
    switch statement explictly in my:function, or implicitly in the
    XQuery file.

> and leave the smart streaming strategies to implementors to figure
> out ?

    My streaming strategies are pretty dumb.
    The core strategy is to first choose an XML expression of the
    task at hand, so that as the events arrive, the next event is
    the next thing that has to be done.

    I made the my XML as explicit as possible, so my SAX processor
    could be as simple as possible. I did so, under the assumption
    that if there was a more concise way to express the same thing,
    then I could use XSLT.
    I use XSLT to generate my Ant files from a more document like
    project description for example.

> Did you try XQuery/XSLT and fail ? If yes, where did they
> fell short ?

    Like I said. I didn't want the document. I wanted the parser.

    I don't want to generate a document, I want to generate action.

Alan Gutierrez - alan@engrm.com


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

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