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

Re: SAX - endDocument() confusion again


xmlfilters sax

----- Original Message ----- 
From: "Elliotte Rusty Harold" <elharo@m...>
To: "Karl Waclawek" <karl@w...>
Cc: <xml-dev@l...>; <sax-devel@l...>
Sent: Saturday, February 28, 2004 6:35 AM

> At 11:38 PM -0500 2/27/04, Karl Waclawek wrote:
> 
> >I thought of the reverse direction.
> >How would a filter *down* the chain deal with an "end of parsing"
> >if it doesn't know why parsing stopped. Was it the end of the document?
> >Was there an exception? I think someone else pointed that out already,
> >but I missed the name.
> 
> 
> I'm not sure I see your problem. The parse() method either returns or 
> throws an exception. If it returns normally, the end of document was 
> seen. If it throws an exception it wasn't.

Actually, I was thinking rather in terms of a chain of
ContentHandlers, not true XMLFilter implementations.
I didn't make that clear.

Sometimes you don't know where the end of the chain is, so
you can't call parse() on it and you have to drive the
chain from the parser end.

You are obviously right with your argument for XMLFilters.
 
> Of course the filter only really nows what the previous filter in the 
> chain tells it. It doesn't know and doesn't need to know what filters 
> earlier in the chain say. That's the point of filtering.

Yes, as above, I was not clear at all.
The problem I described only arises when driving the 
"contentHandler-filter" chain from the parser end, in
which case the filters down the chain have no parse()
call to evaluate.

Karl

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.