libxml-ruby 4.1.1 → 5.0.3

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/HISTORY +33 -0
  3. data/README.rdoc +7 -16
  4. data/ext/libxml/extconf.rb +67 -61
  5. data/ext/libxml/ruby_libxml.h +43 -44
  6. data/ext/libxml/ruby_xml.c +0 -343
  7. data/ext/libxml/ruby_xml.h +9 -10
  8. data/ext/libxml/ruby_xml_attr_decl.c +154 -153
  9. data/ext/libxml/ruby_xml_attributes.c +276 -275
  10. data/ext/libxml/ruby_xml_attributes.h +2 -0
  11. data/ext/libxml/ruby_xml_document.c +6 -6
  12. data/ext/libxml/ruby_xml_document.h +11 -11
  13. data/ext/libxml/ruby_xml_dtd.c +95 -86
  14. data/ext/libxml/ruby_xml_encoding.h +20 -18
  15. data/ext/libxml/ruby_xml_error.c +12 -5
  16. data/ext/libxml/ruby_xml_error.h +2 -2
  17. data/ext/libxml/ruby_xml_html_parser_context.c +35 -21
  18. data/ext/libxml/ruby_xml_namespace.c +0 -3
  19. data/ext/libxml/ruby_xml_node.c +1394 -1398
  20. data/ext/libxml/ruby_xml_parser.h +1 -1
  21. data/ext/libxml/ruby_xml_parser_context.c +47 -39
  22. data/ext/libxml/ruby_xml_parser_options.c +9 -1
  23. data/ext/libxml/ruby_xml_parser_options.h +1 -1
  24. data/ext/libxml/ruby_xml_reader.c +1244 -1242
  25. data/ext/libxml/ruby_xml_relaxng.c +113 -112
  26. data/ext/libxml/ruby_xml_sax2_handler.c +1 -1
  27. data/ext/libxml/ruby_xml_sax_parser.c +1 -9
  28. data/ext/libxml/ruby_xml_schema.c +422 -420
  29. data/ext/libxml/ruby_xml_schema_attribute.c +108 -107
  30. data/ext/libxml/ruby_xml_schema_element.c +70 -69
  31. data/ext/libxml/ruby_xml_schema_type.c +252 -251
  32. data/ext/libxml/ruby_xml_version.h +5 -5
  33. data/ext/libxml/ruby_xml_writer.c +1138 -1137
  34. data/ext/libxml/ruby_xml_xpath.c +1 -1
  35. data/ext/libxml/ruby_xml_xpath_context.c +2 -2
  36. data/ext/libxml/ruby_xml_xpath_expression.c +81 -81
  37. data/ext/libxml/ruby_xml_xpath_object.c +340 -339
  38. data/lib/libxml/document.rb +15 -15
  39. data/lib/libxml/html_parser.rb +23 -23
  40. data/lib/libxml/parser.rb +26 -24
  41. data/lib/libxml/schema/element.rb +27 -19
  42. data/test/test.rb +5 -0
  43. data/test/test_document.rb +9 -1
  44. data/test/test_document_write.rb +1 -4
  45. data/test/test_dtd.rb +5 -8
  46. data/test/test_encoding.rb +1 -4
  47. data/test/test_helper.rb +9 -2
  48. data/test/test_html_parser.rb +162 -162
  49. data/test/test_namespace.rb +1 -3
  50. data/test/test_node.rb +1 -3
  51. data/test/test_node_write.rb +1 -4
  52. data/test/test_parser.rb +26 -17
  53. data/test/test_reader.rb +4 -4
  54. data/test/test_sax_parser.rb +1 -1
  55. data/test/test_schema.rb +237 -231
  56. data/test/test_xml.rb +0 -99
  57. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 791562c871b9c8d9680778bf68bdde22c5911ad147bd28634f3051d2c3b5bf6a
4
- data.tar.gz: e2782de74edb9609634ef022f9d94d98591d3e49c38cb5d667af407ffa87b5da
3
+ metadata.gz: 6b052083c2417da07faf0c5f32b5e518846ae024066383c0be78a1c6a2d492ef
4
+ data.tar.gz: 0cbd221ea22756e0c28909e17f9c01975c2fca376a579624c915dc7d2604899c
5
5
  SHA512:
