# REXML Change Log

## 3.1.7 (1260)

### Since previous minor release (1260)

Executive Summary

2007-07-25T04:59:49.018991Z
1260

    Tagged for release 3.1.7

ser

### Since last major release (993)

Executive Summary

- Issue 14; 3.1.3: DTD events are now all being passed by StreamParser
- Issue #9; 3.1.3: The SAX parser was not denormalizing entity references in incoming text.
- Applied Curt Sampson's optimization improvements
- Fixed a buffering bug in Source.rb that affected the SAX parser
- Fixed a CDATA pretty-printing bug. (#39)

2007-07-25T04:59:49.018991Z
1260

    Tagged for release 3.1.7

ser
2007-07-25T00:16:50.050523Z
1259

    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).

    Addresses ticket:92.

ser
2007-07-25T00:06:01.118565Z
1258

    r1285@bean: ser | 2007-07-24 20:02:07 -0400
    And THIS goes with the previous two patches. Dammit.

ser
2007-07-24T23:57:32.165630Z
1257

    r1283@bean: ser | 2007-07-24 19:53:30 -0400
    This goes with the previous commit.

ser
2007-07-24T15:14:05.273151Z
1256

    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 )

ser
2007-06-10T03:28:56.429633Z
1255

    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.

ser
2007-02-19T13:04:19.216080Z
1251

    This doesn't work yet.

ser
2007-02-18T15:12:20.364999Z
1250

    * Adds :attribute_quoting to Element#context, allowing users to choose which

    character to use to quote attribute values.
    * Adds a REVISION attribute to the REXML object, for better version tracking
    * Cross-merges some changes from the other branch

ser
2006-12-04T01:41:11.734055Z
1245

    Documentation cleanup. Ticket:84

ser
2006-12-04T01:26:44.451203Z
1244

    Fixes ticket:80

ser
2006-12-04T00:13:32.366700Z
1243

    Adds a unit test for ticket:79

ser
2006-12-02T22:43:03.669731Z
1242

    A test to confirm that ticket:77 is closed.

ser
2006-12-01T02:08:56.110091Z
1241

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

ser
2006-11-27T01:53:43.470152Z
1239

    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.

ser
2006-11-27T01:11:11.144730Z
1238

    Put in a test for ticket:75, which I've been unable to duplicate.

ser
2006-11-27T01:03:53.140707Z
1237

    Fixes ticket:71

ser
2006-11-27T00:29:32.545575Z
1236

    Addresses ticket:66

ser
2006-11-27T00:14:01.675383Z
1235

    * 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

ser
2006-10-15T00:59:00.751739Z
1234

    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.

ser
2006-09-25T01:51:37.609266Z
1231

    Fixes a bug in multiple decodings

ser
2006-09-24T14:24:06.843099Z
1230

    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.

ser
2006-09-12T18:04:04.932255Z
1229

    Typo fix. Goes with

ser
2006-09-11T12:27:19.584811Z
1228

    This goes with ticket:68. Dammit.

ser
2006-09-11T12:26:04.975504Z
1227

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

ser
2006-09-11T12:17:38.806154Z
1226

    Fixes ticket:68.

    NOTE that this involves an API change! Entity declarations in the doctype now
    generate events that carry two, not one, arguments.

ser
2006-09-08T01:42:33.283788Z
1222

    Cross-patch from Ruby CVS; mostly Nabu edits.

ser
2006-09-08T00:55:52.702573Z
1221

    * Adds a data file for a unit test that got missed
    * Documentation updates

ser
2006-09-06T16:02:31.913561Z
1220

    Fixed a really old crusty string from when importing stylesheets from

ser
2006-09-06T12:44:44.127381Z
1216

    ticket:21: Improved the error message for missing attribute quotes. There's
    only so much we can do about this; if there's a missing or mismatched end
    quote, how would we know?

ser
2006-09-06T12:28:03.161247Z
1215

    Added a test to confirm ticket:76 has been resolved

ser
2006-09-06T12:23:42.471067Z
1214

    Added unit test confirming ticket:57 has been fixed.

ser
2006-09-06T12:01:48.023255Z
1211

    Changes some namespace logic. This is related to ticket:51.

    If a namespace mapping is provided (during the call to match() or first()),
    then this overrides the default nodal namespace mapping.

ser
2006-09-06T02:08:21.235649Z
1210

    Added some unit tests for ticket:51. These will fail.

