Loading ...
Sorry, an error occurred while loading the content.

Re: [soaplite] XML::Parser::Lite

Expand Messages
  • Paul Kulchenko
    Hi, Duncan! You re absolutely right, it s not doing what I expected. This value is not in use right now, but may be used in a future. I ll fix it. Thank you.
    Message 1 of 4 , Apr 21 12:18 PM
    • 0 Attachment
      Hi, Duncan!

      You're absolutely right, it's not doing what I expected. This value
      is not in use right now, but may be used in a future. I'll fix it.
      Thank you.

      btw, did you just looked into the source or tried to use it? Does it
      work for you?

      Best wishes, Paul.

      --- Duncan Cameron <dcameron@...> wrote:
      > Paul
      >
      > I've been looking at XML::Parser::Lite and wondered if the
      > following is doing what you expect:
      >
      > Final(__PACKAGE__ => @_)
      >
      > This is passing the literal '__PACKAGE__' not the value of
      > __PACKAGE__ as the => operator quotes the left-hand side.
      > It doesn' matter as the called method doesn't need to use it.
      > But maybe inthe future it might.
      >
      > Regards,
      > Duncan Cameron
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Yahoo! Auctions - buy the things you want at great prices
      http://auctions.yahoo.com/
    • Duncan Cameron
      Paul Using XML::Parser::Lite with SOAP::Lite works fine with Perl 5.6. I was trying it with Perl 5.005 (by commenting out the version check) to see what
      Message 2 of 4 , Apr 22 2:47 PM
      • 0 Attachment
        Paul

        Using XML::Parser::Lite with SOAP::Lite works fine with Perl 5.6. I
        was trying it with Perl 5.005 (by commenting out the version check)
        to see what didn't work, that's when I saw the use of '__PACKAGE__'.

        I had looked at the Shallow Parsing paper by my namesake Robert Cameron
        and had a go at turning it into a SAX parser but I wasn't aware of the
        regular expression extensions to execute code, so I was having to parse
        each tag as a second step. What you've done looks very good.

        Are you aware of any restrictions on what code can be executed from the
        regular expression (?{ code }) ? I've created a SAX adapter which takes
        the events fired by Parser::Lite and converts them to SAX events. It works
        with a simple SAX handler, but I get segment violations when I try it
        with XML::Handler::XMLWriter and XML::Handler::CanonXMLWriter. For example,
        I wondered if it's valid to execute another regular expression from that
        code.

        Regards,
        Duncan Cameron


        On 2001-04-21 at 12:18:00, Paul Kulchenko <paulclinger@...> wrote concerning 'Re: [soaplite] XML::Parser::Lite':
        >Hi, Duncan!
        >
        >You're absolutely right, it's not doing what I expected. This value
        >is not in use right now, but may be used in a future. I'll fix it.
        >Thank you.
        >
        >btw, did you just looked into the source or tried to use it? Does it
        >work for you?
        >
        >Best wishes, Paul.
        >
        >--- Duncan Cameron <dcameron@...> wrote:
        >> Paul
        >>
        >> I've been looking at XML::Parser::Lite and wondered if the
        >> following is doing what you expect:
        >>
        >> Final(__PACKAGE__ => @_)
        >>
        >> This is passing the literal '__PACKAGE__' not the value of
        >> __PACKAGE__ as the => operator quotes the left-hand side.
        >> It doesn' matter as the called method doesn't need to use it.
        >> But maybe inthe future it might.
        >>
        >> Regards,
        >> Duncan Cameron
      • Paul Kulchenko
        Hi, Duncan! ... Actually, I tried to run it with Perl 5.005 and got some unpredictable results. It seems like ?{} code wasn t properly executed. It didn t
        Message 3 of 4 , Apr 22 4:07 PM
        • 0 Attachment
          Hi, Duncan!

          > Using XML::Parser::Lite with SOAP::Lite works fine with Perl 5.6.
          > I was trying it with Perl 5.005 (by commenting out the version
          Actually, I tried to run it with Perl 5.005 and got some
          unpredictable results. It seems like ?{} code wasn't properly
          executed. It didn't fail, but results were absolutely strange, so I
          decided to stick with 5.6.

          > Are you aware of any restrictions on what code can be executed from
          > the
          > regular expression (?{ code }) ? I've created a SAX adapter which
          > takes
          > the events fired by Parser::Lite and converts them to SAX events.
          > It works
          > with a simple SAX handler, but I get segment violations when I try
          > it
          > with XML::Handler::XMLWriter and XML::Handler::CanonXMLWriter. For
          > example,
          > I wondered if it's valid to execute another regular expression from
          > that code.
          Regular expressions can't be executed from code that is executed from
          ?{} unfortunately. It seems like regexp context can't be reproduced
          and my app segfaults when I'm doing it. As you can see I'v used
          index/substring to find a way around this restriction, but index()
          can search only static strings.

          I have a similar code for other Perl (without ?{}) and probably it
          does what you did: parses elements as the first stage and then parses
          them again to generate events, but it was MUCH slower than current
          implementation even without all features, so I didn't finish it,
          though I still hope to address Perl before 5.6 also. Could you send
          me what you did to convert callbacks to SAX events? Thank you.

          Best wishes, Paul.

          --- Duncan Cameron <dcameron@...> wrote:
          > Paul
          >
          > Using XML::Parser::Lite with SOAP::Lite works fine with Perl 5.6.
          > I
          > was trying it with Perl 5.005 (by commenting out the version check)
          > to see what didn't work, that's when I saw the use of
          > '__PACKAGE__'.
          >
          > I had looked at the Shallow Parsing paper by my namesake Robert
          > Cameron
          > and had a go at turning it into a SAX parser but I wasn't aware of
          > the
          > regular expression extensions to execute code, so I was having to
          > parse
          > each tag as a second step. What you've done looks very good.
          >
          > Are you aware of any restrictions on what code can be executed from
          > the
          > regular expression (?{ code }) ? I've created a SAX adapter which
          > takes
          > the events fired by Parser::Lite and converts them to SAX events.
          > It works
          > with a simple SAX handler, but I get segment violations when I try
          > it
          > with XML::Handler::XMLWriter and XML::Handler::CanonXMLWriter. For
          > example,
          > I wondered if it's valid to execute another regular expression from
          > that
          > code.
          >
          > Regards,
          > Duncan Cameron
          >
          >
          > On 2001-04-21 at 12:18:00, Paul Kulchenko <paulclinger@...>
          > wrote concerning 'Re: [soaplite] XML::Parser::Lite':
          > >Hi, Duncan!
          > >
          > >You're absolutely right, it's not doing what I expected. This
          > value
          > >is not in use right now, but may be used in a future. I'll fix it.
          > >Thank you.
          > >
          > >btw, did you just looked into the source or tried to use it? Does
          > it
          > >work for you?
          > >
          > >Best wishes, Paul.
          > >
          > >--- Duncan Cameron <dcameron@...> wrote:
          > >> Paul
          > >>
          > >> I've been looking at XML::Parser::Lite and wondered if the
          > >> following is doing what you expect:
          > >>
          > >> Final(__PACKAGE__ => @_)
          > >>
          > >> This is passing the literal '__PACKAGE__' not the value of
          > >> __PACKAGE__ as the => operator quotes the left-hand side.
          > >> It doesn' matter as the called method doesn't need to use it.
          > >> But maybe inthe future it might.
          > >>
          > >> Regards,
          > >> Duncan Cameron
          >
          >
          >
          > To unsubscribe from this group, send an email to:
          > soaplite-unsubscribe@yahoogroups.com
          >
          >
          >
          > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
          >
          >


          __________________________________________________
          Do You Yahoo!?
          Yahoo! Auctions - buy the things you want at great prices
          http://auctions.yahoo.com/
        Your message has been successfully submitted and would be delivered to recipients shortly.