6
- metadata.gz: f3569183ea0e3cc00895c2fa3760b280dd1244f7c69144e661c7fbbdc575f57c67b479b5f0074a6cbf13c93d25bb6e9bd1c89df443388187f8f6472ba00ddfd8
7
- data.tar.gz: d856e272adb85fa91aca6d83fd3a5d1c4ae4e1e40f2cb318d9e369ed86c14df973c942c74a4c84e76c83f270eaaadc47021571852e1e39ef750927a3c5930f07
6
+ metadata.gz: 377fb83e8a6080462bbabed39309a42d1f5af793d68576b9b2e39dd12a72ed1d56b77ffe005c271b63d299ff1bd2b38ddc83d8ae6b47d4084c8568df0cc16cfd
7
+ data.tar.gz: 05dea25232fdf0f79306375f7889a9e6a9827f6b29a00c0acdebcbfd20a93c90c514051835add11adb8ed5c5cd494d4fd25d44ae26592c8ab9c63e06d2893def
data/HISTORY CHANGED
@@ -1,5 +1,38 @@
1
1
  = Release History
2
2
 
3
+ == 5.0.3 / 2024-03-11
4
+
5
+ * Update xmlStructuredErrorFunc to be backwards compatible
6
+
7
+ == 5.0.2 / 2024-01-08
8
+
9
+ * Fix broken DTD creation (DTD name is not required)
10
+
11
+ == 5.0.1 / 2024-01-08
12
+
13
+ * Fix broken Document#io method that was broken by switching Parsers to use keyword arguments
14
+
15
+ == 5.0.0 / 2024-01-07
16
+
17
+ * This release is major version bump because it removes access to global parser options
18
+ that libxml2 version 2.12.0 deprecated (see https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.0)
19
+ In the unlikely event your code uses these options, then you will need to update it.
20
+ Specifically, instead of setting global parser options, pass them directly to either Parsers
21
+ or ParserContexts when creating them. Options are defined as constants in
22
+ LibXML::XML::Parser::Options and LibXML::HTML::Parser::Options
23
+ * Update Parser initialize methods to take keyword parameters instead of a hash table (you may have to update your code due to this change)
24
+ * Fix broken compilation with libxml2 version 2.12.0 (due to libxml2 header changes)
25
+ * Add support for Ruby 3.3.*
26
+ * Remove support for Ruby 2.7.* (gem should still work but is no longer tested)
27
+
28
+ == 4.1.2 / 2023-11-04
29
+
30
+ * Fix Ruby warnings about undefined allocators (yuuji.yaginuma, Christopher Sahnwaldt)
31
+ * Fix Schema::Element required? and array? (John Andrews)
32
+ * Remove SchemaElement#minOccurs and SchemaElement#maxOccurs since they actually did not work (Charlie Savage)
33
+ * Fix typo: XPatch -> XPath (Christopher Sahnwaldt)
34
+ * Introduce new alternative Homebrew installation search paths to extconf makefile (Pierce Brooks)
35
+
3
36
  == 4.1.1 / 2023-05-01
4
37
 
5
38
  * Fix compile warning (or error) for input_callbacks_register_input_callbacks (Charlie Savage)
data/README.rdoc CHANGED
@@ -11,7 +11,7 @@ We think libxml-ruby is the best XML library for Ruby because:
11
11
  * Conformance - It passes all 1800+ tests from the OASIS XML Tests Suite
12
12
 
13
13
  == Requirements
14
- libxml-ruby requires Ruby 1.8.7 or higher. It depends on libxml2 to
14
+ libxml-ruby requires Ruby 3.0.0 or higher. It depends on libxml2 to
15
15
  function properly. libxml2, in turn, depends on:
16
16
 
17
17
  * libm (math routines: very standard)
@@ -20,9 +20,9 @@ function properly. libxml2, in turn, depends on:
20
20
 
21
21
  If you are running Linux or Unix you'll need a C compiler so the
