libxml-ruby 3.2.3-x64-mingw-ucrt → 4.0.0-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY +10 -0
- data/ext/libxml/extconf.h +3 -0
- data/ext/libxml/libxml.c +0 -1
- data/ext/libxml/libxml_ruby.def +0 -1
- data/ext/libxml/ruby_libxml.h +0 -23
- data/ext/libxml/ruby_xml.c +3 -1
- data/ext/libxml/ruby_xml.h +1 -1
- data/ext/libxml/ruby_xml_cbg.c +1 -1
- data/ext/libxml/ruby_xml_document.c +6 -0
- data/ext/libxml/ruby_xml_dtd.c +1 -1
- data/ext/libxml/ruby_xml_encoding.c +1 -1
- data/ext/libxml/ruby_xml_encoding.h +2 -0
- data/ext/libxml/ruby_xml_error.c +2 -2
- data/ext/libxml/ruby_xml_error.h +3 -1
- data/ext/libxml/ruby_xml_html_parser.c +2 -0
- data/ext/libxml/ruby_xml_html_parser_context.c +1 -0
- data/ext/libxml/ruby_xml_html_parser_options.c +2 -0
- data/ext/libxml/ruby_xml_input_cbg.c +1 -1
- data/ext/libxml/ruby_xml_io.c +1 -1
- data/ext/libxml/ruby_xml_node.c +4 -12
- data/ext/libxml/ruby_xml_parser_context.c +2 -0
- data/ext/libxml/ruby_xml_reader.c +3 -0
- data/ext/libxml/ruby_xml_reader.h +0 -3
- data/ext/libxml/ruby_xml_relaxng.c +2 -0
- data/ext/libxml/ruby_xml_relaxng.h +0 -2
- data/ext/libxml/ruby_xml_schema.c +72 -2
- data/ext/libxml/ruby_xml_schema.h +4 -785
- data/ext/libxml/ruby_xml_schema_attribute.c +46 -0
- data/ext/libxml/ruby_xml_schema_attribute.h +25 -3
- data/ext/libxml/ruby_xml_schema_element.h +0 -3
- data/ext/libxml/ruby_xml_schema_facet.c +4 -0
- data/ext/libxml/ruby_xml_schema_facet.h +0 -4
- data/ext/libxml/ruby_xml_schema_type.c +37 -0
- data/ext/libxml/ruby_xml_version.h +5 -5
- data/ext/libxml/ruby_xml_writer.c +4 -0
- data/ext/libxml/ruby_xml_writer.h +0 -4
- data/ext/libxml/ruby_xml_xinclude.c +4 -0
- data/ext/libxml/ruby_xml_xpath.c +1 -0
- data/ext/libxml/ruby_xml_xpath.h +2 -0
- data/ext/libxml/ruby_xml_xpath_context.c +2 -0
- data/ext/libxml/ruby_xml_xpath_object.c +1 -0
- data/lib/{3.0 → 3.1}/libxml_ruby.so +0 -0
- data/lib/3.2/libxml_ruby.so +0 -0
- data/test/test_helper.rb +4 -0
- data/test/test_xml.rb +15 -3
- metadata +6 -12
- data/MANIFEST +0 -166
- data/ext/libxml/ruby_xml_xpointer.c +0 -99
- data/ext/libxml/ruby_xml_xpointer.h +0 -11
- data/setup.rb +0 -1584
- data/test/test_suite.rb +0 -48
- data/test/test_xpointer.rb +0 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15167370942fc862a4602c9bfc1fd35f46562cad3a43093ac5249d679791fb69
|
4
|
+
data.tar.gz: d4f29d60c2d528405b520f68c4c47b60f6dbd42276571d7044835395b7499d29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b991a82a321d37111acf48e9115c8feb87d2481cd6a4fbdf52d769020b5585d6bfa60bcc5aa09358726ce1172622d53e861dc36f29da91fe0c2d709b26dd17e1
|
7
|
+
data.tar.gz: 7f9f1b54201198b74590d39544cf330939aa930021281a73dd85a20d56088dc2926a40a67bffb0dc52f0d3768d888552574f41ec2b51f13f2a2acfee8ad774b5
|
data/HISTORY
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
= Release History
|
2
2
|
|
3
|
+
== 4.0.0 / 2022-12-28
|
4
|
+
|
5
|
+
* Breaking - Remove support for XPointer since libxml2 has deprecated it and will remove it (Charlie Savage)
|
6
|
+
* Breaking - Remove support for ancient setup.rb script (Charlie Savage)
|
7
|
+
|
8
|
+
== 3.2.4 / 2022-10-29
|
9
|
+
|
10
|
+
* Support libxml2 version 2.10.2 (Charlie Savage)
|
11
|
+
* Reduce number of globally included C header files (Charlie Savage)
|
12
|
+
|
3
13
|
== 3.2.3 / 2022-05-22
|
4
14
|
|
5
15
|
* Change some getter methods to instance variables with attr_accessors for easier debuggability (David Hansen)
|
data/ext/libxml/libxml.c
CHANGED
data/ext/libxml/libxml_ruby.def
CHANGED
data/ext/libxml/ruby_libxml.h
CHANGED
@@ -4,29 +4,7 @@
|
|
4
4
|
#define __RUBY_LIBXML_H__
|
5
5
|
|
6
6
|
#include <ruby.h>
|
7
|
-
#include <libxml/parser.h>
|
8
|
-
#include <libxml/parserInternals.h>
|
9
|
-
#include <libxml/debugXML.h>
|
10
7
|
#include <libxml/xmlversion.h>
|
11
|
-
#include <libxml/xmlmemory.h>
|
12
|
-
#include <libxml/xpath.h>
|
13
|
-
#include <libxml/valid.h>
|
14
|
-
#include <libxml/catalog.h>
|
15
|
-
#include <libxml/HTMLparser.h>
|
16
|
-
#include <libxml/xmlreader.h>
|
17
|
-
#include <libxml/c14n.h>
|
18
|
-
|
19
|
-
#include <ruby/encoding.h>
|
20
|
-
|
21
|
-
#ifdef LIBXML_DEBUG_ENABLED
|
22
|
-
#include <libxml/xpathInternals.h>
|
23
|
-
#endif
|
24
|
-
#ifdef LIBXML_XINCLUDE_ENABLED
|
25
|
-
#include <libxml/xinclude.h>
|
26
|
-
#endif
|
27
|
-
#ifdef LIBXML_XPTR_ENABLED
|
28
|
-
#include <libxml/xpointer.h>
|
29
|
-
#endif
|
30
8
|
|
31
9
|
#include "ruby_xml_version.h"
|
32
10
|
#include "ruby_xml.h"
|
@@ -56,7 +34,6 @@
|
|
56
34
|
#include "ruby_xml_xpath_expression.h"
|
57
35
|
#include "ruby_xml_xpath_context.h"
|
58
36
|
#include "ruby_xml_xpath_object.h"
|
59
|
-
#include "ruby_xml_xpointer.h"
|
60
37
|
#include "ruby_xml_input_cbg.h"
|
61
38
|
#include "ruby_xml_dtd.h"
|
62
39
|
#include "ruby_xml_schema.h"
|
data/ext/libxml/ruby_xml.c
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
#include "ruby_libxml.h"
|
2
2
|
#include "ruby_xml.h"
|
3
3
|
|
4
|
+
#include <libxml/catalog.h>
|
5
|
+
|
4
6
|
VALUE mXML;
|
5
7
|
|
6
8
|
/*
|
@@ -477,7 +479,7 @@ static VALUE rxml_default_line_numbers_set(VALUE klass, VALUE value)
|
|
477
479
|
}
|
478
480
|
}
|
479
481
|
|
480
|
-
int rxml_libxml_default_options()
|
482
|
+
int rxml_libxml_default_options(void)
|
481
483
|
{
|
482
484
|
int options = 0;
|
483
485
|
|
data/ext/libxml/ruby_xml.h
CHANGED
data/ext/libxml/ruby_xml_cbg.c
CHANGED
@@ -52,6 +52,12 @@
|
|
52
52
|
#include "ruby_libxml.h"
|
53
53
|
#include "ruby_xml_document.h"
|
54
54
|
|
55
|
+
#include <libxml/c14n.h>
|
56
|
+
#include <libxml/debugXML.h>
|
57
|
+
#include <libxml/relaxng.h>
|
58
|
+
#include <libxml/xmlschemas.h>
|
59
|
+
#include <libxml/xinclude.h>
|
60
|
+
|
55
61
|
VALUE cXMLDocument;
|
56
62
|
|
57
63
|
void rxml_document_free(xmlDocPtr xdoc)
|
data/ext/libxml/ruby_xml_dtd.c
CHANGED
@@ -235,7 +235,7 @@ static VALUE rxml_dtd_initialize(int argc, VALUE *argv, VALUE self)
|
|
235
235
|
return self;
|
236
236
|
}
|
237
237
|
|
238
|
-
void rxml_init_dtd()
|
238
|
+
void rxml_init_dtd(void)
|
239
239
|
{
|
240
240
|
cXMLDtd = rb_define_class_under(mXML, "Dtd", rb_cObject);
|
241
241
|
rb_define_alloc_func(cXMLDtd, rxml_dtd_alloc);
|
@@ -182,7 +182,7 @@ rb_encoding* rxml_figure_encoding(const xmlChar* xencoding)
|
|
182
182
|
VALUE rxml_new_cstr(const xmlChar* xstr, const xmlChar* xencoding)
|
183
183
|
{
|
184
184
|
rb_encoding *rbencoding = rxml_figure_encoding(xencoding);
|
185
|
-
return rb_external_str_new_with_enc((const char*)xstr, strlen((const char*)xstr), rbencoding);
|
185
|
+
return rb_external_str_new_with_enc((const char*)xstr, (long)strlen((const char*)xstr), rbencoding);
|
186
186
|
}
|
187
187
|
|
188
188
|
VALUE rxml_new_cstr_len(const xmlChar* xstr, const long length, const xmlChar* xencoding)
|
data/ext/libxml/ruby_xml_error.c
CHANGED
@@ -44,7 +44,7 @@ static ID ERROR_HANDLER_ID;
|
|
44
44
|
* Returns the proc that will be called when libxml generates
|
45
45
|
* warning, error or fatal error messages.
|
46
46
|
*/
|
47
|
-
static VALUE rxml_error_get_handler()
|
47
|
+
static VALUE rxml_error_get_handler(void)
|
48
48
|
{
|
49
49
|
VALUE block = rb_cvar_get(eXMLError, ERROR_HANDLER_ID);
|
50
50
|
return block;
|
@@ -165,7 +165,7 @@ NORETURN(void rxml_raise(xmlErrorPtr xerror))
|
|
165
165
|
rb_exc_raise(error);
|
166
166
|
}
|
167
167
|
|
168
|
-
void rxml_init_error()
|
168
|
+
void rxml_init_error(void)
|
169
169
|
{
|
170
170
|
CALL_METHOD = rb_intern("call");
|
171
171
|
ERROR_HANDLER_ID = rb_intern("@@__error_handler_callback__");
|
data/ext/libxml/ruby_xml_error.h
CHANGED
@@ -3,9 +3,11 @@
|
|
3
3
|
#ifndef __RXML_ERROR__
|
4
4
|
#define __RXML_ERROR__
|
5
5
|
|
6
|
+
#include <libxml/xmlerror.h>
|
7
|
+
|
6
8
|
extern VALUE eXMLError;
|
7
9
|
|
8
|
-
void rxml_init_error();
|
10
|
+
void rxml_init_error(void);
|
9
11
|
VALUE rxml_error_wrap(xmlErrorPtr xerror);
|
10
12
|
NORETURN(void rxml_raise(xmlErrorPtr xerror));
|
11
13
|
|
@@ -88,7 +88,7 @@ int ic_close(void *context)
|
|
88
88
|
*
|
89
89
|
* Register a new set of I/O callback for handling parser input.
|
90
90
|
*/
|
91
|
-
static VALUE input_callbacks_register_input_callbacks()
|
91
|
+
static VALUE input_callbacks_register_input_callbacks(void)
|
92
92
|
{
|
93
93
|
xmlRegisterInputCallbacks(ic_match, ic_open, ic_read, ic_close);
|
94
94
|
return (Qtrue);
|
data/ext/libxml/ruby_xml_io.c
CHANGED
@@ -30,7 +30,7 @@ int rxml_write_callback(VALUE io, const char *buffer, int len)
|
|
30
30
|
{
|
31
31
|
// Could be StringIO
|
32
32
|
VALUE written, string;
|
33
|
-
string = rb_external_str_new_with_enc(buffer, strlen(buffer), rb_enc_get(io));
|
33
|
+
string = rb_external_str_new_with_enc(buffer, (long)strlen(buffer), rb_enc_get(io));
|
34
34
|
written = rb_funcall(io, WRITE_METHOD, 1, string);
|
35
35
|
return NUM2INT(written);
|
36
36
|
}
|
data/ext/libxml/ruby_xml_node.c
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
#include "ruby_xml_node.h"
|
3
3
|
#include <assert.h>
|
4
4
|
|
5
|
+
#include <libxml/debugXML.h>
|
6
|
+
#include <libxml/parserInternals.h>
|
7
|
+
#include <libxml/xlink.h>
|
8
|
+
|
5
9
|
VALUE cXMLNode;
|
6
10
|
|
7
11
|
/* Document-class: LibXML::XML::Node
|
@@ -997,17 +1001,6 @@ static VALUE rxml_node_path(VALUE self)
|
|
997
1001
|
return result;
|
998
1002
|
}
|
999
1003
|
|
1000
|
-
/*
|
1001
|
-
* call-seq:
|
1002
|
-
* node.pointer -> XML::NodeSet
|
1003
|
-
*
|
1004
|
-
* Evaluates an XPointer expression relative to this node.
|
1005
|
-
*/
|
1006
|
-
static VALUE rxml_node_pointer(VALUE self, VALUE xptr_str)
|
1007
|
-
{
|
1008
|
-
return (rxml_xpointer_point2(self, xptr_str));
|
1009
|
-
}
|
1010
|
-
|
1011
1004
|
/*
|
1012
1005
|
* call-seq:
|
1013
1006
|
* node.prev -> XML::Node
|
@@ -1393,7 +1386,6 @@ void rxml_init_node(void)
|
|
1393
1386
|
rb_define_method(cXMLNode, "output_escaping?", rxml_node_output_escaping_q, 0);
|
1394
1387
|
rb_define_method(cXMLNode, "output_escaping=", rxml_node_output_escaping_set, 1);
|
1395
1388
|
rb_define_method(cXMLNode, "path", rxml_node_path, 0);
|
1396
|
-
rb_define_method(cXMLNode, "pointer", rxml_node_pointer, 1);
|
1397
1389
|
rb_define_method(cXMLNode, "remove!", rxml_node_remove_ex, 0);
|
1398
1390
|
rb_define_method(cXMLNode, "space_preserve", rxml_node_space_preserve_get, 0);
|
1399
1391
|
rb_define_method(cXMLNode, "space_preserve=", rxml_node_space_preserve_set, 1);
|
@@ -1,6 +1,4 @@
|
|
1
1
|
#include "ruby_libxml.h"
|
2
|
-
#define LIBXML_OUTPUT_ENABLED
|
3
|
-
#define DUMP_CONTENT_MODEL
|
4
2
|
#include "ruby_xml_schema.h"
|
5
3
|
|
6
4
|
#include "ruby_xml_schema_type.h"
|
@@ -8,6 +6,78 @@
|
|
8
6
|
#include "ruby_xml_schema_attribute.h"
|
9
7
|
#include "ruby_xml_schema_facet.h"
|
10
8
|
|
9
|
+
#include <libxml/xmlschemas.h>
|
10
|
+
|
11
|
+
typedef struct _xmlSchemaBucket xmlSchemaBucket;
|
12
|
+
typedef xmlSchemaBucket *xmlSchemaBucketPtr;
|
13
|
+
|
14
|
+
/**
|
15
|
+
* xmlSchemaSchemaRelation:
|
16
|
+
*
|
17
|
+
* Used to create a graph of schema relationships.
|
18
|
+
*/
|
19
|
+
typedef struct _xmlSchemaSchemaRelation xmlSchemaSchemaRelation;
|
20
|
+
typedef xmlSchemaSchemaRelation *xmlSchemaSchemaRelationPtr;
|
21
|
+
struct _xmlSchemaSchemaRelation {
|
22
|
+
xmlSchemaSchemaRelationPtr next;
|
23
|
+
int type;
|
24
|
+
/* E.g. XML_SCHEMA_SCHEMA_IMPORT */
|
25
|
+
const xmlChar *importNamespace;
|
26
|
+
xmlSchemaBucketPtr bucket;
|
27
|
+
};
|
28
|
+
|
29
|
+
struct _xmlSchemaBucket {
|
30
|
+
int type;
|
31
|
+
int flags;
|
32
|
+
const xmlChar *schemaLocation;
|
33
|
+
const xmlChar *origTargetNamespace;
|
34
|
+
const xmlChar *targetNamespace;
|
35
|
+
xmlDocPtr doc;
|
36
|
+
xmlSchemaSchemaRelationPtr relations;
|
37
|
+
int located;
|
38
|
+
int parsed;
|
39
|
+
int imported;
|
40
|
+
int preserveDoc;
|
41
|
+
xmlSchemaItemListPtr globals;
|
42
|
+
/* Global components. */
|
43
|
+
xmlSchemaItemListPtr locals; /* Local components. */
|
44
|
+
};
|
45
|
+
|
46
|
+
/**
|
47
|
+
* xmlSchemaImport:
|
48
|
+
* (extends xmlSchemaBucket)
|
49
|
+
*
|
50
|
+
* Reflects a schema. Holds some information
|
51
|
+
* about the schema and its toplevel components. Duplicate
|
52
|
+
* toplevel components are not checked at this level.
|
53
|
+
*/
|
54
|
+
typedef struct _xmlSchemaImport xmlSchemaImport;
|
55
|
+
typedef xmlSchemaImport *xmlSchemaImportPtr;
|
56
|
+
struct _xmlSchemaImport {
|
57
|
+
int type;
|
58
|
+
/* Main OR import OR include. */
|
59
|
+
int flags;
|
60
|
+
const xmlChar *schemaLocation; /* The URI of the schema document. */
|
61
|
+
/* For chameleon includes, @origTargetNamespace will be NULL */
|
62
|
+
const xmlChar *origTargetNamespace;
|
63
|
+
/*
|
64
|
+
* For chameleon includes, @targetNamespace will be the
|
65
|
+
* targetNamespace of the including schema.
|
66
|
+
*/
|
67
|
+
const xmlChar *targetNamespace;
|
68
|
+
xmlDocPtr doc; /* The schema node-tree. */
|
69
|
+
/* @relations will hold any included/imported/redefined schemas. */
|
70
|
+
xmlSchemaSchemaRelationPtr relations;
|
71
|
+
int located;
|
72
|
+
int parsed;
|
73
|
+
int imported;
|
74
|
+
int preserveDoc;
|
75
|
+
xmlSchemaItemListPtr globals;
|
76
|
+
xmlSchemaItemListPtr locals;
|
77
|
+
/* The imported schema. */
|
78
|
+
xmlSchemaPtr schema;
|
79
|
+
};
|
80
|
+
|
11
81
|
/*
|
12
82
|
* Document-class: LibXML::XML::Schema
|
13
83
|
*
|