ser
2006-09-04T02:54:51.849384Z
1209

    Another bit for ticket:52

ser
2006-09-04T02:51:31.506426Z
1208

    Fix for ticket:52, spurious newlines added to comments.

ser
2006-09-04T02:40:40.163835Z
1207

    Unit tests to confirm ticket:43 fixed

ser
2006-09-04T02:39:23.201897Z
1206

    Unit tests added to confirm ticket:36

ser
2006-09-03T11:54:56.151041Z
1205

    Resolves ticket:70. The root cause of this was the conversion of literals to
    numbers and back to strings.

ser
2006-08-06T00:45:31.945955Z
1204

    Unit test for feature request #16.

ser
2006-08-06T00:44:02.009549Z
1203

    Implements feature request #16.

ser
2006-06-25T13:06:02.394286Z
1200

    Adds a unit test specifically for ticket:60.

ser
2006-06-25T13:03:01.475668Z
1199

    Fix for ticket:60, Functions::number not working correctly. The fix was provide
    by Alex LeDonne, and included an excellent unit test. Alex's fix also fixes an
    unfiled bug about number() not handling negative numbers.

ser
2006-04-13T02:09:52.524463Z
1193

    Version bump

ser
2006-04-13T01:46:32.499753Z
1192

    Adds a regression test for ticket #56, which was fixed
    in an earlier, unidentified, commit.

ser
2006-04-08T21:23:17.700522Z
1191

    Good patch by Aaron to fix ticket #53: REXML ignoring unbalanced tags
    at the end of a document.

ser
2006-04-08T21:15:40.226592Z
1190

    Various fixes to recent (unreleased) regressions

ser
2006-04-08T20:34:08.102078Z
1189

    Fixes ticket #42

ser
2006-04-08T19:39:23.923254Z
1188

    Adds a unit test for ticket #39. I don't know which changeset addressed this
    issue.

ser
2006-04-08T13:43:32.199960Z
1187

    Adds a test to confirm that ticket #12 has been fixed

ser
2006-04-08T12:29:31.012148Z
1186

    Added the Jaxen test suite, contributed by Ryan Cox. Some rewriting was

    necessary to merge it into the test framework, but most of the effort was
    contributed.

ser
2006-04-08T02:04:08.430335Z
1185

    Formatting changes

ser
2006-04-08T01:56:04.270707Z
1184

    Addresses ticket #10, fixing the StreamParser API for DTDs.

ser
2006-04-05T02:33:53.981987Z
1183

    Re-enables a SAX test, and adds a new one.

ser
2006-04-01T16:40:13.309837Z
1182

    Adds a test for ticket#58 and some documentation to clarify how XMLDecl
    works, to avoid invalid bug reports.

ser
2006-03-31T01:47:39.485593Z
1180

    Resolves ticket #49

2006-03-30T01:40:40.987466Z
1178

    Ticket #45
    Now parses notation declarations in DTDs properly.

2006-03-27T01:13:06.879878Z
1177

    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.

2006-03-26T20:03:24.522505Z
1176

    Renamed some unit tests to make them easier to identify and get at.

2006-03-26T20:02:44.964927Z
1175

    This test included a big XML file, which has been compressed.

2006-03-26T19:58:15.853349Z
1174

    Closes #26, allowing anything that walks like an IO
    to be a source.

2006-03-26T14:55:20.223768Z
1173

    Applies a patch by David Tardon, which (incidentally) fixes

2006-03-26T13:42:14.495787Z
1164

    Whitespace changes

2006-03-02T11:49:52.861863Z
1160

    Improved doctype handling

    This undoes the patch for issue:48, and fixes it with cleaner whitespace
    handling outside of the document context. The issue was that REXML was
    stripping out and ignoring whitespace, which made it difficult to preserve
    the structure of the document. This fixes that.

    I'm not sure that this had anything to do with issue:48, but I was unable
    to repeat the errors from issue:48, and it may be that, because of the
    alternate encoding and ISO-9660-3 characters, the XML declaration was being
    lost on repeated reads.

2006-02-20T00:03:37.392049Z
1159

    Merged encoding changes from CVS. Need to verify this,
    as it may be causing problems.

2006-02-19T23:12:24.006206Z
1158

    Deals with carriage returns after XML

2006-02-19T22:25:49.832791Z
1157

    This patch goes with

2006-02-19T22:19:20.651308Z
1156

    Encodes some characters and removes a brokes link in the

