nokogiri 1.16.0 → 1.18.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +14 -16
- data/LICENSE-DEPENDENCIES.md +6 -6
- data/README.md +8 -5
- data/dependencies.yml +9 -9
- data/ext/nokogiri/extconf.rb +188 -142
- data/ext/nokogiri/gumbo.c +69 -53
- data/ext/nokogiri/html4_document.c +10 -4
- data/ext/nokogiri/html4_element_description.c +18 -18
- data/ext/nokogiri/html4_sax_parser.c +40 -0
- data/ext/nokogiri/html4_sax_parser_context.c +48 -58
- data/ext/nokogiri/html4_sax_push_parser.c +25 -24
- data/ext/nokogiri/libxml2_polyfill.c +114 -0
- data/ext/nokogiri/nokogiri.c +9 -2
- data/ext/nokogiri/nokogiri.h +18 -33
- data/ext/nokogiri/xml_attr.c +1 -1
- data/ext/nokogiri/xml_cdata.c +2 -10
- data/ext/nokogiri/xml_comment.c +3 -8
- data/ext/nokogiri/xml_document.c +167 -156
- data/ext/nokogiri/xml_document_fragment.c +10 -25
- data/ext/nokogiri/xml_dtd.c +1 -1
- data/ext/nokogiri/xml_element_content.c +9 -9
- data/ext/nokogiri/xml_encoding_handler.c +4 -4
- data/ext/nokogiri/xml_namespace.c +6 -6
- data/ext/nokogiri/xml_node.c +141 -104
- data/ext/nokogiri/xml_node_set.c +46 -44
- data/ext/nokogiri/xml_reader.c +74 -57
- data/ext/nokogiri/xml_relax_ng.c +35 -56
- data/ext/nokogiri/xml_sax_parser.c +156 -88
- data/ext/nokogiri/xml_sax_parser_context.c +219 -131
- data/ext/nokogiri/xml_sax_push_parser.c +68 -49
- data/ext/nokogiri/xml_schema.c +50 -85
- data/ext/nokogiri/xml_syntax_error.c +19 -11
- data/ext/nokogiri/xml_text.c +2 -4
- data/ext/nokogiri/xml_xpath_context.c +103 -100
- data/ext/nokogiri/xslt_stylesheet.c +16 -11
- data/gumbo-parser/Makefile +3 -0
- data/gumbo-parser/src/ascii.c +2 -2
- data/gumbo-parser/src/error.c +76 -48
- data/gumbo-parser/src/error.h +5 -1
- data/gumbo-parser/src/nokogiri_gumbo.h +11 -2
- data/gumbo-parser/src/parser.c +66 -25
- data/gumbo-parser/src/tokenizer.c +6 -6
- data/lib/nokogiri/class_resolver.rb +1 -1
- data/lib/nokogiri/css/node.rb +6 -2
- data/lib/nokogiri/css/parser.rb +6 -4
- data/lib/nokogiri/css/parser.y +2 -2
- data/lib/nokogiri/css/parser_extras.rb +6 -66
- data/lib/nokogiri/css/selector_cache.rb +38 -0
- data/lib/nokogiri/css/tokenizer.rb +4 -4
- data/lib/nokogiri/css/tokenizer.rex +9 -8
- data/lib/nokogiri/css/xpath_visitor.rb +42 -6
- data/lib/nokogiri/css.rb +86 -20
- data/lib/nokogiri/decorators/slop.rb +3 -5
- data/lib/nokogiri/encoding_handler.rb +2 -2
- data/lib/nokogiri/html4/document.rb +44 -23
- data/lib/nokogiri/html4/document_fragment.rb +124 -12
- data/lib/nokogiri/html4/encoding_reader.rb +1 -1
- data/lib/nokogiri/html4/sax/parser.rb +23 -38
- data/lib/nokogiri/html4/sax/parser_context.rb +4 -9
- data/lib/nokogiri/html4.rb +9 -14
- data/lib/nokogiri/html5/builder.rb +40 -0
- data/lib/nokogiri/html5/document.rb +61 -30
- data/lib/nokogiri/html5/document_fragment.rb +130 -20
- data/lib/nokogiri/html5/node.rb +4 -4
- data/lib/nokogiri/html5.rb +114 -72
- data/lib/nokogiri/version/constant.rb +1 -1
- data/lib/nokogiri/xml/builder.rb +8 -1
- data/lib/nokogiri/xml/document.rb +70 -26
- data/lib/nokogiri/xml/document_fragment.rb +84 -13
- data/lib/nokogiri/xml/node.rb +82 -11
- data/lib/nokogiri/xml/node_set.rb +9 -7
- data/lib/nokogiri/xml/parse_options.rb +1 -1
- data/lib/nokogiri/xml/pp/node.rb +6 -1
- data/lib/nokogiri/xml/reader.rb +51 -17
- data/lib/nokogiri/xml/relax_ng.rb +57 -20
- data/lib/nokogiri/xml/sax/document.rb +174 -83
- data/lib/nokogiri/xml/sax/parser.rb +115 -41
- data/lib/nokogiri/xml/sax/parser_context.rb +116 -8
- data/lib/nokogiri/xml/sax/push_parser.rb +3 -0
- data/lib/nokogiri/xml/sax.rb +48 -0
- data/lib/nokogiri/xml/schema.rb +112 -45
- data/lib/nokogiri/xml/searchable.rb +38 -42
- data/lib/nokogiri/xml/syntax_error.rb +22 -0
- data/lib/nokogiri/xml/xpath_context.rb +14 -3
- data/lib/nokogiri/xml.rb +13 -24
- data/lib/nokogiri/xslt/stylesheet.rb +29 -7
- data/lib/nokogiri/xslt.rb +3 -9
- data/lib/xsd/xmlparser/nokogiri.rb +3 -4
- data/patches/libxml2/0019-xpath-Use-separate-static-hash-table-for-standard-fu.patch +244 -0
- data/ports/archives/libxml2-2.13.5.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.42.tar.xz +0 -0
- metadata +13 -14
- data/ext/nokogiri/libxml2_backwards_compat.c +0 -121
- data/patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch +0 -25
- data/ports/archives/libxml2-2.12.3.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.39.tar.xz +0 -0
@@ -7,10 +7,9 @@ module XSD
|
|
7
7
|
###
|
8
8
|
# Nokogiri XML parser for soap4r.
|
9
9
|
#
|
10
|
-
# Nokogiri may be used as the XML parser in soap4r.
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# required to use Nokogiri as the XML parser.
|
10
|
+
# Nokogiri may be used as the XML parser in soap4r. Require 'xsd/xmlparser/nokogiri' in your
|
11
|
+
# soap4r applications, and soap4r will use Nokogiri as its XML parser. No other changes should
|
12
|
+
# be required to use Nokogiri as the XML parser.
|
14
13
|
#
|
15
14
|
# Example (using UW ITS Web Services):
|
16
15
|
#
|
@@ -0,0 +1,244 @@
|
|
1
|
+
From d3e3526111097560cf7c002613e2cb1d469b59e0 Mon Sep 17 00:00:00 2001
|
2
|
+
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
3
|
+
Date: Sat, 21 Dec 2024 16:03:46 +0100
|
4
|
+
Subject: [PATCH] xpath: Use separate static hash table for standard functions
|
5
|
+
|
6
|
+
This avoids registering standard functions when creating an XPath
|
7
|
+
context.
|
8
|
+
|
9
|
+
Lookup of extension functions is a bit slower now, but ultimately, all
|
10
|
+
function lookups should be moved to the compilation phase.
|
11
|
+
|
12
|
+
(cherry picked from commit bf5fcf6e646bb51a0f6a3655a1d64bea97274867)
|
13
|
+
---
|
14
|
+
xpath.c | 170 ++++++++++++++++++++++++++++++++------------------------
|
15
|
+
1 file changed, 98 insertions(+), 72 deletions(-)
|
16
|
+
|
17
|
+
diff --git a/xpath.c b/xpath.c
|
18
|
+
index 485d7747..21711653 100644
|
19
|
+
--- a/xpath.c
|
20
|
+
+++ b/xpath.c
|
21
|
+
@@ -136,11 +136,48 @@
|
22
|
+
|
23
|
+
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
24
|
+
|
25
|
+
-/************************************************************************
|
26
|
+
- * *
|
27
|
+
- * Floating point stuff *
|
28
|
+
- * *
|
29
|
+
- ************************************************************************/
|
30
|
+
+static void
|
31
|
+
+xmlXPathNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
32
|
+
+
|
33
|
+
+static const struct {
|
34
|
+
+ const char *name;
|
35
|
+
+ xmlXPathFunction func;
|
36
|
+
+} xmlXPathStandardFunctions[] = {
|
37
|
+
+ { "boolean", xmlXPathBooleanFunction },
|
38
|
+
+ { "ceiling", xmlXPathCeilingFunction },
|
39
|
+
+ { "count", xmlXPathCountFunction },
|
40
|
+
+ { "concat", xmlXPathConcatFunction },
|
41
|
+
+ { "contains", xmlXPathContainsFunction },
|
42
|
+
+ { "id", xmlXPathIdFunction },
|
43
|
+
+ { "false", xmlXPathFalseFunction },
|
44
|
+
+ { "floor", xmlXPathFloorFunction },
|
45
|
+
+ { "last", xmlXPathLastFunction },
|
46
|
+
+ { "lang", xmlXPathLangFunction },
|
47
|
+
+ { "local-name", xmlXPathLocalNameFunction },
|
48
|
+
+ { "not", xmlXPathNotFunction },
|
49
|
+
+ { "name", xmlXPathNameFunction },
|
50
|
+
+ { "namespace-uri", xmlXPathNamespaceURIFunction },
|
51
|
+
+ { "normalize-space", xmlXPathNormalizeFunction },
|
52
|
+
+ { "number", xmlXPathNumberFunction },
|
53
|
+
+ { "position", xmlXPathPositionFunction },
|
54
|
+
+ { "round", xmlXPathRoundFunction },
|
55
|
+
+ { "string", xmlXPathStringFunction },
|
56
|
+
+ { "string-length", xmlXPathStringLengthFunction },
|
57
|
+
+ { "starts-with", xmlXPathStartsWithFunction },
|
58
|
+
+ { "substring", xmlXPathSubstringFunction },
|
59
|
+
+ { "substring-before", xmlXPathSubstringBeforeFunction },
|
60
|
+
+ { "substring-after", xmlXPathSubstringAfterFunction },
|
61
|
+
+ { "sum", xmlXPathSumFunction },
|
62
|
+
+ { "true", xmlXPathTrueFunction },
|
63
|
+
+ { "translate", xmlXPathTranslateFunction }
|
64
|
+
+};
|
65
|
+
+
|
66
|
+
+#define NUM_STANDARD_FUNCTIONS \
|
67
|
+
+ (sizeof(xmlXPathStandardFunctions) / sizeof(xmlXPathStandardFunctions[0]))
|
68
|
+
+
|
69
|
+
+#define SF_HASH_SIZE 64
|
70
|
+
+
|
71
|
+
+static unsigned char xmlXPathSFHash[SF_HASH_SIZE];
|
72
|
+
|
73
|
+
double xmlXPathNAN = 0.0;
|
74
|
+
double xmlXPathPINF = 0.0;
|
75
|
+
@@ -156,6 +193,18 @@ xmlXPathInit(void) {
|
76
|
+
xmlInitParser();
|
77
|
+
}
|
78
|
+
|
79
|
+
+ATTRIBUTE_NO_SANITIZE_INTEGER
|
80
|
+
+static unsigned
|
81
|
+
+xmlXPathSFComputeHash(const xmlChar *name) {
|
82
|
+
+ unsigned hashValue = 5381;
|
83
|
+
+ const xmlChar *ptr;
|
84
|
+
+
|
85
|
+
+ for (ptr = name; *ptr; ptr++)
|
86
|
+
+ hashValue = hashValue * 33 + *ptr;
|
87
|
+
+
|
88
|
+
+ return(hashValue);
|
89
|
+
+}
|
90
|
+
+
|
91
|
+
/**
|
92
|
+
* xmlInitXPathInternal:
|
93
|
+
*
|
94
|
+
@@ -164,6 +213,8 @@ xmlXPathInit(void) {
|
95
|
+
ATTRIBUTE_NO_SANITIZE("float-divide-by-zero")
|
96
|
+
void
|
97
|
+
xmlInitXPathInternal(void) {
|
98
|
+
+ size_t i;
|
99
|
+
+
|
100
|
+
#if defined(NAN) && defined(INFINITY)
|
101
|
+
xmlXPathNAN = NAN;
|
102
|
+
xmlXPathPINF = INFINITY;
|
103
|
+
@@ -175,8 +226,34 @@ xmlInitXPathInternal(void) {
|
104
|
+
xmlXPathPINF = 1.0 / zero;
|
105
|
+
xmlXPathNINF = -xmlXPathPINF;
|
106
|
+
#endif
|
107
|
+
+
|
108
|
+
+ /*
|
109
|
+
+ * Initialize hash table for standard functions
|
110
|
+
+ */
|
111
|
+
+
|
112
|
+
+ for (i = 0; i < SF_HASH_SIZE; i++)
|
113
|
+
+ xmlXPathSFHash[i] = UCHAR_MAX;
|
114
|
+
+
|
115
|
+
+ for (i = 0; i < NUM_STANDARD_FUNCTIONS; i++) {
|
116
|
+
+ const char *name = xmlXPathStandardFunctions[i].name;
|
117
|
+
+ int bucketIndex = xmlXPathSFComputeHash(BAD_CAST name) % SF_HASH_SIZE;
|
118
|
+
+
|
119
|
+
+ while (xmlXPathSFHash[bucketIndex] != UCHAR_MAX) {
|
120
|
+
+ bucketIndex += 1;
|
121
|
+
+ if (bucketIndex >= SF_HASH_SIZE)
|
122
|
+
+ bucketIndex = 0;
|
123
|
+
+ }
|
124
|
+
+
|
125
|
+
+ xmlXPathSFHash[bucketIndex] = i;
|
126
|
+
+ }
|
127
|
+
}
|
128
|
+
|
129
|
+
+/************************************************************************
|
130
|
+
+ * *
|
131
|
+
+ * Floating point stuff *
|
132
|
+
+ * *
|
133
|
+
+ ************************************************************************/
|
134
|
+
+
|
135
|
+
/**
|
136
|
+
* xmlXPathIsNaN:
|
137
|
+
* @val: a double value
|
138
|
+
@@ -3979,18 +4056,6 @@ xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
|
139
|
+
*/
|
140
|
+
xmlXPathFunction
|
141
|
+
xmlXPathFunctionLookup(xmlXPathContextPtr ctxt, const xmlChar *name) {
|
142
|
+
- if (ctxt == NULL)
|
143
|
+
- return (NULL);
|
144
|
+
-
|
145
|
+
- if (ctxt->funcLookupFunc != NULL) {
|
146
|
+
- xmlXPathFunction ret;
|
147
|
+
- xmlXPathFuncLookupFunc f;
|
148
|
+
-
|
149
|
+
- f = ctxt->funcLookupFunc;
|
150
|
+
- ret = f(ctxt->funcLookupData, name, NULL);
|
151
|
+
- if (ret != NULL)
|
152
|
+
- return(ret);
|
153
|
+
- }
|
154
|
+
return(xmlXPathFunctionLookupNS(ctxt, name, NULL));
|
155
|
+
}
|
156
|
+
|
157
|
+
@@ -4015,6 +4080,22 @@ xmlXPathFunctionLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
|
158
|
+
if (name == NULL)
|
159
|
+
return(NULL);
|
160
|
+
|
161
|
+
+ if (ns_uri == NULL) {
|
162
|
+
+ int bucketIndex = xmlXPathSFComputeHash(name) % SF_HASH_SIZE;
|
163
|
+
+
|
164
|
+
+ while (xmlXPathSFHash[bucketIndex] != UCHAR_MAX) {
|
165
|
+
+ int funcIndex = xmlXPathSFHash[bucketIndex];
|
166
|
+
+
|
167
|
+
+ if (strcmp(xmlXPathStandardFunctions[funcIndex].name,
|
168
|
+
+ (char *) name) == 0)
|
169
|
+
+ return(xmlXPathStandardFunctions[funcIndex].func);
|
170
|
+
+
|
171
|
+
+ bucketIndex += 1;
|
172
|
+
+ if (bucketIndex >= SF_HASH_SIZE)
|
173
|
+
+ bucketIndex = 0;
|
174
|
+
+ }
|
175
|
+
+ }
|
176
|
+
+
|
177
|
+
if (ctxt->funcLookupFunc != NULL) {
|
178
|
+
xmlXPathFuncLookupFunc f;
|
179
|
+
|
180
|
+
@@ -13494,61 +13575,6 @@ xmlXPathEscapeUriFunction(xmlXPathParserContextPtr ctxt, int nargs) {
|
181
|
+
void
|
182
|
+
xmlXPathRegisterAllFunctions(xmlXPathContextPtr ctxt)
|
183
|
+
{
|
184
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"boolean",
|
185
|
+
- xmlXPathBooleanFunction);
|
186
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"ceiling",
|
187
|
+
- xmlXPathCeilingFunction);
|
188
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"count",
|
189
|
+
- xmlXPathCountFunction);
|
190
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"concat",
|
191
|
+
- xmlXPathConcatFunction);
|
192
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"contains",
|
193
|
+
- xmlXPathContainsFunction);
|
194
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"id",
|
195
|
+
- xmlXPathIdFunction);
|
196
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"false",
|
197
|
+
- xmlXPathFalseFunction);
|
198
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"floor",
|
199
|
+
- xmlXPathFloorFunction);
|
200
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"last",
|
201
|
+
- xmlXPathLastFunction);
|
202
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"lang",
|
203
|
+
- xmlXPathLangFunction);
|
204
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"local-name",
|
205
|
+
- xmlXPathLocalNameFunction);
|
206
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"not",
|
207
|
+
- xmlXPathNotFunction);
|
208
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"name",
|
209
|
+
- xmlXPathNameFunction);
|
210
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"namespace-uri",
|
211
|
+
- xmlXPathNamespaceURIFunction);
|
212
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"normalize-space",
|
213
|
+
- xmlXPathNormalizeFunction);
|
214
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"number",
|
215
|
+
- xmlXPathNumberFunction);
|
216
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"position",
|
217
|
+
- xmlXPathPositionFunction);
|
218
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"round",
|
219
|
+
- xmlXPathRoundFunction);
|
220
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"string",
|
221
|
+
- xmlXPathStringFunction);
|
222
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"string-length",
|
223
|
+
- xmlXPathStringLengthFunction);
|
224
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"starts-with",
|
225
|
+
- xmlXPathStartsWithFunction);
|
226
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"substring",
|
227
|
+
- xmlXPathSubstringFunction);
|
228
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"substring-before",
|
229
|
+
- xmlXPathSubstringBeforeFunction);
|
230
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"substring-after",
|
231
|
+
- xmlXPathSubstringAfterFunction);
|
232
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"sum",
|
233
|
+
- xmlXPathSumFunction);
|
234
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"true",
|
235
|
+
- xmlXPathTrueFunction);
|
236
|
+
- xmlXPathRegisterFunc(ctxt, (const xmlChar *)"translate",
|
237
|
+
- xmlXPathTranslateFunction);
|
238
|
+
-
|
239
|
+
xmlXPathRegisterFuncNS(ctxt, (const xmlChar *)"escape-uri",
|
240
|
+
(const xmlChar *)"http://www.w3.org/2002/08/xquery-functions",
|
241
|
+
xmlXPathEscapeUriFunction);
|
242
|
+
--
|
243
|
+
2.47.1
|
244
|
+
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogiri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
@@ -17,10 +17,9 @@ authors:
|
|
17
17
|
- Sergio Arbeo
|
18
18
|
- Timothy Elliott
|
19
19
|
- Nobuyoshi Nakada
|
20
|
-
autorequire:
|
21
20
|
bindir: bin
|
22
21
|
cert_chain: []
|
23
|
-
date:
|
22
|
+
date: 2024-12-29 00:00:00.000000000 Z
|
24
23
|
dependencies:
|
25
24
|
- !ruby/object:Gem::Dependency
|
26
25
|
name: mini_portile2
|
@@ -36,7 +35,6 @@ dependencies:
|
|
36
35
|
- - "~>"
|
37
36
|
- !ruby/object:Gem::Version
|
38
37
|
version: 2.8.2
|
39
|
-
force_ruby_platform: false
|
40
38
|
- !ruby/object:Gem::Dependency
|
41
39
|
name: racc
|
42
40
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,7 +49,6 @@ dependencies:
|
|
51
49
|
- - "~>"
|
52
50
|
- !ruby/object:Gem::Version
|
53
51
|
version: '1.4'
|
54
|
-
force_ruby_platform: false
|
55
52
|
description: |
|
56
53
|
Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby. It provides a
|
57
54
|
sensible, easy-to-understand API for reading, writing, modifying, and querying documents. It is
|
@@ -66,9 +63,10 @@ extra_rdoc_files:
|
|
66
63
|
- ext/nokogiri/html4_document.c
|
67
64
|
- ext/nokogiri/html4_element_description.c
|
68
65
|
- ext/nokogiri/html4_entity_lookup.c
|
66
|
+
- ext/nokogiri/html4_sax_parser.c
|
69
67
|
- ext/nokogiri/html4_sax_parser_context.c
|
70
68
|
- ext/nokogiri/html4_sax_push_parser.c
|
71
|
-
- ext/nokogiri/
|
69
|
+
- ext/nokogiri/libxml2_polyfill.c
|
72
70
|
- ext/nokogiri/nokogiri.c
|
73
71
|
- ext/nokogiri/test_global_handlers.c
|
74
72
|
- ext/nokogiri/xml_attr.c
|
@@ -111,9 +109,10 @@ files:
|
|
111
109
|
- ext/nokogiri/html4_document.c
|
112
110
|
- ext/nokogiri/html4_element_description.c
|
113
111
|
- ext/nokogiri/html4_entity_lookup.c
|
112
|
+
- ext/nokogiri/html4_sax_parser.c
|
114
113
|
- ext/nokogiri/html4_sax_parser_context.c
|
115
114
|
- ext/nokogiri/html4_sax_push_parser.c
|
116
|
-
- ext/nokogiri/
|
115
|
+
- ext/nokogiri/libxml2_polyfill.c
|
117
116
|
- ext/nokogiri/nokogiri.c
|
118
117
|
- ext/nokogiri/nokogiri.h
|
119
118
|
- ext/nokogiri/test_global_handlers.c
|
@@ -195,6 +194,7 @@ files:
|
|
195
194
|
- lib/nokogiri/css/parser.rb
|
196
195
|
- lib/nokogiri/css/parser.y
|
197
196
|
- lib/nokogiri/css/parser_extras.rb
|
197
|
+
- lib/nokogiri/css/selector_cache.rb
|
198
198
|
- lib/nokogiri/css/syntax_error.rb
|
199
199
|
- lib/nokogiri/css/tokenizer.rb
|
200
200
|
- lib/nokogiri/css/tokenizer.rex
|
@@ -216,6 +216,7 @@ files:
|
|
216
216
|
- lib/nokogiri/html4/sax/parser_context.rb
|
217
217
|
- lib/nokogiri/html4/sax/push_parser.rb
|
218
218
|
- lib/nokogiri/html5.rb
|
219
|
+
- lib/nokogiri/html5/builder.rb
|
219
220
|
- lib/nokogiri/html5/document.rb
|
220
221
|
- lib/nokogiri/html5/document_fragment.rb
|
221
222
|
- lib/nokogiri/html5/node.rb
|
@@ -267,13 +268,13 @@ files:
|
|
267
268
|
- lib/xsd/xmlparser/nokogiri.rb
|
268
269
|
- patches/libxml2/0001-Remove-script-macro-support.patch
|
269
270
|
- patches/libxml2/0002-Update-entities-to-remove-handling-of-ssi.patch
|
270
|
-
- patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch
|
271
271
|
- patches/libxml2/0009-allow-wildcard-namespaces.patch
|
272
272
|
- patches/libxml2/0010-update-config.guess-and-config.sub-for-libxml2.patch
|
273
273
|
- patches/libxml2/0011-rip-out-libxml2-s-libc_single_threaded-support.patch
|
274
|
+
- patches/libxml2/0019-xpath-Use-separate-static-hash-table-for-standard-fu.patch
|
274
275
|
- patches/libxslt/0001-update-config.guess-and-config.sub-for-libxslt.patch
|
275
|
-
- ports/archives/libxml2-2.
|
276
|
-
- ports/archives/libxslt-1.1.
|
276
|
+
- ports/archives/libxml2-2.13.5.tar.xz
|
277
|
+
- ports/archives/libxslt-1.1.42.tar.xz
|
277
278
|
homepage: https://nokogiri.org
|
278
279
|
licenses:
|
279
280
|
- MIT
|
@@ -284,7 +285,6 @@ metadata:
|
|
284
285
|
changelog_uri: https://nokogiri.org/CHANGELOG.html
|
285
286
|
source_code_uri: https://github.com/sparklemotion/nokogiri
|
286
287
|
rubygems_mfa_required: 'true'
|
287
|
-
post_install_message:
|
288
288
|
rdoc_options:
|
289
289
|
- "--main"
|
290
290
|
- README.md
|
@@ -294,15 +294,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
294
294
|
requirements:
|
295
295
|
- - ">="
|
296
296
|
- !ruby/object:Gem::Version
|
297
|
-
version: 3.
|
297
|
+
version: 3.1.0
|
298
298
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
299
299
|
requirements:
|
300
300
|
- - ">="
|
301
301
|
- !ruby/object:Gem::Version
|
302
302
|
version: '0'
|
303
303
|
requirements: []
|
304
|
-
rubygems_version: 3.
|
305
|
-
signing_key:
|
304
|
+
rubygems_version: 3.6.2
|
306
305
|
specification_version: 4
|
307
306
|
summary: Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
|
308
307
|
test_files: []
|
@@ -1,121 +0,0 @@
|
|
1
|
-
#ifndef HAVE_XMLFIRSTELEMENTCHILD
|
2
|
-
#include <nokogiri.h>
|
3
|
-
/**
|
4
|
-
* xmlFirstElementChild:
|
5
|
-
* @parent: the parent node
|
6
|
-
*
|
7
|
-
* Finds the first child node of that element which is a Element node
|
8
|
-
* Note the handling of entities references is different than in
|
9
|
-
* the W3C DOM element traversal spec since we don't have back reference
|
10
|
-
* from entities content to entities references.
|
11
|
-
*
|
12
|
-
* Returns the first element child or NULL if not available
|
13
|
-
*/
|
14
|
-
xmlNodePtr
|
15
|
-
xmlFirstElementChild(xmlNodePtr parent)
|
16
|
-
{
|
17
|
-
xmlNodePtr cur = NULL;
|
18
|
-
|
19
|
-
if (parent == NULL) {
|
20
|
-
return (NULL);
|
21
|
-
}
|
22
|
-
switch (parent->type) {
|
23
|
-
case XML_ELEMENT_NODE:
|
24
|
-
case XML_ENTITY_NODE:
|
25
|
-
case XML_DOCUMENT_NODE:
|
26
|
-
case XML_HTML_DOCUMENT_NODE:
|
27
|
-
cur = parent->children;
|
28
|
-
break;
|
29
|
-
default:
|
30
|
-
return (NULL);
|
31
|
-
}
|
32
|
-
while (cur != NULL) {
|
33
|
-
if (cur->type == XML_ELEMENT_NODE) {
|
34
|
-
return (cur);
|
35
|
-
}
|
36
|
-
cur = cur->next;
|
37
|
-
}
|
38
|
-
return (NULL);
|
39
|
-
}
|
40
|
-
|
41
|
-
/**
|
42
|
-
* xmlNextElementSibling:
|
43
|
-
* @node: the current node
|
44
|
-
*
|
45
|
-
* Finds the first closest next sibling of the node which is an
|
46
|
-
* element node.
|
47
|
-
* Note the handling of entities references is different than in
|
48
|
-
* the W3C DOM element traversal spec since we don't have back reference
|
49
|
-
* from entities content to entities references.
|
50
|
-
*
|
51
|
-
* Returns the next element sibling or NULL if not available
|
52
|
-
*/
|
53
|
-
xmlNodePtr
|
54
|
-
xmlNextElementSibling(xmlNodePtr node)
|
55
|
-
{
|
56
|
-
if (node == NULL) {
|
57
|
-
return (NULL);
|
58
|
-
}
|
59
|
-
switch (node->type) {
|
60
|
-
case XML_ELEMENT_NODE:
|
61
|
-
case XML_TEXT_NODE:
|
62
|
-
case XML_CDATA_SECTION_NODE:
|
63
|
-
case XML_ENTITY_REF_NODE:
|
64
|
-
case XML_ENTITY_NODE:
|
65
|
-
case XML_PI_NODE:
|
66
|
-
case XML_COMMENT_NODE:
|
67
|
-
case XML_DTD_NODE:
|
68
|
-
case XML_XINCLUDE_START:
|
69
|
-
case XML_XINCLUDE_END:
|
70
|
-
node = node->next;
|
71
|
-
break;
|
72
|
-
default:
|
73
|
-
return (NULL);
|
74
|
-
}
|
75
|
-
while (node != NULL) {
|
76
|
-
if (node->type == XML_ELEMENT_NODE) {
|
77
|
-
return (node);
|
78
|
-
}
|
79
|
-
node = node->next;
|
80
|
-
}
|
81
|
-
return (NULL);
|
82
|
-
}
|
83
|
-
|
84
|
-
/**
|
85
|
-
* xmlLastElementChild:
|
86
|
-
* @parent: the parent node
|
87
|
-
*
|
88
|
-
* Finds the last child node of that element which is a Element node
|
89
|
-
* Note the handling of entities references is different than in
|
90
|
-
* the W3C DOM element traversal spec since we don't have back reference
|
91
|
-
* from entities content to entities references.
|
92
|
-
*
|
93
|
-
* Returns the last element child or NULL if not available
|
94
|
-
*/
|
95
|
-
xmlNodePtr
|
96
|
-
xmlLastElementChild(xmlNodePtr parent)
|
97
|
-
{
|
98
|
-
xmlNodePtr cur = NULL;
|
99
|
-
|
100
|
-
if (parent == NULL) {
|
101
|
-
return (NULL);
|
102
|
-
}
|
103
|
-
switch (parent->type) {
|
104
|
-
case XML_ELEMENT_NODE:
|
105
|
-
case XML_ENTITY_NODE:
|
106
|
-
case XML_DOCUMENT_NODE:
|
107
|
-
case XML_HTML_DOCUMENT_NODE:
|
108
|
-
cur = parent->last;
|
109
|
-
break;
|
110
|
-
default:
|
111
|
-
return (NULL);
|
112
|
-
}
|
113
|
-
while (cur != NULL) {
|
114
|
-
if (cur->type == XML_ELEMENT_NODE) {
|
115
|
-
return (cur);
|
116
|
-
}
|
117
|
-
cur = cur->prev;
|
118
|
-
}
|
119
|
-
return (NULL);
|
120
|
-
}
|
121
|
-
#endif
|
@@ -1,25 +0,0 @@
|
|
1
|
-
From 0b6ae484761fa01242fe8b67b54e3eb2d282d83d Mon Sep 17 00:00:00 2001
|
2
|
-
From: Mike Dalessio <mike.dalessio@gmail.com>
|
3
|
-
Date: Wed, 4 Dec 2019 08:43:51 -0500
|
4
|
-
Subject: [PATCH] fix libxml2.la's path
|
5
|
-
|
6
|
-
---
|
7
|
-
Makefile.in | 2 +-
|
8
|
-
1 file changed, 1 insertion(+), 1 deletion(-)
|
9
|
-
|
10
|
-
diff --git a/Makefile.in b/Makefile.in
|
11
|
-
index cf96d41..1372d8b 100644
|
12
|
-
--- a/Makefile.in
|
13
|
-
+++ b/Makefile.in
|
14
|
-
@@ -1057,7 +1057,7 @@ clean-noinstLTLIBRARIES:
|
15
|
-
rm -f $${locs}; \
|
16
|
-
}
|
17
|
-
|
18
|
-
-libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) $(EXTRA_libxml2_la_DEPENDENCIES)
|
19
|
-
+$(top_builddir)/libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) $(EXTRA_libxml2_la_DEPENDENCIES)
|
20
|
-
$(AM_V_CCLD)$(libxml2_la_LINK) -rpath $(libdir) $(libxml2_la_OBJECTS) $(libxml2_la_LIBADD) $(LIBS)
|
21
|
-
|
22
|
-
testdso.la: $(testdso_la_OBJECTS) $(testdso_la_DEPENDENCIES) $(EXTRA_testdso_la_DEPENDENCIES)
|
23
|
-
--
|
24
|
-
2.17.1
|
25
|
-
|
Binary file
|
Binary file
|