REXML - Change Log

# Change Log

#### 2.3.6

- 2.3.6:
  - attribute::* and @* now works
  - If node()[@x] matched a non-Element node, XPath would throw an exception.
  - Upgraded the install.rb file; fixed a couple of bugs, added redirection and a --noop mode. This was for Portage support.
- 2.3.5:
  - Fixed a bug that caused text containing > to be split into two text nodes. This incurred a speed penalty, but I'll try to improve that later.
  - Added a bug tracking system.
  - Fixed a comment parsing bug.
  - Mike Stok fixed Functions#translate and cleaned up some cruft that slipped through in Functions#substring.
  - Fixed a bug in Element#prefixes, and fixed Attributes#prefixes to use DOCTYPE declared namespaces. Added DocType#attributes_of(Element).
  - Fixed a bug in writing Attlist declarations.
  - Added AttlistDecl#each; AttlistDecl now includes Enumerable
  - Fixed Functions#name and Functions#local_name; fixed unit test.
  - Fixed a bug re. functions w/in predicates in XPath
  - Fixes for Child#parent=()
  - Fixes and speed improvement for creating Text nodes
  - SAX2Parser bug fixes
  - Added dist.xml and an ant build file
  - Tom sent a new version of his pretty printer
  - Kouhei has a new version of his Japanese API documentation translation online