2006-02-19T22:00:14.024007Z
1155

    Fixes issue:46, adding methods for accessing notation DTD

2006-02-19T21:57:39.908513Z
1154

    Fixes issue:48, repeated writes munging text

2005-11-30T11:32:49.783223Z
1146

    * Moves parser.source.position() to parser.position()
    * Improves the build script (less work for me to package a distribution)

2005-11-25T15:58:20.378732Z
1145

    * Resolves issue #34

2005-11-23T00:20:15.718670Z
1144

    * 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.
    * Minor, yet incomplete, documentation changes. Again, these are in this patch
    because of Subversion's glaring lack of block-level commits.
    * I forgot to add the unit tests that I promised in the previous patch for
    issue #32.

2005-11-22T23:58:33.692070Z
1143

    * Merges a user-contributed patch for issue #40
    * Adds a forgotten-to-commit unit test for issue #32

2005-11-21T13:28:12.652058Z
1142

    * Fixes ticket #32

2005-11-21T00:33:11.032371Z
1141

    * Fixes typo from previous commit

2005-11-19T17:50:52.118971Z
1140

    * Aliases #size to #length, as per zdennis's request.

2005-09-11T01:32:31.851186Z
1139

    Fixes ticket:30, XPath default namespace bug. The fix was provided
    by Lucas Nussbaum.

2005-08-19T01:44:39.863445Z
1138

    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 issue... but in the meantime, the patch
    has been applied.

2005-08-19T01:40:12.103913Z
1137

    Fixed issue44, Element#xpath

2005-08-15T12:17:37.319723Z
1136

    Fixes roundup issue 43: substring-after bug.
    See: http://www.germane-software.com/cgi-bin/roundup/rexml/issue43

2005-08-14T14:24:31.164797Z
1135

    * More XPath ordering testing added
    * Fixed the documentation WRT the raw mode of text nodes (ticket:4)

2005-08-12T11:36:28.774016Z
1132

    Cross ported fix from CVS

ser
2005-08-12T11:24:28.337294Z
1129

    Version bump. File renaming.

ser
2005-08-12T10:56:28.272296Z
1127

    Fixed a couple of bugs in the SAX2 parser, plus a bunch of other changes I don't remember.

ser
2005-06-11T17:36:09.546977Z
1126

    Fixes ticket:3 (Issue38 in Roundup.)
    However, this needs further testing.

ser
2005-06-11T01:54:37.318355Z
1125

    require

ser
2005-06-11T01:15:21.785671Z
1124

    Fixes

ser
2005-05-25T11:35:11.210717Z
1109

    Wasn't including Text class.

ser
2005-05-19T02:29:10.787521Z
1105

    Backed out the patch that changed the versions

ser
2005-05-19T02:26:47.065701Z
1104

    * Changes by Matz, mostly of indent -> indent_level, to avoid
    function/variable naming conflicts
    * Tabs -> spaces (whitespace)

ser
2005-05-18T11:50:12.534456Z
1103

    Indentation changes, and changed some exceptions to runtime
    exceptions.

ser
2005-05-18T11:41:27.534993Z
1102

    Fixed the inheritance bug in the pull parser that James Britt found.

ser
2005-04-09T17:23:35.672657Z
1091

    Applied Nobu's changes to the Encoding infrastructure, which should fix

    potential threading issues.

    Added more tests, and the missing syncenumerator class.

ser
2005-04-09T15:51:57.235958Z
1090

    Uncommented some code commented for testing

ser
2005-04-09T15:50:53.650688Z
1089

    * Fixed preceding:: and following:: axis
    * Fixed the ordering bug that Martin Fowler reported.

ser
2005-03-13T12:21:57.957932Z
1083

    Merged the changes in from branches/xpath_V

ser
2005-01-30T22:03:06.882278Z
1069

    Added Michael's sample code.

ser
2005-01-30T21:57:04.178614Z
1068

    Added functions courtesy of Michael Neumann <mneumann@xxxx.de>.
    Example code to follow.

ser
2004-09-23T02:12:28.082494Z
1038

    Fixed a broken link. Thanks to Dick Davies for pointing it out.

ser
2004-08-16T13:08:40.534233Z
1034

    * #29: XPath ordering bug fixed by Mark Williams. Incidentally, Mark supplied
    a superlative bug report, including a full unit test. Then he went ahead and
    fixed the bug. It doesn't get any better than this, folks.

