Issue #8731 has been updated by kou (Kouhei Sutou).


?????????????????????????????????

SAX2Listener#entitydecl????????1?????????????????????????????????????????????????????????????????????????????????????????1????????????????????????????????????????????

notationdecl???????????????????????????????????????????????????????????????????????????????????????????????SAX2Listner???????????????????????????????????????????????????????????????????????????????????????????????????????????

??????????????????????????????????????????????"%"??????????????????????????宣??????????????????????????????????????????????????????????"%"以?????????????????????????????????????????????????????

----------------------------------------
Bug #8731: Problems when parsing notation decl and entity decl with REXML::Parsers::SAX2Parser
https://bugs.ruby-lang.org/issues/8731#change-41089

Author: ohai (Ippei Obayashi)
Status: Closed
Priority: Normal
Assignee: 
Category: lib
Target version: 
ruby -v: ruby 2.1.0dev (2013-08-04 trunk 42372) [x86_64-linux]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


以????????(sax2parser_decl_error.rb)?????????????????????????????????
  require 'rexml/parsers/sax2parser'
  require 'rexml/sax2listener'
  
  xml = <<EOS
  <!DOCTYPE root [
    <!ENTITY % YN '"Yes"'>
    <!NOTATION x SYSTEM "URIx">
  ]>
  <root />
  EOS
  
  class Listener
    include REXML::SAX2Listener
  end
  
  parser = REXML::Parsers::SAX2Parser.new(xml)
  parser.listen(Listener.new)
  parser.parse
  # > test_sax2parser.rb:21:in `entitydecl': wrong number of arguments (3 for 1) (ArgumentError)
????????? SAX2Parser#handle ?????? SAX2Listener#entitydecl, notationdecl ??渡??????????????????????????????????????

添???????? rexml-sax2parser-fix.patch ??修正???????????????????????????????? rexml-sax2parser-unittest.patch ???????
??????????rexml-sax2listener-doc.patch ?????????????修正????????????????




-- 
http://bugs.ruby-lang.org/