- 2.3.4: Fixed a bug in XPath that kept non-Element nodes from being returned from recursive paths. This had a side effect of speeding up XPath recursions. Fixed a bug in Document WRT text outside of the document. Added peek and unshift methods to the PullParser API. XPath methods now accept an array of nodes in addition to a single node. Fixed a bug in Functions::string(). Changed the unit tests to the Test::Unit platform. This allows the unit tests to be run under a GUI. More Function fixes (substring) by Mike Stok. There was a major bug in XPath handling of math operations, which is fixed. Strings pulled from IO streams are now tainted. Lots of bug fixes in PullParser -- it now passes 100% of the Oasis tests. Bug fix for stream parsing in Entity. Bug fixes in DocType -- SAX2Parser now passes 100% of Oasis tests. REXML now processes internal ATTLIST declarations in the doctype. This includes processing of XML namespaces in the doctype. Changed pretty printing. Whitespace is now never added around Text nodes, and there's a new context property, :ignore_whitespace_nodes. There's also a new transitive pretty printer, obtained by passing 'true' as the third argument to write().
- 2.3.3: Added an alternate pretty printer by Thomas Sawyer; it is in the contrib/ directory. Speed optimizations; REXML is noticably faster now. In particular, PullParser is now just as fast as Stream parsing (10x speed increase over first version). Fixed a bug in Element.add_namespace. Fixed a problem that occurred on some systems with Entities. News: Kouhei Sutou has done a Japanese translation of the REXML API docs. See the section in the main REXML page about the API documentation for links. Mike Stock fixed a bug in the starts_with XPath function. Added, on request, methods to Element to filter children on type. cdatas(), instructions(), comments(), and texts() now return immutable arrays of only those child nodes.
- 2.3.2: Added a (more or less) SAX2 conforming parser. Really, this and the pull parser are just a thin layer over the legacy REXML stream parser, and you'll get better results with the original API. The best thing about this (and the primary reason I did it this way) is that REXML maintains backward compatibility with the old Stream API. After I play with pure pull parsing some more, I may decide to reimplement stream parsing on top of pull parsing, but it shouldn't affect SAX2 in any way. The SAX2 parser is slower primarily because SAX2 requires the parser to do a lot more work -- resolving namespaces and so on -- so while I know I can improve the speed some, SAX2 will never be as fast as REXML vanilla stream parsing. That said, the SAX2 API is pretty nice, and includes all of those stream API changes I wanted to get in, except for filter parsing. Check out the tutorial for usage information.
- 2.3.1: Added a pull parser. This is VERY experimental, and the API is likely to change.
- 2.3.0: Internal entities are now handled10. Speed has been further improved for most operations, but especially for stream parsing, writing, and large document parsing.
- 2.2.1: Fixed a bug in benchmark/bench.rb that kept it from running. Added stand_alone?() to XMLDecl as an alias for the standalone accessor. Improvements to the streaming API; in particular, pulling data from non-closing streams doesn't require passing a block size of 1 to the IOSource class any longer; in fact, the block size is ignored. Added a user-supplied patch to fix the fact that not all of the DTD events were getting passed to the listener. Improved entity parsing. Better test suite; you can now pass `--help` to the main test suite to get a list of the new options, which include listing the available suites and listing methods in the suites, as well as instructions on how to run only certain suites or methods in suites.
- 2.1.3: Fixed broken links in documentation. Added new documentation layout; the old format -- everything on one page -- was getting a bit overwhelming. Added RSS for changelog. Bugfix for element cloning namespace loss. The Streaming API wasn't normalizing input strings; this has been fixed. Added support for deep cloning via Parent.deep_clone(). Fixed some streaming issues for SOAP4RUBY. In particular, text normalization is now also done for the Streaming API. '\r' handling is now correct, as per the XML spec, and entities are handled better. &#13; is now converted to '\r' internally, and then translated back to '\r' on output. All other numeric entities (&#nnn; and &#xnnn;) are now converted to unicode on input, but are only converted back to entities if they don't fit in the requested encoding.
- 2.1.2: Fixed a bug with reading ISO-8859-1 encoded documents, and Document now includes Output, which it always should have.
- 2.1.1: Forgot to add output.rb to the repository.
- 2.1.0: IO optimizations, and support for ISO-8859-1 output. Fixed up pretty-printing a little. Now, if pretty-printing is turned on, text nodes are stripped before printing. This, obviously, can mess up what you'd expect from :respect_whitespace, but pretty printing, by definition, must change your formatting. Updated the tutorial a bit. Please see the section on adding text for a warning, if you're using a non-UTF-8 compatable encoding. Changed behavior of `Element.attributes.each`. It now itterates over key, value pairs, rather than attributes. This was a feature request. Expanded the unit tests and subsequently fixed a number of obscure bugs. I'm distributing the API documentation seperately from the main distribution now, because the API docs constitute nearly 50% of the total distribution size. FIxed a bug in namespace handling in attributes. Completely updated the API documentation for Element, Element.Elements, and Element.Attributes; the rest of the classes to follow. I'm seriously contemplating removing the examples from the API documentation, because most of them are practically duplicates of the unit tests in `test/`.
- 2.0.4: 2.0 munged the encoding value in output. This is fixed. I left debugging turned on in XPath in 2.0.2 :-/
- 2.0.2: Added grouping '(...)' and preceding:: and following:: axis. This means that, aside from functional bugs, XPath should have no missing functionality bugs. Keep in mind that not all Functions are tested, though.
- 2.0.1: Added some unit tests, and fixed a namespace XPath bug WRT attribute default NS's. Unicode support was screwing up the upper end of ASCII support; chars between 0xF0 and 0xFD were getting munged. This has been fixed, at the cost of a small amount of speed. Optimized the descendant axes of XPath; it should be significantly faster for '//' and other descendant operations. Added several user contributed unit tests. Re-added QuickPath, the old, non-fully-XPath compliant, yet much faster, XPath processor. Everything is being converted to UTF8 now, and the XML declaration reflects this. See the bugs for more information.
- 2.0: True XPath support. Finally. XPath is fully implemented now, and passes all of the tests I can throw at it, including complex XPaths such as `'*[* and not(*/node()) and not(*[not(@style)]) and not(*/@style != */@style)]'`. It may be slower than it was, but it should be reasonably efficient for what it is doing. The XPath spec doesn't help, and thwarts most attempts at optimization. Please see the notes on XPath for more information. Oh, and some minor bugs were fixed in the XML parser.
- 1.2.8: Fixed a bug pointed out by Peter Verhage where the element names weren't being properly parsed if a namespace was involved.
- 1.2.7: Fixing problems with the 1.2.6 distribution :-/. Added an "applications using REXML" section in this document -- send me those links! Added rdoc documentation. I'm not using API2XML anymore. I think API2XML was the right model, generating XML rather than HTML (which is what rdoc does), but rdoc does a much better job at parsing Ruby source, and I really didn't want to go there in the first place. Also, I had forgotten to generate the Tutorial HTML.
- 1.2.6: Documentation fix (TR). Fixed a bug in Element.add (and, therefore, Element.add_element). Added Robert Feldt's terse xml constructor to contrib/ (check it out; it's handy). Tobias discovered a terrible bug, whereby ENTITY wasn't printing out a final '>'. After a long discussion with a couple of users, and some review of the XML spec, I decided to reverse the default handling of whitespace and pretty printing. REXML now no longer defaults to pretty printing, and preserves whitespace unless otherwise directed. Added provisional namespace support to XPath. XPath is going to require another rewrite.
- 1.2.5: Bug fixes: doctypes that had spaces between the closing ] and > generated errors. There was a small bug that caused too many newlines to be generated in some output. Eelis van der Weegen (what a great name!) pointed out one of the numerous API errors. Julian requested that add_attributes take both Hash (original) and array of arrays (as produced by StreamListener). I killed the mailing list, accidentally, and fixed it again. Fixed a bug in next_sibling, caused by a combination of mixing overriding <=>() and using Array.index().
- 1.2.4: Changes since 1.1b: 100% OASIS valid tests passed. UTF-8/16 support. Many bug fixes. to_a() added to Parent and Element.elements. Updated tutorial. Added variable IOSource buffer size, for stream parsing. delete() now fails silently rather than throwing an exception if it can't find the elemnt to delete. Added a patch to support REXMLBuilder. Reorganized file layout in distribution; added a repackaging program; added the logo.
- 1.1b: Changes since 1.1a: Stream parsing added. Bug fixes in entity parsing. New XPath implementation, fixing many bugs and making feature complete. Completed whitespace handling, adding much functionality and fixing several bugs. Added convenience methods for inserting elememnts. Improved error reporting. Fixed attribute content to correctly handle quotes and apostrophes. Added mechanisms for handling raw text. Cleaned up utility programs (profile.rb, comparison.rb, etc.). Improved speed a little. Brought REXML up to 98.9% OASIS valid source compliance.

10) Please note that entity handling complicates text manipulation. See the note in the tutorial