Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I'd be curious to have a few precisions here. SAX is push-parsing (with the tiny extra that you can get a little context from the driver if it provides it), so I don't see how people could get that wrong ;-) As for pull-parsing, it is true that SAX does nothing for that. It should be too hard to come up with an API for pull-parsing, the trouble is mostly in agreeing on one. I guess that if someone presents a pull-parser system that is reasonable enough, it'll be adopted.

    I would think that people's

    --

    -- Robin Berjon [berjon.com]

    • As for the part that interests me most, how many different interpretations of SAX did you get, and how did they differ?

      A notable point of difference was between people who considered the events to be all that the spec [sourceforge.net] specified, and people who considered the spec to specify events and also parse(), parse_file(), parse_string(), and their behavior. If you read SAX as obliging one to follow the behavior of parse() et al in current parsers, then you can't easily implement something like HTML::TokeParser.

      M

      • Ah thanks for the precision. That is an area that I would never have considered grey, but then I have my nose right inside it all the time, and a lot of the talk that define(s|d) SAX isn't archived as it happened on IRC.

        Here's an attempted short breakdown of the general idea (as clear as I can make it past 4am). The parse calls (parse, parse_file etc.) are part of the SAX spec, and there's a very good reason for this and for why I very much doubt that it'll change. SAX drivers are meant to be total

        --

        -- Robin Berjon [berjon.com]

  • Well, I'm the first to admit that my background is not in CS; so asking "is SAX a blah-blah-parser?" will likely draw a stare.

    That said, however, the reality is that SAX itself makes no rule about which type of parser you hook to it. It is a simple event-based API who's only real expectation is that the various "lexical events" (start_document, end_document, start_element, end_element, etc.) are fired in document order. How you choose to fire those events based on the needs of your application is entir

    • Well, I'm the first to admit that my background is not in CS; so asking "is SAX a blah-blah-parser?" will likely draw a stare. [...] so that Sean can say "oh, well, its a bibble-parser; i can sleep now"

      I'm interested to see that your admitted inability to understand what I'm saying hasn't stopped you from reacting to it indignantly.

      • Well, I must say that I understand kingubu's reaction. He worked hard on PerlSAX2 as several of us did and reading here that SAX is just as bad as POD if not worse, without even the slightest factual argument to sustain such a claim is a bit, err, hard :-) That's why I'm asking for precisions above, I know it's a journal and anyone can bitch about whatever (which I do) without sustaining one's claims but still, if you think SAX sucks we would be glad to hear about why it sucks instead of just aspersions

        --

        -- Robin Berjon [berjon.com]

        • ...and reading here that SAX is just as bad as POD if not worse

          You may have read that, but I didn't write it. I sense that you two are reacting very defensively to things you're irrationally imputing to my message.

          I prescribe an (in)decent massage, and/or some medical marijuana.

          The doktor has spoken!

          • This is very disconcerting. A similar situation existed with Pod; and I found it very very hard to fix that situation

            That's what I read. I don't feel that I'm reacting very defensively to your message. Perhaps it is that, despite the fact that I've defended POD against offered replacements on more than one occasion, I really hate it :-). That would suffice to explain what appears as defensiveness ("What? You compared my baby to POD!!!" ;-).

            That is not to say that we won't accept your remedies.

            --

            -- Robin Berjon [berjon.com]