nokogiri 1.5.7.rc1 → 1.5.7.rc2
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/CHANGELOG.ja.rdoc +40 -11
- data/CHANGELOG.rdoc +32 -11
- data/Manifest.txt +1 -0
- data/Rakefile +20 -9
- data/ext/nokogiri/nokogiri.h +4 -0
- data/ext/nokogiri/xml_node.c +33 -1
- data/ext/nokogiri/xml_reader.c +0 -3
- data/lib/nokogiri/css/xpath_visitor.rb +1 -1
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml/builder.rb +12 -2
- data/lib/nokogiri/xml/document.rb +3 -1
- data/tasks/cross_compile.rb +10 -10
- data/test/css/test_parser.rb +9 -9
- data/test/css/test_xpath_visitor.rb +1 -1
- data/test/html/sax/test_parser.rb +1 -2
- data/test/namespaces/test_namespaces_in_builder_doc.rb +60 -0
- data/test/namespaces/test_namespaces_in_created_doc.rb +62 -0
- data/test/namespaces/test_namespaces_in_parsed_doc.rb +60 -0
- data/test/xml/test_builder.rb +17 -1
- data/test/xml/test_document.rb +4 -2
- data/test/xml/test_node.rb +13 -1
- data/test_all +1 -1
- metadata +83 -77
data/CHANGELOG.ja.rdoc
CHANGED
@@ -1,9 +1,23 @@
|
|
1
|
-
== 1.5.
|
1
|
+
== 1.5.x
|
2
|
+
|
3
|
+
=== 1.5.7 / unreleased
|
2
4
|
|
3
5
|
* Bugfixes
|
6
|
+
* SAX::Parser.parse_io throw an error when used with lower case encoding. #828
|
4
7
|
* (JRuby) Java Nokogiri is finally green (passes all tests) under 1.8 and 1.9 mode. High five everyone. #798, #705
|
8
|
+
* (JRuby) Nokogiri::XML::Reader broken (as a pull parser) on jruby - reads the whole XML document. #831
|
9
|
+
* (JRuby) JRuby hangs parsing "&". #837
|
10
|
+
* (JRuby) JRuby NPE parsing an invalid XML instruction. #838
|
11
|
+
* (JRuby) Node#content= incompatibility. #839
|
12
|
+
* (JRuby) to_xhtml doesn't print the last slash for self-closing tags in JRuby. #834
|
13
|
+
* (JRuby) Adding an EntityReference after a Text node mangles the entity in JRuby. #835
|
14
|
+
* (JRuby) JRuby version inconsistency: nil for empty attributes. #818
|
15
|
+
* CSS queries for classes (e.g., ".foo") now treat all whitespace identically. #854
|
16
|
+
* Namespace behavior cleaned up and made consistent between JRuby and MRI. #846, #801 (Thanks, Michael Klein!)
|
17
|
+
* (MRI) SAX parser handles empty processing instructions. #845
|
18
|
+
|
5
19
|
|
6
|
-
|
20
|
+
=== 1.5.6 / 2012年12月19日
|
7
21
|
|
8
22
|
* Features
|
9
23
|
|
@@ -41,7 +55,7 @@
|
|
41
55
|
* (JRuby) builder requires textwrappers for valid utf8 in jruby, not in mri. #784
|
42
56
|
|
43
57
|
|
44
|
-
|
58
|
+
=== 1.5.5 / 2012年6月24日
|
45
59
|
|
46
60
|
* Features
|
47
61
|
|
@@ -63,7 +77,7 @@
|
|
63
77
|
* JRuby の Entity 解決は C version の Nokogiri と同じ結果にならないといけない。#704, #647, #703
|
64
78
|
|
65
79
|
|
66
|
-
|
80
|
+
=== 1.5.4 / 2012年6月12日
|
67
81
|
|
68
82
|
* Features
|
69
83
|
|
@@ -87,7 +101,7 @@
|
|
87
101
|
ここに、自分ならではの二重否定のジョークをうめこむとなおよし。
|
88
102
|
|
89
103
|
|
90
|
-
|
104
|
+
=== 1.5.3 / 2012年6月1日
|
91
105
|
|
92
106
|
* Features
|
93
107
|
|
@@ -115,12 +129,12 @@
|
|
115
129
|
* (JRuby) Concurrency issue in XPath parsing. #682
|
116
130
|
|
117
131
|
|
118
|
-
|
132
|
+
=== 1.5.2 / 2012-03-09
|
119
133
|
|
120
134
|
Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631, #632.
|
121
135
|
|
122
136
|
|
123
|
-
|
137
|
+
=== 1.5.1 / 2012年3月9日
|
124
138
|
|
125
139
|
* 新機能
|
126
140
|
|
@@ -165,7 +179,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
165
179
|
* Node#set is a private method (JRuby). #564 (thanks, Nick Sieger!)
|
166
180
|
* C14n cleanup and Node#canonicalize (thanks, Ivan Pirlik!) #563
|
167
181
|
|
168
|
-
|
182
|
+
=== 1.5.0 / 2011年7月1日
|
169
183
|
|
170
184
|
* 註
|
171
185
|
|
@@ -185,7 +199,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
185
199
|
* <meta charset="..."> を認識するようになった.
|
186
200
|
|
187
201
|
|
188
|
-
|
202
|
+
=== 1.5.0 beta3 2010年12月2日
|
189
203
|
|
190
204
|
* 註
|
191
205
|
|
@@ -196,13 +210,13 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
196
210
|
|
197
211
|
* Node#inner_textはnilを返さなくなった. (JRuby) #264
|
198
212
|
|
199
|
-
|
213
|
+
=== 1.5.0 beta2 2010年7月30日
|
200
214
|
|
201
215
|
* 註
|
202
216
|
|
203
217
|
* 1.4.3からの変更点を参照
|
204
218
|
|
205
|
-
|
219
|
+
=== 1.5.0 beta1 2010年5月22日
|
206
220
|
|
207
221
|
* 註
|
208
222
|
|
@@ -214,6 +228,9 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
214
228
|
* LibXML 2.6.16および古いバージョンは非推奨. インストールできない.
|
215
229
|
* FFIサポートは削除された.
|
216
230
|
|
231
|
+
|
232
|
+
== 1.4.x
|
233
|
+
|
217
234
|
=== 1.4.7 / 2011年7月1日
|
218
235
|
|
219
236
|
* バグの修正
|
@@ -423,6 +440,9 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
423
440
|
|
424
441
|
* Hpricot用の互換性レイヤーを削除
|
425
442
|
|
443
|
+
|
444
|
+
== 1.3.x
|
445
|
+
|
426
446
|
=== 1.3.3 / 2009年7月26日
|
427
447
|
|
428
448
|
* 新しい機能
|
@@ -529,6 +549,9 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
529
549
|
* Node#before/after/inner_html=で値なしのHTML属性が受け入れられなかった問題を
|
530
550
|
修正 (GH#35)
|
531
551
|
|
552
|
+
|
553
|
+
== 1.2.x
|
554
|
+
|
532
555
|
=== 1.2.3 / 2009年3月22日
|
533
556
|
|
534
557
|
* バグの修正
|
@@ -609,6 +632,9 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
609
632
|
|
610
633
|
* Nokogiri::HTML.fragment は XML::DocumentFragment (LH #32)で返す
|
611
634
|
|
635
|
+
|
636
|
+
== 1.1.x
|
637
|
+
|
612
638
|
=== 1.1.1
|
613
639
|
|
614
640
|
* 新しい機能
|
@@ -641,6 +667,9 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
641
667
|
* XML::Node#dup が引数任意のdepthを取る
|
642
668
|
* XML::Node#add_previous_sibling が新しい兄弟ノードで返す
|
643
669
|
|
670
|
+
|
671
|
+
== 1.0.x
|
672
|
+
|
644
673
|
=== 1.0.7
|
645
674
|
|
646
675
|
* バグの修正
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
== 1.5.
|
1
|
+
== 1.5.x
|
2
|
+
|
3
|
+
=== 1.5.7 / unreleased
|
2
4
|
|
3
5
|
* Bugfixes
|
4
6
|
* SAX::Parser.parse_io throw an error when used with lower case encoding. #828
|
@@ -10,8 +12,12 @@
|
|
10
12
|
* (JRuby) to_xhtml doesn't print the last slash for self-closing tags in JRuby. #834
|
11
13
|
* (JRuby) Adding an EntityReference after a Text node mangles the entity in JRuby. #835
|
12
14
|
* (JRuby) JRuby version inconsistency: nil for empty attributes. #818
|
15
|
+
* CSS queries for classes (e.g., ".foo") now treat all whitespace identically. #854
|
16
|
+
* Namespace behavior cleaned up and made consistent between JRuby and MRI. #846, #801 (Thanks, Michael Klein!)
|
17
|
+
* (MRI) SAX parser handles empty processing instructions. #845
|
18
|
+
|
13
19
|
|
14
|
-
|
20
|
+
=== 1.5.6 / 2012-12-19
|
15
21
|
|
16
22
|
* Features
|
17
23
|
|
@@ -49,7 +55,7 @@
|
|
49
55
|
* (JRuby) builder requires textwrappers for valid utf8 in jruby, not in mri. #784
|
50
56
|
|
51
57
|
|
52
|
-
|
58
|
+
=== 1.5.5 / 2012-06-24
|
53
59
|
|
54
60
|
* Features
|
55
61
|
|
@@ -71,7 +77,7 @@
|
|
71
77
|
* JRuby's Entity resolving should be consistent with C-Nokogiri #704, #647, #703
|
72
78
|
|
73
79
|
|
74
|
-
|
80
|
+
=== 1.5.4 / 2012-06-12
|
75
81
|
|
76
82
|
* Features
|
77
83
|
|
@@ -97,7 +103,7 @@
|
|
97
103
|
Insert your own joke about double-negatives here.
|
98
104
|
|
99
105
|
|
100
|
-
|
106
|
+
=== 1.5.3 / 2012-06-01
|
101
107
|
|
102
108
|
* Features
|
103
109
|
|
@@ -127,12 +133,12 @@
|
|
127
133
|
* (JRuby) Concurrency issue in XPath parsing. #682
|
128
134
|
|
129
135
|
|
130
|
-
|
136
|
+
=== 1.5.2 / 2012-03-09
|
131
137
|
|
132
138
|
Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631, #632.
|
133
139
|
|
134
140
|
|
135
|
-
|
141
|
+
=== 1.5.1 / 2012-03-09
|
136
142
|
|
137
143
|
* Features
|
138
144
|
|
@@ -177,7 +183,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
177
183
|
* C14n cleanup and Node#canonicalize (thanks, Ivan Pirlik!) #563
|
178
184
|
|
179
185
|
|
180
|
-
|
186
|
+
=== 1.5.0 / 2011-07-01
|
181
187
|
|
182
188
|
* Notes
|
183
189
|
|
@@ -197,7 +203,7 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
197
203
|
encoding.
|
198
204
|
* Add support for <meta charset="...">.
|
199
205
|
|
200
|
-
|
206
|
+
=== 1.5.0 beta3 / 2010/12/02
|
201
207
|
|
202
208
|
* Notes
|
203
209
|
|
@@ -208,13 +214,13 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
208
214
|
|
209
215
|
* Node#inner_text no longer returns nil. (JRuby) #264
|
210
216
|
|
211
|
-
|
217
|
+
=== 1.5.0 beta2 / 2010/07/30
|
212
218
|
|
213
219
|
* Notes
|
214
220
|
|
215
221
|
* See changelog from 1.4.3
|
216
222
|
|
217
|
-
|
223
|
+
=== 1.5.0 beta1 / 2010/05/22
|
218
224
|
|
219
225
|
* Notes
|
220
226
|
|
@@ -226,6 +232,9 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
226
232
|
* LibXML 2.6.16 and earlier are deprecated. Nokogiri will refuse to install.
|
227
233
|
* FFI support is removed.
|
228
234
|
|
235
|
+
|
236
|
+
== 1.4.x
|
237
|
+
|
229
238
|
=== 1.4.7 / 2011-07-01
|
230
239
|
|
231
240
|
* Bugfixes
|
@@ -437,6 +446,9 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
437
446
|
|
438
447
|
* Hpricot compatibility layer removed
|
439
448
|
|
449
|
+
|
450
|
+
== 1.3.x
|
451
|
+
|
440
452
|
=== 1.3.3 / 2009/07/26
|
441
453
|
|
442
454
|
* New Features
|
@@ -530,6 +542,9 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
530
542
|
* Fixed a bug with attribute conditions in CSS selectors (GH#36)
|
531
543
|
* Fixed intolerance of HTML attributes without values in Node#before/after/inner_html=. (GH#35)
|
532
544
|
|
545
|
+
|
546
|
+
== 1.2.x
|
547
|
+
|
533
548
|
=== 1.2.3 / 2009-03-22
|
534
549
|
|
535
550
|
* Bugfixes
|
@@ -610,6 +625,9 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
610
625
|
|
611
626
|
* Nokogiri::HTML.fragment now returns an XML::DocumentFragment (LH #32)
|
612
627
|
|
628
|
+
|
629
|
+
== 1.1.x
|
630
|
+
|
613
631
|
=== 1.1.1
|
614
632
|
|
615
633
|
* New features
|
@@ -643,6 +661,9 @@ Repackaging of 1.5.1 with a gemspec that is compatible with older Rubies. #631,
|
|
643
661
|
* XML::Node#dup takes an optional depth argument
|
644
662
|
* XML::Node#add_previous_sibling returns new sibling node.
|
645
663
|
|
664
|
+
|
665
|
+
== 1.0.x
|
666
|
+
|
646
667
|
=== 1.0.7
|
647
668
|
|
648
669
|
* Bugfixes
|
data/Manifest.txt
CHANGED
@@ -66,6 +66,7 @@ ext/java/nokogiri/internals/ParserContext.java
|
|
66
66
|
ext/java/nokogiri/internals/ReaderNode.java
|
67
67
|
ext/java/nokogiri/internals/SaveContextVisitor.java
|
68
68
|
ext/java/nokogiri/internals/SchemaErrorHandler.java
|
69
|
+
ext/java/nokogiri/internals/UncloseableInputStream.java
|
69
70
|
ext/java/nokogiri/internals/XmlDeclHandler.java
|
70
71
|
ext/java/nokogiri/internals/XmlDomParserContext.java
|
71
72
|
ext/java/nokogiri/internals/XmlSaxParser.java
|
data/Rakefile
CHANGED
@@ -67,6 +67,19 @@ end
|
|
67
67
|
|
68
68
|
# ----------------------------------------
|
69
69
|
|
70
|
+
def add_file_to_gem relative_path
|
71
|
+
target_path = File.join gem_build_path, relative_path
|
72
|
+
target_dir = File.dirname(target_path)
|
73
|
+
mkdir_p target_dir unless File.directory?(target_dir)
|
74
|
+
rm_f target_path
|
75
|
+
ln relative_path, target_path
|
76
|
+
HOE.spec.files += [relative_path]
|
77
|
+
end
|
78
|
+
|
79
|
+
def gem_build_path
|
80
|
+
File.join 'pkg', HOE.spec.full_name
|
81
|
+
end
|
82
|
+
|
70
83
|
if java?
|
71
84
|
# TODO: clean this section up.
|
72
85
|
require "rake/javaextensiontask"
|
@@ -78,17 +91,15 @@ if java?
|
|
78
91
|
ext.classpath = jars.map { |x| File.expand_path x }.join ':'
|
79
92
|
end
|
80
93
|
|
81
|
-
gem_build_path = File.join 'pkg', HOE.spec.full_name
|
82
|
-
|
83
94
|
task gem_build_path => [:compile] do
|
84
|
-
|
85
|
-
HOE.spec.files += ['lib/nokogiri/nokogiri.jar']
|
95
|
+
add_file_to_gem 'lib/nokogiri/nokogiri.jar'
|
86
96
|
end
|
87
97
|
else
|
88
98
|
mingw_available = true
|
89
99
|
begin
|
90
100
|
require 'tasks/cross_compile'
|
91
101
|
rescue
|
102
|
+
puts "WARNING: cross compilation not available: #{$!}"
|
92
103
|
mingw_available = false
|
93
104
|
end
|
94
105
|
require "rake/extensiontask"
|
@@ -101,10 +112,10 @@ else
|
|
101
112
|
if mingw_available
|
102
113
|
ext.cross_compile = true
|
103
114
|
ext.cross_platform = ["x86-mswin32-60", "x86-mingw32"]
|
104
|
-
ext.cross_config_options << "--with-xml2-include=#{File.join($recipes[
|
105
|
-
ext.cross_config_options << "--with-xml2-lib=#{File.join($recipes[
|
106
|
-
ext.cross_config_options << "--with-iconv-dir=#{$recipes[
|
107
|
-
ext.cross_config_options << "--with-xslt-dir=#{$recipes[
|
115
|
+
ext.cross_config_options << "--with-xml2-include=#{File.join($recipes["libxml2"].path, 'include', 'libxml2')}"
|
116
|
+
ext.cross_config_options << "--with-xml2-lib=#{File.join($recipes["libxml2"].path, 'lib')}"
|
117
|
+
ext.cross_config_options << "--with-iconv-dir=#{$recipes["libiconv"].path}"
|
118
|
+
ext.cross_config_options << "--with-xslt-dir=#{$recipes["libxslt"].path}"
|
108
119
|
ext.cross_config_options << "--with-zlib-dir=#{CROSS_DIR}"
|
109
120
|
end
|
110
121
|
end
|
@@ -207,7 +218,7 @@ task "gem:windows" => "gem" do
|
|
207
218
|
rbconfig_19 = rake_compiler_config["rbconfig-1.9.2"]
|
208
219
|
raise "rbconfig #{rbconfig_19} needs --export-all in its DLDFLAGS value" if File.read(rbconfig_19).split("\n").grep(/CONFIG\["DLDFLAGS"\].*--export-all/).empty?
|
209
220
|
|
210
|
-
pkg_config_path = [
|
221
|
+
pkg_config_path = %w[libxslt libxml2].collect { |pkg| File.join($recipes[pkg].path, "lib/pkgconfig") }.join(":")
|
211
222
|
sh("env PKG_CONFIG_PATH=#{pkg_config_path} RUBY_CC_VERSION=#{ruby_cc_version} rake cross native gem") || raise("build failed!")
|
212
223
|
end
|
213
224
|
|
data/ext/nokogiri/nokogiri.h
CHANGED
data/ext/nokogiri/xml_node.c
CHANGED
@@ -23,10 +23,34 @@ typedef xmlNodePtr (*pivot_reparentee_func)(xmlNodePtr, xmlNodePtr);
|
|
23
23
|
/* :nodoc: */
|
24
24
|
static void relink_namespace(xmlNodePtr reparented)
|
25
25
|
{
|
26
|
+
xmlChar *name, *prefix;
|
26
27
|
xmlNodePtr child;
|
28
|
+
xmlNsPtr ns;
|
29
|
+
|
30
|
+
if (reparented->type != XML_ATTRIBUTE_NODE &&
|
31
|
+
reparented->type != XML_ELEMENT_NODE) return;
|
32
|
+
|
33
|
+
if (reparented->ns == NULL || reparented->ns->prefix == NULL) {
|
34
|
+
name = xmlSplitQName2(reparented->name, &prefix);
|
35
|
+
|
36
|
+
if(reparented->type == XML_ATTRIBUTE_NODE) {
|
37
|
+
if (prefix == NULL || strcmp((char*)prefix, XMLNS_PREFIX) == 0) return;
|
38
|
+
}
|
39
|
+
|
40
|
+
ns = xmlSearchNs(reparented->doc, reparented, prefix);
|
41
|
+
|
42
|
+
if (ns == NULL && reparented->parent) {
|
43
|
+
ns = xmlSearchNs(reparented->doc, reparented->parent, prefix);
|
44
|
+
}
|
45
|
+
|
46
|
+
if (ns != NULL) {
|
47
|
+
xmlNodeSetName(reparented, name);
|
48
|
+
xmlSetNs(reparented, ns);
|
49
|
+
}
|
50
|
+
}
|
27
51
|
|
28
52
|
/* Avoid segv when relinking against unlinked nodes. */
|
29
|
-
if(!reparented->parent) return;
|
53
|
+
if (reparented->type != XML_ELEMENT_NODE || !reparented->parent) return;
|
30
54
|
|
31
55
|
/* Make sure that our reparented node has the correct namespaces */
|
32
56
|
if(!reparented->ns && reparented->doc != (xmlDocPtr)reparented->parent)
|
@@ -70,6 +94,14 @@ static void relink_namespace(xmlNodePtr reparented)
|
|
70
94
|
relink_namespace(child);
|
71
95
|
child = child->next;
|
72
96
|
}
|
97
|
+
|
98
|
+
if (reparented->type == XML_ELEMENT_NODE) {
|
99
|
+
child = (xmlNodePtr)((xmlElementPtr)reparented)->attributes;
|
100
|
+
while(NULL != child) {
|
101
|
+
relink_namespace(child);
|
102
|
+
child = child->next;
|
103
|
+
}
|
104
|
+
}
|
73
105
|
}
|
74
106
|
|
75
107
|
/* :nodoc: */
|
data/ext/nokogiri/xml_reader.c
CHANGED
@@ -25,9 +25,6 @@ static int has_attributes(xmlTextReaderPtr reader)
|
|
25
25
|
return(0);
|
26
26
|
}
|
27
27
|
|
28
|
-
#define XMLNS_PREFIX "xmlns"
|
29
|
-
#define XMLNS_PREFIX_LEN 6 /* including either colon or \0 */
|
30
|
-
#define XMLNS_BUFFER_LEN 128
|
31
28
|
static void Nokogiri_xml_node_namespaces(xmlNodePtr node, VALUE attr_hash)
|
32
29
|
{
|
33
30
|
xmlNsPtr ns;
|
data/lib/nokogiri/version.rb
CHANGED
data/lib/nokogiri/xml/builder.rb
CHANGED
@@ -327,7 +327,8 @@ module Nokogiri
|
|
327
327
|
return self if @ns
|
328
328
|
end
|
329
329
|
|
330
|
-
|
330
|
+
@ns = { :pending => ns.to_s }
|
331
|
+
return self
|
331
332
|
end
|
332
333
|
|
333
334
|
###
|
@@ -355,11 +356,20 @@ module Nokogiri
|
|
355
356
|
else
|
356
357
|
node = @doc.create_element(method.to_s.sub(/[_!]$/, ''),*args) { |n|
|
357
358
|
# Set up the namespace
|
358
|
-
if @ns
|
359
|
+
if @ns.is_a? Nokogiri::XML::Namespace
|
359
360
|
n.namespace = @ns
|
360
361
|
@ns = nil
|
361
362
|
end
|
362
363
|
}
|
364
|
+
|
365
|
+
if @ns.is_a? Hash
|
366
|
+
node.namespace = node.namespace_definitions.find { |x| x.prefix == @ns[:pending] }
|
367
|
+
if node.namespace.nil?
|
368
|
+
raise ArgumentError, "Namespace #{@ns[:pending]} has not been defined"
|
369
|
+
end
|
370
|
+
@ns = nil
|
371
|
+
end
|
372
|
+
|
363
373
|
insert(node, &block)
|
364
374
|
end
|
365
375
|
end
|
@@ -87,7 +87,6 @@ module Nokogiri
|
|
87
87
|
if key =~ NCNAME_RE
|
88
88
|
ns_name = key.split(":", 2)[1]
|
89
89
|
elm.add_namespace_definition ns_name, v
|
90
|
-
next
|
91
90
|
end
|
92
91
|
elm[k.to_s] = v.to_s
|
93
92
|
}
|
@@ -95,6 +94,9 @@ module Nokogiri
|
|
95
94
|
elm.content = arg
|
96
95
|
end
|
97
96
|
end
|
97
|
+
if ns = elm.namespace_definitions.find { |n| n.prefix.nil? or n.prefix == '' }
|
98
|
+
elm.namespace = ns
|
99
|
+
end
|
98
100
|
elm
|
99
101
|
end
|
100
102
|
|
data/tasks/cross_compile.rb
CHANGED
@@ -4,10 +4,10 @@ HOST = Rake::ExtensionCompiler.mingw_host
|
|
4
4
|
|
5
5
|
require 'mini_portile'
|
6
6
|
$recipes = {}
|
7
|
-
$recipes[
|
8
|
-
$recipes[
|
9
|
-
$recipes[
|
10
|
-
$recipes[
|
7
|
+
$recipes["zlib"] = MiniPortile.new "zlib", "1.2.7"
|
8
|
+
$recipes["libiconv"] = MiniPortile.new "libiconv", "1.13.1"
|
9
|
+
$recipes["libxml2"] = MiniPortile.new "libxml2", "2.7.7"
|
10
|
+
$recipes["libxslt"] = MiniPortile.new "libxslt", "1.1.26"
|
11
11
|
$recipes.each { |_, recipe| recipe.host = HOST }
|
12
12
|
|
13
13
|
file "lib/nokogiri/nokogiri.rb" do
|
@@ -18,7 +18,7 @@ end
|
|
18
18
|
|
19
19
|
namespace :cross do
|
20
20
|
task :zlib do
|
21
|
-
recipe = $recipes[
|
21
|
+
recipe = $recipes["zlib"]
|
22
22
|
recipe.files = ["http://zlib.net/#{recipe.name}-#{recipe.version}.tar.gz"]
|
23
23
|
class << recipe
|
24
24
|
def configure
|
@@ -57,7 +57,7 @@ namespace :cross do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
task :libiconv do
|
60
|
-
recipe = $recipes[
|
60
|
+
recipe = $recipes["libiconv"]
|
61
61
|
recipe.files = ["http://ftp.gnu.org/pub/gnu/libiconv/#{recipe.name}-#{recipe.version}.tar.gz"]
|
62
62
|
recipe.configure_options = [
|
63
63
|
"--host=#{HOST}",
|
@@ -78,14 +78,14 @@ namespace :cross do
|
|
78
78
|
end
|
79
79
|
|
80
80
|
task :libxml2 => ["cross:zlib", "cross:libiconv"] do
|
81
|
-
recipe = $recipes[
|
81
|
+
recipe = $recipes["libxml2"]
|
82
82
|
recipe.files = ["ftp://ftp.xmlsoft.org/libxml2/#{recipe.name}-#{recipe.version}.tar.gz"]
|
83
83
|
recipe.configure_options = [
|
84
84
|
"--host=#{HOST}",
|
85
85
|
"--enable-static",
|
86
86
|
"--disable-shared",
|
87
87
|
"--with-zlib=#{CROSS_DIR}",
|
88
|
-
"--with-iconv=#{$recipes[
|
88
|
+
"--with-iconv=#{$recipes["libiconv"].path}",
|
89
89
|
"--without-python",
|
90
90
|
"--without-readline",
|
91
91
|
"CFLAGS='-DIN_LIBXML'"
|
@@ -109,13 +109,13 @@ namespace :cross do
|
|
109
109
|
end
|
110
110
|
|
111
111
|
task :libxslt => ['cross:libxml2'] do
|
112
|
-
recipe = $recipes[
|
112
|
+
recipe = $recipes["libxslt"]
|
113
113
|
recipe.files = ["ftp://ftp.xmlsoft.org/libxml2/#{recipe.name}-#{recipe.version}.tar.gz"]
|
114
114
|
recipe.configure_options = [
|
115
115
|
"--host=#{HOST}",
|
116
116
|
"--enable-static",
|
117
117
|
"--disable-shared",
|
118
|
-
"--with-libxml-prefix=#{$recipes[
|
118
|
+
"--with-libxml-prefix=#{$recipes["libxml2"].path}",
|
119
119
|
"--without-python",
|
120
120
|
"--without-crypto",
|
121
121
|
"CFLAGS='-DIN_LIBXML'"
|
data/test/css/test_parser.rb
CHANGED
@@ -263,33 +263,33 @@ module Nokogiri
|
|
263
263
|
assert_xpath "//a[visited(.)]", @parser.parse('a:visited')
|
264
264
|
assert_xpath "//a[hover(.)]", @parser.parse('a:hover')
|
265
265
|
assert_xpath "//a[active(.)]", @parser.parse('a:active')
|
266
|
-
assert_xpath "//a[active(.) and contains(concat(' ', @class, ' '), ' foo ')]",
|
266
|
+
assert_xpath "//a[active(.) and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]",
|
267
267
|
@parser.parse('a:active.foo')
|
268
268
|
end
|
269
269
|
|
270
270
|
def test_star
|
271
271
|
assert_xpath "//*", @parser.parse('*')
|
272
|
-
assert_xpath "//*[contains(concat(' ', @class, ' '), ' pastoral ')]",
|
272
|
+
assert_xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' pastoral ')]",
|
273
273
|
@parser.parse('*.pastoral')
|
274
274
|
end
|
275
275
|
|
276
276
|
def test_class
|
277
|
-
assert_xpath "//*[contains(concat(' ', @class, ' '), ' a ') and contains(concat(' ', @class, ' '), ' b ')]",
|
277
|
+
assert_xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' a ') and contains(concat(' ', normalize-space(@class), ' '), ' b ')]",
|
278
278
|
@parser.parse('.a.b')
|
279
|
-
assert_xpath "//*[contains(concat(' ', @class, ' '), ' awesome ')]",
|
279
|
+
assert_xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' awesome ')]",
|
280
280
|
@parser.parse('.awesome')
|
281
|
-
assert_xpath "//foo[contains(concat(' ', @class, ' '), ' awesome ')]",
|
281
|
+
assert_xpath "//foo[contains(concat(' ', normalize-space(@class), ' '), ' awesome ')]",
|
282
282
|
@parser.parse('foo.awesome')
|
283
|
-
assert_xpath "//foo//*[contains(concat(' ', @class, ' '), ' awesome ')]",
|
283
|
+
assert_xpath "//foo//*[contains(concat(' ', normalize-space(@class), ' '), ' awesome ')]",
|
284
284
|
@parser.parse('foo .awesome')
|
285
285
|
end
|
286
286
|
|
287
287
|
def test_not_so_simple_not
|
288
|
-
assert_xpath "//*[@id = 'p' and not(contains(concat(' ', @class, ' '), ' a '))]",
|
288
|
+
assert_xpath "//*[@id = 'p' and not(contains(concat(' ', normalize-space(@class), ' '), ' a '))]",
|
289
289
|
@parser.parse('#p:not(.a)')
|
290
|
-
assert_xpath "//p[contains(concat(' ', @class, ' '), ' a ') and not(contains(concat(' ', @class, ' '), ' b '))]",
|
290
|
+
assert_xpath "//p[contains(concat(' ', normalize-space(@class), ' '), ' a ') and not(contains(concat(' ', normalize-space(@class), ' '), ' b '))]",
|
291
291
|
@parser.parse('p.a:not(.b)')
|
292
|
-
assert_xpath "//p[@a = 'foo' and not(contains(concat(' ', @class, ' '), ' b '))]",
|
292
|
+
assert_xpath "//p[@a = 'foo' and not(contains(concat(' ', normalize-space(@class), ' '), ' b '))]",
|
293
293
|
@parser.parse("p[a='foo']:not(.b)")
|
294
294
|
end
|
295
295
|
|
@@ -17,8 +17,7 @@ module Nokogiri
|
|
17
17
|
|
18
18
|
def test_parse_empty_file
|
19
19
|
# Make sure empty files don't break stuff
|
20
|
-
empty_file_name = File.join(
|
21
|
-
FileUtils.touch empty_file_name
|
20
|
+
empty_file_name = File.join(ASSETS_DIR, 'bogus.xml')
|
22
21
|
# assert_nothing_raised do
|
23
22
|
@parser.parse_file empty_file_name
|
24
23
|
# end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module XML
|
5
|
+
class TestNamespacesInBuilderDoc < Nokogiri::TestCase
|
6
|
+
def setup
|
7
|
+
super
|
8
|
+
b = Nokogiri::XML::Builder.new do |x|
|
9
|
+
x.fruit(:xmlns => 'ns:fruit', :'xmlns:veg' => 'ns:veg', :'xmlns:xlink' => 'http://www.w3.org/1999/xlink') do
|
10
|
+
x.pear { x.bosc }
|
11
|
+
x.orange
|
12
|
+
x[:veg].carrot do
|
13
|
+
x.cheese(:xmlns => 'ns:dairy', :'xlink:href' => 'http://example.com/cheese/')
|
14
|
+
end
|
15
|
+
x[:meat].bacon(:'xmlns:meat' => 'ns:meat') do
|
16
|
+
x.apple :count => 2
|
17
|
+
x[:veg].tomato
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
@doc = b.doc
|
23
|
+
end
|
24
|
+
|
25
|
+
def check_namespace e
|
26
|
+
e.namespace.nil? ? nil : e.namespace.href
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_builder_default_ns
|
30
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root)
|
31
|
+
end
|
32
|
+
def test_builder_parent_default_ns
|
33
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0])
|
34
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[1])
|
35
|
+
end
|
36
|
+
def test_builder_grandparent_default_ns
|
37
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0].elements[0])
|
38
|
+
end
|
39
|
+
def test_builder_parent_nondefault_ns
|
40
|
+
assert_equal 'ns:veg', check_namespace(@doc.root.elements[2])
|
41
|
+
end
|
42
|
+
def test_builder_single_decl_ns_1
|
43
|
+
assert_equal 'ns:dairy', check_namespace(@doc.root.elements[2].elements[0])
|
44
|
+
end
|
45
|
+
def test_builder_nondefault_attr_ns
|
46
|
+
assert_equal 'http://www.w3.org/1999/xlink',
|
47
|
+
check_namespace(@doc.root.elements[2].elements[0].attribute_nodes.find { |a| a.name =~ /href/ })
|
48
|
+
end
|
49
|
+
def test_builder_single_decl_ns_2
|
50
|
+
assert_equal 'ns:meat', check_namespace(@doc.root.elements[3])
|
51
|
+
end
|
52
|
+
def test_builder_buried_default_ns
|
53
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[3].elements[0])
|
54
|
+
end
|
55
|
+
def test_builder_buried_decl_ns
|
56
|
+
assert_equal 'ns:veg', check_namespace(@doc.root.elements[3].elements[1])
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module XML
|
5
|
+
class TestNamespacesInCreatedDoc < Nokogiri::TestCase
|
6
|
+
def setup
|
7
|
+
super
|
8
|
+
@doc = Nokogiri::XML('<fruit xmlns="ns:fruit" xmlns:veg="ns:veg" xmlns:xlink="http://www.w3.org/1999/xlink"/>')
|
9
|
+
pear = @doc.create_element('pear')
|
10
|
+
bosc = @doc.create_element('bosc')
|
11
|
+
pear.add_child(bosc)
|
12
|
+
@doc.root << pear
|
13
|
+
@doc.root.add_child('<orange/>')
|
14
|
+
carrot = @doc.create_element('veg:carrot')
|
15
|
+
@doc.root << carrot
|
16
|
+
cheese = @doc.create_element('cheese', :xmlns => 'ns:dairy', :'xlink:href' => 'http://example.com/cheese/')
|
17
|
+
carrot << cheese
|
18
|
+
bacon = @doc.create_element('meat:bacon', :'xmlns:meat' => 'ns:meat')
|
19
|
+
apple = @doc.create_element('apple')
|
20
|
+
apple['count'] = 2
|
21
|
+
bacon << apple
|
22
|
+
tomato = @doc.create_element('veg:tomato')
|
23
|
+
bacon << tomato
|
24
|
+
@doc.root << bacon
|
25
|
+
end
|
26
|
+
|
27
|
+
def check_namespace e
|
28
|
+
e.namespace.nil? ? nil : e.namespace.href
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_created_default_ns
|
32
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root)
|
33
|
+
end
|
34
|
+
def test_created_parent_default_ns
|
35
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0])
|
36
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[1])
|
37
|
+
end
|
38
|
+
def test_created_grandparent_default_ns
|
39
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0].elements[0])
|
40
|
+
end
|
41
|
+
def test_created_parent_nondefault_ns
|
42
|
+
assert_equal 'ns:veg', check_namespace(@doc.root.elements[2])
|
43
|
+
end
|
44
|
+
def test_created_single_decl_ns_1
|
45
|
+
assert_equal 'ns:dairy', check_namespace(@doc.root.elements[2].elements[0])
|
46
|
+
end
|
47
|
+
def test_created_nondefault_attr_ns
|
48
|
+
assert_equal 'http://www.w3.org/1999/xlink',
|
49
|
+
check_namespace(@doc.root.elements[2].elements[0].attribute_nodes.find { |a| a.name =~ /href/ })
|
50
|
+
end
|
51
|
+
def test_created_single_decl_ns_2
|
52
|
+
assert_equal 'ns:meat', check_namespace(@doc.root.elements[3])
|
53
|
+
end
|
54
|
+
def test_created_buried_default_ns
|
55
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[3].elements[0])
|
56
|
+
end
|
57
|
+
def test_created_buried_decl_ns
|
58
|
+
assert_equal 'ns:veg', check_namespace(@doc.root.elements[3].elements[1])
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module XML
|
5
|
+
class TestNamespacesInParsedDoc < Nokogiri::TestCase
|
6
|
+
def setup
|
7
|
+
super
|
8
|
+
@doc = Nokogiri::XML <<-eoxml
|
9
|
+
<fruit xmlns="ns:fruit" xmlns:veg="ns:veg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
10
|
+
<pear>
|
11
|
+
<bosc/>
|
12
|
+
</pear>
|
13
|
+
<orange/>
|
14
|
+
<veg:carrot>
|
15
|
+
<cheese xmlns="ns:dairy" xlink:href="http://example.com/cheese/"/>
|
16
|
+
</veg:carrot>
|
17
|
+
<meat:bacon xmlns:meat="ns:meat">
|
18
|
+
<apple count="2"/>
|
19
|
+
<veg:tomato/>
|
20
|
+
</meat:bacon>
|
21
|
+
</fruit>
|
22
|
+
eoxml
|
23
|
+
end
|
24
|
+
|
25
|
+
def check_namespace e
|
26
|
+
e.namespace.nil? ? nil : e.namespace.href
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_parsed_default_ns
|
30
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root)
|
31
|
+
end
|
32
|
+
def test_parsed_parent_default_ns
|
33
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0])
|
34
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[1])
|
35
|
+
end
|
36
|
+
def test_parsed_grandparent_default_ns
|
37
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0].elements[0])
|
38
|
+
end
|
39
|
+
def test_parsed_parent_nondefault_ns
|
40
|
+
assert_equal 'ns:veg', check_namespace(@doc.root.elements[2])
|
41
|
+
end
|
42
|
+
def test_parsed_single_decl_ns_1
|
43
|
+
assert_equal 'ns:dairy', check_namespace(@doc.root.elements[2].elements[0])
|
44
|
+
end
|
45
|
+
def test_parsed_nondefault_attr_ns
|
46
|
+
assert_equal 'http://www.w3.org/1999/xlink',
|
47
|
+
check_namespace(@doc.root.elements[2].elements[0].attribute_nodes.find { |a| a.name =~ /href/ })
|
48
|
+
end
|
49
|
+
def test_parsed_single_decl_ns_2
|
50
|
+
assert_equal 'ns:meat', check_namespace(@doc.root.elements[3])
|
51
|
+
end
|
52
|
+
def test_parsed_buried_default_ns
|
53
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[3].elements[0])
|
54
|
+
end
|
55
|
+
def test_parsed_buried_decl_ns
|
56
|
+
assert_equal 'ns:veg', check_namespace(@doc.root.elements[3].elements[1])
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
data/test/xml/test_builder.rb
CHANGED
@@ -143,11 +143,27 @@ module Nokogiri
|
|
143
143
|
assert_equal 'bar', doc.at('foo|baz', 'foo' => 'bar').namespace.href
|
144
144
|
end
|
145
145
|
|
146
|
+
def test_specified_namespace_postdeclared
|
147
|
+
doc = Nokogiri::XML::Builder.new { |xml|
|
148
|
+
xml.a do
|
149
|
+
xml[:foo].b("xmlns:foo" => "bar")
|
150
|
+
end
|
151
|
+
}.doc
|
152
|
+
a = doc.at('a')
|
153
|
+
assert_equal({}, a.namespaces)
|
154
|
+
|
155
|
+
b = doc.at_xpath('//foo:b', {:foo=>'bar'})
|
156
|
+
assert b
|
157
|
+
assert_equal({"xmlns:foo"=>"bar"}, b.namespaces)
|
158
|
+
assert_equal("b", b.name)
|
159
|
+
assert_equal("bar", b.namespace.href)
|
160
|
+
end
|
161
|
+
|
146
162
|
def test_specified_namespace_undeclared
|
147
163
|
Nokogiri::XML::Builder.new { |xml|
|
148
164
|
xml.root do
|
149
165
|
assert_raises(ArgumentError) do
|
150
|
-
xml[:foo]
|
166
|
+
xml[:foo].bar
|
151
167
|
end
|
152
168
|
end
|
153
169
|
}
|
data/test/xml/test_document.rb
CHANGED
@@ -63,11 +63,13 @@ module Nokogiri
|
|
63
63
|
def test_ignore_unknown_namespace
|
64
64
|
doc = Nokogiri::XML(<<-eoxml)
|
65
65
|
<xml>
|
66
|
-
<unknown:foo xmlns='hello' />
|
66
|
+
<unknown:foo xmlns='http://hello.com/' />
|
67
67
|
<bar />
|
68
68
|
</xml>
|
69
69
|
eoxml
|
70
|
-
|
70
|
+
if Nokogiri.jruby?
|
71
|
+
refute doc.xpath('//foo').first.namespace # assert that the namespace is nil
|
72
|
+
end
|
71
73
|
refute_empty doc.xpath('//bar'), "bar wasn't found in the document" # bar should be part of the doc
|
72
74
|
end
|
73
75
|
|
data/test/xml/test_node.rb
CHANGED
@@ -651,6 +651,18 @@ module Nokogiri
|
|
651
651
|
assert_equal "<!-- < -->", comment.to_xml
|
652
652
|
end
|
653
653
|
|
654
|
+
def test_find_by_css_class_with_nonstandard_whitespace
|
655
|
+
doc = Nokogiri::HTML '
|
656
|
+
<html>
|
657
|
+
<body>
|
658
|
+
<div class="a
|
659
|
+
b"></div>
|
660
|
+
</body>
|
661
|
+
</html>
|
662
|
+
'
|
663
|
+
assert_not_nil doc.at_css(".b")
|
664
|
+
end
|
665
|
+
|
654
666
|
def test_find_by_css_with_tilde_eql
|
655
667
|
xml = Nokogiri::XML.parse(<<-eoxml)
|
656
668
|
<root>
|
@@ -905,7 +917,7 @@ module Nokogiri
|
|
905
917
|
</root>
|
906
918
|
eoxml
|
907
919
|
|
908
|
-
tires = xml.css('bike|tire', 'bike' => 'http://schwinn.com/')
|
920
|
+
tires = xml.css('bike|tire', 'bike' => 'http://schwinn.com/' )
|
909
921
|
assert_equal 1, tires.length
|
910
922
|
end
|
911
923
|
|
data/test_all
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
# (e.g., 1.9.3's glob_helper). ["rake test:valgrind:suppression"]
|
11
11
|
#
|
12
12
|
|
13
|
-
RUBIES="ruby-1.9.3-
|
13
|
+
RUBIES="ruby-1.9.3-p327 jruby-1.7.3 jruby-1.6.5.1 jruby-1.6.7.2 ree-1.8.7-2011.12 ruby-1.9.2-p320 ruby-1.8.7-p370"
|
14
14
|
TEST_LOG=test.log
|
15
15
|
VALGRIND_LOG=valgrind.log
|
16
16
|
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogiri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -474228265
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
9
|
- 7
|
10
10
|
- rc
|
11
|
-
-
|
12
|
-
version: 1.5.7.
|
11
|
+
- 2
|
12
|
+
version: 1.5.7.rc2
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Aaron Patterson
|
@@ -20,7 +20,7 @@ autorequire:
|
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
22
|
|
23
|
-
date: 2013-
|
23
|
+
date: 2013-03-11 00:00:00 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
prerelease: false
|
@@ -228,40 +228,40 @@ extra_rdoc_files:
|
|
228
228
|
- Manifest.txt
|
229
229
|
- README.ja.rdoc
|
230
230
|
- README.rdoc
|
231
|
+
- ext/nokogiri/html_document.c
|
232
|
+
- ext/nokogiri/html_element_description.c
|
233
|
+
- ext/nokogiri/html_entity_lookup.c
|
231
234
|
- ext/nokogiri/html_sax_parser_context.c
|
232
|
-
- ext/nokogiri/
|
233
|
-
- ext/nokogiri/
|
234
|
-
- ext/nokogiri/xml_node.c
|
235
|
+
- ext/nokogiri/html_sax_push_parser.c
|
236
|
+
- ext/nokogiri/nokogiri.c
|
235
237
|
- ext/nokogiri/xml_attr.c
|
236
|
-
- ext/nokogiri/
|
237
|
-
- ext/nokogiri/
|
238
|
-
- ext/nokogiri/xml_document.c
|
239
|
-
- ext/nokogiri/xml_sax_push_parser.c
|
238
|
+
- ext/nokogiri/xml_attribute_decl.c
|
239
|
+
- ext/nokogiri/xml_cdata.c
|
240
240
|
- ext/nokogiri/xml_comment.c
|
241
|
+
- ext/nokogiri/xml_document.c
|
242
|
+
- ext/nokogiri/xml_document_fragment.c
|
243
|
+
- ext/nokogiri/xml_dtd.c
|
241
244
|
- ext/nokogiri/xml_element_content.c
|
242
|
-
- ext/nokogiri/xml_sax_parser_context.c
|
243
245
|
- ext/nokogiri/xml_element_decl.c
|
244
|
-
- ext/nokogiri/xml_node_set.c
|
245
|
-
- ext/nokogiri/xml_entity_reference.c
|
246
|
-
- ext/nokogiri/xml_xpath_context.c
|
247
|
-
- ext/nokogiri/xml_document_fragment.c
|
248
246
|
- ext/nokogiri/xml_encoding_handler.c
|
249
|
-
- ext/nokogiri/
|
250
|
-
- ext/nokogiri/
|
247
|
+
- ext/nokogiri/xml_entity_decl.c
|
248
|
+
- ext/nokogiri/xml_entity_reference.c
|
249
|
+
- ext/nokogiri/xml_io.c
|
250
|
+
- ext/nokogiri/xml_libxml2_hacks.c
|
251
|
+
- ext/nokogiri/xml_namespace.c
|
252
|
+
- ext/nokogiri/xml_node.c
|
253
|
+
- ext/nokogiri/xml_node_set.c
|
254
|
+
- ext/nokogiri/xml_processing_instruction.c
|
255
|
+
- ext/nokogiri/xml_reader.c
|
256
|
+
- ext/nokogiri/xml_relax_ng.c
|
251
257
|
- ext/nokogiri/xml_sax_parser.c
|
258
|
+
- ext/nokogiri/xml_sax_parser_context.c
|
259
|
+
- ext/nokogiri/xml_sax_push_parser.c
|
252
260
|
- ext/nokogiri/xml_schema.c
|
253
|
-
- ext/nokogiri/xml_dtd.c
|
254
|
-
- ext/nokogiri/xml_libxml2_hacks.c
|
255
|
-
- ext/nokogiri/xml_attribute_decl.c
|
256
261
|
- ext/nokogiri/xml_syntax_error.c
|
257
|
-
- ext/nokogiri/
|
258
|
-
- ext/nokogiri/
|
259
|
-
- ext/nokogiri/
|
260
|
-
- ext/nokogiri/xml_processing_instruction.c
|
261
|
-
- ext/nokogiri/xml_cdata.c
|
262
|
-
- ext/nokogiri/html_entity_lookup.c
|
263
|
-
- ext/nokogiri/html_element_description.c
|
264
|
-
- ext/nokogiri/html_document.c
|
262
|
+
- ext/nokogiri/xml_text.c
|
263
|
+
- ext/nokogiri/xml_xpath_context.c
|
264
|
+
- ext/nokogiri/xslt_stylesheet.c
|
265
265
|
files:
|
266
266
|
- .autotest
|
267
267
|
- .gemtest
|
@@ -502,6 +502,9 @@ files:
|
|
502
502
|
- test/xslt/test_custom_functions.rb
|
503
503
|
- test/xslt/test_exception_handling.rb
|
504
504
|
- test_all
|
505
|
+
- test/namespaces/test_namespaces_in_builder_doc.rb
|
506
|
+
- test/namespaces/test_namespaces_in_created_doc.rb
|
507
|
+
- test/namespaces/test_namespaces_in_parsed_doc.rb
|
505
508
|
homepage: http://nokogiri.org
|
506
509
|
licenses: []
|
507
510
|
|
@@ -541,65 +544,68 @@ signing_key:
|
|
541
544
|
specification_version: 3
|
542
545
|
summary: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser"
|
543
546
|
test_files:
|
544
|
-
- test/
|
545
|
-
- test/
|
546
|
-
- test/
|
547
|
-
- test/
|
548
|
-
- test/
|
549
|
-
- test/
|
550
|
-
- test/
|
551
|
-
- test/
|
552
|
-
- test/
|
553
|
-
- test/xml/
|
554
|
-
- test/xml/
|
555
|
-
- test/xml/test_dtd.rb
|
556
|
-
- test/xml/test_node_reparenting.rb
|
557
|
-
- test/xml/test_c14n.rb
|
558
|
-
- test/xml/test_node_inheritance.rb
|
559
|
-
- test/xml/test_schema.rb
|
560
|
-
- test/xml/node/test_save_options.rb
|
561
|
-
- test/xml/node/test_subclass.rb
|
547
|
+
- test/decorators/test_slop.rb
|
548
|
+
- test/test_encoding_handler.rb
|
549
|
+
- test/css/test_parser.rb
|
550
|
+
- test/css/test_nthiness.rb
|
551
|
+
- test/css/test_tokenizer.rb
|
552
|
+
- test/css/test_xpath_visitor.rb
|
553
|
+
- test/xslt/test_exception_handling.rb
|
554
|
+
- test/xslt/test_custom_functions.rb
|
555
|
+
- test/test_reader.rb
|
556
|
+
- test/xml/test_comment.rb
|
557
|
+
- test/xml/test_unparented_node.rb
|
562
558
|
- test/xml/test_processing_instruction.rb
|
563
|
-
- test/xml/
|
564
|
-
- test/xml/test_namespace.rb
|
565
|
-
- test/xml/test_relax_ng.rb
|
559
|
+
- test/xml/test_node_attributes.rb
|
566
560
|
- test/xml/test_xpath.rb
|
567
|
-
- test/xml/test_reader_encoding.rb
|
568
561
|
- test/xml/test_node_encoding.rb
|
569
|
-
- test/xml/
|
562
|
+
- test/xml/test_element_decl.rb
|
563
|
+
- test/xml/test_entity_decl.rb
|
564
|
+
- test/xml/test_namespace.rb
|
565
|
+
- test/xml/test_cdata.rb
|
566
|
+
- test/xml/test_node_inheritance.rb
|
567
|
+
- test/xml/test_entity_reference.rb
|
570
568
|
- test/xml/test_text.rb
|
569
|
+
- test/xml/test_reader_encoding.rb
|
570
|
+
- test/xml/test_dtd.rb
|
571
|
+
- test/xml/test_xinclude.rb
|
572
|
+
- test/xml/test_parse_options.rb
|
573
|
+
- test/xml/test_schema.rb
|
574
|
+
- test/xml/test_element_content.rb
|
571
575
|
- test/xml/test_document.rb
|
572
|
-
- test/xml/
|
573
|
-
- test/xml/
|
574
|
-
- test/xml/
|
575
|
-
- test/xml/test_unparented_node.rb
|
576
|
+
- test/xml/test_relax_ng.rb
|
577
|
+
- test/xml/test_c14n.rb
|
578
|
+
- test/xml/test_dtd_encoding.rb
|
576
579
|
- test/xml/test_syntax_error.rb
|
577
|
-
- test/xml/
|
578
|
-
- test/xml/
|
580
|
+
- test/xml/test_attribute_decl.rb
|
581
|
+
- test/xml/test_node_set.rb
|
582
|
+
- test/xml/test_builder.rb
|
579
583
|
- test/xml/sax/test_parser.rb
|
580
|
-
- test/xml/sax/test_parser_context.rb
|
581
584
|
- test/xml/sax/test_push_parser.rb
|
582
|
-
- test/xml/
|
583
|
-
- test/xml/
|
585
|
+
- test/xml/sax/test_parser_context.rb
|
586
|
+
- test/xml/test_document_encoding.rb
|
587
|
+
- test/xml/test_attr.rb
|
588
|
+
- test/xml/test_document_fragment.rb
|
589
|
+
- test/xml/test_node.rb
|
590
|
+
- test/xml/test_node_reparenting.rb
|
591
|
+
- test/xml/node/test_save_options.rb
|
592
|
+
- test/xml/node/test_subclass.rb
|
584
593
|
- test/test_css_cache.rb
|
585
|
-
- test/
|
586
|
-
- test/xslt/test_custom_functions.rb
|
587
|
-
- test/decorators/test_slop.rb
|
588
|
-
- test/html/test_builder.rb
|
589
|
-
- test/html/test_document_fragment.rb
|
590
|
-
- test/html/test_named_characters.rb
|
591
|
-
- test/html/test_element_description.rb
|
594
|
+
- test/test_soap4r_sax.rb
|
592
595
|
- test/html/test_node_encoding.rb
|
593
596
|
- test/html/test_document.rb
|
594
|
-
- test/html/
|
595
|
-
- test/html/
|
597
|
+
- test/html/test_named_characters.rb
|
598
|
+
- test/html/test_builder.rb
|
596
599
|
- test/html/sax/test_parser.rb
|
597
600
|
- test/html/sax/test_parser_context.rb
|
601
|
+
- test/html/test_document_encoding.rb
|
602
|
+
- test/html/test_element_description.rb
|
603
|
+
- test/html/test_document_fragment.rb
|
604
|
+
- test/html/test_node.rb
|
605
|
+
- test/test_memory_leak.rb
|
606
|
+
- test/test_convert_xpath.rb
|
607
|
+
- test/namespaces/test_namespaces_in_builder_doc.rb
|
608
|
+
- test/namespaces/test_namespaces_in_created_doc.rb
|
609
|
+
- test/namespaces/test_namespaces_in_parsed_doc.rb
|
598
610
|
- test/test_xslt_transforms.rb
|
599
|
-
- test/
|
600
|
-
- test/css/test_parser.rb
|
601
|
-
- test/css/test_nthiness.rb
|
602
|
-
- test/css/test_xpath_visitor.rb
|
603
|
-
- test/test_encoding_handler.rb
|
604
|
-
- test/test_soap4r_sax.rb
|
605
|
-
- test/test_reader.rb
|
611
|
+
- test/test_nokogiri.rb
|