Hello --

On Thu, 15 Nov 2001, James Britt (rubydev) wrote:

> >
> > AFAICS: Almost everybody expessed that they would like a RubyWay API,
> > that integrates well with Ruby, over a DOM API. Many think SAX and DOM
> > would be a good idea as a later addition.
> > Some think both are not needed, and a RubyWay streaming parser+API would
> > be nicer.
>

> I haven't been counting, but the sense I get is many people on this
> list think a Ruby-way is personally/aesthetically better than DOM or
> SAX, though some people have a use for DOM and SAX.

> What I don't see is any clear explanation why some people view this
> as an either/or choice.

I agree.  I think it's probably because this discussion has been
specifically about what might go into the standard distribution of
Ruby, so there's a winner-take-all component to it.  But still, people
should not stop writing useful XML-related software, whether it's in
the standard distribution or not.

> > SAX: IIRC, its' creator(s) say, there's no standard. It's defined
> > through the Java implementation. Ruby is different to Java.

> I suspect there's a formal API def somewhere (would have to look).
> XML is not a standard, it's the recommendation of a vendor
> consortia.  SAX is essentially just as "standard", but derived from
> discussions on the xml-dev list.

There's no language-independent API definition for SAX.  Here's what
David Megginson says in the FAQ at <http://www.saxproject.org>:

  Where's the formal language-independent SAX2 Specification?

  There isn't any, and probably there won't ever be one. SAX2 in Java
  is defined by its interfaces and by the base of running code -- it's
  more like English Common Law rather than the heavily codified Civil
  Code of ISO or W3C specifications. Outside of Java, SAX is whatever
  programmers in that language decide it should be.

Hmmmm.... maybe this is why "SAX" sometimes gets used as a generic
term for streaming/event-driven parser.  In any case, it certainly
raises big questions about what a Ruby SAX parser would be.  I've
started looking at XML::SAX::* in Perl, just to see what might be
involved.

> > A RubyWay equivalent for both concepts sure would offer many advantages.
> > (as many report from practical experience)

(When did Ruby Way become one word?  Or is that just the adjectival
form? :-)


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav