From: "James Britt (rubydev)" Date: 2001-11-16T10:14:36+09:00 Subject: [ruby-talk:25369] Re: XML support in the standard lib;whatexactly? > There's no language-independent API definition for SAX. Here's what > David Megginson says in the FAQ at : > > 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. > Ah, that would go a long way in explaining why, at 6:30 a.m., pre-coffee, I couldn't think of where I could find one ... > 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. It's interesting to look at how SAX and SAX2 have been implemented in other languages. Despite there being no W3C TR, or even anything like a formal spec, people tend to provide the same classes (or the equivalent) and APIs as in the Java "reference" version. Even the Microsoft parser implements SAX and SAX2, with matching objects and methods. (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/sax2_gettingstarted_sax2comimplementation.asp) It suggests that there is sort of "common law" approach to XML APIs; once something has established itself among the XML community, it can be fruitful to build on it. People act "as if" there were a language-independent API definition for SAX; perhaps there's some benefit to this. James