nokogiri 1.12.5-java → 1.13.0-java
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 +2 -0
- data/README.md +9 -7
- data/bin/nokogiri +63 -50
- data/dependencies.yml +5 -6
- data/ext/java/nokogiri/XmlDocumentFragment.java +4 -3
- data/ext/java/nokogiri/XmlNamespace.java +0 -8
- data/ext/java/nokogiri/XmlNode.java +23 -2
- data/ext/java/nokogiri/XmlNodeSet.java +0 -4
- data/ext/java/nokogiri/XmlReader.java +12 -0
- data/ext/java/nokogiri/internals/NokogiriStrictErrorHandler.java +1 -1
- data/ext/java/nokogiri/internals/SaveContextVisitor.java +2 -0
- data/ext/nokogiri/extconf.rb +47 -35
- data/ext/nokogiri/xml_document.c +35 -35
- data/ext/nokogiri/xml_document_fragment.c +0 -2
- data/ext/nokogiri/xml_dtd.c +2 -2
- data/ext/nokogiri/xml_encoding_handler.c +25 -11
- data/ext/nokogiri/xml_node.c +638 -333
- data/ext/nokogiri/xml_reader.c +37 -11
- data/ext/nokogiri/xml_xpath_context.c +72 -49
- data/lib/nokogiri/class_resolver.rb +67 -0
- data/lib/nokogiri/css/node.rb +9 -8
- data/lib/nokogiri/css/parser.rb +11 -3
- data/lib/nokogiri/css/parser.y +10 -2
- data/lib/nokogiri/css/parser_extras.rb +20 -20
- data/lib/nokogiri/css/syntax_error.rb +1 -0
- data/lib/nokogiri/css/tokenizer.rb +2 -1
- data/lib/nokogiri/css/tokenizer.rex +2 -1
- data/lib/nokogiri/css/xpath_visitor.rb +174 -75
- data/lib/nokogiri/css.rb +38 -6
- data/lib/nokogiri/decorators/slop.rb +8 -7
- data/lib/nokogiri/extension.rb +1 -1
- data/lib/nokogiri/gumbo.rb +1 -0
- data/lib/nokogiri/html.rb +16 -10
- data/lib/nokogiri/html4/builder.rb +1 -0
- data/lib/nokogiri/html4/document.rb +84 -75
- data/lib/nokogiri/html4/document_fragment.rb +11 -7
- data/lib/nokogiri/html4/element_description.rb +1 -0
- data/lib/nokogiri/html4/element_description_defaults.rb +426 -520
- data/lib/nokogiri/html4/entity_lookup.rb +2 -1
- data/lib/nokogiri/html4/sax/parser.rb +2 -1
- data/lib/nokogiri/html4/sax/parser_context.rb +1 -0
- data/lib/nokogiri/html4/sax/push_parser.rb +7 -7
- data/lib/nokogiri/html4.rb +11 -5
- data/lib/nokogiri/html5/document.rb +24 -10
- data/lib/nokogiri/html5/document_fragment.rb +5 -2
- data/lib/nokogiri/html5/node.rb +6 -3
- data/lib/nokogiri/html5.rb +68 -64
- data/lib/nokogiri/jruby/dependencies.rb +10 -9
- data/lib/nokogiri/nokogiri.jar +0 -0
- data/lib/nokogiri/syntax_error.rb +1 -0
- data/lib/nokogiri/version/constant.rb +2 -1
- data/lib/nokogiri/version/info.rb +19 -13
- data/lib/nokogiri/version.rb +1 -0
- data/lib/nokogiri/xml/attr.rb +5 -3
- data/lib/nokogiri/xml/attribute_decl.rb +2 -1
- data/lib/nokogiri/xml/builder.rb +32 -32
- data/lib/nokogiri/xml/cdata.rb +2 -1
- data/lib/nokogiri/xml/character_data.rb +1 -0
- data/lib/nokogiri/xml/document.rb +139 -103
- data/lib/nokogiri/xml/document_fragment.rb +41 -38
- data/lib/nokogiri/xml/dtd.rb +3 -2
- data/lib/nokogiri/xml/element_content.rb +1 -0
- data/lib/nokogiri/xml/element_decl.rb +2 -1
- data/lib/nokogiri/xml/entity_decl.rb +3 -2
- data/lib/nokogiri/xml/entity_reference.rb +1 -0
- data/lib/nokogiri/xml/namespace.rb +2 -0
- data/lib/nokogiri/xml/node/save_options.rb +6 -3
- data/lib/nokogiri/xml/node.rb +512 -348
- data/lib/nokogiri/xml/node_set.rb +46 -54
- data/lib/nokogiri/xml/notation.rb +12 -0
- data/lib/nokogiri/xml/parse_options.rb +11 -7
- data/lib/nokogiri/xml/pp/character_data.rb +8 -6
- data/lib/nokogiri/xml/pp/node.rb +24 -26
- data/lib/nokogiri/xml/pp.rb +1 -0
- data/lib/nokogiri/xml/processing_instruction.rb +2 -1
- data/lib/nokogiri/xml/reader.rb +17 -19
- data/lib/nokogiri/xml/relax_ng.rb +1 -0
- data/lib/nokogiri/xml/sax/document.rb +20 -19
- data/lib/nokogiri/xml/sax/parser.rb +36 -34
- data/lib/nokogiri/xml/sax/parser_context.rb +7 -3
- data/lib/nokogiri/xml/sax/push_parser.rb +5 -5
- data/lib/nokogiri/xml/sax.rb +1 -0
- data/lib/nokogiri/xml/schema.rb +7 -6
- data/lib/nokogiri/xml/searchable.rb +42 -22
- data/lib/nokogiri/xml/syntax_error.rb +4 -4
- data/lib/nokogiri/xml/text.rb +1 -0
- data/lib/nokogiri/xml/xpath/syntax_error.rb +2 -1
- data/lib/nokogiri/xml/xpath.rb +12 -0
- data/lib/nokogiri/xml/xpath_context.rb +2 -3
- data/lib/nokogiri/xml.rb +3 -3
- data/lib/nokogiri/xslt/stylesheet.rb +1 -0
- data/lib/nokogiri/xslt.rb +3 -2
- data/lib/nokogiri.rb +19 -16
- data/lib/xsd/xmlparser/nokogiri.rb +25 -24
- metadata +102 -30
@@ -1,8 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require 'nokogiri'
|
3
2
|
|
4
|
-
|
5
|
-
|
3
|
+
require "nokogiri"
|
4
|
+
|
5
|
+
module XSD
|
6
|
+
module XMLParser
|
6
7
|
###
|
7
8
|
# Nokogiri XML parser for soap4r.
|
8
9
|
#
|
@@ -27,40 +28,40 @@ module XSD # :nodoc:
|
|
27
28
|
class Nokogiri < XSD::XMLParser::Parser
|
28
29
|
###
|
29
30
|
# Create a new XSD parser with +host+ and +opt+
|
30
|
-
def initialize
|
31
|
+
def initialize(host, opt = {})
|
31
32
|
super
|
32
|
-
@parser = ::Nokogiri::XML::SAX::Parser.new(self, @charset ||
|
33
|
+
@parser = ::Nokogiri::XML::SAX::Parser.new(self, @charset || "UTF-8")
|
33
34
|
end
|
34
35
|
|
35
36
|
###
|
36
37
|
# Start parsing +string_or_readable+
|
37
|
-
def do_parse
|
38
|
+
def do_parse(string_or_readable)
|
38
39
|
@parser.parse(string_or_readable)
|
39
40
|
end
|
40
41
|
|
41
42
|
###
|
42
43
|
# Handle the start_element event with +name+ and +attrs+
|
43
|
-
def start_element
|
44
|
+
def start_element(name, attrs = [])
|
44
45
|
super(name, Hash[*attrs.flatten])
|
45
46
|
end
|
46
47
|
|
47
48
|
###
|
48
49
|
# Handle the end_element event with +name+
|
49
|
-
def end_element
|
50
|
+
def end_element(name)
|
50
51
|
super
|
51
52
|
end
|
52
53
|
|
53
54
|
###
|
54
55
|
# Handle errors with message +msg+
|
55
|
-
def error
|
56
|
-
raise ParseError
|
56
|
+
def error(msg)
|
57
|
+
raise ParseError, msg
|
57
58
|
end
|
58
|
-
|
59
|
+
alias_method :warning, :error
|
59
60
|
|
60
61
|
###
|
61
62
|
# Handle cdata_blocks containing +string+
|
62
|
-
def cdata_block
|
63
|
-
characters
|
63
|
+
def cdata_block(string)
|
64
|
+
characters(string)
|
64
65
|
end
|
65
66
|
|
66
67
|
###
|
@@ -70,16 +71,16 @@ module XSD # :nodoc:
|
|
70
71
|
# +prefix+ is the namespace prefix for the element
|
71
72
|
# +uri+ is the associated namespace URI
|
72
73
|
# +ns+ is a hash of namespace prefix:urls associated with the element
|
73
|
-
def start_element_namespace
|
74
|
+
def start_element_namespace(name, attrs = [], prefix = nil, uri = nil, ns = [])
|
74
75
|
###
|
75
76
|
# Deal with SAX v1 interface
|
76
|
-
name = [prefix, name].compact.join(
|
77
|
-
attributes = ns.map
|
78
|
-
[[
|
79
|
-
|
80
|
-
[[attr.prefix, attr.localname].compact.join(
|
81
|
-
|
82
|
-
start_element
|
77
|
+
name = [prefix, name].compact.join(":")
|
78
|
+
attributes = ns.map do |ns_prefix, ns_uri|
|
79
|
+
[["xmlns", ns_prefix].compact.join(":"), ns_uri]
|
80
|
+
end + attrs.map do |attr|
|
81
|
+
[[attr.prefix, attr.localname].compact.join(":"), attr.value]
|
82
|
+
end.flatten
|
83
|
+
start_element(name, attributes)
|
83
84
|
end
|
84
85
|
|
85
86
|
###
|
@@ -87,13 +88,13 @@ module XSD # :nodoc:
|
|
87
88
|
# +name+ is the element's name
|
88
89
|
# +prefix+ is the namespace prefix associated with the element
|
89
90
|
# +uri+ is the associated namespace URI
|
90
|
-
def end_element_namespace
|
91
|
+
def end_element_namespace(name, prefix = nil, uri = nil)
|
91
92
|
###
|
92
93
|
# Deal with SAX v1 interface
|
93
|
-
end_element
|
94
|
+
end_element([prefix, name].compact.join(":"))
|
94
95
|
end
|
95
96
|
|
96
|
-
|
97
|
+
["xmldecl", "start_document", "end_document", "comment"].each do |name|
|
97
98
|
class_eval %{ def #{name}(*args); end }
|
98
99
|
end
|
99
100
|
|
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.13.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
@@ -20,7 +20,7 @@ authors:
|
|
20
20
|
autorequire:
|
21
21
|
bindir: bin
|
22
22
|
cert_chain: []
|
23
|
-
date:
|
23
|
+
date: 2022-01-06 00:00:00.000000000 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
requirement: !ruby/object:Gem::Requirement
|
@@ -29,8 +29,8 @@ dependencies:
|
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '1.4'
|
31
31
|
name: racc
|
32
|
-
type: :runtime
|
33
32
|
prerelease: false
|
33
|
+
type: :runtime
|
34
34
|
version_requirements: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
36
|
- - "~>"
|
@@ -43,8 +43,8 @@ dependencies:
|
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '2.2'
|
45
45
|
name: bundler
|
46
|
-
type: :development
|
47
46
|
prerelease: false
|
47
|
+
type: :development
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - "~>"
|
@@ -57,8 +57,8 @@ dependencies:
|
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '1.4'
|
59
59
|
name: hoe-markdown
|
60
|
-
type: :development
|
61
60
|
prerelease: false
|
61
|
+
type: :development
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
64
|
- - "~>"
|
@@ -69,15 +69,15 @@ dependencies:
|
|
69
69
|
requirements:
|
70
70
|
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '5.
|
72
|
+
version: '5.15'
|
73
73
|
name: minitest
|
74
|
-
type: :development
|
75
74
|
prerelease: false
|
75
|
+
type: :development
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '5.
|
80
|
+
version: '5.15'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
@@ -85,8 +85,8 @@ dependencies:
|
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '1.4'
|
87
87
|
name: minitest-reporters
|
88
|
-
type: :development
|
89
88
|
prerelease: false
|
89
|
+
type: :development
|
90
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
92
|
- - "~>"
|
@@ -99,8 +99,8 @@ dependencies:
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '13.0'
|
101
101
|
name: rake
|
102
|
-
type: :development
|
103
102
|
prerelease: false
|
103
|
+
type: :development
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
106
|
- - "~>"
|
@@ -109,87 +109,157 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
requirement: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- -
|
112
|
+
- - '='
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
114
|
+
version: 1.1.7
|
115
115
|
name: rake-compiler
|
116
|
-
type: :development
|
117
116
|
prerelease: false
|
117
|
+
type: :development
|
118
118
|
version_requirements: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- -
|
120
|
+
- - '='
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
122
|
+
version: 1.1.7
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
124
|
requirement: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
126
|
- - "~>"
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
version: '1.
|
128
|
+
version: '1.2'
|
129
129
|
name: rake-compiler-dock
|
130
|
+
prerelease: false
|
130
131
|
type: :development
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - "~>"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '1.2'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
requirement: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - "~>"
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '6.3'
|
143
|
+
name: rdoc
|
131
144
|
prerelease: false
|
145
|
+
type: :development
|
132
146
|
version_requirements: !ruby/object:Gem::Requirement
|
133
147
|
requirements:
|
134
148
|
- - "~>"
|
135
149
|
- !ruby/object:Gem::Version
|
136
|
-
version: '
|
150
|
+
version: '6.3'
|
137
151
|
- !ruby/object:Gem::Dependency
|
138
152
|
requirement: !ruby/object:Gem::Requirement
|
139
153
|
requirements:
|
140
154
|
- - "~>"
|
141
155
|
- !ruby/object:Gem::Version
|
142
|
-
version: 1.0.
|
156
|
+
version: 1.0.7
|
143
157
|
name: rexical
|
144
|
-
type: :development
|
145
158
|
prerelease: false
|
159
|
+
type: :development
|
146
160
|
version_requirements: !ruby/object:Gem::Requirement
|
147
161
|
requirements:
|
148
162
|
- - "~>"
|
149
163
|
- !ruby/object:Gem::Version
|
150
|
-
version: 1.0.
|
164
|
+
version: 1.0.7
|
151
165
|
- !ruby/object:Gem::Dependency
|
152
166
|
requirement: !ruby/object:Gem::Requirement
|
153
167
|
requirements:
|
154
168
|
- - "~>"
|
155
169
|
- !ruby/object:Gem::Version
|
156
|
-
version: '1.
|
170
|
+
version: '1.23'
|
157
171
|
name: rubocop
|
172
|
+
prerelease: false
|
158
173
|
type: :development
|
174
|
+
version_requirements: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - "~>"
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '1.23'
|
179
|
+
- !ruby/object:Gem::Dependency
|
180
|
+
requirement: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - "~>"
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0.17'
|
185
|
+
name: rubocop-minitest
|
159
186
|
prerelease: false
|
187
|
+
type: :development
|
160
188
|
version_requirements: !ruby/object:Gem::Requirement
|
161
189
|
requirements:
|
162
190
|
- - "~>"
|
163
191
|
- !ruby/object:Gem::Version
|
164
|
-
version: '
|
192
|
+
version: '0.17'
|
165
193
|
- !ruby/object:Gem::Dependency
|
166
194
|
requirement: !ruby/object:Gem::Requirement
|
167
195
|
requirements:
|
168
196
|
- - "~>"
|
169
197
|
- !ruby/object:Gem::Version
|
170
|
-
version: '
|
171
|
-
name:
|
198
|
+
version: '1.12'
|
199
|
+
name: rubocop-performance
|
200
|
+
prerelease: false
|
172
201
|
type: :development
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
203
|
+
requirements:
|
204
|
+
- - "~>"
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '1.12'
|
207
|
+
- !ruby/object:Gem::Dependency
|
208
|
+
requirement: !ruby/object:Gem::Requirement
|
209
|
+
requirements:
|
210
|
+
- - "~>"
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: '0.6'
|
213
|
+
name: rubocop-rake
|
173
214
|
prerelease: false
|
215
|
+
type: :development
|
174
216
|
version_requirements: !ruby/object:Gem::Requirement
|
175
217
|
requirements:
|
176
218
|
- - "~>"
|
177
219
|
- !ruby/object:Gem::Version
|
178
|
-
version: '0.
|
220
|
+
version: '0.6'
|
179
221
|
- !ruby/object:Gem::Dependency
|
180
222
|
requirement: !ruby/object:Gem::Requirement
|
181
223
|
requirements:
|
182
224
|
- - "~>"
|
183
225
|
- !ruby/object:Gem::Version
|
184
|
-
version: '
|
185
|
-
name:
|
226
|
+
version: '2.3'
|
227
|
+
name: rubocop-shopify
|
228
|
+
prerelease: false
|
186
229
|
type: :development
|
230
|
+
version_requirements: !ruby/object:Gem::Requirement
|
231
|
+
requirements:
|
232
|
+
- - "~>"
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: '2.3'
|
235
|
+
- !ruby/object:Gem::Dependency
|
236
|
+
requirement: !ruby/object:Gem::Requirement
|
237
|
+
requirements:
|
238
|
+
- - "~>"
|
239
|
+
- !ruby/object:Gem::Version
|
240
|
+
version: '1.0'
|
241
|
+
name: ruby_memcheck
|
242
|
+
prerelease: false
|
243
|
+
type: :development
|
244
|
+
version_requirements: !ruby/object:Gem::Requirement
|
245
|
+
requirements:
|
246
|
+
- - "~>"
|
247
|
+
- !ruby/object:Gem::Version
|
248
|
+
version: '1.0'
|
249
|
+
- !ruby/object:Gem::Dependency
|
250
|
+
requirement: !ruby/object:Gem::Requirement
|
251
|
+
requirements:
|
252
|
+
- - "~>"
|
253
|
+
- !ruby/object:Gem::Version
|
254
|
+
version: '0.21'
|
255
|
+
name: simplecov
|
187
256
|
prerelease: false
|
257
|
+
type: :development
|
188
258
|
version_requirements: !ruby/object:Gem::Requirement
|
189
259
|
requirements:
|
190
260
|
- - "~>"
|
191
261
|
- !ruby/object:Gem::Version
|
192
|
-
version: '0.
|
262
|
+
version: '0.21'
|
193
263
|
description: |
|
194
264
|
Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby. It provides a
|
195
265
|
sensible, easy-to-understand API for reading, writing, modifying, and querying documents. It is
|
@@ -374,6 +444,7 @@ files:
|
|
374
444
|
- lib/nekodtd.jar
|
375
445
|
- lib/nekohtml.jar
|
376
446
|
- lib/nokogiri.rb
|
447
|
+
- lib/nokogiri/class_resolver.rb
|
377
448
|
- lib/nokogiri/css.rb
|
378
449
|
- lib/nokogiri/css/node.rb
|
379
450
|
- lib/nokogiri/css/parser.rb
|
@@ -460,6 +531,7 @@ metadata:
|
|
460
531
|
documentation_uri: https://nokogiri.org/rdoc/index.html
|
461
532
|
changelog_uri: https://nokogiri.org/CHANGELOG.html
|
462
533
|
source_code_uri: https://github.com/sparklemotion/nokogiri
|
534
|
+
rubygems_mfa_required: 'true'
|
463
535
|
post_install_message:
|
464
536
|
rdoc_options:
|
465
537
|
- "--main"
|
@@ -470,14 +542,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
470
542
|
requirements:
|
471
543
|
- - ">="
|
472
544
|
- !ruby/object:Gem::Version
|
473
|
-
version: 2.
|
545
|
+
version: 2.6.0
|
474
546
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
475
547
|
requirements:
|
476
548
|
- - ">="
|
477
549
|
- !ruby/object:Gem::Version
|
478
550
|
version: '0'
|
479
551
|
requirements: []
|
480
|
-
rubygems_version: 3.
|
552
|
+
rubygems_version: 3.2.29
|
481
553
|
signing_key:
|
482
554
|
specification_version: 4
|
483
555
|
summary: Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
|