ser
2004-08-15T14:19:20.633312Z
1033

    * #26: Element#add_element(nil) now raises an error
    * Changed XPath searches so that if a non-Hash is passed, an error is raised
    * Fixed a spurrious undefined method error in encoding.

ser
2004-07-19T12:53:04.324614Z
1032

    Some of the DTD events were not being passed through by the stream parser.

ser
2004-07-19T12:39:35.385978Z
1031

    Setting bin apps to executable

ser
2004-07-19T12:38:55.161177Z
1030

    bin/* programs should now be executable.

ser
2004-07-19T12:29:40.641669Z
1029

    All declared internal entities, as well as numeric entities,
    should now be denormalized. There was a related bug in that the SAX parser
    was actually double-encoding entities; this is also fixed.

ser
2004-07-18T13:06:18.153461Z
1028

    * Minor pretty printing fix.

ser
2004-07-18T13:04:13.752351Z
1027

    The unit test for the previous patch. Forgot to commit it.

ser
2004-07-18T13:03:02.594252Z
1026

    This bug was related to how REXML determines the encoding of a file, and
    evinced itself by hanging on input when using the SAX parser.

ser
2004-07-18T12:18:36.897360Z
1025

ser
2004-07-03T14:22:08.011608Z
1024

    * Previous fix, (include? -> includes?) was incorrect.
    * Added another test for encoding
    * Started AnyName support in RelaxNG
    * Added Element#Attributes#to_a, so that it does something intelligent.
    This was needed by XPath, for '@*'
    * Fixed XPath so that @* works.
    * Added xmlgrep to the bin/ directory. A little tool allowing you to grep
    for XPaths in an XML document.

ser
2004-07-03T12:57:34.521851Z
1023

    * Fixed bug #34, typo in xpath_parser.

ser
2004-06-20T15:40:30.856904Z
1014

    * Minor big in missing includes for validation rules

ser
2004-06-20T15:20:07.842721Z
1011

    * Removed debugging output from unit test
    * Moved ">" in Element.inspect

ser
2004-06-20T15:02:55.619540Z
1009

    * Redesigned and rewrote the RelaxNG code. It isn't elegant, but it works.
    Particular problems encountered were interleave and ref. Interleave means I
    can't use a clean FSM design, and ref means the dirty FSM design has to be
     modified
    during validation. There's a lot of code that could be cleaned up in here.
    However, I'm pretty sure that this design is reasonably fast and space
     efficient.
    I'm not entirely convinced that it is correct; more tests are required.
    * This version adds support for defines and refs.

ser
2004-06-10T19:28:15.779019Z
1008

    PREPARES FOR DEF/REF. REMOVEABLE

ser
2004-06-09T12:16:45.939471Z
1007

    I forgot to add Kou's tests for the preceding-sibling patch.

ser
2004-06-09T12:12:35.848721Z
1006

    * Applied Kou's preceding-sibling patch, which fixes the order of the axe results

ser
2004-06-09T12:01:33.636821Z
1005

    * Added Kou's patch to normalize attribute values passed through the SAX2 and
    Stream parsers.

ser
2004-06-09T11:24:17.425158Z
1004

    * Added suppert for mixed

ser
2004-06-09T02:24:08.127284Z
1003

    * Entirely rewrote the validation code; the finite state machine, while cool,
    didn't survive the encounter with Interleave. It was getting sort of hacky,
    too. The new mechanism is less elegant, but is basically still a FSM, and is
    more flexible without having to add hacks to extend it. Large chunks of the
    FSM may be reusable in other validation mechanisms.
    * Added interleave support

ser
2004-06-07T11:45:53.976376Z
1002

    Workin' in the coal mine, goin' down, down, down...

ser
2004-06-06T18:28:44.302708Z
1000

    Version bump

ser
2004-06-06T18:27:02.044444Z
999

    * Added support for <value>

ser
2004-06-06T17:10:18.133005Z
998

    * Fixed a bunch of cases
    * Added support for <group>

ser
2004-06-05T12:37:10.866629Z
997

    * Fixed text in choices. This change improves handling of all events that occur

    without an end step (which is most of them).

ser
2004-06-05T12:03:52.449317Z
996

    Validation improvements:
    * Fixed text
    * Fixed attributes in choices

ser
2004-06-05T11:06:18.909949Z
995

    * XPath wasn't parsing ")" correctly.

ser
2004-06-05T03:23:25.014452Z
994

    Improved support for converting XPaths to strings.

ser