libxml-ruby 4.1.2-x64-mingw-ucrt → 5.0.0-x64-mingw-ucrt
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.
- checksums.yaml +4 -4
- data/HISTORY +14 -0
- data/ext/libxml/ruby_libxml.h +43 -44
- data/ext/libxml/ruby_xml.c +0 -343
- data/ext/libxml/ruby_xml.h +9 -10
- data/ext/libxml/ruby_xml_attributes.h +2 -0
- data/ext/libxml/ruby_xml_document.c +6 -6
- data/ext/libxml/ruby_xml_document.h +11 -11
- data/ext/libxml/ruby_xml_dtd.c +3 -3
- data/ext/libxml/ruby_xml_encoding.h +20 -18
- data/ext/libxml/ruby_xml_error.c +9 -6
- data/ext/libxml/ruby_xml_error.h +2 -2
- data/ext/libxml/ruby_xml_html_parser_context.c +35 -21
- data/ext/libxml/ruby_xml_namespace.c +0 -3
- data/ext/libxml/ruby_xml_node.c +1394 -1398
- data/ext/libxml/ruby_xml_parser.h +1 -1
- data/ext/libxml/ruby_xml_parser_context.c +47 -39
- data/ext/libxml/ruby_xml_parser_options.c +9 -1
- data/ext/libxml/ruby_xml_parser_options.h +1 -1
- data/ext/libxml/ruby_xml_reader.c +15 -16
- data/ext/libxml/ruby_xml_sax2_handler.c +1 -1
- data/ext/libxml/ruby_xml_sax_parser.c +1 -9
- data/ext/libxml/ruby_xml_schema.c +4 -4
- data/ext/libxml/ruby_xml_version.h +5 -5
- data/ext/libxml/ruby_xml_writer.c +8 -8
- data/ext/libxml/ruby_xml_xpath.c +1 -1
- data/ext/libxml/ruby_xml_xpath_context.c +2 -2
- data/ext/libxml/ruby_xml_xpath_expression.c +1 -1
- data/lib/3.2/libxml_ruby.so +0 -0
- data/lib/3.3/libxml_ruby.so +0 -0
- data/lib/libxml/document.rb +13 -13
- data/lib/libxml/html_parser.rb +23 -23
- data/lib/libxml/parser.rb +26 -24
- data/test/test.rb +5 -0
- data/test/test_document_write.rb +1 -4
- data/test/test_dtd.rb +1 -4
- data/test/test_encoding.rb +1 -4
- data/test/test_helper.rb +9 -2
- data/test/test_html_parser.rb +162 -162
- data/test/test_namespace.rb +1 -3
- data/test/test_node.rb +1 -3
- data/test/test_node_write.rb +1 -4
- data/test/test_parser.rb +26 -17
- data/test/test_reader.rb +4 -4
- data/test/test_sax_parser.rb +1 -1
- data/test/test_xml.rb +0 -99
- metadata +6 -4
- data/lib/3.1/libxml_ruby.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2597b3a2369dd697ecf208bc7453e470fca96255761ed6909d089576a54dc480
|
4
|
+
data.tar.gz: 0ad2245319036e3037f95c988005db027e522166536dbff0be77142104b031b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f0da0d7e285691f132c4da7d8e732c8f826819427eb2a17476d1c191486e7217749e7835a5cfe929aad3e5418652dce93d25d609013b4721edb89ad571d6ee6
|
7
|
+
data.tar.gz: c567ce32a8ef312fd866189c93b6cfd1cc9391c740117496b0d2bf639578916a86758f3a896e08040891a1e67224fe83d88a529e9f92ebf532a334883ac6c93a
|
data/HISTORY
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
= Release History
|
2
2
|
|
3
|
+
== 5.0.0 / 2024-01-07
|
4
|
+
|
5
|
+
* This release is major version bump because it removes access to global parser options
|
6
|
+
that libxml2 version 2.12.0 deprecated (see https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.0)
|
7
|
+
In the unlikely event your code uses these options, then you will need to update it.
|
8
|
+
Specifically, instead of setting global parser options, pass them directly to either Parsers
|
9
|
+
or ParserContexts when creating them. Options are defined as constants in
|
10
|
+
LibXML::XML::Parser::Options and LibXML::HTML::Parser::Options
|
11
|
+
* Update Parser initialize methods to take named parameters instead of a hash table (you should *not*
|
12
|
+
have to update your code due to this change)
|
13
|
+
* Fix broken compiliation with libxml2 version 2.12.0 (due to libxml2 header changes)
|
14
|
+
* Add support for Ruby 3.3.*
|
15
|
+
* Remove support for Ruby 2.7.* (gem should still work but is no longer tested)
|
16
|
+
|
3
17
|
== 4.1.2 / 2023-11-04
|
4
18
|
|
5
19
|
* Fix Ruby warnings about undefined allocators (yuuji.yaginuma, Christopher Sahnwaldt)
|
data/ext/libxml/ruby_libxml.h
CHANGED
@@ -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
|
-
|
8
|
-
|
9
|
-
#include "
|
10
|
-
#include "
|
11
|
-
#include "
|
12
|
-
#include "
|
13
|
-
#include "
|
14
|
-
#include "
|
15
|
-
#include "
|
16
|
-
#include "
|
17
|
-
#include "
|
18
|
-
#include "
|
19
|
-
#include "
|
20
|
-
#include "
|
21
|
-
#include "
|
22
|
-
#include "
|
23
|
-
#include "
|
24
|
-
#include "
|
25
|
-
#include "
|
26
|
-
#include "
|
27
|
-
#include "
|
28
|
-
#include "
|
29
|
-
#include "
|
30
|
-
#include "
|
31
|
-
#include "
|
32
|
-
#include "
|
33
|
-
#include "
|
34
|
-
#include "
|
35
|
-
#include "
|
36
|
-
#include "
|
37
|
-
#include "
|
38
|
-
#include "
|
39
|
-
#include "
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|
data/ext/libxml/ruby_xml.c
CHANGED
@@ -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);
|
data/ext/libxml/ruby_xml.h
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
/* Please see the LICENSE file for copyright and distribution information */
|
2
|
-
|
3
|
-
#ifndef __RUBY_XML_H__
|
4
|
-
#define __RUBY_XML_H__
|
5
|
-
|
6
|
-
extern VALUE mXML;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
#endif
|
1
|
+
/* Please see the LICENSE file for copyright and distribution information */
|
2
|
+
|
3
|
+
#ifndef __RUBY_XML_H__
|
4
|
+
#define __RUBY_XML_H__
|
5
|
+
|
6
|
+
extern VALUE mXML;
|
7
|
+
void rxml_init_xml(void);
|
8
|
+
|
9
|
+
#endif
|
@@ -542,7 +542,7 @@ static VALUE rxml_document_import(VALUE self, VALUE node)
|
|
542
542
|
xresult = xmlDocCopyNode(xnode, xdoc, 1);
|
543
543
|
|
544
544
|
if (xresult == NULL)
|
545
|
-
rxml_raise(
|
545
|
+
rxml_raise(xmlGetLastError());
|
546
546
|
|
547
547
|
return rxml_node_wrap(xresult);
|
548
548
|
}
|
@@ -808,7 +808,7 @@ static VALUE rxml_document_save(int argc, VALUE *argv, VALUE self)
|
|
808
808
|
length = xmlSaveFormatFileEnc(xfilename, xdoc, (const char*)xencoding, indent);
|
809
809
|
|
810
810
|
if (length == -1)
|
811
|
-
rxml_raise(
|
811
|
+
rxml_raise(xmlGetLastError());
|
812
812
|
|
813
813
|
return (INT2NUM(length));
|
814
814
|
}
|
@@ -958,7 +958,7 @@ static VALUE rxml_document_xinclude(VALUE self)
|
|
958
958
|
}
|
959
959
|
else
|
960
960
|
{
|
961
|
-
rxml_raise(
|
961
|
+
rxml_raise(xmlGetLastError());
|
962
962
|
return Qnil;
|
963
963
|
}
|
964
964
|
#else
|
@@ -1007,7 +1007,7 @@ static VALUE rxml_document_validate_schema(VALUE self, VALUE schema)
|
|
1007
1007
|
xmlSchemaFreeValidCtxt(vptr);
|
1008
1008
|
if (is_invalid)
|
1009
1009
|
{
|
1010
|
-
rxml_raise(
|
1010
|
+
rxml_raise(xmlGetLastError());
|
1011
1011
|
return Qfalse;
|
1012
1012
|
}
|
1013
1013
|
else
|
@@ -1040,7 +1040,7 @@ static VALUE rxml_document_validate_relaxng(VALUE self, VALUE relaxng)
|
|
1040
1040
|
xmlRelaxNGFreeValidCtxt(vptr);
|
1041
1041
|
if (is_invalid)
|
1042
1042
|
{
|
1043
|
-
rxml_raise(
|
1043
|
+
rxml_raise(xmlGetLastError());
|
1044
1044
|
return Qfalse;
|
1045
1045
|
}
|
1046
1046
|
else
|
@@ -1075,7 +1075,7 @@ static VALUE rxml_document_validate_dtd(VALUE self, VALUE dtd)
|
|
1075
1075
|
}
|
1076
1076
|
else
|
1077
1077
|
{
|
1078
|
-
rxml_raise(
|
1078
|
+
rxml_raise(xmlGetLastError());
|
1079
1079
|
return Qfalse;
|
1080
1080
|
}
|
1081
1081
|
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
/* Please see the LICENSE file for copyright and distribution information */
|
2
|
-
|
3
|
-
#ifndef __RXML_DOCUMENT__
|
4
|
-
#define __RXML_DOCUMENT__
|
5
|
-
|
6
|
-
extern VALUE cXMLDocument;
|
7
|
-
void rxml_init_document();
|
8
|
-
VALUE rxml_document_wrap(xmlDocPtr xnode);
|
9
|
-
|
10
|
-
typedef xmlChar * xmlCharPtr;
|
11
|
-
#endif
|
1
|
+
/* Please see the LICENSE file for copyright and distribution information */
|
2
|
+
|
3
|
+
#ifndef __RXML_DOCUMENT__
|
4
|
+
#define __RXML_DOCUMENT__
|
5
|
+
|
6
|
+
extern VALUE cXMLDocument;
|
7
|
+
void rxml_init_document(void);
|
8
|
+
VALUE rxml_document_wrap(xmlDocPtr xnode);
|
9
|
+
|
10
|
+
typedef xmlChar * xmlCharPtr;
|
11
|
+
#endif
|
data/ext/libxml/ruby_xml_dtd.c
CHANGED
@@ -181,7 +181,7 @@ static VALUE rxml_dtd_initialize(int argc, VALUE *argv, VALUE self)
|
|
181
181
|
xdtd = xmlCreateIntSubset(xdoc, xname, xpublic, xsystem);
|
182
182
|
|
183
183
|
if (xdtd == NULL)
|
184
|
-
rxml_raise(
|
184
|
+
rxml_raise(xmlGetLastError());
|
185
185
|
|
186
186
|
/* Document will free this dtd now. */
|
187
187
|
RDATA(self)->dfree = NULL;
|
@@ -201,7 +201,7 @@ static VALUE rxml_dtd_initialize(int argc, VALUE *argv, VALUE self)
|
|
201
201
|
(xmlChar*) StringValuePtr(system));
|
202
202
|
|
203
203
|
if (xdtd == NULL)
|
204
|
-
rxml_raise(
|
204
|
+
rxml_raise(xmlGetLastError());
|
205
205
|
|
206
206
|
DATA_PTR(self) = xdtd;
|
207
207
|
|
@@ -221,7 +221,7 @@ static VALUE rxml_dtd_initialize(int argc, VALUE *argv, VALUE self)
|
|
221
221
|
xdtd = xmlIOParseDTD(NULL, buffer, enc);
|
222
222
|
|
223
223
|
if (xdtd == NULL)
|
224
|
-
rxml_raise(
|
224
|
+
rxml_raise(xmlGetLastError());
|
225
225
|
|
226
226
|
xmlFree(new_string);
|
227
227
|
|
@@ -1,18 +1,20 @@
|
|
1
|
-
/* Please see the LICENSE file for copyright and distribution information */
|
2
|
-
|
3
|
-
#ifndef __RXML_ENCODING__
|
4
|
-
#define __RXML_ENCODING__
|
5
|
-
|
6
|
-
#include <ruby/encoding.h>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
1
|
+
/* Please see the LICENSE file for copyright and distribution information */
|
2
|
+
|
3
|
+
#ifndef __RXML_ENCODING__
|
4
|
+
#define __RXML_ENCODING__
|
5
|
+
|
6
|
+
#include <ruby/encoding.h>
|
7
|
+
#include <libxml/encoding.h>
|
8
|
+
#include <libxml/xmlstring.h>
|
9
|
+
|
10
|
+
extern VALUE mXMLEncoding;
|
11
|
+
|
12
|
+
void rxml_init_encoding(void);
|
13
|
+
|
14
|
+
VALUE rxml_new_cstr(const xmlChar* xstr, const xmlChar* xencoding);
|
15
|
+
VALUE rxml_new_cstr_len(const xmlChar* xstr, const long length, const xmlChar* xencoding);
|
16
|
+
|
17
|
+
rb_encoding* rxml_xml_encoding_to_rb_encoding(VALUE klass, xmlCharEncoding xmlEncoding);
|
18
|
+
rb_encoding* rxml_figure_encoding(const xmlChar* xencoding);
|
19
|
+
|
20
|
+
#endif
|