Граф коммитов

66 Коммитов

Автор SHA1 Сообщение Дата
hsbt be1206c0ac * lib/rexml/**/*.rb: removed commented-out code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-21 03:10:27 +00:00
hsbt 448c87008e * lib/cgi/core.rb: remove unused variables.
* lib/erb.rb: ditto.
* lib/mkmf.rb: ditto.
* lib/net/http/response.rb: ditto.
* lib/optparse/version.rb: ditto.
* lib/prime.rb: ditto.
* lib/racc/parser.rb: ditto.
* lib/rexml/document.rb: ditto.
* lib/rexml/dtd/dtd.rb: ditto.
* lib/rexml/element.rb: ditto.
* lib/rexml/functions.rb: ditto.
* lib/rexml/parsers/xpathparser.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-27 11:04:28 +00:00
kou a66a9fbb10 * lib/rexml/parsers/ultralightparser.rb
(REXML::Parsers::UltraLightParser#parse): Fix wrong :start_doctype
  position.
  [Bug #9061] [ruby-dev:47778]
  Patch by Ippei Obayashi. Thanks!!!

* test/rexml/parser/test_ultra_light.rb: Add a test for this case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-16 09:31:24 +00:00
kou 128d3e7817 * lib/rexml/parsers/streamparser.rb: Add dependency file require.
[Bug #9062] [ruby-dev:47779]
  Reported by Ippei Obayashi. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-31 12:50:49 +00:00
kou 73c57761a9 * lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
Add source information to parse exception on no close tag error.
  [Bug #8844]  [ruby-dev:47672]
  Patch by Ippei Obayashi. Thanks!!!
* test/rexml/parser/test_tree.rb: Add a test for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 14:01:20 +00:00
kou a0657cd5d7 * lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
Remove needless nested parse exception information.
  [Bug #8844]  [ruby-dev:47672]
  Reported by Ippei Obayashi. Thanks!!!
* test/rexml/parser/test_tree.rb: Add a test for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 13:57:18 +00:00
kou 8328d8a2b7 * lib/rexml/parsers/sax2parser.rb
(REXML::Parsers::SAX2Parser#handle_entitydecl): Extract.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 09:42:37 +00:00
kou 7e0022bc8e * lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
Fix wrong "%" position in parameter entity declaration event argument.
* test/rexml/parser/test_sax2.rb: Add tests for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 09:41:29 +00:00
kou f61f11a936 * lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
Support NDATA in external entity declaration.
* test/rexml/parser/test_sax2.rb: Add tests for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 09:09:25 +00:00
kou 3e5f5f5ca4 * lib/rexml/parsers/baseparser.rb
(REXML::Parsers::BaseParser#pull_event): Support optional NDATA
  in parameter entity declaration.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 09:08:21 +00:00
kou ce89dedde3 * NEWS (REXML::Parsers::SAX2Parser): Add about this change.
* lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
  Fix wrong number of arguments. Document says "an array of the
  entity declaration" but it passes two or more arguments.
  This is a bug but it break backward compatibility.
  Reported by Ippei Obayashi. [Bug #8731] [ruby-dev:47582]
* lib/rexml/sax2listener.rb (REXML::SAX2Listener#entitydecl): ditto.
  The listener template accepted two arguments.
* test/rexml/parser/test_sax2.rb: Add tests for external ID case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11 09:01:41 +00:00
kou 90749b1f2a * lib/rexml/parsers/baseparser.rb
(REXML::Parsers::BaseParser::CDATA_END): Use "\A" instead of "^".
  It is not an used constant but I fix it. (Or shuold I remove it?)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 03:51:30 +00:00
kou 265c2f8eb8 * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
Fix wrong constant name. "]>" pattern match is the same but
  it is used for "<!DOCTYPE" end mark not "<![CDATA[" end mark.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 03:48:30 +00:00
kou 43b082d90c * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser):
Use "\A" instead of "^" in document type declaration patterns
  because they are used as the head match in content not the head
  match in line. They don't cause any problems in the current code
  but it should be fixed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 03:46:43 +00:00
kou 6b2c0ca25d * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::SYSTEM):
Fix loose "head" match regular expression. It doesn't cause any
  problem in the current code but it should be fixed because readers
  may confuse it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 03:01:56 +00:00
kou 6d18dd8e4d * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::PUBLIC):
Fix loose "head" match regular expression.
  [Bug #8701] [ruby-dev:47551]
  Patch by Ippei Obayashi. Thanks!!!
* test/rexml/parse/test_notation_declaration.rb (#test_system_public):
  Add a test for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 02:34:06 +00:00
kou 75a138732e * lib/rexml/parsers/streamparser.rb
(REXML::Parsers::StreamParser#parse): Add "entity" event support to
  listener. [Bug #8689] [ruby-dev:47542]
  Reported by Ippei Obayashi.
* test/rexml/test_stream.rb (StreamTester#entity): Add a test for
  the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 14:17:24 +00:00
kou a7322e3678 * lib/rexml/parsers/baseparser.rb: Fix a bug that UTF-8 is used
for UTF-16XX encoded XML that doesn't have encoding="UTF-16" in
  XML declration.
* test/rexml/test_document.rb: Add tests for the above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 12:42:37 +00:00
kou 2a42c1bd3a * lib/rexml/source.rb (REXML::IOSource#initialize): Reduce
@line_break initialize code. It should be done only in #encoding=.
* lib/rexml/parsers/baseparser.rb: Don't set UTF-16 encoding to
  source by encoding="UTF-16" in XML declaration because UTF-16XX
  source encoding should be set in Source#initialize or
  IOSource#intialize. They should handle BOM. Parser should not
  consider about it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28 12:31:20 +00:00
tenderlove ee827e52a7 eliminate `shadowing outer local variable - name` warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 18:03:51 +00:00
kou ca77bce66d * lib/rexml/parsers/baseparser.rb: use meaningful name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-02 12:48:45 +00:00
kou 92cecf79b4 * lib/rexml/parsers/baseparser.rb, test/rexml/test_namespace.rb:
fix the default xml namespace URI validation.
  Reported by Miho Hiramatsu. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-02 12:42:27 +00:00
kou bd895ab176 * lib/rexml/parsers/baseparser.rb: use private instead of _xxx
method name. This is Ruby code not Python code.
  refs #5696


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-03 15:21:53 +00:00
ayumin 5eac56441c * lib/rexml/parsers/baseparser.rb: rexml BaseParser uses
instance_eval unnecessarily on listener add.
  patch from Charles Nutter. [Bug #5696] [ruby-core:41437]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-03 15:05:20 +00:00
kou 2bb6fcb6fd * lib/rexml/parsers/baseparser.rb, test/rexml/test_comment.rb:
allow a single hyphen in comment. [Bug 5278]
  Reported by Thomas Fritzsche. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-07 14:42:44 +00:00
kou 80cb3351dd * lib/rexml/parsers/xpathparser.rb
(REXML::Parsers::XPathParser#parse),
  test/rexml/test_elements.rb
  (ElementsTester::test_each_with_frozen_condition):
  don't modify original XPath. fixes #4164
  Reported by Pavel Shved. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11 07:05:42 +00:00
nobu d371e3583e * lib: revert r31635-r31638 and untabify with expand(1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-19 00:07:25 +00:00
drbrain 7bbf2f3085 * lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style
	  Patch by Steve Klabnik [Ruby 1.9 - Bug #4730]
	  Patch by Jason Dew [Ruby 1.9 - Feature #4718]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 21:19:18 +00:00
naruse f25ff846f6 * lib/rexml/encoding.rb (REXML::Encoding#encoding=): store @encoding
a String which means the name of the encoding.
  this partially revert r29646.

* lib/rexml/document.rb: follow above.

* lib/rexml/output.rb: ditto.

* lib/rexml/parsers/baseparser.rb: ditto.

* lib/rexml/source.rb: ditto.

* lib/rexml/xmldecl.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-02 15:36:48 +00:00
marcandre f3e3547407 * lib/*.rb: Remove unused variable warnings.
Patch by Run Paint [ruby-core:30991]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08 20:59:01 +00:00
kou 994f066f76 * lib/rexml/encoding.rb: use Ruby native encoding mechnism. [ruby-dev:42464]
* lib/rexml/encodings/: remove.

* lib/rexml/document.rb, lib/rexml/formatters/default.rb,
  lib/rexml/output.rb, lib/rexml/parseexception.rb,
  lib/rexml/parsers/baseparser.rb, lib/rexml/source.rb,
  lib/rexml/xmldecl.rb: use Ruby's native Encoding object.

* test/rexml/, test/rss/: follow the above encoding chagnes.

* NEWS: add REXML's incompatible change about encoding.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-30 12:10:56 +00:00
naruse b3ac1c3fb8 Refix previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-06 00:53:14 +00:00
naruse 75ba1d6ac4 Fix previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-06 00:22:04 +00:00
naruse 9ea41e083c Remove warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-05 21:27:40 +00:00
naruse 40bc864003 * lib/rexml/parsers/baseparser.rb (LETTER, DIGIT):
always use POSIX charclass.

* lib/rexml/parsers/baseparser.rb (NAMECHAR):
  remove duplicated range.

* lib/rexml/xmltokens.rb (NCNAME_STR, NAMECHAR): ditto.

* lib/rexml/parsers/xpathparser.rb (PathExpr): ditto.

* lib/rexml/text.rb (REXML::Text#initialize):
  initialize @parent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-05 21:08:12 +00:00
nobu cff7d0c80e * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::STANDALONE):
any number spaces can be placed between equal-sign and the value.
  patch from Ed Howland in [ruby-core:27345].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-29 01:36:26 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
mame 179b7eaa6b * lib/rexml/parsers/lightparser.rb, lib/debug.rb: remove unused when
clauses.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01 13:55:08 +00:00
mame 46321a9a31 * lib/xmlrpc, lib/rexml, test/ruby/test_array.rb,
test/ruby/test_unicode_escape.rb, test/scanf/test_scanf.rb,
  test/rss/rss-assertions.rb: fix indentation to remove warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01 13:46:53 +00:00
naruse 40d8d38909 * ext/json/lib/json/pure/generator.rb,
ext/json/lib/json/pure/parser.rb, ext/openssl/lib/openssl/x509.rb,
ext/win32ole/sample/olegen.rb, lib/date/format.rb, lib/irb/context.rb,
lib/irb/workspace.rb, lib/net/http.rb, lib/net/imap.rb,
lib/rdoc/generator.rb, lib/rdoc/markup/to_html.rb,
lib/rdoc/markup/to_latex.rb, lib/rdoc/parsers/parse_c.rb,
lib/rdoc/ri/formatter.rb, lib/rexml/parsers/baseparser.rb,
lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rss/parser.rb,
lib/uri/common.rb, lib/uri/generic.rb, lib/webrick/httpresponse.rb,
lib/webrick/httpservlet/filehandler.rb, lib/yaml/baseemitter.rb,
lib/yaml/encoding.rb: performance tuning arround String#gsub.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12 06:18:06 +00:00
ser 66aeb2f708 r1479@bean: ser | 2008-01-19 14:26:31 -0500
r1483@bean:  ser | 2008-01-19 14:47:23 -0500
 Sam's fixes:
 * Don't blow up on empty documents
 * Add a test case for sorted attributes
 * Making the output predictable simplifies unit tests, and doesn't cost
   much given that most xml element have few attributes
 * Ruby 1.9 revision 14922 is more strict
 * Complete Ticket #134
 * Fix for ticket #121
 * Fix for ticket #124
 * Fix for ticket #128
 * Fix ticket #133
 * Ticket #131 (Support Ruby 1.9)
 * Fix for ticket #127
 * Fix for ticket #123
 * Add missing data needed by test case
 
  r1481@bean (orig r1303):  ser | 2008-01-19 17:22:32 -0500
  Tagged for release
  r1482@bean (orig r1304):  ser | 2008-01-19 17:27:10 -0500
  Version bump
 


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-20 04:31:57 +00:00
matz 1448668244 * lib/rexml: 1.9 patch from Sam Ruby mentioned in his blog:
<http://intertwingly.net/blog/2007/12/31/Porting-REXML-to-Ruby-1-9>
  [ruby-core:14639]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-01 05:43:50 +00:00
ser 06f2b5b1d8 Fixes ticket:110 (more UTF-16 problems)
Missing include for UndefinedNamespaceException was causing errors in some
    cases.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-04 04:52:08 +00:00
ser 9acf1749fb r1366@bean: ser | 2007-10-01 21:24:33 -0400
r1352@bean:  ser | 2007-07-29 11:33:07 -0400
  Implements namespace validation in the baseparser.  This means that, as per
  the XML namespace spec, unbound prefixes generate UndefinedNamespaceException.
  Also, as per the namespace spec, the 'xml' prefix must be bound to 
  http://www.w3.org/XML/1998/namespace, and the 'xmlns' prefix must not be declared. 
  in the XML.
 


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-02 01:46:32 +00:00
ser efe8edf32c r1361@bean: ser | 2007-10-01 21:24:28 -0400
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-02 01:45:19 +00:00
ser 1d8c98a486 Merges upstream changes for REXML v3.1.7
http://www.germane-software.com/repos/rexml/tags/3.1.7

 r1278@bean:  ser | 2007-06-07 00:53:06 -0400
 Fixed a double-encoding bug.  This was a regression, related
 to ticket:48.
 r1292@bean:  ser | 2007-07-25 08:19:36 -0400
  r1279@bean:  ser | 2007-06-09 23:19:02 -0400
  Fixes ticket:89 -- encoding CP-1252 was broken.  ISO-8859-15 had the same
  problem.
  
  Also in this patch is a fix to merge.rb (unused, but it should at least
  contain no errors), and a unit test for ticket:88.
 
 r1293@bean:  ser | 2007-07-25 08:19:37 -0400
  r1281@bean:  ser | 2007-07-24 11:08:48 -0400
  Addresses ticket:85
  
  This is a major rewrite of the XML formatting code.  The XML writers have all
  been extracted out of the classes and put into their own class containers.
  This makes writing parsers easier, and cleaner.
  
  There are three formatters, which correspond to the previous three XML writing
  modes:
  
    REXML::Formatters::Default    
        Prints the XML document exactly as it was parsed
    REXML::Formatters::Pretty     
        Pretty prints the XML document, destroying whitespace in the document
    REXML::Formatters::Transitive 
        Pretty prints the XML document, preserving whitespace
  
  All of the write() functions have been deprecated (some are still used, but
  these will also go away) except the write() function on Document, which is left
  for convenience.  To pretty print an XML document the canonical way:
  
    formatter = REXML::Formatters::Pretty.new( 5 ) # indent by 5 spaces
    formatter.write( document, output )
  
 
 r1294@bean:  ser | 2007-07-25 08:19:38 -0400
  r1283@bean:  ser | 2007-07-24 19:53:30 -0400
  This goes with the previous commit.
 
 r1295@bean:  ser | 2007-07-25 08:19:39 -0400
  r1285@bean:  ser | 2007-07-24 20:02:07 -0400
  And THIS goes with the previous two patches.  Dammit.
 
 r1296@bean:  ser | 2007-07-25 08:19:40 -0400
  r1287@bean:  ser | 2007-07-24 20:12:25 -0400
  Applied patch from Jeff Barczewski.  Note that this changes what the values of
  the name and IDs are from the previous behavior -- the values no longer include
  the quotes.  This is the correct behavior, so I'm leaving it in, but it is not
  backwards compatible.  Also fixes the serializer so that it outputs the doctype
  in a correct format (needed as a result of this change).
 
 r1297@bean:  ser | 2007-07-25 08:38:38 -0400
 Version update


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-25 12:47:23 +00:00
ser fa4bfa6af5 Merged from REXML main repository:
Fixes ticket:68.
  NOTE that this involves an API change!  Entity declarations in the doctype
  now generate events that carry two, not one, arguments.

Implements ticket:15, using gwrite's suggestion.  This allows Element to be
subclassed.

Two unrelated changes, because subversion is retarded and doesn't do
block-level commits:

  1) Fixed a typo bug in previous change for ticket:15
  2) Fixed namespaces handling in XPath and element.  

    ***** Note that this is an API change!!! *****

    Element.namespaces() now returns a hash of namespace mappings which are
    relevant for that node.

Fixes a bug in multiple decodings

The changeset 1230:1231 was bad.  The default behavior is *not* to use the
native REXML encodings by default, but rather to use ICONV by default.  I know
that this will piss some people off, but defaulting to the pure Ruby version
isn't the correct solution, and it breaks other encodings, so I've reverted it.

* Fixes ticket:61 (xpath_parser)
* Fixes ticket:63 (UTF-16; UNILE decoding was bad)
* Cleans up some tests, removing opportunities for test corruption
* Improves parsing error messages a little
* Adds the ability to override the encoding detection in Source construction
* Fixes an edge case in Functions::string, where document nodes weren't 
  correctly converted
* Fixes Functions::string() for Element and Document nodes
* Fixes some problems in entity handling

Addresses ticket:66

Fixes ticket:71

Addresses ticket:78
  NOTE: that this also fixes what is technically another bug in REXML.  REXML's
  XPath parser used to allow exponential notation in numbers.  The XPath spec
  is specific about what a number is, and scientific notation is not included.
  Therefore, this has been fixed.

Cross-ported a fix for ticket:88 from CVS.

Fixes ticket:80

Documentation cleanup.  Ticket:84

Applied Kou's fix for an un-trac'ed bug.

------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-20 03:56:02 +00:00
matz c009be97e8 * lib/rexml/encoding.rb (REXML::Encoding::check_encoding): spaces
are allowed around equal sign.  [ruby-core:09032]

* lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-09 14:00:59 +00:00
ser ec847fad4e Merged changes into HEAD from REXML 3.1.5.
The list of bug fixes/enhancements is at:

  http://www.germane-software.com/projects/rexml/query?status=closed&milestone=3.1.5


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-08 02:03:44 +00:00
ser 78d9dd71a6 Short summary:
This is a version bump to REXML 3.1.4 for Ruby HEAD.  This change log is
  identical to the log for the 1.8 branch.

  It includes numerous bug fixes and is a pretty big patch, but is nonetheless
  a minor revision bump, since the API hasn't changed.

  For more information, see:

    http:/www.germane-software.com/projects/rexml/milestone/3.1.4

  For all tickets, see:

    http://www.germane-software.com/projects/rexml/ticket/#

  Where '#' is replaced with the ticket number.

Changelog:

* Fixed the documentation WRT the raw mode of text nodes (ticket #4)
* Fixes roundup ticket #43: substring-after bug.
* Fixed ticket #44, Element#xpath
* Patch submitted by an anonymous doner to allow parsing of Tempfiles.  I was
  hoping that, by now, that whole Source thing would have been changed to use
  duck typing and avoid this sort of ticket... but in the meantime, the patch
  has been applied.
* Fixes ticket:30, XPath default namespace bug.  The fix was provided
  by Lucas Nussbaum.
* Aliases #size to #length, as per zdennis's request.
* Fixes typo from previous commit
* Fixes ticket #32, preceding-sibling fails attempting delete_if on nil nodeset
* Merges a user-contributed patch for ticket #40
* Adds a forgotten-to-commit unit test for ticket #32
* Changes Date, Version, and Copyright to upper case, to avoid conflicts with
  the Date class.  All of the other changes in the altered files are because
  Subversion doesn't allow block-level commits, like it should.  English cased
  Version and Copyright are aliased to the upper case versions, for partial
  backward compatability.
* Resolves ticket #34, SAX parser change makes it impossible to parse IO feeds.
* Moves parser.source.position() to parser.position()
* Fixes ticket:48, repeated writes munging text content
* Fixes ticket:46, adding methods for accessing notation DTD information.
* Encodes some characters and removes a brokes link in the documentation
* Deals with carriage returns after XML declarations
* Improved doctype handling
* Whitespace handling changes
* Applies a patch by David Tardon, which (incidentally) fixes ticket:50
* Closes #26, allowing anything that walks like an IO to be a source.
* Ticket #31 - One unescape too many
  This wasn't really a bug, per se... "value" always returns
  a normalized string, and "value" is the method used to get
  the text() of an element.  However, entities have no meaning
  in CDATA sections, so there's no justification for value
  to be normalizing the content of CData objects.  This behavior
  has therefore been changed.
* Ticket #45 -- Now parses notation declarations in DTDs properly.
* Resolves ticket #49, Document.parse_stream returns ArgumentError
* Adds documentation to clarify how XMLDecl works, to avoid invalid bug reports.
* Addresses ticket #10, fixing the StreamParser API for DTDs.
* Fixes ticket #42, XPath node-set function 'name' fails with relative node
  set parameter
* Good patch by Aaron to fix ticket #53: REXML ignoring unbalanced tags
  at the end of a document.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-04-15 04:11:04 +00:00