[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Streaming XML (WAS: More on taming SAX (was Re: [xm


yacc xml grammar
* Kevin Jones <kjouk@y...> [2004-12-27 15:46]:
> On Monday 27 December 2004 20:00, Daniela Florescu wrote:

> > Could you guys please try to clarify for me the answer to
> > the following question: instead hand coding steaming
> > applications using SAX, couldn't you write some XQuery code
> > (with external functions probably) to do the same thing ? Did
> > you try at least ? Did you try and fail ? If yes, why did it
> > fail ?

> Funny, I was just discussing why this might be with someone 
> from work an hour ago. My perspective is not that valid, 
> being an implementor more often than a user, but our 
> conclusion was this is as much about practical issues than 
> technical. The main problems being the relatively poor 
> integration between the programming languages of choice and 
> XQuery/XSLT and lack of interesting implementations in easy 
> to use component form.

    I got [expletive deleted] into it a year ago, somehow, while writing a
    document object model, one of the things it kicked out was a SAX
    library that I kept reworking, and now I'm quite pleased with it.

    It changed the way I looked at documents, after having spent a
    long time writing XSLT. 

    For me, it is a yacc surrogate. If I have a repetitious problem,
    like configurting Java object, I think of an XML grammar that
    repeats the steps, and implement it as a stack-based automation
    using my SAX Strategy library.
    
    I've gotten pretty good at assembling a SAX engine quickly by
    composing one using resuable strategies. Things like
    serialization and document building I delegate to JDK 1.4.

    In these cases, it doesn't buy me anything to have the whole
    document in memory, since I'm either assembling some sort of
    AST, or just responding to events, any state that is build up is
    application specific.

    If I were to pull the XML into a DOM, id pretty much recurse
    over the nodes anyway, visiting each one in turn.

    I'm sure if I were proficent in JavaCC, I'd be cobbling togehter
    little languages as frequently as SAX filters.

--
Alan Gutierrez - alan@e...

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.