libxml-ruby 5.0.6 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/{HISTORY → CHANGELOG.md} +875 -930
  3. data/LICENSE +20 -20
  4. data/README.md +67 -0
  5. data/Rakefile +13 -34
  6. data/ext/libxml/extconf.rb +34 -20
  7. data/ext/libxml/libxml.c +2 -14
  8. data/ext/libxml/ruby_libxml.h +1 -1
  9. data/ext/libxml/ruby_xml_attr.c +27 -22
  10. data/ext/libxml/ruby_xml_attr.h +1 -0
  11. data/ext/libxml/ruby_xml_attr_decl.c +19 -12
  12. data/ext/libxml/ruby_xml_attributes.c +18 -9
  13. data/ext/libxml/ruby_xml_document.c +111 -98
  14. data/ext/libxml/ruby_xml_document.h +1 -0
  15. data/ext/libxml/ruby_xml_dtd.c +49 -19
  16. data/ext/libxml/ruby_xml_dtd.h +1 -0
  17. data/ext/libxml/ruby_xml_html_parser.c +1 -1
  18. data/ext/libxml/ruby_xml_html_parser_context.c +19 -6
  19. data/ext/libxml/ruby_xml_html_parser_context.h +1 -0
  20. data/ext/libxml/ruby_xml_input_cbg.c +45 -17
  21. data/ext/libxml/ruby_xml_io.c +3 -1
  22. data/ext/libxml/ruby_xml_namespace.c +20 -12
  23. data/ext/libxml/ruby_xml_namespace.h +1 -0
  24. data/ext/libxml/ruby_xml_namespaces.c +40 -20
  25. data/ext/libxml/ruby_xml_node.c +71 -32
  26. data/ext/libxml/ruby_xml_node.h +2 -0
  27. data/ext/libxml/ruby_xml_parser.c +1 -1
  28. data/ext/libxml/ruby_xml_parser_context.c +54 -47
  29. data/ext/libxml/ruby_xml_parser_context.h +1 -0
  30. data/ext/libxml/ruby_xml_reader.c +25 -15
  31. data/ext/libxml/ruby_xml_registry.c +31 -0
  32. data/ext/libxml/ruby_xml_registry.h +22 -0
  33. data/ext/libxml/ruby_xml_relaxng.c +21 -5
  34. data/ext/libxml/ruby_xml_relaxng.h +1 -0
  35. data/ext/libxml/ruby_xml_sax_parser.c +1 -1
  36. data/ext/libxml/ruby_xml_schema.c +18 -11
  37. data/ext/libxml/ruby_xml_schema.h +1 -0
  38. data/ext/libxml/ruby_xml_schema_attribute.c +7 -7
  39. data/ext/libxml/ruby_xml_schema_element.c +8 -8
  40. data/ext/libxml/ruby_xml_schema_facet.c +7 -7
  41. data/ext/libxml/ruby_xml_schema_type.c +12 -19
  42. data/ext/libxml/ruby_xml_version.h +4 -4
  43. data/ext/libxml/ruby_xml_writer.c +18 -6
  44. data/ext/libxml/ruby_xml_xpath.c +2 -2
  45. data/ext/libxml/ruby_xml_xpath.h +1 -1
  46. data/ext/libxml/ruby_xml_xpath_context.c +72 -26
  47. data/ext/libxml/ruby_xml_xpath_expression.c +11 -5
  48. data/ext/libxml/ruby_xml_xpath_expression.h +1 -0
  49. data/ext/libxml/ruby_xml_xpath_object.c +69 -54
  50. data/ext/libxml/ruby_xml_xpath_object.h +3 -1
  51. data/ext/vc/libxml_ruby/libxml_ruby.vcxproj +271 -0
  52. data/ext/xcode/libxml-ruby.xcodeproj/project.pbxproj +633 -0
  53. data/ext/xcode/libxml-ruby.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  54. data/ext/xcode/libxml-ruby.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  55. data/ext/xcode/libxml-ruby.xcodeproj/xcshareddata/xcschemes/libxml-ruby.xcscheme +80 -0
  56. data/lib/libxml/document.rb +0 -29
  57. data/lib/libxml/error.rb +30 -3
  58. data/lib/libxml/html_parser.rb +0 -16
  59. data/lib/libxml/node.rb +1 -3
  60. data/lib/libxml/parser.rb +0 -8
  61. data/lib/libxml/schema/attribute.rb +27 -19
  62. data/lib/libxml/schema/element.rb +20 -0
  63. data/lib/libxml/schema/type.rb +44 -21
  64. data/lib/libxml/schema.rb +47 -47
  65. data/lib/libxml-ruby.rb +30 -30
  66. data/libxml-ruby.gemspec +12 -16
  67. data/test/c14n/result/1-1-without-comments/example-1 +3 -3
  68. data/test/c14n/result/1-1-without-comments/example-2 +10 -10
  69. data/test/c14n/result/1-1-without-comments/example-3 +13 -13
  70. data/test/c14n/result/1-1-without-comments/example-4 +8 -8
  71. data/test/c14n/result/1-1-without-comments/example-5 +2 -2
  72. data/test/c14n/result/with-comments/example-1 +5 -5
  73. data/test/c14n/result/with-comments/example-2 +10 -10
  74. data/test/c14n/result/with-comments/example-3 +13 -13
  75. data/test/c14n/result/with-comments/example-4 +8 -8
  76. data/test/c14n/result/with-comments/example-5 +3 -3
  77. data/test/c14n/result/without-comments/example-1 +3 -3
  78. data/test/c14n/result/without-comments/example-2 +10 -10
  79. data/test/c14n/result/without-comments/example-3 +13 -13
  80. data/test/c14n/result/without-comments/example-4 +8 -8
  81. data/test/c14n/result/without-comments/example-5 +2 -2
  82. data/test/test_attr.rb +179 -180
  83. data/test/test_attr_decl.rb +131 -131
  84. data/test/test_attributes.rb +135 -135
  85. data/test/test_canonicalize.rb +122 -120
  86. data/test/test_document.rb +2 -4
  87. data/test/test_dtd.rb +12 -4
  88. data/test/test_encoding_sax.rb +114 -114
  89. data/test/test_error.rb +1 -1
  90. data/test/test_html_parser.rb +6 -2
  91. data/test/test_html_parser_context.rb +22 -22
  92. data/test/test_input_callbacks.rb +36 -0
  93. data/test/test_namespace.rb +1 -1
  94. data/test/test_namespaces.rb +200 -200
  95. data/test/test_node.rb +16 -0
  96. data/test/test_node_cdata.rb +50 -50
  97. data/test/test_node_comment.rb +32 -32
  98. data/test/test_node_copy.rb +40 -40
  99. data/test/test_node_edit.rb +176 -158
  100. data/test/test_node_pi.rb +37 -37
  101. data/test/test_node_text.rb +69 -69
  102. data/test/test_node_xlink.rb +28 -28
  103. data/test/test_parser.rb +5 -41
  104. data/test/test_parser_context.rb +198 -198
  105. data/test/test_properties.rb +38 -38
  106. data/test/test_reader.rb +55 -6
  107. data/test/test_relaxng.rb +59 -53
  108. data/test/test_sax_parser.rb +345 -345
  109. data/test/test_schema.rb +28 -0
  110. data/test/test_traversal.rb +152 -152
  111. data/test/test_writer.rb +0 -31
  112. data/test/test_xinclude.rb +20 -20
  113. data/test/test_xml.rb +3 -7
  114. data/test/test_xpath.rb +244 -244
  115. data/test/test_xpath_context.rb +87 -87
  116. data/test/test_xpath_expression.rb +37 -37
  117. metadata +32 -25
  118. data/README.rdoc +0 -208
  119. data/ext/libxml/extconf.h +0 -4
  120. data/ext/libxml/ruby_xml_cbg.c +0 -85
  121. data/lib/libxml/hpricot.rb +0 -78
  122. data/lib/libxml.rb +0 -5
  123. data/lib/xml/libxml.rb +0 -10
  124. data/lib/xml.rb +0 -14
  125. data/script/benchmark/depixelate +0 -634
  126. data/script/benchmark/hamlet.xml +0 -9055
  127. data/script/benchmark/parsecount +0 -170
  128. data/script/benchmark/sock_entries.xml +0 -507
  129. data/script/benchmark/throughput +0 -41
  130. data/script/test +0 -6
  131. data/test/test_deprecated_require.rb +0 -12
