diff options
author | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-12 12:08:52 +0000 |
---|---|---|
committer | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-12 12:08:52 +0000 |
commit | 69e5c7d29797fe085d0ae919ebadc80a69f0f331 (patch) | |
tree | 8c1af789ecbdd10533ff280b1f686bd89df2999d /lib/rexml/parsers/sax2parser.rb | |
parent | 1b12d598f8f6ed6cde7122e9f8b50238d19e5cf0 (diff) |
* Fixed the inheritance bug in the pull parser that James Britt found.
* Indentation changes, and changed some exceptions to runtime
exceptions.
* Backed out the patch that changed the versions
* Wasn't including Text class.
* Fixes issue:25 (Trac)
* Fixes ticket:3 (Issue38 in Roundup.)
* Numerous fixes in the XPath interpreter correcting, among other
things, ordering bugs and some incorrect behavior.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/parsers/sax2parser.rb')
-rw-r--r-- | lib/rexml/parsers/sax2parser.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rexml/parsers/sax2parser.rb b/lib/rexml/parsers/sax2parser.rb index d5ee1bcfcd..f1b8246902 100644 --- a/lib/rexml/parsers/sax2parser.rb +++ b/lib/rexml/parsers/sax2parser.rb @@ -1,9 +1,11 @@ require 'rexml/parsers/baseparser' require 'rexml/parseexception' require 'rexml/namespace' +require 'rexml/text' module REXML module Parsers + # SAX2Parser class SAX2Parser def initialize source @parser = BaseParser.new(source) @@ -36,6 +38,10 @@ module REXML # :start_prefix_mapping, :end_prefix_mapping, :characters, # :processing_instruction, :doctype, :attlistdecl, :elementdecl, # :entitydecl, :notationdecl, :cdata, :xmldecl, :comment + # + # There is an additional symbol that can be listened for: :progress. + # This will be called for every event generated, passing in the current + # stream position. # # Array contains regular expressions or strings which will be matched # against fully qualified element names. @@ -161,6 +167,7 @@ module REXML :elementdecl, :cdata, :notationdecl, :xmldecl handle( *event ) end + handle( :progress, @parser.source.position ) end end |