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

RE: SAX 2.0 extension proposals.

  • From: Miles Sabin <msabin@c...>
  • To: xml-dev@x...
  • Date: Thu, 3 Feb 2000 15:28:18 -0000

RE: SAX 2.0 extension proposals.
Toby Speight wrote,
> Miles Sabin wrote,
> > You want to be able to enumerate _all_ the parser+filter
> > combinations that support "q" and "r", not just find some
> > _one_ parser+filter that fits the bill.

> That's not quite right.  The problem as I see it is that you 
> don't know which filters to try with which parsers, and so 
> you have to iterate through all the combinations until you 
> find a match.

OK, so you want to be able to query for some one parser +
arbitrary filter chain combo that has all the required
features ... right?

I'm more convinced than ever that this is application specific
logic rather than something which belongs in a general
purpose XMLReader factory. Here's why ...

The problem is not in general soluble, because even with just 
_one_ filter it'd be possible for there to be an unbounded 
number of distinct filter chains (some might filters do 
interesting things if applied multiple times to a single 
parser). So the combinatorial explosion you describe is just 
the tip of the iceberg. Resolving this problem in practice 
requires filter-specific knowledge. But other than the SAX2 
interface, the API is completely silent on how filters should 
behave: implementations of XMLFilter are at the application 
level, and it's up to the application to determine their 
semantics.

In summary: the effects of combining filters and parsers is
dependent on application level semantics, so a SAX level
factory can't be expected to handle it.

On the other hand, it's quite straightforward to deal with
this at the application level, where, presumably you _do_
know what your filters do, and how they combine. That being
so, it's straightforward to put together 'canned' parser/
filter(s) combos and bundle them as a standalone XMLReader
implementation in the way I described earlier in this thread.

Cheers,


Miles

-- 
Miles Sabin                       Cromwell Media
Internet Systems Architect        5/6 Glenthorne Mews
+44 (0)20 8817 4030               London, W6 0LJ, England
msabin@c...          http://www.cromwellmedia.com/


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.