@@ -1,930 +1,875 @@
1
- = Release History
2
-
3
- == 5.0.6 / 2026-04-03
4
- * Test fix - Make the memory leak test threshold more generous to avoid false positives
5
- * Test fix - Call get_handler on Error class instead of module
6
- * Fix XML::Writer.string buffer leak
7
- * Update assertion to comply with minitest deprecations
8
- * Allow libdir to match Rubies with double digit patch numbers
9
-
10
- == 5.0.5 / 2025-07-30
11
- * Try to fix broken documentation link in Ruby Gems website
12
- * Update history file
13
-
14
- == 5.0.4 / 2025-05-12
15
-
16
- * Fix line ending inconsistencies across platforms
17
- * Set Git attributes for source files to keep LF line endings.
18
- * Add optional zlib support detection in extconf
19
-
20
- == 5.0.3 / 2024-03-12
21
-
22
- * Fix compiling against newer libxml versions
23
- * Fix version check
24
-
25
- == 5.0.2 / 2024-01-08
26
-
27
- * Fix broken DTD creation (DTD name is not required)
28
-
29
- == 5.0.1 / 2024-01-08
30
-
31
- * Fix broken Document#io method that was broken by switching Parsers to use keyword arguments
32
-
33
- == 5.0.0 / 2024-01-07
34
-
35
- * This release is major version bump because it removes access to global parser options
36
- that libxml2 version 2.12.0 deprecated (see https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.0)
37
- In the unlikely event your code uses these options, then you will need to update it.
38
- Specifically, instead of setting global parser options, pass them directly to either Parsers
39
- or ParserContexts when creating them. Options are defined as constants in
40
- LibXML::XML::Parser::Options and LibXML::HTML::Parser::Options
41
- * Update Parser initialize methods to take keyword parameters instead of a hash table (you may have to update your code due to this change)
42
- * Fix broken compilation with libxml2 version 2.12.0 (due to libxml2 header changes)
43
- * Add support for Ruby 3.3.*
44
- * Remove support for Ruby 2.7.* (gem should still work but is no longer tested)
45
-
46
- == 4.1.2 / 2023-11-04
47
-
48
- * Fix Ruby warnings about undefined allocators (yuuji.yaginuma, Christopher Sahnwaldt)
49
- * Fix Schema::Element required? and array? (John Andrews)
50
- * Remove SchemaElement#minOccurs and SchemaElement#maxOccurs since they actually did not work (Charlie Savage)
51
- * Fix typo: XPatch -> XPath (Christopher Sahnwaldt)
52
- * Introduce new alternative Homebrew installation search paths to extconf makefile (Pierce Brooks)
53
-
54
- == 4.1.1 / 2023-05-01
55
-
56
- * Fix compile warning (or error) for input_callbacks_register_input_callbacks (Charlie Savage)
57
- * Remove call to deprecated function htmlDefaultSAXHandlerInit (Charlie Savage)
58
-
59
- == 4.1.0 / 2023-04-30
60
-
61
- * Fix compile warning (or error) for rxml_encoding_to_rb_encoding (Charlie Savage)
62
- * Breaking - Remove LibXML::XML.features since its uses functionality deprecated in LibXML (Charlie Savage)
63
-
64
- == 4.0.0 / 2022-12-28
65
-
66
- * Breaking - Remove support for XPointer since libxml2 has deprecated it and will remove it (Charlie Savage)
67
- * Breaking - Remove support for ancient setup.rb script (Charlie Savage)
68
-
69
- == 3.2.4 / 2022-10-29
70
-
71
- * Support libxml2 version 2.10.2 (Charlie Savage)
72
- * Reduce number of globally included C header files (Charlie Savage)
73
-
74
- == 3.2.3 / 2022-05-22
75
-
76
- * Change some getter methods to instance variables with attr_accessors for easier debuggability (David Hansen)
77
- * Add a number of tests related to schemas (David Hansen)
78
- * Add schema.imported_elements so we can find imported elements (David Hansen)
79
- * Fix segfault under windows when dereferencing a pre-existing error where the node has already been freed (David Hansen)
80
- * Update to change name from imported_elements to imported_ns_elements and return a hash of hashes for namespaced elements (David Hansen)
81
- * Only call xmlGetFeaturesList if LIBXML_LEGACY_ENABLED is defined. Most distros still ship libxml2 with legacy features enabled, but this will change (Nick Wellnhofer)
82
- * Update GitHub Actions to use ruby/setup-ruby (Greg)
83
- * Fix memory leak in rxml_node_path, node.path (vovanmozg)
84
-
85
- == 3.2.2 / 2022-01-15
86
- * Switch to Github actions for CI/CD (Greg)
87
- * Test fixes (Greg, Sergio Durigan Junior)
88
- * Fix typo on test/test_sax_parser.rb (Sergio Durigan Junior)
89
- * Update homepage in gemspec (Pirate Praveen Arimbrathodiyil)
90
-
91
- == 3.2.1 / 2020-11-05
92
-
93
- * Fix incorrect handling of encodings when using XMLWriter.io (Charlie Savage)
94
- * Clean up README (Richard Michael)
95
-
96
- == 3.2.0 / 2020-05-09 Charlie Savage
97
-
98
- * Fix crash when creating an empty DTD
99
- * Modernize tests to use Bundler to load gem
100
- * Add libxml-ruby.rb file so gem loads in expected way.
101
- * Add support for xmlSaveNoEmptyTags.
102
- * Clean up extconf.rb file
103
-
104
- == 3.1.0 / 2018-02-03 Charlie Savage
105
-
106
- * Fix segmentation fault when adding one node to another node (Charlie Savage)
107
- * Fix deprecated "assert_equal(nil, expected)" calls. #148 and #151. (utilum)
108
- * Remove assigned but unused variables. #150 (utilum)
109
- * Add Gemfile. #146. (Dorian Marié)
110
- * Remove duplicate hash key in setup.rb. #147. (Dorian Marié)
111
- * Fix gemspec by requiring Date. #149 (utilum)
112
- * Restore default internal encoding after tests are completed. #123 (Charlie Savage)
113
- * Remove duplicate method definitions. #145. (Charlie Savage)
114
- * Remove SchemaElement#minOccurs and SchemaElement#maxOccurs since they actually did not work (Charlie Savage)
115
- * Rename test files to follow Ruby conventions (Charlie Savage)
116
- * Fix handling of node returned by Reader#expand. #142. (Charlie Savage)
117
- * Add Travis Build support (Charlie Savage)
118
- * Fix Fixnum deprecation (Charlie Savage)
119
- * Cleanup schema code (Charlie Savage)
120
- * Update Visual Studio project to 2017 (Charlie Savage)
121
-
122
- == 3.0.0 / 2017-02-07 Charlie Savage
123
-
124
- * Revamp how libxml-ruby manages memory. Instead of trying to return the same ruby object for each xmlnode,
125
- the bindings now create wrapper ruby objects as needed which are then freed at the end of use.
126
- This allows most memory management to be handled by libxml itself. Ruby only manages the lifespan of
127
- documents and parent xml nodes. When those go out of scope, the underlying libxml objects are also freed.
128
- This implementation requires almost no overhead, plays nicely with Nokogiri and appears to work much
129
- better (Charlie Savage).
130
-
131
- * Change XML::Node#eql? API. Nodes are now considered equal only if they wrap the same underlying
132
- libxml node. Previously, they would also be considered equal if they contained the same content
133
- (Charlie Savage)
134
-
135
- * Change XML::Reader.expand API. Previously it would automatically instantiate a reader document so
136
- the an xpath expression could be used to search the returned node. Now you should first call
137
- reader.doc (Charlie Savage)
138
-
139
- * Update Visual Studio project for Visual Studio 15 - requires ruby 2.4+ (Charlie Savage)
140
-
141
- * Remove APIs that have been deprecated for several years (Charlie Savage)
142
-
143
- == 2.9.0 / 2016-06-13 Charlie Savage
144
-
145
- * Revamp libxml-ruby's memory management to not cause crashes when used with Nokogiri (James Laird-Wah)
146
- * Fix garbage collection issue that sometimes caused the library to hang (Charlie Savage)
147
- * Improved multi-threading support (Charlie Savage)
148
- * Fix crash sometimes caused by a xml node being being freed twice (Charlie Savage)
149
- * Fix memory leak when setting the text content of a node (Charlie Savage)
150
- * Set a default task in the Rakefile - use "test" (Robert Haines)
151
- * Add "hanna_gudao" gem and add "rake-compiler" to develpoment dependencies (Robert Haines)
152
- * Use Process.getrlimit instead of `ulimit` in the tests (Robert Haines)
153
- * Build on smartos (Steven Williamson)
154
- * Fix compiler warnings (Charlie Savage)
155
- * Add Xcode project for easier debugging on OSX (Charlie Savage)
156
- * Switch from unit test to minitest (Charlie Savage)
157
-
158
- == 2.8.0 / 2015-01-09 Charlie Savage
159
-
160
- * Use RbConfig instead of Config in extconf.rb (Robert Haines)
161
- * Correct xpath documentation XML (Bill Mill)
162
- * Correct from_string method documentation (Bill Mill)
163
- * Fix compile error with debug not enabled in libxml (Patrick Ziegler)
164
- * Update gemspec to include license (Charlie Savage)
165
- * In XML::Writer prevent writing to io while being GCed (Brett Gibson)
166
-
167
- == 2.7.0 / 2013-08-13 Charlie Savage
168
-
169
- * Don't call rb_warning in GC mark function (Dirkjan Bussink)
170
- * Set libxml error handler when a libxml-ruby error handler is set (Geoffrey Giesemann)
171
- * Fix tests for nil TypeErrors for ruby 2.0=< (Geoffrey Giesemann)
172
- * Fix segmentation fault for issue #62 (Charlie Savage)
173
- * Add #node_type method to dtd (Charlie Savage)
174
- * Fixing equality check of LibXML::XML::Error against other objects (Michał Szajbe)
175
- * Fix #63, XML::Writer.set_quote_char UT, wrong expected string (julp)
176
- * Fix potential segfault when GC occurs while creating ns from xpath (Timothy Elliott)
177
- * Fix for #59, segmentation fault after failure to load external schema (Clifford Heath)
178
-
179
- == 2.6.0 / 2013-02-16 Charlie Savage
180
-
181
- * Fix uninitialized constant LibXML::XML::Error::I18N (NameError) that occurred
182
- with older versions of libxml.
183
- * Various updates/fixes to new XML::Writer class and update how flushing works (julp)
184
-
185
- == 2.5.0 / 2013-01-27 Charlie Savage
186
-
187
- * Compatibility with older versions for IO::write (rb_io_bufwrite is specific to ruby >= 1.9.3?)
188
- and symbols are VALUE not ID (julp).
189
- * Fix version for xmlTextWriterSetQuoteChar, it appeared in libxml2 2.9.0, last version (julp)
190
- * Update use of LIBXML_VERSION (julp).
191
- * Fix misuse of rb_scan_args (julp).
192
- * Update documentation, including DTD docs and added XML Writer (julp).
193
- * Added a new XML::Writer class (julp).
194
- * Improved xml reader api and add namespace support. Note that passing a numeric value
195
- to XML::Reader::move_to_attribute has been deprecated. Instead you should now
196
- use #move_to_attribute_no. (julp).
197
- * Improve error handling and messages (Jarl Friis)
198
-
199
- == 2.4.0 / 2012-12-14 Charlie Savage
200
-
201
- * Support libxml 2.9.0 (Daniel Veillard)
202
-
203
- * Extensive new interfaces for xml schema functionality including suppor for
204
- schemal elements, types, facets and attributes (Anton Sozontov)
205
-
206
- * Fix Encoding#from_s bug and update docs (Nikita Afanasenko)
207
-
208
- * Node#content= encoding (Nikita Afanasenko)
209
-
210
- == 2.3.3 / 2012-07-01 Charlie Savage
211
-
212
- * Add LibXML::XML::Error.get_handler (Carsten Zimmermann)
213
- * Fix variable name in example (Marcus)
214
-
215
- == 2.3.2 / 2012-03-20 Charlie Savage
216
-
217
- * Define various canonicalize constants to support libxml2 versions
218
- older than 1.1.25 (thanks Apple!)
219
-
220
- == 2.3.1 / 2012-03-20 Charlie Savage
221
-
222
- * Yanked - didn't fix the OSX canonicalize issue
223
-
224
- == 2.3.0 / 2012-03-18 Charlie Savage
225
-
226
- * Add ability to insert new PI-nodes into the xmltree (Axel Struebing).
227
-
228
- * Added full pass-through access to libxml2 xmlC14NDocDumpMemory method via
229
- LibXML::XML::Document#canonicalize method with optional arguments.
230
-
231
- * Added full test data for C14N based off of W3C spec.
232
- (http://www.w3.org/TR/xml-c14n#Examples)
233
-
234
- * Update sax handler to support encodings on Ruby 1.9 and higher.
235
-
236
- == 2.2.2 / 2011-08-29 Charlie Savage
237
-
238
- * ++API CHANGE+++
239
-
240
- Reader#relax_ng_validate now takes a RelaxNG object. This is
241
- what the documentation has always said it takes, but it previously
242
- took a string. In addition, it now returns true or false instead of 0 or -1.
243
-
244
- Reader#schema_validate now takes a Schema object. This is
245
- what the documentation has always said it takes, but it previously
246
- took a string. In addition, it now returns true or false instead of 0 or -1.
247
-
248
- Fixes GitHub issue #30.
249
-
250
- * Added Parser::Context#close and HTMLParser::Context#close methods that
251
- allow the underlying io stream (file, string, etc) to be closed. Once a
252
- parser is done parsing its data, it now calls one of these methods.
253
- This means that if you parse thousands of files at the same time,
254
- without running Ruby's garbage colllector, you won't get a too
255
- many files open error. Fixes GitHub issue #29.
256
-
257
- * Fixed bug where Node#inner_xml caused an error when it had no child nodes.
258
- Fixes GitHub issues #31
259
-
260
- * Don't require 'rake' in the gemspec to avoid annoying Bundler bugs
261
-
262
- == 2.2.1 / 2011-08-13 Charlie Savage
263
-
264
- * Packaging fix - include the custom .def file in the gem.
265
-
266
- == 2.2.0 / 2011-08-09 Charlie Savage
267
-
268
- * Update encoding support for Ruby 1.9 so that libxml-ruby returns
269
- strings encoded in UTF-8. This change was required since libxml internally
270
- stores strings in UTF-8. The exceptions to this rule are the #to_s methods
271
- which return UTF-8 by default but can return other encodings if requested.
272
-
273
- == 2.1.2 / 2011-08-03 Charlie Savage
274
-
275
- * Fix segmentation fault that could occur when an XPathContext was marked
276
- before it was fully initialized (Charlie Savage).
277
-
278
- * Add mark method to document to mark all nodes currently being accessed
279
- by ruby. This make Ruby Enterprise Edition happy (Charlie Savage).
280
-
281
- == 2.1.1 / 2011-07-31 Charlie Savage
282
-
283
- * Switch to using def files to control library exports (Charlie Savage).
284
-
285
- == 2.1.0 / 2011-07-31 Charlie Savage
286
-
287
- * Ruby 1.9.3 compatability (Charlie Savage).
288
-
289
- * Added XPath expression <-> Ruby value conversion methods (Jens Wille).
290
-
291
- * Extracted rxml_xpath_to_value from rxml_xpath_context_find (Jens Wille).
292
-
293
- * Adapted rxml_xpath_from_value from Gregoire Lejeune's ruby-xslt
294
- library, see https://github.com/glejeune/ruby-xslt (Jens Wille).
295
-
296
- * Allow calling #find on nodes returned from Reader (Charlie Savage).
297
-
298
- * Change document handling in XPath::Context to address segmentation fault on
299
- Ruby Enterprise Edition (Charlie Savage).
300
-
301
- * Update gemspec file to work directly with bundler thereby allowing git
302
- repository to be used as gem (Charlie Savage).
303
-
304
- * Support gem buld (Charlie Savage).
305
-
306
- * Simplify memory management of attributes namespaces to fix
307
- segmentation faults that occurred when using Ruby 1.9.3 (Charlie Savage).
308
-
309
-
310
- == 2.0.8 / 2011-06-23 Charlie Savage
311
-
312
- * Add in 2 new HTML Parser constants - NODEFDTD and NOIMPLIED.
313
-
314
- * Fix compile issue on Ruby 1.9.3
315
-
316
- == 2.0.6 / 2011-05-23 Charlie Savage
317
-
318
- * Fix segfault that sometimes occurred when looking up encodings on 1.9.
319
- In some cases the Ruby encoding infrastructure was not properly
320
- initialized (nkriege).
321
-
322
- == 2.0.5 / 2011-05-05 Charlie Savage
323
-
324
- * Document#validate_dtd would sometimes cause segmentation faults due to
325
- an improperly initialized data structure (Charlie Savage)
326
-
327
- == 2.0.4 / 2011-05-02 Charlie Savage
328
-
329
- * Fix compile issues on platforms using older versions of libxml2.
330
- The problem as using a C14N constants that was added to libxml2
331
- in July 2009 (Charlie Savage).
332
-
333
- == 2.0.3 / 2011-05-01 Charlie Savage
334
-
335
- * The biggest change in this release is supporting the use of libxml-ruby in
336
- native background Ruby threads. Previously, the use of libxml-ruby in
337
- background threads in Ruby 1.9.x and higher would often cause
338
- segmentation faults. This has now been fixed (Charlie Savage).
339
-
340
- * Update Reader#expand so that returned node correctly remembers its
341
- encoding in Ruby 1.9.x (zerebubuth).
342
-
343
- * Add check to verify a node has not been deleted. This can happen when
344
- a ruby variable holds a reference to a child node that gets freed
345
- when its parent gets freed. Previously when this happened a
346
- segmentation fault would occur, now an exception is raised (Charlie Savage, fixes
347
- RubyForge #26839.
348
-
349
- * Do not unlink nodes before internal validations have run - avoids
350
- segmentation faults caused by freeing a node twice (Charlie Savage).
351
-
352
- * Add support for Document#canonicalization (Victor Lin).
353
-
354
- * Fix memory leak in Reader#lookup_namespace (Charlie Savage).
355
-
356
- * Fix memory leak in Reader#[] (Nathan Kriege).
357
-
358
- * Fix usage of @io instance variable (Jeffrey Taylor)
359
-
360
- * Removed old sax error handling code that has been fixed in newer
361
- versions of libxml (Charlie Savage).
362
-
363
- * Code cleanup - remove unused variables and commented out code (Charlie Savage)
364
-
365
- * Minor text changes and documentation fixes (Charlie Savage).
366
-
367
- * Fix documentation error (fixes RubyForge #26888).
368
-
369
- * Update documentation for Document#validation* methods (fixes RubyForge #24833).
370
-
371
- * Update documentation and test (fixes Ruby Forge Issue #28770).
372
-
373
- * Updated documentation in README (Anurag Priyam):
374
- 1. rake doc does not work; use rake rdoc.
375
- 2. gem mislav-hanna does not exist; use hanna.
376
- 3. rake rdoc 'depends' on hanna; no need of RDOCOPTS
377
- 4. Point to the github issue tracker instead of Ruby Forge
378
- 5. Point to the github (gh-pages) site for docs
379
-
380
- * Add tc_error to test suite (Charlie Savage).
381
-
382
- * Add sax test (Stanislav O.Pogrebnyak).
383
-
384
- == 2.0.2 / 2011-04-17 Charlie Savage
385
-
386
- * Added binaries for windows (Charlie Savage).
387
-
388
- * Update Ruby 1.9 encoding handling to support libxml versions older than
389
- version 2.6.26 which was released on June 6, 2006 (Charlie Savage).
390
-
391
- * Add publish_with_docs rake task - combines publishing the
392
- website and docs (Anurag Priyam).
393
-
394
- * Correctly copy the documentation directory (Anurag Priyam)
395
-
396
- * Use relative link for rdoc so the links are correct on
397
- both rubyforge and github (Anurag Priyam).
398
-
399
- * Update Rakefile to use Hanna RDco template (Charlie Savage).
400
-
401
- * Update dates on license file (Charlie Savage).
402
-
403
- * Add api to allow setting of attribute namespaces. Fixes issue #10 (Charlie Savage).
404
-
405
- * Remove old hack to call the on_error method. This hack isn't needed anymore
406
- since a better workaround was put in place in the parser context. Fixes
407
- This fixes issue #12 (Charlie Savage).
408
-
409
- * Remove references to passing blocks to validation functions. The blocks are no
410
- longer called since the bindings use libxml's structured error handling. See
411
- issue #6 (Charlie Savage).
412
-
413
- * Fix up comment in Document and Node. See issue #8 (Charlie Savage).
414
-
415
- * Update website text (Charlie Savage).
416
-
417
- == 2.0.0 / 2011-04-16 Charlie Savage
418
-
419
- * Ruby 1.9.2 support. The biggest addition is encoding support.
420
- Strings returned by the libxml bindings are now set to the encoding
421
- of the underlying xml document (Charlie Savage).
422
-
423
- * Rubinius compatability. Removed unnecessary use of RHASH_TBL (Aman Gupta)
424
-
425
- * Added .gemspec file (Dudley Flanders).
426
-
427
- * Updated Windows checks to take into account mingw32 (Yaohan Chen).
428
-
429
- * Fix memory leak in Reader#Expand (Szymon Nowak).
430
-
431
- * Fix memory leaks in Reader#read_string, Reader#read_inner_xml
432
- and Reader#read_outer_xml (Sean Geoghegan).
433
-
434
- * Node#space_preserve= was backwards (Dudley Flanders)
435
-
436
- * Fixed typo in readme, added rdoc extension (Loren Sands-Ramshaw).
437
-
438
- * Switched to Rake Compiler (Charlie Savage).
439
-
440
- * Use xmlMalloc() memory for ctxt->sax structure. Sometimes the ctxt->sax pointer
441
- may not be zeroed in rxml_sax_parser_parse(), for example when exception is raised
442
- in one of callbacks. This lets xmlFreeParserCtxt() clean this up (Alexey I. Froloff).
443
-
444
- * Added a rake task to publish the website to github. Moved the jekyll website to
445
- web directory (Anurag Priyam).
446
-
447
- * Modernize project metadata and layout (7rans)
448
-
449
-
450
- == 1.1.3 / 2009-03-18 Charlie Savage
451
-
452
- * Improve performance 10 to 20% by turning on libxml2's dictionary
453
- feature that allows parsers to reuse previously parsed strings.
454
-
455
- * Fix XML::Node#remove! to work correctly with libxml's dictionary feature.
456
-
457
- * Correctly set up parser context options.
458
-
459
- * Simplify DOM modification code (Node#next=, Node#prev=, Node#sibling=) and
460
- update documentation.
461
-
462
- * Deprecated Node#add_child and Node#child=, use Node#<< instead
463
-
464
- * Fix documentation for Node#<<
465
-
466
- * Added Document#import to enable moving nodes from one document
467
- to another document.
468
-
469
-
470
- == 1.1.2 / 2009-03-12 Charlie Savage
471
-
472
- * Added XML::Node#inner_xml helper method.
473
-
474
- * Fix segmentation that could occur when calling the mark function on a
475
- previously freed node.
476
-
477
- == 1.1.1 / 2009-03-10 Charlie Savage
478
-
479
- * Fix - Only include extra html parser context methods for versions of libxml
480
- older than 2.6.27.
481
-
482
- == 1.1.0 / 2009-03-09 Charlie Savage
483
-
484
- * Fix bug caused by the mark function being called on partially initialized
485
- attributes.
486
-
487
- * Revert back to libxml2's internal memory manager.
488
-
489
- == 1.0.0 / 2009-03-05 Charlie Savage
490
-
491
- * OS X (Charlie Savage). Update bindings to support the default installed
492
- version of libxml2 (2.6.16) on OS X 10.5 and the latest version available
493
- via MacPorts.
494
-
495
- == 0.9.9 / 2009-03-05 Charlie Savage
496
-
497
- * Ruby 1.9.1 support (Charlie Savage). libxml-ruby now compiles and runs on either
498
- 1.8.6 and 1.9.1. With 1.8.6 all tests should pass while on 1.9.1 all but
499
- for encoding tests pass. The port to Ruby 1.9.1 revealed two memory
500
- allocation bugs (one with dtds, one with nodes) which are now fixed.
501
-
502
- * Better OS X support (Joe Khoobyar). The default version of libxml2
503
- on OS X 10.5 is fairly old, resulting in this link error:
504
-
505
- NSLinkModule() error
506
- dyld: Symbol not found: _htmlNewParserCtxt
507
-
508
- This can be fixed by using MacPorts to get a newer version of libxml2.
509
- To make use of MacPorts, the build script has been updated to use xml2-config.
510
- This can be fine-tuned using the new --with-xml2-config / --without-xml2-config
511
- options to extconf.rb (default is --without-xml2-config to match existing behavior).
512
-
513
- * Greatly reduced memory usage (Joe Khoobyar).
514
- See http://rubyforge.org/pipermail/libxml-devel/2009-February/001375.html.
515
-
516
- * Add Document#xhtml? and document#node_type methods (Joe Khoobyar)
517
-
518
- * Add XPath::Object#last (Joe Khoobyar)
519
-
520
- * Provide finer control over CDATA nodes on a parser by parser basis (Joe Khoobyar).
521
-
522
- * Bug fix - Namespaces were incorrectly merged with attributes in the new sax2
523
- handler (Charlie Savage).
524
-
525
- * Bug fix - Support iterating over nodes and attributes even with blocks
526
- that call remove! (Charlie Savage)
527
-
528
- * Bug fix - If reader.node is NULL, return nil instead of crashing (Charlie Savage)
529
-
530
- * Bug fix - Dtd's owned by documents were freed twice in some circumstances (Joe Khoobyar).
531
-
532
- * Bug fix - Fix output escaping on attributes nodes (Joe Khoobyar).
533
-
534
- * Bug fix - Make sure IO objects are not garbage collected when used
535
- as parser sources (Charlie Savage).
536
-
537
- == 0.9.8 / 2009-1-24 Charlie Savage
538
-
539
- * Refactored XML::Parser, XML::HTMLParser, XML::SaxParser and
540
- XML::Reader to have consistent APIs. All the parsers
541
- now take a context object in their constructors, allowing fine
542
- grained control over the parsers for advanced use cases. These
543
- API changes are backwards compatible except
544
- for XML::Reader, which now takes an optional hash table as a
545
- second parameter in its various constructors versus an optional
546
- boolean value.
547
-
548
- * Updated all APIs to use the encoding constants defined
549
- in XML::Encoding versus string values. This API change
550
- is not backwards compatible.
551
-
552
- * Added support for attribute declarations in DTD's via the new
553
- XML::AttrDecl class (Len Lattanzi)
554
-
555
- * Support libxml's content escaping capabilities for text nodes by
556
- wrapping libxml's "xmlStringText" and "xmlStringTextNoenc"
557
- (Joe Khoobyar).
558
-
559
- * Updated XML::Reader#read API to return true if a node was read,
560
- false if node was not read and raises an exception on an error.
561
- Previously #read returned 1 if a node was read, 0 if a node was
562
- not read and -1 for an error. This change is not backwards
563
- compatible, but provides a more natural interface for Ruby by
564
- allowing code like this:
565
-
566
- while reader.read
567
- # do stuff
568
- end
569
-
570
- * Changed XML::Error exception objects to return copies of nodes that
571
- cause parse errors instead of the original node. This prevents
572
- segmentation faults when the error is reraised.
573
-
574
- * Added XML::Reader#node method.
575
-
576
- * Fixed compile errors on OS X which uses an older version of libxml.
577
-
578
- * Fixed memory leak when performing XPath searches.
579
-
580
- * Fixed rdocs.
581
-
582
- * Don't override libxml's default settings for entity substitution and
583
- loading external DTDs. This may break some code - you may need to
584
- add in a call to XML.default_substitute_entities = true or
585
- XML.default_load_external_dtd = true.
586
-
587
-
588
- == 0.9.7 / 2008-12-08 Charlie Savage
589
-
590
- * Added SAX2 support. SAX handlers now define two new callbacks,
591
- on_start_element_ns and on_end_element_ns methods. These
592
- new callbacks support namespaces, making them superior to the older
593
- callbacks on_start_element and on_end_element methods. The old callbacks
594
- are still supported, but may be deprecated in the future depending
595
- on community feedback.
596
-
597
- * Added SAX support for libxml's structured error handling.
598
- That menas sax handlers now define a new callback, on_error,
599
- which takes one parameter, an instance of XML::Error. The older
600
- on_parser_error, on_parser_warning and on_parser_fatal_error
601
- callbacks are no longer suported so you must port your code.
602
- Note that the older callbacks took one string parameter, instead of
603
- an XML::Error object.
604
-
605
- * Experimental work-around for libxml error handling bug - see
606
- http://mail.gnome.org/archives/xml/2008-December/msg00014.html
607
- for more information.
608
-
609
- * Fix compilation bugs on Solaris.
610
-
611
- * Fix Rdoc compilation bug.
612
-
613
-
614
- == 0.9.6 / 2008-12-08 Charlie Savage
615
-
616
- * Refactored namespace handling. The existing, and inconsistent,
617
- namespace methods defined on XML::Node have been deprecated.
618
- They have been replaced by a the new XML::Namespaces class.
619
- Use this class to inspect a node's namespace, its default
620
- namespace, its namespace definitions and which namespaces
621
- are in scope. It can be accessed via the the
622
- XML::Node#namespaces method.
623
-
624
- * Rationalized XML::Document#save, XML::Document#to_s and
625
- XML::Node#to_s to take an optional hash table of parameters
626
- that control how output is generated. Supported parameters
627
- include setting indentation on or off, the indentation level
628
- and the output encoding. This is an API change and may break
629
- existing calls to XML::Document#save. However, the previous
630
- API was broken - setting the encoding resulted in an error so
631
- its unlikely anyone is using it.
632
-
633
- * Rationalized XML::Document#debug, XML::Node#debug, XML::XPath::XPathObject#Debug.
634
-
635
- * Deprecated a number of duplicate dump* and debug_* methods in
636
- XML::Document and XML::Node.
637
-
638
- * Additional Ruby 1.9.1 compatability fixes.
639
-
640
- * Cleaned up header file guards.
641
-
642
- == 0.9.5 / 2008-11-29 Charlie Savage
643
-
644
- * Ruby 1.9.1 preview release compatability (Felipe Contreras)
645
-
646
- * Update Node#remove! to return the removed node and to set
647
- its document to nil. This allows the node to be either
648
- moved to another document, another part of the same document
649
- or to be freed on the next garbage collection once its
650
- references have gone out of scope.
651
-
652
- * Fix bug where XPathExpression#compile mistakenly overwrote
653
- RegExp#compile.
654
-
655
- * Update Node to use standard ruby allocators and initializers.
656
-
657
- * Update HTML parser to be more forgiving of invalid documents.
658
-
659
- * Update include paths for Darwin Ports on OS X.
660
-
661
- * Updated C code base to use BSD/Allman style
662
-
663
-
664
- == 0.9.4 / 2008-11-24 Charlie Savage
665
-
666
- * Update HTML parser so that it can read files, strings and io
667
- streams.
668
-
669
- * Update HTML parser to support user specified encodings.
670
-
671
- * Additional C code cleanup.
672
-
673
- == 0.9.3 / 2008-11-22 Charlie Savage
674
-
675
- * Fixed segmentation fault caused by documents being freed
676
- before xpath results that referenced the document (take 2).
677
-
678
- * Allowed sax parser to use io stream
679
-
680
- * Combined encoding and input classes
681
-
682
- * Cleaned up C code - removed remaining legacy structures,
683
- added static to most methods, changed C namespace from ruby_xml
684
- to rxml
685
-
686
- == 0.9.2 / 2008-11-19 Charlie Savage
687
-
688
- * Add support for compiled XPath expressions (donated by Pavel Valodzka)
689
-
690
- * Fixes for compiling on OS X 10.5.4 and 10.5.5
691
-
692
- == 0.9.1 / 2008-11-18 Charlie Savage
693
-
694
- * Expose LibXML's encoding support via a new Encoding object.
695
-
696
- * Revamp error handling to be much easier to use. Errors are now
697
- wrapped by the new XML::Error class and are thrown as exceptions
698
- when it is appropriate.
699
-
700
- * Fixed segmentation fault caused by documents being freed
701
- before xpath results that referenced the document.
702
-
703
- * Add Node#register_default_namespace to simplify default namespace handling.
704
-
705
- * Significantly improve documentation
706
-
707
- * A number of bug fixes and patches.
708
-
709
- == 0.9.0 / 2008-11-18 Charlie Savage
710
-
711
- * Version 0.9.0 was removed due to packaging errors.
712
-
713
-
714
- == 0.8.3 / 2008-07-21 Charlie Savage
715
-
716
- * Missed several files in last release
717
-
718
- == 0.8.2 / 2008-07-21 Charlie Savage
719
-
720
- * To use LibXML you can either require 'xml' or require 'libxml'.
721
- The differences is that require 'xml' mixes the LibXML module into
722
- the global namespace, thereby allowing you to write code such
723
- as document = XML::Document.new. Note that this is different
724
- from 0.8.0 and 0.8.1 and may require updating your code.
725
-
726
- * Support RelaxNG validation (thanks to Morus Walter)
727
-
728
- * Support passing IO objects to XmlReaders (thanks to Tom Hughes)
729
-
730
- * Fix segmentation fault caused by adding an attribute to a CDATA node
731
-
732
- * Moved node checking functions from C to Ruby
733
-
734
- * Improved Windows support - libxml-ruby should now work out of the box.
735
-
736
- * Improved Windows support - turned on libxml's zlib and iconv support.
737
-
738
-
739
- == 0.8.1 / 2008-07-09 Charlie Savage
740
-
741
- * Reimplmented Node#each_attr for backwards compatability
742
-
743
- * Moved node type test to Ruby.
744
-
745
-
746
- == 0.8.0 / 2008-07-09 Charlie Savage
747
-
748
- * Fixed bug in returning attributes from XPath results
749
-
750
- * Fixed DOM traversal methods
751
-
752
- * Changed Node#children to return an array of nodes
753
-
754
- * Fixed bug in returning attributes from XPath results
755
-
756
- * Refactored XPath support, providing more user hooks in the XPath::Context class
757
-
758
- * Added Node#properties for backwards compatibility
759
-
760
- * Updated setup.rb
761
-
762
- * Added more tests
763
-
764
- * Updated rdocs and README file
765
-
766
- * Moved libxml into LibXML namespace
767
-
768
-
769
- == 0.7.0 / 2008-07-09 Charlie Savage
770
-
771
- * Added new attributes class to provide a more natural way of working with attributes
772
-
773
- * Fixed XML::Attr to better support namespaces
774
-
775
- * Added documentation on how to use namespaces with XPath
776
-
777
- * Removed allocation of extraneous structures used to wrap nodes, namespaces and attributes
778
-
779
- * Cleaned up tests and added new test suite
780
-
781
- * Updated rdocs and README file
782
-
783
- * Cleaned out most of the bug list
784
-
785
-
786
- == 0.6.0 / 2008-07-01 Charlie Savage
787
-
788
- * Fixed memory allocation errors in Windows. On Windows, it is essential that the same library that allocates memory must free it. Thus ALLOC calls must be matched to ruby_xfree calls, which they were not. In addition, in one case Ruby was allocating memory to be freed by libxml. On Windows, that's a segmentation fault. On Linux it might fly, but still seems like a bad idea.
789
-
790
- * Fixed segmentation fault in xml reader expand (same xml tree freed twice)
791
-
792
- * Applied a number of patches from Tom Bagby, including fixes for xpath segmentation faults and fixes for various memory leaks
793
-
794
- * Cleaned up a number of compiler warnings
795
-
796
- * Renamed libxml_so.so to libxml_ruby.so (same for xslt). That wasn't actually my original intention, but um, it kind of sort of happened. It should not be noticeable from an end-user perspective.
797
-
798
- * Added rake files for building with MingW
799
-
800
- * Added rake files for packing gems. Note that I did this outside the existing rake tasks because I didn't see how they were actually building the gems.
801
-
802
- * Cleaned up the tests and added a few more based on bug reports from the Tracker and mailing list.
803
-
804
- * Cleaned out the patch queue and went through about 1/2 the bug list
805
-
806
-
807
- === 2007-11-16 "Dan Janowski" <danj at 3skel.com>
808
-
809
- * Merged Dan's MEM2 branch to trunk.
810
-
811
- == 0.5.3 /
812
-
813
- === 2007-11-16 "Dan Janowski" <danj at 3skel.com>
814
-
815
- * Merged Dan's MEM2 branch to trunk.
816
-
817
-
818
- == 0.5.2 / 2007-10-10
819
-
820
- === 2007-10-10 "Dan Janowski" <danj at 3skel.com>
821
-
822
- * (Dan, fill in the major points of the changes you made up to here -thanks)
823
-
824
- === 2007-01-14 "Laurent Sansonetti" <lrz at chopine.be>
825
-
826
- * Added some preliminary RDoc comments for XML::Reader.
827
-
828
- === 2006-12-05 "Laurent Sansonetti" <lrz at chopine.be>
829
-
830
- * Added XML::Reader, a set of bindings to the xmlTextReader API.
831
-
832
-
833
- == 0.3.8.4 / 2006-12-02
834
-
835
- === 2006-04-15 "Ross Bamform" <rosco at roscopeco.co.uk>
836
-
837
- * Implemented SAX parser callback handling.
838
-
839
- === 2006-04-12 "Ross Bamford" <rosco at roscopeco.co.uk>
840
-
841
- * Integrated and tested community patches.
842
- * Defined XML::Node (hash) equality in terms of XML representation.
843
-
844
- === 2006-04-12 "Tim Yamin" <plasmaroo at gentoo.org>
845
-
846
- * Fixed XML::Node#content inoperable bug (plasmaroo) [patch]
847
- * Fixed memory leak in same
848
-
849
- === 2006-04-12 "Mark Van Holstyn" <mvette13 at gmail.com>
850
-
851
- * Added XML::Node::Set#first (mvette13) [patch]
852
- * Added XML::Node::Set#empty?
853
- * Fixed XML::Node::Set#to_a
854
- * Added XML::Node#find_first
855
- * Added XML::Node#remove!
856
-
857
- === 2006-03-27 "Ross Bamford" <rosco at roscopeco.co.uk>
858
-
859
- * Integrated contributed XML::Parser.register_error_handler patch (rosco)
860
-
861
- === 2006-02-27 "Ross Bamford" <rosco at roscopeco.co.uk>
862
-
863
- * Fixed all multiple symbol definitions for -fno-common.
864
- * Removed OSX -fno-common workaround.
865
-
866
-
867
- == 0.3.6 / 2006-02-23
868
-
869
- === 2006-02-21 "Ross Bamford" <rosco at roscopeco.co.uk>
870
-
871
- * Patched extconf.rb with OSX -fno-common workaround
872
- * Added gem and packaging support to Rakefile
873
- * Moved version update to Rakefile
874
- * Removed legacy project utility scripts
875
-
876
- === 2005-02-19 "Ross Bamford" <rosco at roscopeco.co.uk>
877
-
878
- * Fixed doublefree bug in ruby_xml_attr.
879
- * Fixed small leak in parser
880
-
881
- === 2005-12-18 "Ross Bamford" <rosco at roscopeco.co.uk>
882
-
883
- * Updated for GCC 4.0 (community patches)
884
- * Fixed default validation bug
885
- * Refactored project, removed outdated files, cleaned up tests.
886
- * Added RDoc documentation across .c files.
887
- * Fixed up a few strings.
888
-
889
- === 2004-04-04 "Mangler Jurgen" <et@wkv.at>
890
-
891
- * ruby_xml_node.cz: fixed ruby_xml_node_property_set. The ill-behaviour
892
- was, that there was added a second attribute of the same
893
- name, when you were setting the value of an already existing
894
- attribute.
895
-
896
- === 2004-03-17 "Lukas Svoboda" <luks@fi.muni.cz>
897
-
898
- * ruby_xml_node.c: ruby_xml_node_to_s now returns XML subtree dump.
899
-
900
- === 2004-02-27 "Martin Povolny" <martin@solnet.cz>
901
-
902
- * ruby_xml_node.c: added XML::Node.copy, this makes possible building
903
- of xml documents from nodes taken from other xml documents
904
- without making ruby SIGSEGV (see tests/copy_bug.rb).
905
-
906
- === 2004-02-26 "Martin Povolny" <martin@solnet.cz>
907
-
908
- * ruby_xml_dtd.c, ruby_xml_dtd.h, ruby_xml_schema.c, ruby_xml_schema.h:
909
- more work on validation, now you can actually validate
910
- document using dtd or xml schema, also solved warning and
911
- error propagation (see tests/{dtd|schema}-test.rb).
912
-
913
- === 2003-12-30 "Martin Povolny" <martin@solnet.cz>
914
-
915
- * ruby_xml_dtd.c, ruby_xml_dtd.h, ruby_xml_schema.c, ruby_xml_schema.h:
916
- prelimitary support for dtd and schema validation
917
-
918
- === 2003-09-15 "Martin Povolny" <martin@solnet.cz>
919
-
920
- * ruby_xml_input_cbg.c, libxml.c: added class InputCallbacks to make
921
- possible registering custom input callbacks
922
- handlers (xmlRegisterInputCallbacks) written in ruby
923
-
924
- === 2003-08-01 "Martin Povolny" <martin@solnet.cz>
925
-
926
- * ruby_xml_document.c: corrected argument handling in ruby_xml_document_find
927
- * ruby_xml_node.c: corrected argument handling in ruby_xml_node_find
928
-
929
-
930
-
1
+ = Release History
2
+
3
+ == 6.0.0 / 2026-04-08
4
+
5
+ This release is a major refresh of libxml-ruby. The most important changes include:
6
+
7
+ * Migration to Ruby's modern TypedData API which replaces the old Data_Wrap_Struct API
8
+ * libxml-ruby no longer uses libxml2's _private field. Instead, it now uses an internal registry. This removes a long-standing compatibility issue where libxml-ruby's use of _private could collide with other libxml2 consumers
9
+ * Brand-new documentation site available at https://xml4r.github.io/libxml-ruby/ with guides on parsing, XPath, validation, the Writer API, and the internal architecture
10
+ * Updated reference documentation to Ruby's new Aliki theme
11
+ * Expanded tests
12
+ * Finally removed require 'xml' which has been deprecated for a very long time
13
+
14
+ Breaking changes:
15
+
16
+ * Remove deprecated Document methods: dump, format_dump, debug_dump, debug_dump_head, debug_format_dump, reader
17
+ * Remove deprecated Parser.register_error_handler (use Error.set_handler)
18
+ * Remove deprecated HTMLParser#file=, #io=, #string= (use class methods HTMLParser.file, .io, .string)
19
+ * Remove deprecated require paths: require 'libxml', require 'xml/libxml', and require 'xml' (use require 'libxml-ruby')
20
+ * Fix misspelled Schema::Type#annonymus_subtypes -> anonymous_subtypes
21
+
22
+ The release also includes a number of smaller improvements, including:
23
+
24
+ * Support Ruby 4.0 (no changes were required)
25
+ * Fix RelaxNG factories to raise on parse failure instead of wrapping NULL
26
+ * Fix read callback to clamp to buffer size, preventing overflow
27
+ * Fix write callback to use len parameter instead of strlen for StringIO
28
+ * Fix Schema @version ivar reading name instead of version
29
+ * Remove no-op free functions from Schema::Type, Element, Attribute, Facet
30
+ * Fix incorrect types in TypedData_Get_Struct for attr_decl and document node_type
31
+ * Remove dead Check_Type after NUM2INT in HTML parser context
32
+ * Use rb_ensure in namespaces.each to free nsList on exception
33
+ * Remove dead Float::INFINITY definition for Ruby 1.8.7
34
+ * Add mswin CI job using vcpkg for libxml2
35
+ * Minimum Ruby version is now 3.2
36
+ * Revert require_relative back to require for loading the C extension (fixes #226)
37
+ * Allow nil for external and system IDs when creating a DTD (fixes #215)
38
+ * Fix C14N document subset canonicalization with namespace nodes
39
+ * Enable W3C C14N spec tests 3.5 (entity references) and 3.7 (document subsets)
40
+ * Rename HISTORY to CHANGELOG.md, README.rdoc to README.md
41
+
42
+ == 5.0.6 / 2026-04-03
43
+ * Test fix - Make the memory leak test threshold more generous to avoid false positives
44
+ * Test fix - Call get_handler on Error class instead of module
45
+ * Fix XML::Writer.string buffer leak
46
+ * Update assertion to comply with minitest deprecations
47
+ * Allow libdir to match Rubies with double digit patch numbers
48
+
49
+ == 5.0.5 / 2025-07-30
50
+ * Try to fix broken documentation link in Ruby Gems website
51
+ * Update history file
52
+
53
+ == 5.0.4 / 2025-05-12
54
+
55
+ * Fix line ending inconsistencies across platforms
56
+ * Set Git attributes for source files to keep LF line endings.
57
+ * Add optional zlib support detection in extconf
58
+
59
+ == 5.0.3 / 2024-03-12
60
+
61
+ * Fix compiling against newer libxml versions
62
+ * Fix version check
63
+
64
+ == 5.0.2 / 2024-01-08
65
+
66
+ * Fix broken DTD creation (DTD name is not required)
67
+
68
+ == 5.0.1 / 2024-01-08
69
+
70
+ * Fix broken Document#io method that was broken by switching Parsers to use keyword arguments
71
+
72
+ == 5.0.0 / 2024-01-07
73
+
74
+ * This release is major version bump because it removes access to global parser options
75
+ that libxml2 version 2.12.0 deprecated (see https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.0)
76
+ In the unlikely event your code uses these options, then you will need to update it.
77
+ Specifically, instead of setting global parser options, pass them directly to either Parsers
78
+ or ParserContexts when creating them. Options are defined as constants in
79
+ LibXML::XML::Parser::Options and LibXML::HTML::Parser::Options
80
+ * Update Parser initialize methods to take keyword parameters instead of a hash table (you may have to update your code due to this change)
81
+ * Fix broken compilation with libxml2 version 2.12.0 (due to libxml2 header changes)
82
+ * Add support for Ruby 3.3.*
83
+ * Remove support for Ruby 2.7.* (gem should still work but is no longer tested)
84
+
85
+ == 4.1.2 / 2023-11-04
86
+
87
+ * Fix Ruby warnings about undefined allocators (yuuji.yaginuma, Christopher Sahnwaldt)
88
+ * Fix Schema::Element required? and array? (John Andrews)
89
+ * Remove SchemaElement#minOccurs and SchemaElement#maxOccurs since they actually did not work (Charlie Savage)
90
+ * Fix typo: XPatch -> XPath (Christopher Sahnwaldt)
91
+ * Introduce new alternative Homebrew installation search paths to extconf makefile (Pierce Brooks)
92
+
93
+ == 4.1.1 / 2023-05-01
94
+
95
+ * Fix compile warning (or error) for input_callbacks_register_input_callbacks (Charlie Savage)
96
+ * Remove call to deprecated function htmlDefaultSAXHandlerInit (Charlie Savage)
97
+
98
+ == 4.1.0 / 2023-04-30
99
+
100
+ * Fix compile warning (or error) for rxml_encoding_to_rb_encoding (Charlie Savage)
101
+ * Breaking - Remove LibXML::XML.features since its uses functionality deprecated in LibXML (Charlie Savage)
102
+
103
+ == 4.0.0 / 2022-12-28
104
+
105
+ * Breaking - Remove support for XPointer since libxml2 has deprecated it and will remove it (Charlie Savage)
106
+ * Breaking - Remove support for ancient setup.rb script (Charlie Savage)
107
+
108
+ == 3.2.4 / 2022-10-29
109
+
110
+ * Support libxml2 version 2.10.2 (Charlie Savage)
111
+ * Reduce number of globally included C header files (Charlie Savage)
112
+
113
+ == 3.2.3 / 2022-05-22
114
+
115
+ * Change some getter methods to instance variables with attr_accessors for easier debuggability (David Hansen)
116
+ * Add a number of tests related to schemas (David Hansen)
117
+ * Add schema.imported_elements so we can find imported elements (David Hansen)
118
+ * Fix segfault under windows when dereferencing a pre-existing error where the node has already been freed (David Hansen)
119
+ * Update to change name from imported_elements to imported_ns_elements and return a hash of hashes for namespaced elements (David Hansen)
120
+ * Only call xmlGetFeaturesList if LIBXML_LEGACY_ENABLED is defined. Most distros still ship libxml2 with legacy features enabled, but this will change (Nick Wellnhofer)
121
+ * Update GitHub Actions to use ruby/setup-ruby (Greg)
122
+ * Fix memory leak in rxml_node_path, node.path (vovanmozg)
123
+
124
+ == 3.2.2 / 2022-01-15
125
+ * Switch to Github actions for CI/CD (Greg)
126
+ * Test fixes (Greg, Sergio Durigan Junior)
127
+ * Fix typo on test/test_sax_parser.rb (Sergio Durigan Junior)
128
+ * Update homepage in gemspec (Pirate Praveen Arimbrathodiyil)
129
+
130
+ == 3.2.1 / 2020-11-05
131
+
132
+ * Fix incorrect handling of encodings when using XMLWriter.io (Charlie Savage)
133
+ * Clean up README (Richard Michael)
134
+
135
+ == 3.2.0 / 2020-05-09 Charlie Savage
136
+
137
+ * Fix crash when creating an empty DTD
138
+ * Modernize tests to use Bundler to load gem
139
+ * Add libxml-ruby.rb file so gem loads in expected way.
140
+ * Add support for xmlSaveNoEmptyTags.
141
+ * Clean up extconf.rb file
142
+
143
+ == 3.1.0 / 2018-02-03 Charlie Savage
144
+
145
+ * Fix segmentation fault when adding one node to another node (Charlie Savage)
146
+ * Fix deprecated "assert_equal(nil, expected)" calls. #148 and #151. (utilum)
147
+ * Remove assigned but unused variables. #150 (utilum)
148
+ * Add Gemfile. #146. (Dorian Marié)
149
+ * Remove duplicate hash key in setup.rb. #147. (Dorian Marié)
150
+ * Fix gemspec by requiring Date. #149 (utilum)
151
+ * Restore default internal encoding after tests are completed. #123 (Charlie Savage)
152
+ * Remove duplicate method definitions. #145. (Charlie Savage)
153
+ * Remove SchemaElement#minOccurs and SchemaElement#maxOccurs since they actually did not work (Charlie Savage)
154
+ * Rename test files to follow Ruby conventions (Charlie Savage)
155
+ * Fix handling of node returned by Reader#expand. #142. (Charlie Savage)
156
+ * Add Travis Build support (Charlie Savage)
157
+ * Fix Fixnum deprecation (Charlie Savage)
158
+ * Cleanup schema code (Charlie Savage)
159
+ * Update Visual Studio project to 2017 (Charlie Savage)
160
+
161
+ == 3.0.0 / 2017-02-07 Charlie Savage
162
+
163
+ * Revamp how libxml-ruby manages memory. Instead of trying to return the same ruby object for each xmlnode,
164
+ the bindings now create wrapper ruby objects as needed which are then freed at the end of use.
165
+ This allows most memory management to be handled by libxml itself. Ruby only manages the lifespan of
166
+ documents and parent xml nodes. When those go out of scope, the underlying libxml objects are also freed.
167
+ This implementation requires almost no overhead, plays nicely with Nokogiri and appears to work much
168
+ better (Charlie Savage).
169
+
170
+ * Change XML::Node#eql? API. Nodes are now considered equal only if they wrap the same underlying
171
+ libxml node. Previously, they would also be considered equal if they contained the same content
172
+ (Charlie Savage)
173
+
174
+ * Change XML::Reader.expand API. Previously it would automatically instantiate a reader document so
175
+ an xpath expression could be used to search the returned node. Now you should first call
176
+ reader.doc (Charlie Savage)
177
+
178
+ * Update Visual Studio project for Visual Studio 15 - requires ruby 2.4+ (Charlie Savage)
179
+ * Remove APIs that have been deprecated for several years (Charlie Savage)
180
+
181
+ == 2.9.0 / 2016-06-13 Charlie Savage
182
+
183
+ * Revamp libxml-ruby's memory management to not cause crashes when used with Nokogiri (James Laird-Wah)
184
+ * Fix garbage collection issue that sometimes caused the library to hang (Charlie Savage)
185
+ * Improved multi-threading support (Charlie Savage)
186
+ * Fix crash sometimes caused by an xml node being freed twice (Charlie Savage)
187
+ * Fix memory leak when setting the text content of a node (Charlie Savage)
188
+ * Set a default task in the Rakefile - use "test" (Robert Haines)
189
+ * Add "hanna_gudao" gem and add "rake-compiler" to development dependencies (Robert Haines)
190
+ * Use Process.getrlimit instead of `ulimit` in the tests (Robert Haines)
191
+ * Build on smartos (Steven Williamson)
192
+ * Fix compiler warnings (Charlie Savage)
193
+ * Add Xcode project for easier debugging on OSX (Charlie Savage)
194
+ * Switch from unit test to minitest (Charlie Savage)
195
+
196
+ == 2.8.0 / 2015-01-09 Charlie Savage
197
+
198
+ * Use RbConfig instead of Config in extconf.rb (Robert Haines)
199
+ * Correct xpath documentation XML (Bill Mill)
200
+ * Correct from_string method documentation (Bill Mill)
201
+ * Fix compile error with debug not enabled in libxml (Patrick Ziegler)
202
+ * Update gemspec to include license (Charlie Savage)
203
+ * In XML::Writer prevent writing to io while being GCed (Brett Gibson)
204
+
205
+ == 2.7.0 / 2013-08-13 Charlie Savage
206
+
207
+ * Don't call rb_warning in GC mark function (Dirkjan Bussink)
208
+ * Set libxml error handler when a libxml-ruby error handler is set (Geoffrey Giesemann)
209
+ * Fix tests for nil TypeErrors for ruby 2.0=< (Geoffrey Giesemann)
210
+ * Fix segmentation fault for issue #62 (Charlie Savage)
211
+ * Add #node_type method to dtd (Charlie Savage)
212
+ * Fixing equality check of LibXML::XML::Error against other objects (Michał Szajbe)
213
+ * Fix #63, XML::Writer.set_quote_char UT, wrong expected string (julp)
214
+ * Fix potential segfault when GC occurs while creating ns from xpath (Timothy Elliott)
215
+ * Fix for #59, segmentation fault after failure to load external schema (Clifford Heath)
216
+
217
+ == 2.6.0 / 2013-02-16 Charlie Savage
218
+
219
+ * Fix uninitialized constant LibXML::XML::Error::I18N (NameError) that occurred
220
+ with older versions of libxml.
221
+ * Various updates/fixes to new XML::Writer class and update how flushing works (julp)
222
+
223
+ == 2.5.0 / 2013-01-27 Charlie Savage
224
+
225
+ * Compatibility with older versions for IO::write (rb_io_bufwrite is specific to ruby >= 1.9.3?)
226
+ and symbols are VALUE not ID (julp).
227
+ * Fix version for xmlTextWriterSetQuoteChar, it appeared in libxml2 2.9.0, last version (julp)
228
+ * Update use of LIBXML_VERSION (julp).
229
+ * Fix misuse of rb_scan_args (julp).
230
+ * Update documentation, including DTD docs and added XML Writer (julp).
231
+ * Added a new XML::Writer class (julp).
232
+ * Improved xml reader api and add namespace support. Note that passing a numeric value
233
+ to XML::Reader::move_to_attribute has been deprecated. Instead you should now
234
+ use #move_to_attribute_no. (julp).
235
+ * Improve error handling and messages (Jarl Friis)
236
+
237
+ == 2.4.0 / 2012-12-14 Charlie Savage
238
+
239
+ * Support libxml 2.9.0 (Daniel Veillard)
240
+ * Extensive new interfaces for xml schema functionality including support for
241
+ schema elements, types, facets and attributes (Anton Sozontov)
242
+
243
+ * Fix Encoding#from_s bug and update docs (Nikita Afanasenko)
244
+ * Node#content= encoding (Nikita Afanasenko)
245
+
246
+ == 2.3.3 / 2012-07-01 Charlie Savage
247
+
248
+ * Add LibXML::XML::Error.get_handler (Carsten Zimmermann)
249
+ * Fix variable name in example (Marcus)
250
+
251
+ == 2.3.2 / 2012-03-20 Charlie Savage
252
+
253
+ * Define various canonicalize constants to support libxml2 versions
254
+ older than 1.1.25 (thanks Apple!)
255
+
256
+ == 2.3.1 / 2012-03-20 Charlie Savage
257
+
258
+ * Yanked - didn't fix the OSX canonicalize issue
259
+
260
+ == 2.3.0 / 2012-03-18 Charlie Savage
261
+
262
+ * Add ability to insert new PI-nodes into the xmltree (Axel Struebing).
263
+ * Added full pass-through access to libxml2 xmlC14NDocDumpMemory method via
264
+ LibXML::XML::Document#canonicalize method with optional arguments.
265
+
266
+ * Added full test data for C14N based off of W3C spec.
267
+ (http://www.w3.org/TR/xml-c14n#Examples)
268
+
269
+ * Update sax handler to support encodings on Ruby 1.9 and higher.
270
+
271
+ == 2.2.2 / 2011-08-29 Charlie Savage
272
+
273
+ * ++API CHANGE+++
274
+
275
+ Reader#relax_ng_validate now takes a RelaxNG object. This is
276
+ what the documentation has always said it takes, but it previously
277
+ took a string. In addition, it now returns true or false instead of 0 or -1.
278
+
279
+ Reader#schema_validate now takes a Schema object. This is
280
+ what the documentation has always said it takes, but it previously
281
+ took a string. In addition, it now returns true or false instead of 0 or -1.
282
+
283
+ Fixes GitHub issue #30.
284
+
285
+ * Added Parser::Context#close and HTMLParser::Context#close methods that
286
+ allow the underlying io stream (file, string, etc) to be closed. Once a
287
+ parser is done parsing its data, it now calls one of these methods.
288
+ This means that if you parse thousands of files at the same time,
289
+ without running Ruby's garbage collector, you won't get a too
290
+ many files open error. Fixes GitHub issue #29.
291
+
292
+ * Fixed bug where Node#inner_xml caused an error when it had no child nodes.
293
+ Fixes GitHub issues #31
294
+
295
+ * Don't require 'rake' in the gemspec to avoid annoying Bundler bugs
296
+
297
+ == 2.2.1 / 2011-08-13 Charlie Savage
298
+
299
+ * Packaging fix - include the custom .def file in the gem.
300
+
301
+ == 2.2.0 / 2011-08-09 Charlie Savage
302
+
303
+ * Update encoding support for Ruby 1.9 so that libxml-ruby returns
304
+ strings encoded in UTF-8. This change was required since libxml internally
305
+ stores strings in UTF-8. The exceptions to this rule are the #to_s methods
306
+ which return UTF-8 by default but can return other encodings if requested.
307
+
308
+ == 2.1.2 / 2011-08-03 Charlie Savage
309
+
310
+ * Fix segmentation fault that could occur when an XPathContext was marked
311
+ before it was fully initialized (Charlie Savage).
312
+
313
+ * Add mark method to document to mark all nodes currently being accessed
314
+ by ruby. This make Ruby Enterprise Edition happy (Charlie Savage).
315
+
316
+ == 2.1.1 / 2011-07-31 Charlie Savage
317
+
318
+ * Switch to using def files to control library exports (Charlie Savage).
319
+
320
+ == 2.1.0 / 2011-07-31 Charlie Savage
321
+
322
+ * Ruby 1.9.3 compatibility (Charlie Savage).
323
+ * Added XPath expression <-> Ruby value conversion methods (Jens Wille).
324
+ * Extracted rxml_xpath_to_value from rxml_xpath_context_find (Jens Wille).
325
+ * Adapted rxml_xpath_from_value from Gregoire Lejeune's ruby-xslt
326
+ library, see https://github.com/glejeune/ruby-xslt (Jens Wille).
327
+
328
+ * Allow calling #find on nodes returned from Reader (Charlie Savage).
329
+ * Change document handling in XPath::Context to address segmentation fault on
330
+ Ruby Enterprise Edition (Charlie Savage).
331
+
332
+ * Update gemspec file to work directly with bundler thereby allowing git
333
+ repository to be used as gem (Charlie Savage).
334
+
335
+ * Support gem buld (Charlie Savage).
336
+ * Simplify memory management of attributes namespaces to fix
337
+ segmentation faults that occurred when using Ruby 1.9.3 (Charlie Savage).
338
+
339
+
340
+ == 2.0.8 / 2011-06-23 Charlie Savage
341
+
342
+ * Add in 2 new HTML Parser constants - NODEFDTD and NOIMPLIED.
343
+ * Fix compile issue on Ruby 1.9.3
344
+
345
+ == 2.0.6 / 2011-05-23 Charlie Savage
346
+
347
+ * Fix segfault that sometimes occurred when looking up encodings on 1.9.
348
+ In some cases the Ruby encoding infrastructure was not properly
349
+ initialized (nkriege).
350
+
351
+ == 2.0.5 / 2011-05-05 Charlie Savage
352
+
353
+ * Document#validate_dtd would sometimes cause segmentation faults due to
354
+ an improperly initialized data structure (Charlie Savage)
355
+
356
+ == 2.0.4 / 2011-05-02 Charlie Savage
357
+
358
+ * Fix compile issues on platforms using older versions of libxml2.
359
+ The problem as using a C14N constants that was added to libxml2
360
+ in July 2009 (Charlie Savage).
361
+
362
+ == 2.0.3 / 2011-05-01 Charlie Savage
363
+
364
+ * The biggest change in this release is supporting the use of libxml-ruby in
365
+ native background Ruby threads. Previously, the use of libxml-ruby in
366
+ background threads in Ruby 1.9.x and higher would often cause
367
+ segmentation faults. This has now been fixed (Charlie Savage).
368
+
369
+ * Update Reader#expand so that returned node correctly remembers its
370
+ encoding in Ruby 1.9.x (zerebubuth).
371
+
372
+ * Add check to verify a node has not been deleted. This can happen when
373
+ a ruby variable holds a reference to a child node that gets freed
374
+ when its parent gets freed. Previously when this happened a
375
+ segmentation fault would occur, now an exception is raised (Charlie Savage, fixes
376
+ RubyForge #26839.
377
+
378
+ * Do not unlink nodes before internal validations have run - avoids
379
+ segmentation faults caused by freeing a node twice (Charlie Savage).
380
+
381
+ * Add support for Document#canonicalization (Victor Lin).
382
+ * Fix memory leak in Reader#lookup_namespace (Charlie Savage).
383
+ * Fix memory leak in Reader#[] (Nathan Kriege).
384
+ * Fix usage of @io instance variable (Jeffrey Taylor)
385
+ * Removed old sax error handling code that has been fixed in newer
386
+ versions of libxml (Charlie Savage).
387
+
388
+ * Code cleanup - remove unused variables and commented out code (Charlie Savage)
389
+ * Minor text changes and documentation fixes (Charlie Savage).
390
+ * Fix documentation error (fixes RubyForge #26888).
391
+ * Update documentation for Document#validation* methods (fixes RubyForge #24833).
392
+ * Update documentation and test (fixes Ruby Forge Issue #28770).
393
+ * Updated documentation in README (Anurag Priyam):
394
+ 1. rake doc does not work; use rake rdoc.
395
+ 2. gem mislav-hanna does not exist; use hanna.
396
+ 3. rake rdoc 'depends' on hanna; no need of RDOCOPTS
397
+ 4. Point to the github issue tracker instead of Ruby Forge
398
+ 5. Point to the github (gh-pages) site for docs
399
+
400
+ * Add tc_error to test suite (Charlie Savage).
401
+ * Add sax test (Stanislav O.Pogrebnyak).
402
+
403
+ == 2.0.2 / 2011-04-17 Charlie Savage
404
+
405
+ * Added binaries for windows (Charlie Savage).
406
+ * Update Ruby 1.9 encoding handling to support libxml versions older than
407
+ version 2.6.26 which was released on June 6, 2006 (Charlie Savage).
408
+
409
+ * Add publish_with_docs rake task - combines publishing the
410
+ website and docs (Anurag Priyam).
411
+
412
+ * Correctly copy the documentation directory (Anurag Priyam)
413
+ * Use relative link for rdoc so the links are correct on
414
+ both rubyforge and github (Anurag Priyam).
415
+
416
+ * Update Rakefile to use Hanna RDco template (Charlie Savage).
417
+ * Update dates on license file (Charlie Savage).
418
+ * Add api to allow setting of attribute namespaces. Fixes issue #10 (Charlie Savage).
419
+ * Remove old hack to call the on_error method. This hack isn't needed anymore
420
+ since a better workaround was put in place in the parser context. Fixes
421
+ This fixes issue #12 (Charlie Savage).
422
+
423
+ * Remove references to passing blocks to validation functions. The blocks are no
424
+ longer called since the bindings use libxml's structured error handling. See
425
+ issue #6 (Charlie Savage).
426
+
427
+ * Fix up comment in Document and Node. See issue #8 (Charlie Savage).
428
+ * Update website text (Charlie Savage).
429
+
430
+ == 2.0.0 / 2011-04-16 Charlie Savage
431
+
432
+ * Ruby 1.9.2 support. The biggest addition is encoding support.
433
+ Strings returned by the libxml bindings are now set to the encoding
434
+ of the underlying xml document (Charlie Savage).
435
+
436
+ * Rubinius compatibility. Removed unnecessary use of RHASH_TBL (Aman Gupta)
437
+ * Added .gemspec file (Dudley Flanders).
438
+ * Updated Windows checks to take into account mingw32 (Yaohan Chen).
439
+ * Fix memory leak in Reader#Expand (Szymon Nowak).
440
+ * Fix memory leaks in Reader#read_string, Reader#read_inner_xml
441
+ and Reader#read_outer_xml (Sean Geoghegan).
442
+
443
+ * Node#space_preserve= was backwards (Dudley Flanders)
444
+ * Fixed typo in readme, added rdoc extension (Loren Sands-Ramshaw).
445
+ * Switched to Rake Compiler (Charlie Savage).
446
+ * Use xmlMalloc() memory for ctxt->sax structure. Sometimes the ctxt->sax pointer
447
+ may not be zeroed in rxml_sax_parser_parse(), for example when exception is raised
448
+ in one of callbacks. This lets xmlFreeParserCtxt() clean this up (Alexey I. Froloff).
449
+
450
+ * Added a rake task to publish the website to github. Moved the jekyll website to
451
+ web directory (Anurag Priyam).
452
+
453
+ * Modernize project metadata and layout (7rans)
454
+
455
+
456
+ == 1.1.3 / 2009-03-18 Charlie Savage
457
+
458
+ * Improve performance 10 to 20% by turning on libxml2's dictionary
459
+ feature that allows parsers to reuse previously parsed strings.
460
+
461
+ * Fix XML::Node#remove! to work correctly with libxml's dictionary feature.
462
+ * Correctly set up parser context options.
463
+ * Simplify DOM modification code (Node#next=, Node#prev=, Node#sibling=) and
464
+ update documentation.
465
+
466
+ * Deprecated Node#add_child and Node#child=, use Node#<< instead
467
+ * Fix documentation for Node#<<
468
+ * Added Document#import to enable moving nodes from one document
469
+ to another document.
470
+
471
+
472
+ == 1.1.2 / 2009-03-12 Charlie Savage
473
+
474
+ * Added XML::Node#inner_xml helper method.
475
+ * Fix segmentation that could occur when calling the mark function on a
476
+ previously freed node.
477
+
478
+ == 1.1.1 / 2009-03-10 Charlie Savage
479
+
480
+ * Fix - Only include extra html parser context methods for versions of libxml
481
+ older than 2.6.27.
482
+
483
+ == 1.1.0 / 2009-03-09 Charlie Savage
484
+
485
+ * Fix bug caused by the mark function being called on partially initialized
486
+ attributes.
487
+
488
+ * Revert back to libxml2's internal memory manager.
489
+
490
+ == 1.0.0 / 2009-03-05 Charlie Savage
491
+
492
+ * OS X (Charlie Savage). Update bindings to support the default installed
493
+ version of libxml2 (2.6.16) on OS X 10.5 and the latest version available
494
+ via MacPorts.
495
+
496
+ == 0.9.9 / 2009-03-05 Charlie Savage
497
+
498
+ * Ruby 1.9.1 support (Charlie Savage). libxml-ruby now compiles and runs on
499
+ 1.8.6 and 1.9.1. With 1.8.6 all tests should pass while on 1.9.1 all but
500
+ encoding tests pass. The port to Ruby 1.9.1 revealed two memory
501
+ allocation bugs (one with dtds, one with nodes) which are now fixed.
502
+
503
+ * Better OS X support (Joe Khoobyar). The default version of libxml2
504
+ on OS X 10.5 is fairly old, resulting in this link error:
505
+
506
+ NSLinkModule() error
507
+ dyld: Symbol not found: _htmlNewParserCtxt
508
+
509
+ This can be fixed by using MacPorts to get a newer version of libxml2.
510
+ To make use of MacPorts, the build script has been updated to use xml2-config.
511
+ This can be fine-tuned using the new --with-xml2-config / --without-xml2-config
512
+ options to extconf.rb (default is --without-xml2-config to match existing behavior).
513
+
514
+ * Greatly reduced memory usage (Joe Khoobyar).
515
+ See http://rubyforge.org/pipermail/libxml-devel/2009-February/001375.html.
516
+
517
+ * Add Document#xhtml? and document#node_type methods (Joe Khoobyar)
518
+ * Add XPath::Object#last (Joe Khoobyar)
519
+ * Provide finer control over CDATA nodes on a parser by parser basis (Joe Khoobyar).
520
+ * Bug fix - Namespaces were incorrectly merged with attributes in the new sax2
521
+ handler (Charlie Savage).
522
+
523
+ * Bug fix - Support iterating over nodes and attributes even with blocks
524
+ that call remove! (Charlie Savage)
525
+
526
+ * Bug fix - If reader.node is NULL, return nil instead of crashing (Charlie Savage)
527
+ * Bug fix - Dtd's owned by documents were freed twice in some circumstances (Joe Khoobyar).
528
+ * Bug fix - Fix output escaping on attributes nodes (Joe Khoobyar).
529
+ * Bug fix - Make sure IO objects are not garbage collected when used
530
+ as parser sources (Charlie Savage).
531
+
532
+ == 0.9.8 / 2009-1-24 Charlie Savage
533
+
534
+ * Refactored XML::Parser, XML::HTMLParser, XML::SaxParser and
535
+ XML::Reader to have consistent APIs. All the parsers
536
+ now take a context object in their constructors, allowing fine
537
+ grained control over the parsers for advanced use cases. These
538
+ API changes are backwards compatible except
539
+ for XML::Reader, which now takes an optional hash table as a
540
+ second parameter in its various constructors versus an optional
541
+ boolean value.
542
+
543
+ * Updated all APIs to use the encoding constants defined
544
+ in XML::Encoding versus string values. This API change
545
+ is not backwards compatible.
546
+
547
+ * Added support for attribute declarations in DTD's via the new
548
+ XML::AttrDecl class (Len Lattanzi)
549
+
550
+ * Support libxml's content escaping capabilities for text nodes by
551
+ wrapping libxml's "xmlStringText" and "xmlStringTextNoenc"
552
+ (Joe Khoobyar).
553
+
554
+ * Updated XML::Reader#read API to return true if a node was read,
555
+ false if node was not read and raises an exception on an error.
556
+ Previously #read returned 1 if a node was read, 0 if a node was
557
+ not read and -1 for an error. This change is not backwards
558
+ compatible, but provides a more natural interface for Ruby by
559
+ allowing code like this:
560
+
561
+ while reader.read
562
+ # do stuff
563
+ end
564
+
565
+ * Changed XML::Error exception objects to return copies of nodes that
566
+ cause parse errors instead of the original node. This prevents
567
+ segmentation faults when the error is reraised.
568
+
569
+ * Added XML::Reader#node method.
570
+ * Fixed compile errors on OS X which uses an older version of libxml.
571
+ * Fixed memory leak when performing XPath searches.
572
+ * Fixed rdocs.
573
+ * Don't override libxml's default settings for entity substitution and
574
+ loading external DTDs. This may break some code - you may need to
575
+ add in a call to XML.default_substitute_entities = true or
576
+ XML.default_load_external_dtd = true.
577
+
578
+
579
+ == 0.9.7 / 2008-12-08 Charlie Savage
580
+
581
+ * Added SAX2 support. SAX handlers now define two new callbacks,
582
+ on_start_element_ns and on_end_element_ns methods. These
583
+ new callbacks support namespaces, making them superior to the older
584
+ callbacks on_start_element and on_end_element methods. The old callbacks
585
+ are still supported, but may be deprecated in the future depending
586
+ on community feedback.
587
+
588
+ * Added SAX support for libxml's structured error handling.
589
+ That menas sax handlers now define a new callback, on_error,
590
+ which takes one parameter, an instance of XML::Error. The older
591
+ on_parser_error, on_parser_warning and on_parser_fatal_error
592
+ callbacks are no longer suported so you must port your code.
593
+ Note that the older callbacks took one string parameter, instead of
594
+ an XML::Error object.
595
+
596
+ * Experimental work-around for libxml error handling bug - see
597
+ http://mail.gnome.org/archives/xml/2008-December/msg00014.html
598
+ for more information.
599
+
600
+ * Fix compilation bugs on Solaris.
601
+ * Fix Rdoc compilation bug.
602
+
603
+
604
+ == 0.9.6 / 2008-12-08 Charlie Savage
605
+
606
+ * Refactored namespace handling. The existing, and inconsistent,
607
+ namespace methods defined on XML::Node have been deprecated.
608
+ They have been replaced by a the new XML::Namespaces class.
609
+ Use this class to inspect a node's namespace, its default
610
+ namespace, its namespace definitions and which namespaces
611
+ are in scope. It can be accessed via the the
612
+ XML::Node#namespaces method.
613
+
614
+ * Rationalized XML::Document#save, XML::Document#to_s and
615
+ XML::Node#to_s to take an optional hash table of parameters
616
+ that control how output is generated. Supported parameters
617
+ include setting indentation on or off, the indentation level
618
+ and the output encoding. This is an API change and may break
619
+ existing calls to XML::Document#save. However, the previous
620
+ API was broken - setting the encoding resulted in an error so
621
+ its unlikely anyone is using it.
622
+
623
+ * Rationalized XML::Document#debug, XML::Node#debug, XML::XPath::XPathObject#Debug.
624
+ * Deprecated a number of duplicate dump* and debug_* methods in
625
+ XML::Document and XML::Node.
626
+
627
+ * Additional Ruby 1.9.1 compatibility fixes.
628
+ * Cleaned up header file guards.
629
+
630
+ == 0.9.5 / 2008-11-29 Charlie Savage
631
+
632
+ * Ruby 1.9.1 preview release compatibility (Felipe Contreras)
633
+ * Update Node#remove! to return the removed node and to set
634
+ its document to nil. This allows the node to be either
635
+ moved to another document, another part of the same document
636
+ or to be freed on the next garbage collection once its
637
+ references have gone out of scope.
638
+
639
+ * Fix bug where XPathExpression#compile mistakenly overwrote
640
+ RegExp#compile.
641
+
642
+ * Update Node to use standard ruby allocators and initializers.
643
+ * Update HTML parser to be more forgiving of invalid documents.
644
+ * Update include paths for Darwin Ports on OS X.
645
+ * Updated C code base to use BSD/Allman style
646
+
647
+
648
+ == 0.9.4 / 2008-11-24 Charlie Savage
649
+
650
+ * Update HTML parser so that it can read files, strings and io
651
+ streams.
652
+
653
+ * Update HTML parser to support user specified encodings.
654
+ * Additional C code cleanup.
655
+
656
+ == 0.9.3 / 2008-11-22 Charlie Savage
657
+
658
+ * Fixed segmentation fault caused by documents being freed
659
+ before xpath results that referenced the document (take 2).
660
+
661
+ * Allowed sax parser to use io stream
662
+ * Combined encoding and input classes
663
+ * Cleaned up C code - removed remaining legacy structures,
664
+ added static to most methods, changed C namespace from ruby_xml
665
+ to rxml
666
+
667
+ == 0.9.2 / 2008-11-19 Charlie Savage
668
+
669
+ * Add support for compiled XPath expressions (donated by Pavel Valodzka)
670
+ * Fixes for compiling on OS X 10.5.4 and 10.5.5
671
+
672
+ == 0.9.1 / 2008-11-18 Charlie Savage
673
+
674
+ * Expose LibXML's encoding support via a new Encoding object.
675
+ * Revamp error handling to be much easier to use. Errors are now
676
+ wrapped by the new XML::Error class and are thrown as exceptions
677
+ when it is appropriate.
678
+
679
+ * Fixed segmentation fault caused by documents being freed
680
+ before xpath results that referenced the document.
681
+
682
+ * Add Node#register_default_namespace to simplify default namespace handling.
683
+ * Significantly improve documentation
684
+ * A number of bug fixes and patches.
685
+
686
+ == 0.9.0 / 2008-11-18 Charlie Savage
687
+
688
+ * Version 0.9.0 was removed due to packaging errors.
689
+
690
+
691
+ == 0.8.3 / 2008-07-21 Charlie Savage
692
+
693
+ * Missed several files in last release
694
+
695
+ == 0.8.2 / 2008-07-21 Charlie Savage
696
+
697
+ * To use LibXML you can either require 'xml' or require 'libxml'.
698
+ The differences is that require 'xml' mixes the LibXML module into
699
+ the global namespace, thereby allowing you to write code such
700
+ as document = XML::Document.new. Note that this is different
701
+ from 0.8.0 and 0.8.1 and may require updating your code.
702
+
703
+ * Support RelaxNG validation (thanks to Morus Walter)
704
+ * Support passing IO objects to XmlReaders (thanks to Tom Hughes)
705
+ * Fix segmentation fault caused by adding an attribute to a CDATA node
706
+ * Moved node checking functions from C to Ruby
707
+ * Improved Windows support - libxml-ruby should now work out of the box.
708
+ * Improved Windows support - turned on libxml's zlib and iconv support.
709
+
710
+
711
+ == 0.8.1 / 2008-07-09 Charlie Savage
712
+
713
+ * Reimplemented Node#each_attr for backwards compatibility
714
+ * Moved node type test to Ruby.
715
+
716
+
717
+ == 0.8.0 / 2008-07-09 Charlie Savage
718
+
719
+ * Fixed bug in returning attributes from XPath results
720
+ * Fixed DOM traversal methods
721
+ * Changed Node#children to return an array of nodes
722
+ * Fixed bug in returning attributes from XPath results
723
+ * Refactored XPath support, providing more user hooks in the XPath::Context class
724
+ * Added Node#properties for backwards compatibility
725
+ * Updated setup.rb
726
+ * Added more tests
727
+ * Updated rdocs and README file
728
+ * Moved libxml into LibXML namespace
729
+
730
+
731
+ == 0.7.0 / 2008-07-09 Charlie Savage
732
+
733
+ * Added new attributes class to provide a more natural way of working with attributes
734
+ * Fixed XML::Attr to better support namespaces
735
+ * Added documentation on how to use namespaces with XPath
736
+ * Removed allocation of extraneous structures used to wrap nodes, namespaces and attributes
737
+ * Cleaned up tests and added new test suite
738
+ * Updated rdocs and README file
739
+ * Cleaned out most of the bug list
740
+
741
+
742
+ == 0.6.0 / 2008-07-01 Charlie Savage
743
+
744
+ * Fixed memory allocation errors in Windows. On Windows, it is essential that the same library that allocates memory must free it. Thus ALLOC calls must be matched to ruby_xfree calls, which they were not. In addition, in one case Ruby was allocating memory to be freed by libxml. On Windows, that's a segmentation fault. On Linux it might fly, but still seems like a bad idea.
745
+ * Fixed segmentation fault in xml reader expand (same xml tree freed twice)
746
+ * Applied a number of patches from Tom Bagby, including fixes for xpath segmentation faults and fixes for various memory leaks
747
+ * Cleaned up a number of compiler warnings
748
+ * Renamed libxml_so.so to libxml_ruby.so (same for xslt). That wasn't actually my original intention, but um, it kind of sort of happened. It should not be noticeable from an end-user perspective.
749
+ * Added rake files for building with MingW
750
+ * Added rake files for packing gems. Note that I did this outside the existing rake tasks because I didn't see how they were actually building the gems.
751
+ * Cleaned up the tests and added a few more based on bug reports from the Tracker and mailing list.
752
+ * Cleaned out the patch queue and went through about 1/2 the bug list
753
+
754
+
755
+ === 2007-11-16 "Dan Janowski" <danj at 3skel.com>
756
+
757
+ * Merged Dan's MEM2 branch to trunk.
758
+
759
+ == 0.5.3 /
760
+
761
+ === 2007-11-16 "Dan Janowski" <danj at 3skel.com>
762
+
763
+ * Merged Dan's MEM2 branch to trunk.
764
+
765
+
766
+ == 0.5.2 / 2007-10-10
767
+
768
+ === 2007-10-10 "Dan Janowski" <danj at 3skel.com>
769
+
770
+ * (Dan, fill in the major points of the changes you made up to here -thanks)
771
+
772
+ === 2007-01-14 "Laurent Sansonetti" <lrz at chopine.be>
773
+
774
+ * Added some preliminary RDoc comments for XML::Reader.
775
+
776
+ === 2006-12-05 "Laurent Sansonetti" <lrz at chopine.be>
777
+
778
+ * Added XML::Reader, a set of bindings to the xmlTextReader API.
779
+
780
+
781
+ == 0.3.8.4 / 2006-12-02
782
+
783
+ === 2006-04-15 "Ross Bamform" <rosco at roscopeco.co.uk>
784
+
785
+ * Implemented SAX parser callback handling.
786
+
787
+ === 2006-04-12 "Ross Bamford" <rosco at roscopeco.co.uk>
788
+
789
+ * Integrated and tested community patches.
790
+ * Defined XML::Node (hash) equality in terms of XML representation.
791
+
792
+ === 2006-04-12 "Tim Yamin" <plasmaroo at gentoo.org>
793
+
794
+ * Fixed XML::Node#content inoperable bug (plasmaroo) [patch]
795
+ * Fixed memory leak in same
796
+
797
+ === 2006-04-12 "Mark Van Holstyn" <mvette13 at gmail.com>
798
+
799
+ * Added XML::Node::Set#first (mvette13) [patch]
800
+ * Added XML::Node::Set#empty?
801
+ * Fixed XML::Node::Set#to_a
802
+ * Added XML::Node#find_first
803
+ * Added XML::Node#remove!
804
+
805
+ === 2006-03-27 "Ross Bamford" <rosco at roscopeco.co.uk>
806
+
807
+ * Integrated contributed XML::Parser.register_error_handler patch (rosco)
808
+
809
+ === 2006-02-27 "Ross Bamford" <rosco at roscopeco.co.uk>
810
+
811
+ * Fixed all multiple symbol definitions for -fno-common.
812
+ * Removed OSX -fno-common workaround.
813
+
814
+
815
+ == 0.3.6 / 2006-02-23
816
+
817
+ === 2006-02-21 "Ross Bamford" <rosco at roscopeco.co.uk>
818
+
819
+ * Patched extconf.rb with OSX -fno-common workaround
820
+ * Added gem and packaging support to Rakefile
821
+ * Moved version update to Rakefile
822
+ * Removed legacy project utility scripts
823
+
824
+ === 2005-02-19 "Ross Bamford" <rosco at roscopeco.co.uk>
825
+
826
+ * Fixed doublefree bug in ruby_xml_attr.
827
+ * Fixed small leak in parser
828
+
829
+ === 2005-12-18 "Ross Bamford" <rosco at roscopeco.co.uk>
830
+
831
+ * Updated for GCC 4.0 (community patches)
832
+ * Fixed default validation bug
833
+ * Refactored project, removed outdated files, cleaned up tests.
834
+ * Added RDoc documentation across .c files.
835
+ * Fixed up a few strings.
836
+
837
+ === 2004-04-04 "Mangler Jurgen" <et@wkv.at>
838
+
839
+ * ruby_xml_node.cz: fixed ruby_xml_node_property_set. The ill-behaviour
840
+ was, that there was added a second attribute of the same
841
+ name, when you were setting the value of an already existing
842
+ attribute.
843
+
844
+ === 2004-03-17 "Lukas Svoboda" <luks@fi.muni.cz>
845
+
846
+ * ruby_xml_node.c: ruby_xml_node_to_s now returns XML subtree dump.
847
+
848
+ === 2004-02-27 "Martin Povolny" <martin@solnet.cz>
849
+
850
+ * ruby_xml_node.c: added XML::Node.copy, this makes possible building
851
+ of xml documents from nodes taken from other xml documents
852
+ without making ruby SIGSEGV (see tests/copy_bug.rb).
853
+
854
+ === 2004-02-26 "Martin Povolny" <martin@solnet.cz>
855
+
856
+ * ruby_xml_dtd.c, ruby_xml_dtd.h, ruby_xml_schema.c, ruby_xml_schema.h:
857
+ more work on validation, now you can actually validate
858
+ document using dtd or xml schema, also solved warning and
859
+ error propagation (see tests/{dtd|schema}-test.rb).
860
+
861
+ === 2003-12-30 "Martin Povolny" <martin@solnet.cz>
862
+
863
+ * ruby_xml_dtd.c, ruby_xml_dtd.h, ruby_xml_schema.c, ruby_xml_schema.h:
864
+ preliminary support for dtd and schema validation
865
+
866
+ === 2003-09-15 "Martin Povolny" <martin@solnet.cz>
867
+
868
+ * ruby_xml_input_cbg.c, libxml.c: added class InputCallbacks to make
869
+ possible registering custom input callbacks
870
+ handlers (xmlRegisterInputCallbacks) written in ruby
871
+
872
+ === 2003-08-01 "Martin Povolny" <martin@solnet.cz>
873
+
874
+ * ruby_xml_document.c: corrected argument handling in ruby_xml_document_find
875
+ * ruby_xml_node.c: corrected argument handling in ruby_xml_node_find