nokogiri 1.4.7-java → 1.5.0.beta.1-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.
- data.tar.gz.sig +0 -0
- data/CHANGELOG.ja.rdoc +8 -83
- data/CHANGELOG.rdoc +6 -80
- data/Manifest.txt +4 -74
- data/README.ja.rdoc +5 -1
- data/README.rdoc +8 -22
- data/Rakefile +79 -60
- data/bin/nokogiri +1 -6
- data/deps.rip +5 -0
- data/ext/nokogiri/extconf.rb +32 -53
- data/ext/nokogiri/nokogiri.c +0 -2
- data/ext/nokogiri/nokogiri.h +0 -9
- data/ext/nokogiri/xml_document.c +0 -14
- data/ext/nokogiri/xml_dtd.c +2 -2
- data/ext/nokogiri/xml_io.c +7 -32
- data/ext/nokogiri/xml_node.c +31 -103
- data/ext/nokogiri/xml_node_set.c +8 -8
- data/ext/nokogiri/xml_reader.c +1 -20
- data/ext/nokogiri/xml_sax_parser.c +3 -5
- data/ext/nokogiri/xml_sax_parser_context.c +0 -40
- data/ext/nokogiri/xml_xpath_context.c +2 -35
- data/ext/nokogiri/xslt_stylesheet.c +6 -124
- data/lib/isorelax.jar +0 -0
- data/lib/jing.jar +0 -0
- data/lib/nekodtd.jar +0 -0
- data/lib/nekohtml.jar +0 -0
- data/lib/nokogiri.rb +7 -3
- data/lib/nokogiri/css.rb +3 -6
- data/lib/nokogiri/css/generated_parser.rb +669 -0
- data/lib/nokogiri/css/generated_tokenizer.rb +145 -0
- data/lib/nokogiri/css/parser.rb +70 -665
- data/lib/nokogiri/css/parser.y +1 -6
- data/lib/nokogiri/css/tokenizer.rb +3 -148
- data/lib/nokogiri/css/tokenizer.rex +1 -1
- data/lib/nokogiri/css/xpath_visitor.rb +14 -16
- data/lib/nokogiri/decorators/slop.rb +3 -5
- data/lib/nokogiri/html.rb +3 -2
- data/lib/nokogiri/html/document.rb +18 -134
- data/lib/nokogiri/html/document_fragment.rb +21 -26
- data/lib/nokogiri/html/element_description_defaults.rb +671 -0
- data/lib/nokogiri/html/sax/parser.rb +2 -6
- data/lib/nokogiri/nokogiri.jar +0 -0
- data/lib/nokogiri/version.rb +4 -9
- data/lib/nokogiri/xml/attribute_decl.rb +1 -1
- data/lib/nokogiri/xml/builder.rb +1 -1
- data/lib/nokogiri/xml/document.rb +3 -27
- data/lib/nokogiri/xml/document_fragment.rb +2 -9
- data/lib/nokogiri/xml/dtd.rb +1 -12
- data/lib/nokogiri/xml/element_decl.rb +1 -1
- data/lib/nokogiri/xml/entity_decl.rb +1 -1
- data/lib/nokogiri/xml/node.rb +75 -172
- data/lib/nokogiri/xml/node/save_options.rb +0 -10
- data/lib/nokogiri/xml/node_set.rb +3 -28
- data/lib/nokogiri/xml/parse_options.rb +0 -8
- data/lib/nokogiri/xml/reader.rb +6 -44
- data/lib/nokogiri/xml/sax/document.rb +5 -9
- data/lib/nokogiri/xml/schema.rb +1 -7
- data/lib/nokogiri/xslt.rb +5 -9
- data/lib/xercesImpl.jar +0 -0
- data/tasks/cross_compile.rb +12 -27
- data/tasks/test.rb +0 -0
- data/test/css/test_parser.rb +19 -40
- data/test/css/test_tokenizer.rb +0 -8
- data/test/helper.rb +1 -4
- data/test/html/sax/test_parser.rb +21 -47
- data/test/html/sax/test_parser_context.rb +2 -2
- data/test/html/test_document.rb +3 -58
- data/test/html/test_document_encoding.rb +0 -53
- data/test/html/test_document_fragment.rb +13 -82
- data/test/html/test_element_description.rb +4 -2
- data/test/html/test_node.rb +0 -9
- data/test/test_memory_leak.rb +2 -57
- data/test/test_nokogiri.rb +14 -20
- data/test/test_reader.rb +7 -47
- data/test/test_xslt_transforms.rb +5 -8
- data/test/xml/sax/test_parser.rb +17 -34
- data/test/xml/sax/test_parser_context.rb +0 -50
- data/test/xml/sax/test_push_parser.rb +1 -18
- data/test/xml/test_attr.rb +4 -31
- data/test/xml/test_attribute_decl.rb +7 -3
- data/test/xml/test_builder.rb +5 -5
- data/test/xml/test_cdata.rb +3 -3
- data/test/xml/test_document.rb +18 -15
- data/test/xml/test_document_fragment.rb +20 -19
- data/test/xml/test_dtd.rb +13 -18
- data/test/xml/test_element_content.rb +1 -1
- data/test/xml/test_element_decl.rb +1 -1
- data/test/xml/test_entity_decl.rb +12 -10
- data/test/xml/test_namespace.rb +7 -5
- data/test/xml/test_node.rb +15 -54
- data/test/xml/test_node_reparenting.rb +42 -85
- data/test/xml/test_node_set.rb +2 -61
- data/test/xml/test_schema.rb +0 -5
- data/test/xml/test_text.rb +2 -11
- data/test/xml/test_unparented_node.rb +1 -1
- data/test/xml/test_xpath.rb +7 -43
- metadata +442 -473
- metadata.gz.sig +0 -0
- data/.gemtest +0 -0
- data/ext/nokogiri/depend +0 -358
- data/ext/nokogiri/libcharset-1.dll +0 -0
- data/ext/nokogiri/libexslt.dll +0 -0
- data/ext/nokogiri/libiconv-2.dll +0 -0
- data/ext/nokogiri/libxml2.dll +0 -0
- data/ext/nokogiri/libxslt.dll +0 -0
- data/ext/nokogiri/xml_libxml2_hacks.c +0 -112
- data/ext/nokogiri/xml_libxml2_hacks.h +0 -12
- data/ext/nokogiri/zlib1.dll +0 -0
- data/lib/nokogiri/css/parser_extras.rb +0 -91
- data/lib/nokogiri/ffi/encoding_handler.rb +0 -42
- data/lib/nokogiri/ffi/html/document.rb +0 -28
- data/lib/nokogiri/ffi/html/element_description.rb +0 -81
- data/lib/nokogiri/ffi/html/entity_lookup.rb +0 -16
- data/lib/nokogiri/ffi/html/sax/parser_context.rb +0 -38
- data/lib/nokogiri/ffi/io_callbacks.rb +0 -42
- data/lib/nokogiri/ffi/libxml.rb +0 -420
- data/lib/nokogiri/ffi/structs/common_node.rb +0 -38
- data/lib/nokogiri/ffi/structs/html_elem_desc.rb +0 -24
- data/lib/nokogiri/ffi/structs/html_entity_desc.rb +0 -13
- data/lib/nokogiri/ffi/structs/xml_alloc.rb +0 -16
- data/lib/nokogiri/ffi/structs/xml_attr.rb +0 -20
- data/lib/nokogiri/ffi/structs/xml_attribute.rb +0 -27
- data/lib/nokogiri/ffi/structs/xml_buffer.rb +0 -16
- data/lib/nokogiri/ffi/structs/xml_char_encoding_handler.rb +0 -11
- data/lib/nokogiri/ffi/structs/xml_document.rb +0 -117
- data/lib/nokogiri/ffi/structs/xml_dtd.rb +0 -28
- data/lib/nokogiri/ffi/structs/xml_element.rb +0 -26
- data/lib/nokogiri/ffi/structs/xml_element_content.rb +0 -17
- data/lib/nokogiri/ffi/structs/xml_entity.rb +0 -32
- data/lib/nokogiri/ffi/structs/xml_enumeration.rb +0 -12
- data/lib/nokogiri/ffi/structs/xml_node.rb +0 -28
- data/lib/nokogiri/ffi/structs/xml_node_set.rb +0 -53
- data/lib/nokogiri/ffi/structs/xml_notation.rb +0 -11
- data/lib/nokogiri/ffi/structs/xml_ns.rb +0 -15
- data/lib/nokogiri/ffi/structs/xml_parser_context.rb +0 -20
- data/lib/nokogiri/ffi/structs/xml_parser_input.rb +0 -19
- data/lib/nokogiri/ffi/structs/xml_relax_ng.rb +0 -14
- data/lib/nokogiri/ffi/structs/xml_sax_handler.rb +0 -51
- data/lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb +0 -124
- data/lib/nokogiri/ffi/structs/xml_schema.rb +0 -13
- data/lib/nokogiri/ffi/structs/xml_syntax_error.rb +0 -31
- data/lib/nokogiri/ffi/structs/xml_text_reader.rb +0 -12
- data/lib/nokogiri/ffi/structs/xml_xpath_context.rb +0 -38
- data/lib/nokogiri/ffi/structs/xml_xpath_object.rb +0 -35
- data/lib/nokogiri/ffi/structs/xml_xpath_parser_context.rb +0 -20
- data/lib/nokogiri/ffi/structs/xslt_stylesheet.rb +0 -13
- data/lib/nokogiri/ffi/weak_bucket.rb +0 -40
- data/lib/nokogiri/ffi/xml/attr.rb +0 -41
- data/lib/nokogiri/ffi/xml/attribute_decl.rb +0 -27
- data/lib/nokogiri/ffi/xml/cdata.rb +0 -19
- data/lib/nokogiri/ffi/xml/comment.rb +0 -18
- data/lib/nokogiri/ffi/xml/document.rb +0 -174
- data/lib/nokogiri/ffi/xml/document_fragment.rb +0 -21
- data/lib/nokogiri/ffi/xml/dtd.rb +0 -67
- data/lib/nokogiri/ffi/xml/element_content.rb +0 -43
- data/lib/nokogiri/ffi/xml/element_decl.rb +0 -19
- data/lib/nokogiri/ffi/xml/entity_decl.rb +0 -36
- data/lib/nokogiri/ffi/xml/entity_reference.rb +0 -19
- data/lib/nokogiri/ffi/xml/namespace.rb +0 -44
- data/lib/nokogiri/ffi/xml/node.rb +0 -559
- data/lib/nokogiri/ffi/xml/node_set.rb +0 -150
- data/lib/nokogiri/ffi/xml/processing_instruction.rb +0 -20
- data/lib/nokogiri/ffi/xml/reader.rb +0 -236
- data/lib/nokogiri/ffi/xml/relax_ng.rb +0 -85
- data/lib/nokogiri/ffi/xml/sax/parser.rb +0 -143
- data/lib/nokogiri/ffi/xml/sax/parser_context.rb +0 -79
- data/lib/nokogiri/ffi/xml/sax/push_parser.rb +0 -51
- data/lib/nokogiri/ffi/xml/schema.rb +0 -109
- data/lib/nokogiri/ffi/xml/syntax_error.rb +0 -98
- data/lib/nokogiri/ffi/xml/text.rb +0 -18
- data/lib/nokogiri/ffi/xml/xpath.rb +0 -9
- data/lib/nokogiri/ffi/xml/xpath_context.rb +0 -153
- data/lib/nokogiri/ffi/xslt/stylesheet.rb +0 -77
- data/test/decorators/test_slop.rb +0 -16
- data/test/ffi/test_document.rb +0 -35
- data/test/files/encoding.html +0 -82
- data/test/files/encoding.xhtml +0 -84
- data/test/xslt/test_custom_functions.rb +0 -94
@@ -50,22 +50,21 @@ module Nokogiri
|
|
50
50
|
# end
|
51
51
|
|
52
52
|
{
|
53
|
-
:add_child => {:target => "/root/a1", :
|
54
|
-
:<< => {:target => "/root/a1", :
|
53
|
+
:add_child => {:target => "/root/a1", :returns => :reparented, :children_tags => %w[text b1 b2]},
|
54
|
+
:<< => {:target => "/root/a1", :returns => :reparented, :children_tags => %w[text b1 b2]},
|
55
55
|
|
56
|
-
:replace => {:target => "/root/a1/node()", :
|
57
|
-
:swap => {:target => "/root/a1/node()", :
|
56
|
+
:replace => {:target => "/root/a1/node()", :returns => :reparented, :children_tags => %w[b1 b2]},
|
57
|
+
:swap => {:target => "/root/a1/node()", :returns => :self, :children_tags => %w[b1 b2]},
|
58
58
|
|
59
|
-
:
|
60
|
-
:inner_html= => {:target => "/root/a1", :returns_self => true, :children_tags => %w[b1 b2]},
|
59
|
+
:inner_html= => {:target => "/root/a1", :returns => :self, :children_tags => %w[b1 b2]},
|
61
60
|
|
62
|
-
:add_previous_sibling => {:target => "/root/a1/text()", :
|
63
|
-
:previous= => {:target => "/root/a1/text()", :
|
64
|
-
:before => {:target => "/root/a1/text()", :
|
61
|
+
:add_previous_sibling => {:target => "/root/a1/text()", :returns => :reparented, :children_tags => %w[b1 b2 text]},
|
62
|
+
:previous= => {:target => "/root/a1/text()", :returns => :reparented, :children_tags => %w[b1 b2 text]},
|
63
|
+
:before => {:target => "/root/a1/text()", :returns => :self, :children_tags => %w[b1 b2 text]},
|
65
64
|
|
66
|
-
:add_next_sibling => {:target => "/root/a1/text()", :
|
67
|
-
:next= => {:target => "/root/a1/text()", :
|
68
|
-
:after => {:target => "/root/a1/text()", :
|
65
|
+
:add_next_sibling => {:target => "/root/a1/text()", :returns => :reparented, :children_tags => %w[text b1 b2]},
|
66
|
+
:next= => {:target => "/root/a1/text()", :returns => :reparented, :children_tags => %w[text b1 b2]},
|
67
|
+
:after => {:target => "/root/a1/text()", :returns => :self, :children_tags => %w[text b1 b2]}
|
69
68
|
}.each do |method, params|
|
70
69
|
|
71
70
|
before do
|
@@ -96,12 +95,11 @@ module Nokogiri
|
|
96
95
|
end
|
97
96
|
|
98
97
|
it "returns the expected value" do
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
result.must_equal sendee
|
98
|
+
if params[:returns] == :self
|
99
|
+
sendee = @doc.at_xpath(params[:target])
|
100
|
+
sendee.send(method, @other_node).must_equal sendee
|
103
101
|
else
|
104
|
-
|
102
|
+
@doc.at_xpath(params[:target]).send(method, @other_node).must_equal @other_node
|
105
103
|
end
|
106
104
|
end
|
107
105
|
end
|
@@ -112,17 +110,6 @@ module Nokogiri
|
|
112
110
|
@doc.at_xpath(params[:target]).send(method, @fragment_string)
|
113
111
|
@doc.xpath("/root/a1/node()").collect {|n| n.name}.must_equal params[:children_tags]
|
114
112
|
end
|
115
|
-
|
116
|
-
it "returns the expected value" do
|
117
|
-
sendee = @doc.at_xpath(params[:target])
|
118
|
-
result = sendee.send(method, @fragment_string)
|
119
|
-
if params[:returns_self]
|
120
|
-
result.must_equal sendee
|
121
|
-
else
|
122
|
-
result.must_be_kind_of Nokogiri::XML::NodeSet
|
123
|
-
result.to_html.must_equal @fragment_string
|
124
|
-
end
|
125
|
-
end
|
126
113
|
end
|
127
114
|
describe "passed a fragment" do
|
128
115
|
it "inserts the fragment roots in the proper position" do
|
@@ -147,25 +134,37 @@ module Nokogiri
|
|
147
134
|
end
|
148
135
|
end
|
149
136
|
end
|
150
|
-
end
|
151
137
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
138
|
+
describe "text node merging" do
|
139
|
+
describe "#add_child" do
|
140
|
+
it "merges the Text node with adjacent Text nodes" do
|
141
|
+
@doc.at_xpath("/root/a1").add_child Nokogiri::XML::Text.new('hello', @doc)
|
142
|
+
@doc.at_xpath("/root/a1/text()").content.must_equal "First nodehello"
|
143
|
+
end
|
157
144
|
end
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
145
|
+
describe "#replace" do
|
146
|
+
it "merges the Text node with adjacent Text nodes" do
|
147
|
+
@doc.at_xpath("/root/a3/bx").replace Nokogiri::XML::Text.new('hello', @doc)
|
148
|
+
@doc.at_xpath("/root/a3/text()").content.must_equal "Third hellonode"
|
149
|
+
end
|
163
150
|
end
|
164
151
|
end
|
165
152
|
end
|
166
153
|
end
|
167
154
|
|
168
155
|
describe "ad hoc node reparenting behavior" do
|
156
|
+
before do
|
157
|
+
@xml = Nokogiri::XML "<root><a1>First node</a1><a2>Second node</a2><a3>Third node</a3></root>"
|
158
|
+
@html = Nokogiri::HTML(<<-eohtml)
|
159
|
+
<html>
|
160
|
+
<head></head>
|
161
|
+
<body>
|
162
|
+
<div class='baz'><a href="foo" class="bar">first</a></div>
|
163
|
+
</body>
|
164
|
+
</html>
|
165
|
+
eohtml
|
166
|
+
end
|
167
|
+
|
169
168
|
describe "#add_child" do
|
170
169
|
describe "given a new node with a namespace" do
|
171
170
|
it "keeps the namespace" do
|
@@ -224,34 +223,7 @@ module Nokogiri
|
|
224
223
|
end
|
225
224
|
end
|
226
225
|
|
227
|
-
describe "#add_previous_sibling" do
|
228
|
-
it "should not merge text nodes during the operation" do
|
229
|
-
xml = Nokogiri::XML %Q(<root>text node</root>)
|
230
|
-
replacee = xml.root.children.first
|
231
|
-
replacee.add_previous_sibling "foo <p></p> bar"
|
232
|
-
assert_equal "foo <p></p> bartext node", xml.root.children.to_html
|
233
|
-
end
|
234
|
-
end
|
235
|
-
|
236
|
-
describe "#add_next_sibling" do
|
237
|
-
it "should not merge text nodes during the operation" do
|
238
|
-
xml = Nokogiri::XML %Q(<root>text node</root>)
|
239
|
-
replacee = xml.root.children.first
|
240
|
-
replacee.add_next_sibling "foo <p></p> bar"
|
241
|
-
assert_equal "text nodefoo <p></p> bar", xml.root.children.to_html
|
242
|
-
end
|
243
|
-
end
|
244
|
-
|
245
226
|
describe "#replace" do
|
246
|
-
describe "a text node with a text node" do
|
247
|
-
it "should not merge text nodes during the operation" do
|
248
|
-
xml = Nokogiri::XML %Q(<root>text node</root>)
|
249
|
-
replacee = xml.root.children.first
|
250
|
-
replacee.replace "new text node"
|
251
|
-
assert_equal "new text node", xml.root.children.first.content
|
252
|
-
end
|
253
|
-
end
|
254
|
-
|
255
227
|
describe "when a document has a default namespace" do
|
256
228
|
before do
|
257
229
|
@fruits = Nokogiri::XML(<<-eoxml)
|
@@ -288,10 +260,10 @@ module Nokogiri
|
|
288
260
|
</root>
|
289
261
|
EOHTML
|
290
262
|
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
263
|
+
root = doc.at("root")
|
264
|
+
a = root.at("a")
|
265
|
+
b = a.at("b")
|
266
|
+
c = a.at("c")
|
295
267
|
a.add_next_sibling(b.unlink)
|
296
268
|
c.unlink
|
297
269
|
end
|
@@ -300,21 +272,6 @@ module Nokogiri
|
|
300
272
|
end
|
301
273
|
end
|
302
274
|
|
303
|
-
describe "replace-merging text nodes" do
|
304
|
-
[
|
305
|
-
['<root>a<br/></root>', 'afoo'],
|
306
|
-
['<root>a<br/>b</root>', 'afoob'],
|
307
|
-
['<root><br/>b</root>', 'foob']
|
308
|
-
].each do |xml, result|
|
309
|
-
it "doesn't blow up on #{xml}" do
|
310
|
-
doc = Nokogiri::XML.parse(xml)
|
311
|
-
saved_nodes = doc.root.children
|
312
|
-
doc.at_xpath("/root/br").replace(Nokogiri::XML::Text.new('foo', doc))
|
313
|
-
saved_nodes.each { |child| child.inspect } # try to cause a crash
|
314
|
-
assert_equal result, doc.at_xpath("/root/text()").inner_text
|
315
|
-
end
|
316
|
-
end
|
317
|
-
end
|
318
275
|
end
|
319
276
|
end
|
320
277
|
end
|
data/test/xml/test_node_set.rb
CHANGED
@@ -3,27 +3,6 @@ require "helper"
|
|
3
3
|
module Nokogiri
|
4
4
|
module XML
|
5
5
|
class TestNodeSet < Nokogiri::TestCase
|
6
|
-
class TestNodeSetNamespaces < Nokogiri::TestCase
|
7
|
-
def setup
|
8
|
-
super
|
9
|
-
@xml = Nokogiri.XML('<foo xmlns:n0="http://example.com" />')
|
10
|
-
@list = @xml.xpath('//namespace::*')
|
11
|
-
end
|
12
|
-
|
13
|
-
def test_include?
|
14
|
-
assert @list.include?(@list.first), 'list should have item'
|
15
|
-
end
|
16
|
-
|
17
|
-
def test_push
|
18
|
-
@list.push @list.first
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_delete
|
22
|
-
@list.push @list.first
|
23
|
-
@list.delete @list.first
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
6
|
def setup
|
28
7
|
super
|
29
8
|
@xml = Nokogiri::XML(File.read(XML_FILE), XML_FILE)
|
@@ -158,16 +137,6 @@ module Nokogiri
|
|
158
137
|
set = html.xpath("/html/body/div")
|
159
138
|
assert_equal set.first, set.search(".a").first
|
160
139
|
end
|
161
|
-
|
162
|
-
def test_css_search_with_namespace
|
163
|
-
fragment = Nokogiri::XML.fragment(<<-eoxml)
|
164
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
165
|
-
<head></head>
|
166
|
-
<body></body>
|
167
|
-
</html>
|
168
|
-
eoxml
|
169
|
-
assert_nothing_raised{ fragment.children.search( 'body', { 'xmlns' => 'http://www.w3.org/1999/xhtml' }) }
|
170
|
-
end
|
171
140
|
|
172
141
|
def test_double_equal
|
173
142
|
assert node_set_one = @xml.xpath('//employee')
|
@@ -286,26 +255,11 @@ module Nokogiri
|
|
286
255
|
assert_match '<a>', html
|
287
256
|
end
|
288
257
|
|
289
|
-
def test_gt_string_arg
|
290
|
-
assert node_set = @xml.search('//employee')
|
291
|
-
assert_equal node_set.xpath('./employeeId'), (node_set > 'employeeId')
|
292
|
-
end
|
293
|
-
|
294
258
|
def test_at
|
295
259
|
assert node_set = @xml.search('//employee')
|
296
260
|
assert_equal node_set.first, node_set.at(0)
|
297
261
|
end
|
298
262
|
|
299
|
-
def test_at_xpath
|
300
|
-
assert node_set = @xml.search('//employee')
|
301
|
-
assert_equal node_set.first.first_element_child, node_set.at_xpath('./employeeId')
|
302
|
-
end
|
303
|
-
|
304
|
-
def test_at_css
|
305
|
-
assert node_set = @xml.search('//employee')
|
306
|
-
assert_equal node_set.first.first_element_child, node_set.at_css('employeeId')
|
307
|
-
end
|
308
|
-
|
309
263
|
def test_percent
|
310
264
|
assert node_set = @xml.search('//employee')
|
311
265
|
assert_equal node_set.first, node_set % 0
|
@@ -441,19 +395,6 @@ module Nokogiri
|
|
441
395
|
assert_equal 'employee', @xml.search("//wrapper").first.children[0].name
|
442
396
|
end
|
443
397
|
|
444
|
-
def test_wrap_a_fragment
|
445
|
-
frag = Nokogiri::XML::DocumentFragment.parse <<-EOXML
|
446
|
-
<employees>
|
447
|
-
<employee>hello</employee>
|
448
|
-
<employee>goodbye</employee>
|
449
|
-
</employees>
|
450
|
-
EOXML
|
451
|
-
employees = frag.xpath ".//employee"
|
452
|
-
employees.wrap("<wrapper/>")
|
453
|
-
assert_equal 'wrapper', employees[0].parent.name
|
454
|
-
assert_equal 'employee', frag.at(".//wrapper").children.first.name
|
455
|
-
end
|
456
|
-
|
457
398
|
def test_wrap_preserves_document_structure
|
458
399
|
assert_equal "employeeId",
|
459
400
|
@xml.at_xpath("//employee").children.detect{|j| ! j.text? }.name
|
@@ -469,7 +410,7 @@ module Nokogiri
|
|
469
410
|
names_len = names.length
|
470
411
|
positions_len = positions.length
|
471
412
|
|
472
|
-
assert_raises(ArgumentError) { names + positions.first }
|
413
|
+
assert_raises(ArgumentError) { result = names + positions.first }
|
473
414
|
|
474
415
|
result = names + positions
|
475
416
|
assert_equal names_len, names.length
|
@@ -493,7 +434,7 @@ module Nokogiri
|
|
493
434
|
employees_len = employees.length
|
494
435
|
females_len = females.length
|
495
436
|
|
496
|
-
assert_raises(ArgumentError) { employees - females.first }
|
437
|
+
assert_raises(ArgumentError) { result = employees - females.first }
|
497
438
|
|
498
439
|
result = employees - females
|
499
440
|
assert_equal employees_len, employees.length
|
data/test/xml/test_schema.rb
CHANGED
@@ -74,11 +74,6 @@ module Nokogiri
|
|
74
74
|
assert_equal 2, errors.length
|
75
75
|
end
|
76
76
|
|
77
|
-
def test_validate_non_document
|
78
|
-
string = File.read(PO_XML_FILE)
|
79
|
-
assert_raise(ArgumentError) {@xsd.validate(string)}
|
80
|
-
end
|
81
|
-
|
82
77
|
def test_valid?
|
83
78
|
valid_doc = Nokogiri::XML(File.read(PO_XML_FILE))
|
84
79
|
|
data/test/xml/test_text.rb
CHANGED
@@ -3,13 +3,6 @@ require "helper"
|
|
3
3
|
module Nokogiri
|
4
4
|
module XML
|
5
5
|
class TestText < Nokogiri::TestCase
|
6
|
-
def test_css_path
|
7
|
-
doc = Nokogiri.XML "<root> foo <a>something</a> bar bazz </root>"
|
8
|
-
node = doc.root.children[2]
|
9
|
-
assert_instance_of Nokogiri::XML::Text, node
|
10
|
-
assert_equal node, doc.at_css(node.css_path)
|
11
|
-
end
|
12
|
-
|
13
6
|
def test_inspect
|
14
7
|
node = Text.new('hello world', Document.new)
|
15
8
|
assert_equal "#<#{node.class.name}:#{sprintf("0x%x",node.object_id)} #{node.text.inspect}>", node.inspect
|
@@ -26,13 +19,11 @@ module Nokogiri
|
|
26
19
|
100.times { Text.new('hello world', Document.new) }
|
27
20
|
end
|
28
21
|
|
22
|
+
# No assertion because this was a segv
|
29
23
|
def test_new_without_document
|
30
24
|
doc = Document.new
|
31
25
|
node = Nokogiri::XML::Element.new('foo', doc)
|
32
|
-
|
33
|
-
assert_nothing_raised do
|
34
|
-
Text.new('hello world', node)
|
35
|
-
end
|
26
|
+
text = Text.new('hello world', node)
|
36
27
|
end
|
37
28
|
|
38
29
|
def test_content=
|
@@ -129,7 +129,7 @@ module Nokogiri
|
|
129
129
|
def test_add_child_in_same_document
|
130
130
|
child = @node.css('employee').first
|
131
131
|
|
132
|
-
assert child.children.last
|
132
|
+
assert previous_last_child = child.children.last
|
133
133
|
assert new_child = child.children.first
|
134
134
|
|
135
135
|
last = child.children.last
|
data/test/xml/test_xpath.rb
CHANGED
@@ -61,10 +61,6 @@ module Nokogiri
|
|
61
61
|
}.new
|
62
62
|
end
|
63
63
|
|
64
|
-
def test_variable_binding
|
65
|
-
assert_equal 4, @xml.xpath('//address[@domestic=$value]', nil, :value => 'Yes').length
|
66
|
-
end
|
67
|
-
|
68
64
|
def test_unknown_attribute
|
69
65
|
assert_equal 0, @xml.xpath('//employee[@id="asdfasdf"]/@fooo').length
|
70
66
|
assert_nil @xml.xpath('//employee[@id="asdfasdf"]/@fooo')[0]
|
@@ -96,13 +92,11 @@ module Nokogiri
|
|
96
92
|
|
97
93
|
def test_css_search_uses_custom_selectors
|
98
94
|
set = @xml.xpath('//employee')
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
end
|
105
|
-
end
|
95
|
+
css_set = if Nokogiri.uses_libxml?
|
96
|
+
@xml.css('employee:thing()', @handler)
|
97
|
+
else
|
98
|
+
@xml.xpath("//employee[nokogiri:thing(.)]", @ns, @handler)
|
99
|
+
end
|
106
100
|
assert_equal(set.length, @handler.things.length)
|
107
101
|
assert_equal(set.to_a, @handler.things.flatten)
|
108
102
|
end
|
@@ -190,9 +184,7 @@ module Nokogiri
|
|
190
184
|
def awesome! ; end
|
191
185
|
end
|
192
186
|
util_decorate(@xml, x)
|
193
|
-
|
194
|
-
assert @xml.xpath('//employee/name')
|
195
|
-
|
187
|
+
set = @xml.xpath('//employee/name')
|
196
188
|
@xml.xpath('//employee[saves_node_set(name)]', @handler)
|
197
189
|
assert_equal @xml, @handler.things.document
|
198
190
|
assert @handler.things.respond_to?(:awesome!)
|
@@ -202,35 +194,7 @@ module Nokogiri
|
|
202
194
|
doc = "<html><body id='foo'><foo>hi</foo></body></html>"
|
203
195
|
xpath = 'id("foo")//foo'
|
204
196
|
nokogiri = Nokogiri::HTML.parse(doc)
|
205
|
-
|
206
|
-
end
|
207
|
-
|
208
|
-
def test_custom_xpath_handler_with_args_under_gc_pressure
|
209
|
-
# see http://github.com/tenderlove/nokogiri/issues/#issue/345
|
210
|
-
tool_inspector = Class.new do
|
211
|
-
def name_equals(nodeset, name, *args)
|
212
|
-
nodeset.all? do |node|
|
213
|
-
args.each { |thing| thing.inspect }
|
214
|
-
node["name"] == name
|
215
|
-
end
|
216
|
-
end
|
217
|
-
end.new
|
218
|
-
|
219
|
-
xml = <<-EOXML
|
220
|
-
<toolbox>
|
221
|
-
#{"<tool name='hammer'/><tool name='wrench'/>" * 10}
|
222
|
-
</toolbox>
|
223
|
-
EOXML
|
224
|
-
doc = Nokogiri::XML xml
|
225
|
-
|
226
|
-
# long list of long arguments, to apply GC pressure during
|
227
|
-
# ruby_funcall argument marshalling
|
228
|
-
xpath = ["//tool[name_equals(.,'hammer'"]
|
229
|
-
1000.times { xpath << "'unused argument #{'x' * 1000}'" }
|
230
|
-
xpath << "'unused argument')]"
|
231
|
-
xpath = xpath.join(',')
|
232
|
-
|
233
|
-
assert_equal doc.xpath("//tool[@name='hammer']"), doc.xpath(xpath, tool_inspector)
|
197
|
+
tree = nokogiri.xpath(xpath)
|
234
198
|
end
|
235
199
|
end
|
236
200
|
end
|
metadata
CHANGED
@@ -1,511 +1,480 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogiri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
4
|
+
prerelease: true
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 5
|
8
|
+
- 0
|
9
|
+
- beta
|
10
|
+
- 1
|
11
|
+
version: 1.5.0.beta.1
|
6
12
|
platform: java
|
7
13
|
authors:
|
8
|
-
|
9
|
-
|
14
|
+
- Aaron Patterson
|
15
|
+
- Mike Dalessio
|
10
16
|
autorequire:
|
11
17
|
bindir: bin
|
12
|
-
cert_chain:
|
18
|
+
cert_chain:
|
19
|
+
- |
|
20
|
+
-----BEGIN CERTIFICATE-----
|
21
|
+
MIIDPDCCAiSgAwIBAgIBADANBgkqhkiG9w0BAQUFADBEMRYwFAYDVQQDDA1taWtl
|
22
|
+
LmRhbGVzc2lvMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
|
23
|
+
FgNjb20wHhcNMDkwODExMDU0MjQ5WhcNMTAwODExMDU0MjQ5WjBEMRYwFAYDVQQD
|
24
|
+
DA1taWtlLmRhbGVzc2lvMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJ
|
25
|
+
k/IsZAEZFgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDANjr7
|
26
|
+
lZ1DKtK8YvNp+5kBzIpwrpClHRrosqo01qmWfGBxZckQUtrJUwGPxpzvIHVq1VKp
|
27
|
+
a9FXU/QWYek/1S0vhkOf9XGmFBnVCtbJhwGeyzsQFFSoQIfs2hd5gO0dSRpuKdi3
|
28
|
+
slfJAXzFKg1u/7OCVPgrY/mkdh34MzL5p0gSDzPt7vLPibctHg0GoepYT5Fh1tMQ
|
29
|
+
luzgrN0weTw/QoEWTMQcNk6CyUpzv0pOe7d0qEPQ9Lx7Lz64gIym3f0pKFpWLfME
|
30
|
+
l7PFLeR95zw2zsuZQwCR5ma5zjXD3mo2jk1mVqiI8qplOL1u30FU7hRhTV5n/Qe9
|
31
|
+
elDQoZW9Xz0R5JGDAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0G
|
32
|
+
A1UdDgQWBBRXWlUJZXcR1jkZPE24+mjUTCqNxjANBgkqhkiG9w0BAQUFAAOCAQEA
|
33
|
+
jDh5M41sg1MZKG1DXzQmo/IADeWRmXyb3EZaED9lhFFpoQqaralgpgmvuc0GswvO
|
34
|
+
QIZijh03tPQz8lgp1U1OFZod2ZwbEVTtVZpxs1ssjMraOA6KzlsNROH0XonIiy6j
|
35
|
+
r2Q0UF35ax8pvr3D5Y6AKzIW1F3aeiREylUDJlb/i1dPQ2PVK0yRrSQoK2epwM9E
|
36
|
+
zoczlHTTJc/tRvH5Up3Agcv9y+J0U9a1Af9NRsnHPVBdo2H32MsJ99x5NRDWJmJg
|
37
|
+
ohH37UR7njcc6j4fo22IwTqXaaXJdtVdAWjXP/xs5B3cPYSP6uqFnR46Jf86Iqj1
|
38
|
+
FlqnTjy13J3nD30uxy9a1g==
|
39
|
+
-----END CERTIFICATE-----
|
13
40
|
|
14
|
-
date:
|
41
|
+
date: 2010-05-22 00:00:00 -04:00
|
15
42
|
default_executable: nokogiri
|
16
43
|
dependencies:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: rubyforge
|
46
|
+
prerelease: false
|
47
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
segments:
|
52
|
+
- 2
|
53
|
+
- 0
|
54
|
+
- 4
|
55
|
+
version: 2.0.4
|
56
|
+
type: :development
|
57
|
+
version_requirements: *id001
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: racc
|
60
|
+
prerelease: false
|
61
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
segments:
|
66
|
+
- 0
|
67
|
+
version: "0"
|
68
|
+
type: :development
|
69
|
+
version_requirements: *id002
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rexical
|
72
|
+
prerelease: false
|
73
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
version: "0"
|
80
|
+
type: :development
|
81
|
+
version_requirements: *id003
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rake-compiler
|
84
|
+
prerelease: false
|
85
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
version: "0"
|
92
|
+
type: :development
|
93
|
+
version_requirements: *id004
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: minitest
|
96
|
+
prerelease: false
|
97
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
segments:
|
102
|
+
- 1
|
103
|
+
- 6
|
104
|
+
- 0
|
105
|
+
version: 1.6.0
|
106
|
+
type: :development
|
107
|
+
version_requirements: *id005
|
108
|
+
- !ruby/object:Gem::Dependency
|
109
|
+
name: hoe
|
110
|
+
prerelease: false
|
111
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
segments:
|
116
|
+
- 2
|
117
|
+
- 6
|
118
|
+
- 0
|
119
|
+
version: 2.6.0
|
120
|
+
type: :development
|
121
|
+
version_requirements: *id006
|
83
122
|
description: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's\n\
|
84
123
|
many features is the ability to search documents via XPath or CSS3 selectors.\n\n\
|
85
124
|
XML is like violence - if it doesn\xE2\x80\x99t solve your problems, you are not using\n\
|
86
125
|
enough of it."
|
87
126
|
email:
|
88
|
-
|
89
|
-
|
127
|
+
- aaronp@rubyforge.org
|
128
|
+
- mike.dalessio@gmail.com
|
90
129
|
executables:
|
91
|
-
|
130
|
+
- nokogiri
|
92
131
|
extensions: []
|
93
132
|
|
94
133
|
extra_rdoc_files:
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
- ext/nokogiri/xml_entity_reference.c
|
134
|
+
- Manifest.txt
|
135
|
+
- CHANGELOG.rdoc
|
136
|
+
- CHANGELOG.ja.rdoc
|
137
|
+
- README.rdoc
|
138
|
+
- README.ja.rdoc
|
139
|
+
- ext/nokogiri/html_element_description.c
|
140
|
+
- ext/nokogiri/xml_node_set.c
|
141
|
+
- ext/nokogiri/xml_namespace.c
|
142
|
+
- ext/nokogiri/xml_entity_reference.c
|
143
|
+
- ext/nokogiri/xml_xpath_context.c
|
144
|
+
- ext/nokogiri/xml_node.c
|
145
|
+
- ext/nokogiri/xml_text.c
|
146
|
+
- ext/nokogiri/xml_entity_decl.c
|
147
|
+
- ext/nokogiri/xml_document_fragment.c
|
148
|
+
- ext/nokogiri/xml_element_content.c
|
149
|
+
- ext/nokogiri/html_document.c
|
150
|
+
- ext/nokogiri/xml_attribute_decl.c
|
151
|
+
- ext/nokogiri/xml_syntax_error.c
|
152
|
+
- ext/nokogiri/xml_encoding_handler.c
|
153
|
+
- ext/nokogiri/html_entity_lookup.c
|
154
|
+
- ext/nokogiri/xml_document.c
|
155
|
+
- ext/nokogiri/html_sax_parser_context.c
|
156
|
+
- ext/nokogiri/xml_attr.c
|
157
|
+
- ext/nokogiri/xml_dtd.c
|
158
|
+
- ext/nokogiri/xml_schema.c
|
159
|
+
- ext/nokogiri/xml_io.c
|
160
|
+
- ext/nokogiri/xml_element_decl.c
|
161
|
+
- ext/nokogiri/xml_relax_ng.c
|
162
|
+
- ext/nokogiri/xml_comment.c
|
163
|
+
- ext/nokogiri/xml_reader.c
|
164
|
+
- ext/nokogiri/xml_sax_parser.c
|
165
|
+
- ext/nokogiri/xml_cdata.c
|
166
|
+
- ext/nokogiri/xml_sax_push_parser.c
|
167
|
+
- ext/nokogiri/xml_sax_parser_context.c
|
168
|
+
- ext/nokogiri/xslt_stylesheet.c
|
169
|
+
- ext/nokogiri/nokogiri.c
|
170
|
+
- ext/nokogiri/xml_processing_instruction.c
|
133
171
|
files:
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
- test/files/po.xml
|
354
|
-
- test/files/po.xsd
|
355
|
-
- test/files/shift_jis.html
|
356
|
-
- test/files/shift_jis.xml
|
357
|
-
- test/files/snuggles.xml
|
358
|
-
- test/files/staff.dtd
|
359
|
-
- test/files/staff.xml
|
360
|
-
- test/files/staff.xslt
|
361
|
-
- test/files/tlm.html
|
362
|
-
- test/files/valid_bar.xml
|
363
|
-
- test/helper.rb
|
364
|
-
- test/html/sax/test_parser.rb
|
365
|
-
- test/html/sax/test_parser_context.rb
|
366
|
-
- test/html/test_builder.rb
|
367
|
-
- test/html/test_document.rb
|
368
|
-
- test/html/test_document_encoding.rb
|
369
|
-
- test/html/test_document_fragment.rb
|
370
|
-
- test/html/test_element_description.rb
|
371
|
-
- test/html/test_named_characters.rb
|
372
|
-
- test/html/test_node.rb
|
373
|
-
- test/html/test_node_encoding.rb
|
374
|
-
- test/test_convert_xpath.rb
|
375
|
-
- test/test_css_cache.rb
|
376
|
-
- test/test_encoding_handler.rb
|
377
|
-
- test/test_memory_leak.rb
|
378
|
-
- test/test_nokogiri.rb
|
379
|
-
- test/test_reader.rb
|
380
|
-
- test/test_soap4r_sax.rb
|
381
|
-
- test/test_xslt_transforms.rb
|
382
|
-
- test/xml/node/test_save_options.rb
|
383
|
-
- test/xml/node/test_subclass.rb
|
384
|
-
- test/xml/sax/test_parser.rb
|
385
|
-
- test/xml/sax/test_parser_context.rb
|
386
|
-
- test/xml/sax/test_push_parser.rb
|
387
|
-
- test/xml/test_attr.rb
|
388
|
-
- test/xml/test_attribute_decl.rb
|
389
|
-
- test/xml/test_builder.rb
|
390
|
-
- test/xml/test_cdata.rb
|
391
|
-
- test/xml/test_comment.rb
|
392
|
-
- test/xml/test_document.rb
|
393
|
-
- test/xml/test_document_encoding.rb
|
394
|
-
- test/xml/test_document_fragment.rb
|
395
|
-
- test/xml/test_dtd.rb
|
396
|
-
- test/xml/test_dtd_encoding.rb
|
397
|
-
- test/xml/test_element_content.rb
|
398
|
-
- test/xml/test_element_decl.rb
|
399
|
-
- test/xml/test_entity_decl.rb
|
400
|
-
- test/xml/test_entity_reference.rb
|
401
|
-
- test/xml/test_namespace.rb
|
402
|
-
- test/xml/test_node.rb
|
403
|
-
- test/xml/test_node_attributes.rb
|
404
|
-
- test/xml/test_node_encoding.rb
|
405
|
-
- test/xml/test_node_reparenting.rb
|
406
|
-
- test/xml/test_node_set.rb
|
407
|
-
- test/xml/test_parse_options.rb
|
408
|
-
- test/xml/test_processing_instruction.rb
|
409
|
-
- test/xml/test_reader_encoding.rb
|
410
|
-
- test/xml/test_relax_ng.rb
|
411
|
-
- test/xml/test_schema.rb
|
412
|
-
- test/xml/test_syntax_error.rb
|
413
|
-
- test/xml/test_text.rb
|
414
|
-
- test/xml/test_unparented_node.rb
|
415
|
-
- test/xml/test_xpath.rb
|
416
|
-
- test/xslt/test_custom_functions.rb
|
417
|
-
- ext/nokogiri/libcharset-1.dll
|
418
|
-
- ext/nokogiri/libxslt.dll
|
419
|
-
- ext/nokogiri/libiconv-2.dll
|
420
|
-
- ext/nokogiri/zlib1.dll
|
421
|
-
- ext/nokogiri/libexslt.dll
|
422
|
-
- ext/nokogiri/libxml2.dll
|
172
|
+
- .autotest
|
173
|
+
- CHANGELOG.ja.rdoc
|
174
|
+
- CHANGELOG.rdoc
|
175
|
+
- Manifest.txt
|
176
|
+
- README.ja.rdoc
|
177
|
+
- README.rdoc
|
178
|
+
- Rakefile
|
179
|
+
- bin/nokogiri
|
180
|
+
- deps.rip
|
181
|
+
- ext/nokogiri/extconf.rb
|
182
|
+
- ext/nokogiri/html_document.c
|
183
|
+
- ext/nokogiri/html_document.h
|
184
|
+
- ext/nokogiri/html_element_description.c
|
185
|
+
- ext/nokogiri/html_element_description.h
|
186
|
+
- ext/nokogiri/html_entity_lookup.c
|
187
|
+
- ext/nokogiri/html_entity_lookup.h
|
188
|
+
- ext/nokogiri/html_sax_parser_context.c
|
189
|
+
- ext/nokogiri/html_sax_parser_context.h
|
190
|
+
- ext/nokogiri/nokogiri.c
|
191
|
+
- ext/nokogiri/nokogiri.h
|
192
|
+
- ext/nokogiri/xml_attr.c
|
193
|
+
- ext/nokogiri/xml_attr.h
|
194
|
+
- ext/nokogiri/xml_attribute_decl.c
|
195
|
+
- ext/nokogiri/xml_attribute_decl.h
|
196
|
+
- ext/nokogiri/xml_cdata.c
|
197
|
+
- ext/nokogiri/xml_cdata.h
|
198
|
+
- ext/nokogiri/xml_comment.c
|
199
|
+
- ext/nokogiri/xml_comment.h
|
200
|
+
- ext/nokogiri/xml_document.c
|
201
|
+
- ext/nokogiri/xml_document.h
|
202
|
+
- ext/nokogiri/xml_document_fragment.c
|
203
|
+
- ext/nokogiri/xml_document_fragment.h
|
204
|
+
- ext/nokogiri/xml_dtd.c
|
205
|
+
- ext/nokogiri/xml_dtd.h
|
206
|
+
- ext/nokogiri/xml_element_content.c
|
207
|
+
- ext/nokogiri/xml_element_content.h
|
208
|
+
- ext/nokogiri/xml_element_decl.c
|
209
|
+
- ext/nokogiri/xml_element_decl.h
|
210
|
+
- ext/nokogiri/xml_encoding_handler.c
|
211
|
+
- ext/nokogiri/xml_encoding_handler.h
|
212
|
+
- ext/nokogiri/xml_entity_decl.c
|
213
|
+
- ext/nokogiri/xml_entity_decl.h
|
214
|
+
- ext/nokogiri/xml_entity_reference.c
|
215
|
+
- ext/nokogiri/xml_entity_reference.h
|
216
|
+
- ext/nokogiri/xml_io.c
|
217
|
+
- ext/nokogiri/xml_io.h
|
218
|
+
- ext/nokogiri/xml_namespace.c
|
219
|
+
- ext/nokogiri/xml_namespace.h
|
220
|
+
- ext/nokogiri/xml_node.c
|
221
|
+
- ext/nokogiri/xml_node.h
|
222
|
+
- ext/nokogiri/xml_node_set.c
|
223
|
+
- ext/nokogiri/xml_node_set.h
|
224
|
+
- ext/nokogiri/xml_processing_instruction.c
|
225
|
+
- ext/nokogiri/xml_processing_instruction.h
|
226
|
+
- ext/nokogiri/xml_reader.c
|
227
|
+
- ext/nokogiri/xml_reader.h
|
228
|
+
- ext/nokogiri/xml_relax_ng.c
|
229
|
+
- ext/nokogiri/xml_relax_ng.h
|
230
|
+
- ext/nokogiri/xml_sax_parser.c
|
231
|
+
- ext/nokogiri/xml_sax_parser.h
|
232
|
+
- ext/nokogiri/xml_sax_parser_context.c
|
233
|
+
- ext/nokogiri/xml_sax_parser_context.h
|
234
|
+
- ext/nokogiri/xml_sax_push_parser.c
|
235
|
+
- ext/nokogiri/xml_sax_push_parser.h
|
236
|
+
- ext/nokogiri/xml_schema.c
|
237
|
+
- ext/nokogiri/xml_schema.h
|
238
|
+
- ext/nokogiri/xml_syntax_error.c
|
239
|
+
- ext/nokogiri/xml_syntax_error.h
|
240
|
+
- ext/nokogiri/xml_text.c
|
241
|
+
- ext/nokogiri/xml_text.h
|
242
|
+
- ext/nokogiri/xml_xpath_context.c
|
243
|
+
- ext/nokogiri/xml_xpath_context.h
|
244
|
+
- ext/nokogiri/xslt_stylesheet.c
|
245
|
+
- ext/nokogiri/xslt_stylesheet.h
|
246
|
+
- lib/nokogiri.rb
|
247
|
+
- lib/nokogiri/css.rb
|
248
|
+
- lib/nokogiri/css/generated_parser.rb
|
249
|
+
- lib/nokogiri/css/generated_tokenizer.rb
|
250
|
+
- lib/nokogiri/css/node.rb
|
251
|
+
- lib/nokogiri/css/parser.rb
|
252
|
+
- lib/nokogiri/css/parser.y
|
253
|
+
- lib/nokogiri/css/syntax_error.rb
|
254
|
+
- lib/nokogiri/css/tokenizer.rb
|
255
|
+
- lib/nokogiri/css/tokenizer.rex
|
256
|
+
- lib/nokogiri/css/xpath_visitor.rb
|
257
|
+
- lib/nokogiri/decorators/slop.rb
|
258
|
+
- lib/nokogiri/html.rb
|
259
|
+
- lib/nokogiri/html/builder.rb
|
260
|
+
- lib/nokogiri/html/document.rb
|
261
|
+
- lib/nokogiri/html/document_fragment.rb
|
262
|
+
- lib/nokogiri/html/element_description.rb
|
263
|
+
- lib/nokogiri/html/element_description_defaults.rb
|
264
|
+
- lib/nokogiri/html/entity_lookup.rb
|
265
|
+
- lib/nokogiri/html/sax/parser.rb
|
266
|
+
- lib/nokogiri/html/sax/parser_context.rb
|
267
|
+
- lib/nokogiri/syntax_error.rb
|
268
|
+
- lib/nokogiri/version.rb
|
269
|
+
- lib/nokogiri/version_warning.rb
|
270
|
+
- lib/nokogiri/xml.rb
|
271
|
+
- lib/nokogiri/xml/attr.rb
|
272
|
+
- lib/nokogiri/xml/attribute_decl.rb
|
273
|
+
- lib/nokogiri/xml/builder.rb
|
274
|
+
- lib/nokogiri/xml/cdata.rb
|
275
|
+
- lib/nokogiri/xml/character_data.rb
|
276
|
+
- lib/nokogiri/xml/document.rb
|
277
|
+
- lib/nokogiri/xml/document_fragment.rb
|
278
|
+
- lib/nokogiri/xml/dtd.rb
|
279
|
+
- lib/nokogiri/xml/element_content.rb
|
280
|
+
- lib/nokogiri/xml/element_decl.rb
|
281
|
+
- lib/nokogiri/xml/entity_decl.rb
|
282
|
+
- lib/nokogiri/xml/namespace.rb
|
283
|
+
- lib/nokogiri/xml/node.rb
|
284
|
+
- lib/nokogiri/xml/node/save_options.rb
|
285
|
+
- lib/nokogiri/xml/node_set.rb
|
286
|
+
- lib/nokogiri/xml/notation.rb
|
287
|
+
- lib/nokogiri/xml/parse_options.rb
|
288
|
+
- lib/nokogiri/xml/pp.rb
|
289
|
+
- lib/nokogiri/xml/pp/character_data.rb
|
290
|
+
- lib/nokogiri/xml/pp/node.rb
|
291
|
+
- lib/nokogiri/xml/processing_instruction.rb
|
292
|
+
- lib/nokogiri/xml/reader.rb
|
293
|
+
- lib/nokogiri/xml/relax_ng.rb
|
294
|
+
- lib/nokogiri/xml/sax.rb
|
295
|
+
- lib/nokogiri/xml/sax/document.rb
|
296
|
+
- lib/nokogiri/xml/sax/parser.rb
|
297
|
+
- lib/nokogiri/xml/sax/parser_context.rb
|
298
|
+
- lib/nokogiri/xml/sax/push_parser.rb
|
299
|
+
- lib/nokogiri/xml/schema.rb
|
300
|
+
- lib/nokogiri/xml/syntax_error.rb
|
301
|
+
- lib/nokogiri/xml/text.rb
|
302
|
+
- lib/nokogiri/xml/xpath.rb
|
303
|
+
- lib/nokogiri/xml/xpath/syntax_error.rb
|
304
|
+
- lib/nokogiri/xml/xpath_context.rb
|
305
|
+
- lib/nokogiri/xslt.rb
|
306
|
+
- lib/nokogiri/xslt/stylesheet.rb
|
307
|
+
- lib/xsd/xmlparser/nokogiri.rb
|
308
|
+
- tasks/cross_compile.rb
|
309
|
+
- tasks/test.rb
|
310
|
+
- test/css/test_nthiness.rb
|
311
|
+
- test/css/test_parser.rb
|
312
|
+
- test/css/test_tokenizer.rb
|
313
|
+
- test/css/test_xpath_visitor.rb
|
314
|
+
- test/files/2ch.html
|
315
|
+
- test/files/address_book.rlx
|
316
|
+
- test/files/address_book.xml
|
317
|
+
- test/files/bar/bar.xsd
|
318
|
+
- test/files/dont_hurt_em_why.xml
|
319
|
+
- test/files/exslt.xml
|
320
|
+
- test/files/exslt.xslt
|
321
|
+
- test/files/foo/foo.xsd
|
322
|
+
- test/files/po.xml
|
323
|
+
- test/files/po.xsd
|
324
|
+
- test/files/shift_jis.html
|
325
|
+
- test/files/shift_jis.xml
|
326
|
+
- test/files/snuggles.xml
|
327
|
+
- test/files/staff.dtd
|
328
|
+
- test/files/staff.xml
|
329
|
+
- test/files/staff.xslt
|
330
|
+
- test/files/tlm.html
|
331
|
+
- test/files/valid_bar.xml
|
332
|
+
- test/helper.rb
|
333
|
+
- test/html/sax/test_parser.rb
|
334
|
+
- test/html/sax/test_parser_context.rb
|
335
|
+
- test/html/test_builder.rb
|
336
|
+
- test/html/test_document.rb
|
337
|
+
- test/html/test_document_encoding.rb
|
338
|
+
- test/html/test_document_fragment.rb
|
339
|
+
- test/html/test_element_description.rb
|
340
|
+
- test/html/test_named_characters.rb
|
341
|
+
- test/html/test_node.rb
|
342
|
+
- test/html/test_node_encoding.rb
|
343
|
+
- test/test_convert_xpath.rb
|
344
|
+
- test/test_css_cache.rb
|
345
|
+
- test/test_encoding_handler.rb
|
346
|
+
- test/test_memory_leak.rb
|
347
|
+
- test/test_nokogiri.rb
|
348
|
+
- test/test_reader.rb
|
349
|
+
- test/test_soap4r_sax.rb
|
350
|
+
- test/test_xslt_transforms.rb
|
351
|
+
- test/xml/node/test_save_options.rb
|
352
|
+
- test/xml/node/test_subclass.rb
|
353
|
+
- test/xml/sax/test_parser.rb
|
354
|
+
- test/xml/sax/test_parser_context.rb
|
355
|
+
- test/xml/sax/test_push_parser.rb
|
356
|
+
- test/xml/test_attr.rb
|
357
|
+
- test/xml/test_attribute_decl.rb
|
358
|
+
- test/xml/test_builder.rb
|
359
|
+
- test/xml/test_cdata.rb
|
360
|
+
- test/xml/test_comment.rb
|
361
|
+
- test/xml/test_document.rb
|
362
|
+
- test/xml/test_document_encoding.rb
|
363
|
+
- test/xml/test_document_fragment.rb
|
364
|
+
- test/xml/test_dtd.rb
|
365
|
+
- test/xml/test_dtd_encoding.rb
|
366
|
+
- test/xml/test_element_content.rb
|
367
|
+
- test/xml/test_element_decl.rb
|
368
|
+
- test/xml/test_entity_decl.rb
|
369
|
+
- test/xml/test_entity_reference.rb
|
370
|
+
- test/xml/test_namespace.rb
|
371
|
+
- test/xml/test_node.rb
|
372
|
+
- test/xml/test_node_attributes.rb
|
373
|
+
- test/xml/test_node_encoding.rb
|
374
|
+
- test/xml/test_node_reparenting.rb
|
375
|
+
- test/xml/test_node_set.rb
|
376
|
+
- test/xml/test_parse_options.rb
|
377
|
+
- test/xml/test_processing_instruction.rb
|
378
|
+
- test/xml/test_reader_encoding.rb
|
379
|
+
- test/xml/test_relax_ng.rb
|
380
|
+
- test/xml/test_schema.rb
|
381
|
+
- test/xml/test_syntax_error.rb
|
382
|
+
- test/xml/test_text.rb
|
383
|
+
- test/xml/test_unparented_node.rb
|
384
|
+
- test/xml/test_xpath.rb
|
385
|
+
- lib/nokogiri/nokogiri.jar
|
386
|
+
- lib/isorelax.jar
|
387
|
+
- lib/jing.jar
|
388
|
+
- lib/nekohtml.jar
|
389
|
+
- lib/nekodtd.jar
|
390
|
+
- lib/xercesImpl.jar
|
423
391
|
has_rdoc: true
|
424
392
|
homepage: http://nokogiri.org
|
425
393
|
licenses: []
|
426
394
|
|
427
395
|
post_install_message:
|
428
396
|
rdoc_options:
|
429
|
-
|
430
|
-
|
397
|
+
- --main
|
398
|
+
- README.rdoc
|
431
399
|
require_paths:
|
432
|
-
|
400
|
+
- lib
|
433
401
|
required_ruby_version: !ruby/object:Gem::Requirement
|
434
|
-
none: false
|
435
402
|
requirements:
|
436
|
-
|
437
|
-
|
438
|
-
|
403
|
+
- - ">="
|
404
|
+
- !ruby/object:Gem::Version
|
405
|
+
segments:
|
406
|
+
- 0
|
407
|
+
version: "0"
|
439
408
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
440
|
-
none: false
|
441
409
|
requirements:
|
442
|
-
|
443
|
-
|
444
|
-
|
410
|
+
- - ">"
|
411
|
+
- !ruby/object:Gem::Version
|
412
|
+
segments:
|
413
|
+
- 1
|
414
|
+
- 3
|
415
|
+
- 1
|
416
|
+
version: 1.3.1
|
445
417
|
requirements: []
|
446
418
|
|
447
419
|
rubyforge_project: nokogiri
|
448
|
-
rubygems_version: 1.
|
420
|
+
rubygems_version: 1.3.6
|
449
421
|
signing_key:
|
450
422
|
specification_version: 3
|
451
423
|
summary: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser"
|
452
424
|
test_files:
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
- test/xml/sax/test_parser_context.rb
|
510
|
-
- test/xml/sax/test_parser.rb
|
511
|
-
- test/xslt/test_custom_functions.rb
|
425
|
+
- test/test_reader.rb
|
426
|
+
- test/test_encoding_handler.rb
|
427
|
+
- test/test_nokogiri.rb
|
428
|
+
- test/test_css_cache.rb
|
429
|
+
- test/test_memory_leak.rb
|
430
|
+
- test/test_xslt_transforms.rb
|
431
|
+
- test/test_convert_xpath.rb
|
432
|
+
- test/test_soap4r_sax.rb
|
433
|
+
- test/xml/test_node.rb
|
434
|
+
- test/xml/test_relax_ng.rb
|
435
|
+
- test/xml/test_xpath.rb
|
436
|
+
- test/xml/test_parse_options.rb
|
437
|
+
- test/xml/test_cdata.rb
|
438
|
+
- test/xml/test_element_content.rb
|
439
|
+
- test/xml/test_document_encoding.rb
|
440
|
+
- test/xml/test_comment.rb
|
441
|
+
- test/xml/test_node_reparenting.rb
|
442
|
+
- test/xml/test_schema.rb
|
443
|
+
- test/xml/test_node_attributes.rb
|
444
|
+
- test/xml/test_attr.rb
|
445
|
+
- test/xml/test_node_encoding.rb
|
446
|
+
- test/xml/test_syntax_error.rb
|
447
|
+
- test/xml/test_text.rb
|
448
|
+
- test/xml/test_entity_decl.rb
|
449
|
+
- test/xml/test_builder.rb
|
450
|
+
- test/xml/test_document.rb
|
451
|
+
- test/xml/test_namespace.rb
|
452
|
+
- test/xml/test_element_decl.rb
|
453
|
+
- test/xml/test_dtd.rb
|
454
|
+
- test/xml/test_entity_reference.rb
|
455
|
+
- test/xml/test_attribute_decl.rb
|
456
|
+
- test/xml/test_dtd_encoding.rb
|
457
|
+
- test/xml/test_document_fragment.rb
|
458
|
+
- test/xml/test_unparented_node.rb
|
459
|
+
- test/xml/test_reader_encoding.rb
|
460
|
+
- test/xml/test_node_set.rb
|
461
|
+
- test/xml/test_processing_instruction.rb
|
462
|
+
- test/xml/node/test_save_options.rb
|
463
|
+
- test/xml/node/test_subclass.rb
|
464
|
+
- test/xml/sax/test_parser.rb
|
465
|
+
- test/xml/sax/test_push_parser.rb
|
466
|
+
- test/xml/sax/test_parser_context.rb
|
467
|
+
- test/css/test_parser.rb
|
468
|
+
- test/css/test_nthiness.rb
|
469
|
+
- test/css/test_xpath_visitor.rb
|
470
|
+
- test/css/test_tokenizer.rb
|
471
|
+
- test/html/test_node.rb
|
472
|
+
- test/html/test_document_encoding.rb
|
473
|
+
- test/html/test_element_description.rb
|
474
|
+
- test/html/test_node_encoding.rb
|
475
|
+
- test/html/test_builder.rb
|
476
|
+
- test/html/test_document.rb
|
477
|
+
- test/html/test_named_characters.rb
|
478
|
+
- test/html/test_document_fragment.rb
|
479
|
+
- test/html/sax/test_parser.rb
|
480
|
+
- test/html/sax/test_parser_context.rb
|