22
22
  extension can be compiled when it is installed. If you are running
23
- Windows, then install the x64-mingw32 gem or build it yourself using
24
- Devkit[http://rubyinstaller.org/add-ons/devkit/] or
25
- msys2[https://msys2.github.io/].
23
+ Windows, then install the x64-mingw-ucr gem or build it yourself using (Ruby
24
+ for Windows)[https://rubyinstaller.org/] or directly with msys2[https://msys2.github.io/]
25
+ and ucrt64.
26
26
 
27
27
  == Installation
28
28
  The easiest way to install libxml-ruby is via RubyGems. To install:
@@ -46,13 +46,9 @@ Or bundler:
46
46
  <tt>bundle install libxml-ruby</tt>
47
47
 
48
48
  If you are running Windows, then install the libxml-ruby-x64-mingw32 gem.
49
- The gem includes prebuilt extensions for Ruby 2.3. These
50
- extensions are built using MinGW64 and libxml2 version 2.9.3,
51
- iconv version 1.14 and zlib version 1.2.8. Note these binaries
52
- are available in the <tt>lib\\libs</tt> directory. To use them, put them
53
- on your <tt>PATH</tt>.
49
+ The gem includes prebuilt extensions for Ruby 3.2 and 3.3.
54
50
 
55
- The gem also includes a Microsoft VC++ 2012 solution and XCode 5 project - these
51
+ The gem also includes a Microsoft VC++ solution and XCode project - these
56
52
  are very useful for debugging.
57
53
 
58
54
  libxml-ruby's source codes lives on GitHub[https://github.com/xml4r/libxml-ruby].
@@ -128,11 +124,6 @@ For example:
128
124
 
129
125
  For simplicity's sake, the documentation uses the xml module in its examples.
130
126
 
131
- == Threading
132
- libxml-ruby fully supports native, background Ruby threads. This of course
133
- only applies to Ruby 1.9.x and higher since earlier versions of Ruby do not
134
- support native threads.
135
-
136
127
  == Tests
137
128
 
138
129
  To run tests you first need to build the shared libary:
@@ -143,7 +134,7 @@ Once you have build the shared libary, you can then run tests using rake:
143
134
 
144
135
  rake test
145
136
 
146
- +Travis build status: {<img src="https://travis-ci.org/xml4r/libxml-ruby.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/xml4r/libxml-ruby]
137
+ +Build status: {rdoc-image:https://github.com/xml4r/libxml-ruby/actions/workflows/mri.yml/badge.svg}[https://github.com/xml4r/libxml-ruby/actions/workflows/mri.yml]
147
138
 
148
139
  == Performance
149
140
 
@@ -1,61 +1,67 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'mkmf'
4
-
5
- def crash(str)
6
- printf(" extconf failure: %s\n", str)
7
- exit 1
8
- end
9
-
10
- xc = with_config('xml2-config')
11
- if xc
12
- cflags = `#{xc} --cflags`.chomp
13
- if $? != 0
14
- cflags = nil
15
- else
16
- libs = `#{xc} --libs`.chomp
17
- if $? != 0
18
- libs = nil
19
- else
20
- $CFLAGS += ' ' + cflags
21
- $libs = libs + " " + $libs
22
- end
23
- end
24
- else
25
- dir_config('xml2')
26
- end
27
-
28
- found_header = find_header('libxml/xmlversion.h',
29
- '/opt/include/libxml2',
30
- '/opt/local/include/libxml2',
31
- '/usr/local/include/libxml2',
32
- '/usr/include/libxml2',
33
- '/usr/local/include')
34
-
35
- found_lib = find_library('xml2', 'xmlParseDoc',
36
- '/opt/lib',
37
- '/opt/local/lib',
38
- '/usr/local/lib',
39
- '/usr/lib')
40
-
41
- found_lib ||= find_library('libxml2', 'xmlParseDoc',
42
- '/opt/lib',
43
- '/opt/local/lib',
44
- '/usr/local/lib',
45
- '/usr/lib')
46
-
47
- if !found_header || !found_lib
48
- crash(<<~EOL)
49
- Cannot find libxml2.
50
-
51
- Install the library or try one of the following options to extconf.rb:
52
-
53
- --with-xml2-config=/path/to/xml2-config
54
- --with-xml2-dir=/path/to/libxml2
55
- --with-xml2-lib=/path/to/libxml2/lib
56
- --with-xml2-include=/path/to/libxml2/include
57
- EOL
58
- end
59
-
60
- create_header()
61
- create_makefile('libxml_ruby')
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'mkmf'
4
+
5
+ def crash(str)
6
+ printf(" extconf failure: %s\n", str)
7
+ exit 1
8
+ end
9
+
10
+ xc = with_config('xml2-config')
11
+ if xc
12
+ cflags = `#{xc} --cflags`.chomp
13
+ if $? != 0
14
+ cflags = nil
15
+ else
16
+ libs = `#{xc} --libs`.chomp
17
+ if $? != 0
18
+ libs = nil
19
+ else
20
+ $CFLAGS += ' ' + cflags
21
+ $libs = libs + " " + $libs
22
+ end
23
+ end
24
+ else
25
+ dir_config('xml2')
26
+ end
27
+
28
+ found_header = find_header('libxml/xmlversion.h',
29
+ '/opt/include/libxml2',
30
+ '/opt/local/include/libxml2',
31
+ '/opt/homebrew/opt/libxml2/include/libxml2',
32
+ '/usr/local/include/libxml2',
33
+ '/usr/include/libxml2',
34
+ '/usr/local/include',
35
+ '/usr/local/opt/libxml2/include/libxml2')
36
+
37
+ found_lib = find_library('xml2', 'xmlParseDoc',
38
+ '/opt/lib',
39
+ '/opt/local/lib',
40
+ '/opt/homebrew/opt/libxml2/lib',
41
+ '/usr/lib',
42
+ '/usr/local/lib',
43
+ '/usr/local/opt/libxml2/lib')
44
+
45
+ found_lib ||= find_library('libxml2', 'xmlParseDoc',
46
+ '/opt/lib',
47
+ '/opt/local/lib',
48
+ '/opt/homebrew/opt/libxml2/lib',
49
+ '/usr/lib',
50
+ '/usr/local/lib',
51
+ '/usr/local/opt/libxml2/lib')
52
+
53
+ if !found_header || !found_lib
54
+ crash(<<~EOL)
55
+ Cannot find libxml2.
56
+
57
+ Install the library or try one of the following options to extconf.rb:
58
+
59
+ --with-xml2-config=/path/to/xml2-config
60
+ --with-xml2-dir=/path/to/libxml2
61
+ --with-xml2-lib=/path/to/libxml2/lib
62
+ --with-xml2-include=/path/to/libxml2/include
63
+ EOL
64
+ end
65
+
66
+ create_header()
67
+ create_makefile('libxml_ruby')
@@ -1,44 +1,43 @@
1
- /* Please see the LICENSE file for copyright and distribution information */
2
-
3
- #ifndef __RUBY_LIBXML_H__
4
- #define __RUBY_LIBXML_H__
5
-
6
- #include <ruby.h>
7
- #include <libxml/xmlversion.h>
8
-
9
- #include "ruby_xml_version.h"
10
- #include "ruby_xml.h"
11
- #include "ruby_xml_io.h"
12
- #include "ruby_xml_error.h"
13
- #include "ruby_xml_encoding.h"
14
- #include "ruby_xml_attributes.h"
15
- #include "ruby_xml_attr.h"
16
- #include "ruby_xml_attr_decl.h"
17
- #include "ruby_xml_document.h"
18
- #include "ruby_xml_node.h"
19
- #include "ruby_xml_namespace.h"
20
- #include "ruby_xml_namespaces.h"
21
- #include "ruby_xml_parser.h"
22
- #include "ruby_xml_parser_options.h"
23
- #include "ruby_xml_parser_context.h"
24
- #include "ruby_xml_html_parser.h"
25
- #include "ruby_xml_html_parser_options.h"
26
- #include "ruby_xml_html_parser_context.h"
27
- #include "ruby_xml_reader.h"
28
- #include "ruby_xml_writer.h"
29
- #include "ruby_xml_sax2_handler.h"
30
- #include "ruby_xml_sax_parser.h"
31
- #include "ruby_xml_writer.h"
32
- #include "ruby_xml_xinclude.h"
33
- #include "ruby_xml_xpath.h"
34
- #include "ruby_xml_xpath_expression.h"
35
- #include "ruby_xml_xpath_context.h"
36
- #include "ruby_xml_xpath_object.h"
37
- #include "ruby_xml_input_cbg.h"
38
- #include "ruby_xml_dtd.h"
39
- #include "ruby_xml_schema.h"
40
- #include "ruby_xml_relaxng.h"
41
-
42
- extern VALUE mLibXML;
43
-
44
- #endif
1
+ /* Please see the LICENSE file for copyright and distribution information */
2
+
3
+ #ifndef __RUBY_LIBXML_H__
4
+ #define __RUBY_LIBXML_H__
5
+
6
+ #include <ruby.h>
7
+
8
+ #include "ruby_xml_version.h"
9
+ #include "ruby_xml.h"
10
+ #include "ruby_xml_io.h"
11
+ #include "ruby_xml_error.h"
12
+ #include "ruby_xml_encoding.h"
13
+ #include "ruby_xml_attributes.h"
14
+ #include "ruby_xml_attr.h"
15
+ #include "ruby_xml_attr_decl.h"
16
+ #include "ruby_xml_document.h"
17
+ #include "ruby_xml_node.h"
18
+ #include "ruby_xml_namespace.h"
19
+ #include "ruby_xml_namespaces.h"
20
+ #include "ruby_xml_parser.h"
21
+ #include "ruby_xml_parser_options.h"
22
+ #include "ruby_xml_parser_context.h"
23
+ #include "ruby_xml_html_parser.h"
24
+ #include "ruby_xml_html_parser_options.h"
25
+ #include "ruby_xml_html_parser_context.h"
26
+ #include "ruby_xml_reader.h"
27
+ #include "ruby_xml_writer.h"
28
+ #include "ruby_xml_sax2_handler.h"
29
+ #include "ruby_xml_sax_parser.h"
30
+ #include "ruby_xml_writer.h"
31
+ #include "ruby_xml_xinclude.h"
32
+ #include "ruby_xml_xpath.h"
33
+ #include "ruby_xml_xpath_expression.h"
34
+ #include "ruby_xml_xpath_context.h"
35
+ #include "ruby_xml_xpath_object.h"
36
+ #include "ruby_xml_input_cbg.h"
37
+ #include "ruby_xml_dtd.h"
38
+ #include "ruby_xml_schema.h"
39
+ #include "ruby_xml_relaxng.h"
40
+
41
+ extern VALUE mLibXML;
42
+
43
+ #endif
@@ -328,264 +328,6 @@ static VALUE rxml_enabled_zlib_q(VALUE klass)
328
328
  #endif
329
329
  }
330
330
 
331
- /*
332
- * call-seq:
333
- * XML.debug_entities -> (true|false)
334
- *
335
- * Determine whether included-entity debugging is enabled.
336
- * (Requires Libxml to be compiled with debugging support)
337
- */
338
- static VALUE rxml_debug_entities_get(VALUE klass)
339
- {
340
- #ifdef LIBXML_DEBUG_ENABLED
341
- if (xmlParserDebugEntities)
342
- return(Qtrue);
343
- else
344
- return(Qfalse);
345
- #else
346
- rb_warn("libxml was compiled with debugging turned off");
347
- return (Qfalse);
348
- #endif
349
- }
350
-
351
- /*
352
- * call-seq:
353
- * XML.debug_entities = true|false
354
- *
355
- * Enable or disable included-entity debugging.
356
- * (Requires Libxml to be compiled with debugging support)
357
- */
358
- static VALUE rxml_debug_entities_set(VALUE klass, VALUE value)
359
- {
360
- #ifdef LIBXML_DEBUG_ENABLED
361
- if (value == Qfalse)
362
- {
363
- xmlParserDebugEntities = 0;
364
- return(Qfalse);
365
- }
366
- else
367
- {
368
- xmlParserDebugEntities = 1;
369
- return(Qtrue);
370
- }
371
- #else
372
- rb_warn("libxml was compiled with debugging turned off");
373
- #endif
374
- }
375
-
376
- /*
377
- * call-seq:
378
- * XML.default_keep_blanks -> (true|false)
379
- *
380
- * Determine whether parsers retain whitespace by default.
381
- */
382
- static VALUE rxml_default_keep_blanks_get(VALUE klass)
383
- {
384
- if (xmlKeepBlanksDefaultValue)
385
- return (Qtrue);
386
- else
387
- return (Qfalse);
388
- }
389
-
390
- /*
391
- * call-seq:
392
- * XML.default_keep_blanks = true|false
393
- *
394
- * Controls whether parsers retain whitespace by default.
395
- */
396
- static VALUE rxml_default_keep_blanks_set(VALUE klass, VALUE value)
397
- {
398
- if (value == Qfalse)
399
- {
400
- xmlKeepBlanksDefaultValue = 0;
401
- return (Qfalse);
402
- }
403
- else if (value == Qtrue)
404
- {
405
- xmlKeepBlanksDefaultValue = 1;
406
- return (Qtrue);
407
- }
408
- else
409
- {
410
- rb_raise(rb_eArgError, "Invalid argument, must be a boolean");
411
- }
412
- }
413
-
414
- /*
415
- * call-seq:
416
- * XML.default_load_external_dtd -> (true|false)
417
- *
418
- * Determine whether parsers load external DTDs by default.
419
- */
420
- static VALUE rxml_default_load_external_dtd_get(VALUE klass)
421
- {
422
- if (xmlLoadExtDtdDefaultValue)
423
- return (Qtrue);
424
- else
425
- return (Qfalse);
426
- }
427
-
428
- /*
429
- * call-seq:
430
- * XML.default_load_external_dtd = true|false
431
- *
432
- * Controls whether parsers load external DTDs by default.
433
- */
434
- static VALUE rxml_default_load_external_dtd_set(VALUE klass, VALUE value)
435
- {
436
- if (value == Qfalse)
437
- {
438
- xmlLoadExtDtdDefaultValue = 0;
439
- return (Qfalse);
440
- }
441
- else
442
- {
443
- xmlLoadExtDtdDefaultValue = 1;
444
- return (Qtrue);
445
- }
446
- }
447
-
448
- /*
449
- * call-seq:
450
- * XML.default_line_numbers -> (true|false)
451
- *
452
- * Determine whether parsers retain line-numbers by default.
453
- */
454
- static VALUE rxml_default_line_numbers_get(VALUE klass)
455
- {
456
- if (xmlLineNumbersDefaultValue)
457
- return (Qtrue);
458
- else
459
- return (Qfalse);
460
- }
461
-
462
- /*
463
- * call-seq:
464
- * XML.default_line_numbers = true|false
465
- *
466
- * Controls whether parsers retain line-numbers by default.
467
- */
468
- static VALUE rxml_default_line_numbers_set(VALUE klass, VALUE value)
469
- {
470
- if (value == Qfalse)
471
- {
472
- xmlLineNumbersDefault(0);
473
- return (Qfalse);
474
- }
475
- else
476
- {
477
- xmlLineNumbersDefault(1);
478
- return (Qtrue);
479
- }
480
- }
481
-
482
- int rxml_libxml_default_options(void)
483
- {
484
- int options = 0;
485
-
486
- if (xmlLoadExtDtdDefaultValue)
487
- options |= XML_PARSE_DTDLOAD;
488
-
489
- if (xmlDoValidityCheckingDefaultValue)
490
- options |= XML_PARSE_DTDVALID;
491
-
492
- if (!xmlKeepBlanksDefaultValue)
493
- options |= XML_PARSE_NOBLANKS;
494
-
495
- if (xmlSubstituteEntitiesDefaultValue)
496
- options |= XML_PARSE_NOENT;
497
-
498
- if (!xmlGetWarningsDefaultValue)
499
- options |= XML_PARSE_NOWARNING;
500
-
501
- if (xmlPedanticParserDefaultValue)
502
- options |= XML_PARSE_PEDANTIC;
503
-
504
- return options;
505
- }
506
-
507
- /*
508
- * call-seq:
509
- * XML.default_options -> int
510
- *
511
- * Returns an integer that summarize libxml2's default options.
512
- */
513
- static VALUE rxml_default_options_get(VALUE klass)
514
- {
515
- int options = rxml_libxml_default_options();
516
- return INT2NUM(options);
517
- }
518
-
519
- /*
520
- * call-seq:
521
- * XML.default_pedantic_parser -> (true|false)
522
- *
523
- * Determine whether parsers are pedantic by default.
524
- */
525
- static VALUE rxml_default_pedantic_parser_get(VALUE klass)
526
- {
527
- if (xmlPedanticParserDefaultValue)
528
- return (Qtrue);
529
- else
530
- return (Qfalse);
531
- }
532
-
533
- /*
534
- * call-seq:
535
- * XML.default_pedantic_parser = true|false
536
- *
537
- * Controls whether parsers are pedantic by default.
538
- */
539
- static VALUE rxml_default_pedantic_parser_set(VALUE klass, VALUE value)
540
- {
541
- if (value == Qfalse)
542
- {
543
- xmlPedanticParserDefault(0);
544
- return (Qfalse);
545
- }
546
- else
547
- {
548
- xmlPedanticParserDefault(1);
549
- return (Qtrue);
550
- }
551
- }
552
-
553
- /*
554
- * call-seq:
555
- * XML.default_substitute_entities -> (true|false)
556
- *
557
- * Determine whether parsers perform inline entity substitution
558
- * (for external entities) by default.
559
- */
560
- static VALUE rxml_default_substitute_entities_get(VALUE klass)
561
- {
562
- if (xmlSubstituteEntitiesDefaultValue)
563
- return (Qtrue);
564
- else
565
- return (Qfalse);
566
- }
567
-
568
- /*
569
- * call-seq:
570
- * XML.default_substitute_entities = true|false
571
- *
572
- * Controls whether parsers perform inline entity substitution
573
- * (for external entities) by default.
574
- */
575
- static VALUE rxml_default_substitute_entities_set(VALUE klass, VALUE value)
576
- {
577
- if (value == Qfalse)
578
- {
579
- xmlSubstituteEntitiesDefault(0);
580
- return (Qfalse);
581
- }
582
- else
583
- {
584
- xmlSubstituteEntitiesDefault(1);
585
- return (Qtrue);
586
- }
587
- }
588
-
589
331
  /*
590
332
  * call-seq:
591
333
  * XML.default_tree_indent_string -> "string"
@@ -615,74 +357,6 @@ static VALUE rxml_default_tree_indent_string_set(VALUE klass, VALUE string)
615
357
  return (string);
616
358
  }
617
359
 
618
- /*
619
- * call-seq:
620
- * XML.default_validity_checking -> (true|false)
621
- *
622
- * Determine whether parsers perform XML validation by default.
623
- */
624
- static VALUE rxml_default_validity_checking_get(VALUE klass)
625
- {
626
- if (xmlDoValidityCheckingDefaultValue)
627
- return (Qtrue);
628
- else
629
- return (Qfalse);
630
- }
631
-
632
- /*
633
- * call-seq:
634
- * XML.default_validity_checking = true|false
635
- *
636
- * Controls whether parsers perform XML validation by default.
637
- */
638
- static VALUE rxml_default_validity_checking_set(VALUE klass, VALUE value)
639
- {
640
- if (value == Qfalse)
641
- {
642
- xmlDoValidityCheckingDefaultValue = 0;
643
- return (Qfalse);
644
- }
645
- else
646
- {
647
- xmlDoValidityCheckingDefaultValue = 1;
648
- return (Qtrue);
649
- }
650
- }
651
-
652
- /*
653
- * call-seq:
654
- * XML.default_warnings -> (true|false)
655
- *
656
- * Determine whether parsers output warnings by default.
657
- */
658
- static VALUE rxml_default_warnings_get(VALUE klass)
659
- {
660
- if (xmlGetWarningsDefaultValue)
661
- return (Qtrue);
662
- else
663
- return (Qfalse);
664
- }
665
-
666
- /*
667
- * call-seq:
668
- * XML.default_warnings = true|false
669
- *
670
- * Controls whether parsers output warnings by default.
671
- */
672
- static VALUE rxml_default_warnings_set(VALUE klass, VALUE value)
673
- {
674
- if (value == Qfalse)
675
- {
676
- xmlGetWarningsDefaultValue = 0;
677
- return (Qfalse);
678
- }
679
- else
680
- {
681
- xmlGetWarningsDefaultValue = 1;
682
- return (Qtrue);
683
- }
684
- }
685
-
686
360
  /*
687
361
  * call-seq:
688
362
  * XML.default_compression -> (true|false)
@@ -869,27 +543,10 @@ void rxml_init_xml(void)
869
543
  rb_define_module_function(mXML, "catalog_dump", rxml_catalog_dump, 0);
870
544
  rb_define_module_function(mXML, "catalog_remove", rxml_catalog_remove, 1);
871
545
  rb_define_module_function(mXML, "check_lib_versions", rxml_check_lib_versions, 0);
872
- rb_define_module_function(mXML, "debug_entities", rxml_debug_entities_get, 0);
873
- rb_define_module_function(mXML, "debug_entities=", rxml_debug_entities_set, 1);
874
546
  rb_define_module_function(mXML, "default_compression", rxml_default_compression_get, 0);
875
547
  rb_define_module_function(mXML, "default_compression=", rxml_default_compression_set, 1);
876
- rb_define_module_function(mXML, "default_keep_blanks", rxml_default_keep_blanks_get, 0);
877
- rb_define_module_function(mXML, "default_keep_blanks=", rxml_default_keep_blanks_set, 1);
878
- rb_define_module_function(mXML, "default_load_external_dtd", rxml_default_load_external_dtd_get, 0);
879
- rb_define_module_function(mXML, "default_load_external_dtd=", rxml_default_load_external_dtd_set, 1);
880
- rb_define_module_function(mXML, "default_line_numbers", rxml_default_line_numbers_get, 0);
881
- rb_define_module_function(mXML, "default_line_numbers=", rxml_default_line_numbers_set, 1);
882
- rb_define_module_function(mXML, "default_options", rxml_default_options_get, 0);
883
- rb_define_module_function(mXML, "default_pedantic_parser", rxml_default_pedantic_parser_get, 0);
884
- rb_define_module_function(mXML, "default_pedantic_parser=", rxml_default_pedantic_parser_set, 1);
885
- rb_define_module_function(mXML, "default_substitute_entities", rxml_default_substitute_entities_get, 0);
886
- rb_define_module_function(mXML, "default_substitute_entities=", rxml_default_substitute_entities_set, 1);
887
548
  rb_define_module_function(mXML, "default_tree_indent_string", rxml_default_tree_indent_string_get, 0);
888
549
  rb_define_module_function(mXML, "default_tree_indent_string=", rxml_default_tree_indent_string_set, 1);
889
- rb_define_module_function(mXML, "default_validity_checking", rxml_default_validity_checking_get, 0);
890
- rb_define_module_function(mXML, "default_validity_checking=", rxml_default_validity_checking_set, 1);
891
- rb_define_module_function(mXML, "default_warnings", rxml_default_warnings_get, 0);
892
- rb_define_module_function(mXML, "default_warnings=", rxml_default_warnings_set, 1);
893
550
  rb_define_module_function(mXML, "default_save_no_empty_tags", rxml_default_save_no_empty_tags_get, 0);
894
551
  rb_define_module_function(mXML, "default_save_no_empty_tags=", rxml_default_save_no_empty_tags_set, 1);
895
552
  rb_define_module_function(mXML, "indent_tree_output", rxml_indent_tree_output_get, 0);