nokogiri 1.3.3-x86-mswin32 → 1.4.0-x86-mswin32
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 +48 -3
- data/CHANGELOG.rdoc +42 -0
- data/Manifest.txt +44 -29
- data/README.ja.rdoc +0 -2
- data/README.rdoc +4 -7
- data/Rakefile +14 -22
- data/bin/nokogiri +7 -5
- data/ext/nokogiri/extconf.rb +5 -21
- data/ext/nokogiri/html_document.c +14 -50
- data/ext/nokogiri/html_element_description.c +7 -7
- data/ext/nokogiri/html_entity_lookup.c +6 -4
- data/ext/nokogiri/html_sax_parser_context.c +92 -0
- data/ext/nokogiri/html_sax_parser_context.h +11 -0
- data/ext/nokogiri/nokogiri.c +9 -3
- data/ext/nokogiri/nokogiri.h +16 -20
- data/ext/nokogiri/xml_attr.c +1 -1
- data/ext/nokogiri/xml_attribute_decl.c +67 -0
- data/ext/nokogiri/xml_attribute_decl.h +9 -0
- data/ext/nokogiri/xml_cdata.c +6 -5
- data/ext/nokogiri/xml_comment.c +3 -2
- data/ext/nokogiri/xml_document.c +93 -23
- data/ext/nokogiri/xml_document_fragment.c +1 -3
- data/ext/nokogiri/xml_dtd.c +63 -6
- data/ext/nokogiri/xml_element_content.c +123 -0
- data/ext/nokogiri/xml_element_content.h +10 -0
- data/ext/nokogiri/xml_element_decl.c +69 -0
- data/ext/nokogiri/xml_element_decl.h +9 -0
- data/ext/nokogiri/xml_entity_decl.c +97 -0
- data/ext/nokogiri/xml_entity_decl.h +10 -0
- data/ext/nokogiri/xml_entity_reference.c +1 -1
- data/ext/nokogiri/xml_io.c +10 -3
- data/ext/nokogiri/xml_io.h +1 -0
- data/ext/nokogiri/xml_namespace.c +2 -2
- data/ext/nokogiri/xml_node.c +139 -34
- data/ext/nokogiri/xml_node.h +0 -1
- data/ext/nokogiri/xml_node_set.c +23 -16
- data/ext/nokogiri/xml_processing_instruction.c +1 -1
- data/ext/nokogiri/xml_reader.c +78 -50
- data/ext/nokogiri/xml_sax_parser.c +109 -168
- data/ext/nokogiri/xml_sax_parser.h +33 -0
- data/ext/nokogiri/xml_sax_parser_context.c +155 -0
- data/ext/nokogiri/xml_sax_parser_context.h +10 -0
- data/ext/nokogiri/xml_sax_push_parser.c +11 -6
- data/ext/nokogiri/xml_syntax_error.c +63 -12
- data/ext/nokogiri/xml_text.c +4 -3
- data/ext/nokogiri/xml_xpath.c +1 -1
- data/ext/nokogiri/xml_xpath_context.c +12 -25
- data/ext/nokogiri/xslt_stylesheet.c +3 -3
- data/lib/nokogiri.rb +4 -4
- data/lib/nokogiri/1.8/nokogiri.so +0 -0
- data/lib/nokogiri/1.9/nokogiri.so +0 -0
- data/lib/nokogiri/css/node.rb +1 -9
- data/lib/nokogiri/css/xpath_visitor.rb +11 -21
- data/lib/nokogiri/ffi/html/document.rb +0 -9
- data/lib/nokogiri/ffi/html/sax/parser_context.rb +38 -0
- data/lib/nokogiri/ffi/io_callbacks.rb +4 -2
- data/lib/nokogiri/ffi/libxml.rb +44 -10
- data/lib/nokogiri/ffi/structs/common_node.rb +1 -1
- data/lib/nokogiri/ffi/structs/xml_attribute.rb +27 -0
- data/lib/nokogiri/ffi/structs/xml_dtd.rb +3 -1
- data/lib/nokogiri/ffi/structs/xml_element.rb +26 -0
- data/lib/nokogiri/ffi/structs/xml_element_content.rb +17 -0
- data/lib/nokogiri/ffi/structs/xml_entity.rb +32 -0
- data/lib/nokogiri/ffi/structs/xml_enumeration.rb +12 -0
- data/lib/nokogiri/ffi/structs/xml_parser_context.rb +19 -0
- data/lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb +4 -3
- data/lib/nokogiri/ffi/structs/xml_syntax_error.rb +1 -1
- data/lib/nokogiri/ffi/xml/attribute_decl.rb +27 -0
- data/lib/nokogiri/ffi/xml/comment.rb +2 -2
- data/lib/nokogiri/ffi/xml/document.rb +29 -12
- data/lib/nokogiri/ffi/xml/document_fragment.rb +0 -5
- data/lib/nokogiri/ffi/xml/dtd.rb +14 -3
- data/lib/nokogiri/ffi/xml/element_content.rb +43 -0
- data/lib/nokogiri/ffi/xml/element_decl.rb +19 -0
- data/lib/nokogiri/ffi/xml/entity_decl.rb +27 -0
- data/lib/nokogiri/ffi/xml/node.rb +45 -5
- data/lib/nokogiri/ffi/xml/node_set.rb +1 -1
- data/lib/nokogiri/ffi/xml/reader.rb +45 -24
- data/lib/nokogiri/ffi/xml/sax/parser.rb +27 -34
- data/lib/nokogiri/ffi/xml/sax/parser_context.rb +67 -0
- data/lib/nokogiri/ffi/xml/sax/push_parser.rb +5 -4
- data/lib/nokogiri/ffi/xml/syntax_error.rb +31 -16
- data/lib/nokogiri/ffi/xml/text.rb +2 -2
- data/lib/nokogiri/html.rb +1 -0
- data/lib/nokogiri/html/document.rb +39 -24
- data/lib/nokogiri/html/sax/parser.rb +2 -2
- data/lib/nokogiri/html/sax/parser_context.rb +16 -0
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml.rb +6 -1
- data/lib/nokogiri/xml/attr.rb +5 -0
- data/lib/nokogiri/xml/attribute_decl.rb +18 -0
- data/lib/nokogiri/xml/builder.rb +121 -13
- data/lib/nokogiri/xml/character_data.rb +7 -0
- data/lib/nokogiri/xml/document.rb +43 -29
- data/lib/nokogiri/xml/document_fragment.rb +26 -6
- data/lib/nokogiri/xml/dtd.rb +5 -5
- data/lib/nokogiri/xml/element_content.rb +36 -0
- data/lib/nokogiri/xml/element_decl.rb +13 -0
- data/lib/nokogiri/xml/entity_decl.rb +15 -0
- data/lib/nokogiri/xml/fragment_handler.rb +22 -11
- data/lib/nokogiri/xml/namespace.rb +6 -0
- data/lib/nokogiri/xml/node.rb +33 -15
- data/lib/nokogiri/xml/node_set.rb +66 -44
- data/lib/nokogiri/xml/pp.rb +2 -0
- data/lib/nokogiri/xml/pp/character_data.rb +18 -0
- data/lib/nokogiri/xml/pp/node.rb +56 -0
- data/lib/nokogiri/xml/reader.rb +8 -0
- data/lib/nokogiri/xml/sax.rb +1 -1
- data/lib/nokogiri/xml/sax/document.rb +18 -1
- data/lib/nokogiri/xml/sax/parser.rb +15 -8
- data/lib/nokogiri/xml/sax/parser_context.rb +16 -0
- data/lib/nokogiri/xml/sax/push_parser.rb +0 -3
- data/lib/nokogiri/xml/syntax_error.rb +4 -0
- data/lib/nokogiri/xslt/stylesheet.rb +1 -1
- data/test/css/test_nthiness.rb +1 -1
- data/test/css/test_parser.rb +1 -1
- data/test/css/test_tokenizer.rb +1 -1
- data/test/css/test_xpath_visitor.rb +1 -1
- data/test/ffi/test_document.rb +1 -1
- data/test/files/shift_jis.html +10 -0
- data/test/files/staff.dtd +10 -0
- data/test/helper.rb +12 -3
- data/test/html/sax/test_parser.rb +1 -1
- data/test/html/sax/test_parser_context.rb +48 -0
- data/test/html/test_builder.rb +8 -2
- data/test/html/test_document.rb +23 -1
- data/test/html/test_document_encoding.rb +15 -1
- data/test/html/test_document_fragment.rb +10 -1
- data/test/html/test_element_description.rb +1 -2
- data/test/html/test_named_characters.rb +1 -1
- data/test/html/test_node.rb +61 -1
- data/test/html/test_node_encoding.rb +27 -0
- data/test/test_convert_xpath.rb +1 -3
- data/test/test_css_cache.rb +1 -1
- data/test/test_gc.rb +1 -1
- data/test/test_memory_leak.rb +1 -1
- data/test/test_nokogiri.rb +3 -3
- data/test/test_reader.rb +29 -1
- data/test/test_xslt_transforms.rb +1 -1
- data/test/xml/node/test_save_options.rb +1 -1
- data/test/xml/node/test_subclass.rb +1 -1
- data/test/xml/sax/test_parser.rb +64 -3
- data/test/xml/sax/test_parser_context.rb +56 -0
- data/test/xml/sax/test_push_parser.rb +11 -1
- data/test/xml/test_attr.rb +1 -1
- data/test/xml/test_attribute_decl.rb +82 -0
- data/test/xml/test_builder.rb +95 -1
- data/test/xml/test_cdata.rb +1 -1
- data/test/xml/test_comment.rb +7 -1
- data/test/xml/test_document.rb +147 -6
- data/test/xml/test_document_encoding.rb +1 -1
- data/test/xml/test_document_fragment.rb +55 -5
- data/test/xml/test_dtd.rb +40 -5
- data/test/xml/test_dtd_encoding.rb +3 -1
- data/test/xml/test_element_content.rb +56 -0
- data/test/xml/test_element_decl.rb +73 -0
- data/test/xml/test_entity_decl.rb +83 -0
- data/test/xml/test_entity_reference.rb +1 -1
- data/test/xml/test_namespace.rb +21 -1
- data/test/xml/test_node.rb +70 -4
- data/test/xml/test_node_attributes.rb +1 -1
- data/test/xml/test_node_encoding.rb +1 -1
- data/test/xml/test_node_set.rb +136 -2
- data/test/xml/test_parse_options.rb +1 -1
- data/test/xml/test_processing_instruction.rb +1 -1
- data/test/xml/test_reader_encoding.rb +1 -1
- data/test/xml/test_relax_ng.rb +1 -1
- data/test/xml/test_schema.rb +1 -1
- data/test/xml/test_syntax_error.rb +27 -0
- data/test/xml/test_text.rb +13 -1
- data/test/xml/test_unparented_node.rb +1 -1
- data/test/xml/test_xpath.rb +1 -1
- metadata +55 -38
- data/ext/nokogiri/html_sax_parser.c +0 -57
- data/ext/nokogiri/html_sax_parser.h +0 -11
- data/lib/action-nokogiri.rb +0 -38
- data/lib/nokogiri/decorators.rb +0 -2
- data/lib/nokogiri/decorators/hpricot.rb +0 -3
- data/lib/nokogiri/decorators/hpricot/node.rb +0 -56
- data/lib/nokogiri/decorators/hpricot/node_set.rb +0 -54
- data/lib/nokogiri/decorators/hpricot/xpath_visitor.rb +0 -30
- data/lib/nokogiri/ffi/html/sax/parser.rb +0 -21
- data/lib/nokogiri/hpricot.rb +0 -92
- data/lib/nokogiri/xml/entity_declaration.rb +0 -11
- data/lib/nokogiri/xml/sax/legacy_handlers.rb +0 -65
- data/test/hpricot/files/basic.xhtml +0 -17
- data/test/hpricot/files/boingboing.html +0 -2266
- data/test/hpricot/files/cy0.html +0 -3653
- data/test/hpricot/files/immob.html +0 -400
- data/test/hpricot/files/pace_application.html +0 -1320
- data/test/hpricot/files/tenderlove.html +0 -16
- data/test/hpricot/files/uswebgen.html +0 -220
- data/test/hpricot/files/utf8.html +0 -1054
- data/test/hpricot/files/week9.html +0 -1723
- data/test/hpricot/files/why.xml +0 -19
- data/test/hpricot/load_files.rb +0 -11
- data/test/hpricot/test_alter.rb +0 -68
- data/test/hpricot/test_builder.rb +0 -20
- data/test/hpricot/test_parser.rb +0 -350
- data/test/hpricot/test_paths.rb +0 -15
- data/test/hpricot/test_preserved.rb +0 -77
- data/test/hpricot/test_xml.rb +0 -30
data/CHANGELOG.ja.rdoc
CHANGED
@@ -1,3 +1,48 @@
|
|
1
|
+
=== 1.4.0 2009年10月30日
|
2
|
+
|
3
|
+
* 今日はノコギリの満一歳のお誕生日です
|
4
|
+
|
5
|
+
* 新しい機能
|
6
|
+
* Node#at_xpath はXPathの表現に適したNodeSetの一番最初の要素に返す
|
7
|
+
* Node#at_css はCSSのセレクターに合うNodeSetの一番最初の要素に返す
|
8
|
+
* NodeSet#| は合併させる機能を果たす GH #119 (Serabe ありがとう!)
|
9
|
+
* NodeSet#inspect inspectは出力をきれいにさせる
|
10
|
+
* Node#inspect インスペクト後、普通のrubyで出力施行する
|
11
|
+
* XML::DTD#external_id を追加
|
12
|
+
* XML::DTD#system_id を追加
|
13
|
+
* XML::ElementContent はDTD要素のコンテンツを有効化させる
|
14
|
+
* Nokogiri::XML::Builder内での名前空間宣言用のサポートを改良
|
15
|
+
* XML::Node#external_subsetを追加
|
16
|
+
* XML::Node#create_external_subsetを追加
|
17
|
+
* XML::Node#create_internal_subsetを追加
|
18
|
+
* XML Builderは生成されていないstringsを付加出来る様になった
|
19
|
+
(GH #141, patch from dudleyf)
|
20
|
+
* XML::SAX::ParserContext を追加
|
21
|
+
* XML::Document#remove_namespaces! は名前空間を使いこなせない人たち用の措置
|
22
|
+
|
23
|
+
* バグの修正
|
24
|
+
|
25
|
+
* HTMLドキュメントが メタエンコーディングのタグを宣言しない時、
|
26
|
+
nilを返すようになった GH #115
|
27
|
+
* ENV['PATH'] を調節する為に、RbConfig::CONFIG['host_os']を使用できるように
|
28
|
+
なった GH #113
|
29
|
+
* NodeSet#searchが更に効率的になった GH #119 (Serabe!に感謝します)
|
30
|
+
* NodeSet#xpathがcustom xpath機能を取り扱える様になった
|
31
|
+
* XML::Reader が現時点のノード用に属性を取得する際に、
|
32
|
+
SEGVを修正するようになった
|
33
|
+
* Node#inner_html がNode#to_html と同じ独立変数を受け入れるようになった
|
34
|
+
GH #117
|
35
|
+
* DocumentFragment#css は子ノードへ委任をするようになった GH #123
|
36
|
+
* NodeSet#[]がNodeSet#lengthより大きいスライスでも機能できるようになった
|
37
|
+
GH #131
|
38
|
+
* 新たな親ノードの名前空間の維持出来るようになった GH #134
|
39
|
+
* XML::Document をNodeSetに追加の際にSEGVが修正されるようになった
|
40
|
+
* XML::SyntaxError が重複可
|
41
|
+
|
42
|
+
* 廃棄予定
|
43
|
+
|
44
|
+
* Hpricot用の互換性レイヤーを削除
|
45
|
+
|
1
46
|
=== 1.3.3 / 2009年7月26日
|
2
47
|
|
3
48
|
* 新しい機能
|
@@ -8,12 +53,12 @@
|
|
8
53
|
|
9
54
|
* libxml-ruby のグローバ ルエラー ハンドラー に優先するようになった
|
10
55
|
* ParseOption#strict を修正
|
11
|
-
*
|
12
|
-
* Ruby 1.9
|
56
|
+
* 空文字列を Node#inner_html= に与えた時に生じたSEGVを修正 GH #88
|
57
|
+
* Ruby 1.9 では文字列のエンコーディングをUTF-8になるようにした
|
13
58
|
* ドキュメントの根ノードから違うドキュメントの根ノードに移動した時に生じた
|
14
59
|
SEGVを修正 GH #91
|
15
60
|
* ノードをインスタンス化する時のO(n)のペナルティーを修正 GH #101
|
16
|
-
* XMLのドキュメントをHTML
|
61
|
+
* XMLのドキュメントをHTMLのドキュメントとして出力出来るようになった
|
17
62
|
|
18
63
|
* 廃棄予定
|
19
64
|
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,45 @@
|
|
1
|
+
=== 1.4.0 / 2009/10/30
|
2
|
+
|
3
|
+
* Happy Birthday!
|
4
|
+
|
5
|
+
* New Features
|
6
|
+
|
7
|
+
* Node#at_xpath returns the first element of the NodeSet matching the XPath
|
8
|
+
expression.
|
9
|
+
* Node#at_css returns the first element of the NodeSet matching the CSS
|
10
|
+
selector.
|
11
|
+
* NodeSet#| for unions GH #119 (Thanks Serabe!)
|
12
|
+
* NodeSet#inspect makes prettier output
|
13
|
+
* Node#inspect implemented for more rubyish document inspecting
|
14
|
+
* Added XML::DTD#external_id
|
15
|
+
* Added XML::DTD#system_id
|
16
|
+
* Added XML::ElementContent for DTD Element content validity
|
17
|
+
* Better namespace declaration support in Nokogiri::XML::Builder
|
18
|
+
* Added XML::Node#external_subset
|
19
|
+
* Added XML::Node#create_external_subset
|
20
|
+
* Added XML::Node#create_internal_subset
|
21
|
+
* XML Builder can append raw strings (GH #141, patch from dudleyf)
|
22
|
+
* XML::SAX::ParserContext added
|
23
|
+
* XML::Document#remove_namespaces! for the namespace-impaired
|
24
|
+
|
25
|
+
* Bugfixes
|
26
|
+
|
27
|
+
* returns nil when HTML documents do not declare a meta encoding tag. GH #115
|
28
|
+
* Uses RbConfig::CONFIG['host_os'] to adjust ENV['PATH'] GH #113
|
29
|
+
* NodeSet#search is more efficient GH #119 (Thanks Serabe!)
|
30
|
+
* NodeSet#xpath handles custom xpath functions
|
31
|
+
* Fixing a SEGV when XML::Reader gets attributes for current node
|
32
|
+
* Node#inner_html takes the same arguments as Node#to_html GH #117
|
33
|
+
* DocumentFragment#css delegates to it's child nodes GH #123
|
34
|
+
* NodeSet#[] works with slices larger than NodeSet#length GH #131
|
35
|
+
* Reparented nodes maintain their namespace. GH #134
|
36
|
+
* Fixed SEGV when adding an XML::Document to NodeSet
|
37
|
+
* XML::SyntaxError can be duplicated. GH #148
|
38
|
+
|
39
|
+
* Deprecations
|
40
|
+
|
41
|
+
* Hpricot compatibility layer removed
|
42
|
+
|
1
43
|
=== 1.3.3 / 2009/07/26
|
2
44
|
|
3
45
|
* New Features
|
data/Manifest.txt
CHANGED
@@ -13,12 +13,14 @@ ext/nokogiri/html_element_description.c
|
|
13
13
|
ext/nokogiri/html_element_description.h
|
14
14
|
ext/nokogiri/html_entity_lookup.c
|
15
15
|
ext/nokogiri/html_entity_lookup.h
|
16
|
-
ext/nokogiri/
|
17
|
-
ext/nokogiri/
|
16
|
+
ext/nokogiri/html_sax_parser_context.c
|
17
|
+
ext/nokogiri/html_sax_parser_context.h
|
18
18
|
ext/nokogiri/nokogiri.c
|
19
19
|
ext/nokogiri/nokogiri.h
|
20
20
|
ext/nokogiri/xml_attr.c
|
21
21
|
ext/nokogiri/xml_attr.h
|
22
|
+
ext/nokogiri/xml_attribute_decl.c
|
23
|
+
ext/nokogiri/xml_attribute_decl.h
|
22
24
|
ext/nokogiri/xml_cdata.c
|
23
25
|
ext/nokogiri/xml_cdata.h
|
24
26
|
ext/nokogiri/xml_comment.c
|
@@ -29,6 +31,12 @@ ext/nokogiri/xml_document_fragment.c
|
|
29
31
|
ext/nokogiri/xml_document_fragment.h
|
30
32
|
ext/nokogiri/xml_dtd.c
|
31
33
|
ext/nokogiri/xml_dtd.h
|
34
|
+
ext/nokogiri/xml_element_content.c
|
35
|
+
ext/nokogiri/xml_element_content.h
|
36
|
+
ext/nokogiri/xml_element_decl.c
|
37
|
+
ext/nokogiri/xml_element_decl.h
|
38
|
+
ext/nokogiri/xml_entity_decl.c
|
39
|
+
ext/nokogiri/xml_entity_decl.h
|
32
40
|
ext/nokogiri/xml_entity_reference.c
|
33
41
|
ext/nokogiri/xml_entity_reference.h
|
34
42
|
ext/nokogiri/xml_io.c
|
@@ -47,6 +55,8 @@ ext/nokogiri/xml_relax_ng.c
|
|
47
55
|
ext/nokogiri/xml_relax_ng.h
|
48
56
|
ext/nokogiri/xml_sax_parser.c
|
49
57
|
ext/nokogiri/xml_sax_parser.h
|
58
|
+
ext/nokogiri/xml_sax_parser_context.c
|
59
|
+
ext/nokogiri/xml_sax_parser_context.h
|
50
60
|
ext/nokogiri/xml_sax_push_parser.c
|
51
61
|
ext/nokogiri/xml_sax_push_parser.h
|
52
62
|
ext/nokogiri/xml_schema.c
|
@@ -61,7 +71,6 @@ ext/nokogiri/xml_xpath_context.c
|
|
61
71
|
ext/nokogiri/xml_xpath_context.h
|
62
72
|
ext/nokogiri/xslt_stylesheet.c
|
63
73
|
ext/nokogiri/xslt_stylesheet.h
|
64
|
-
lib/action-nokogiri.rb
|
65
74
|
lib/nokogiri.rb
|
66
75
|
lib/nokogiri/css.rb
|
67
76
|
lib/nokogiri/css/generated_parser.rb
|
@@ -73,16 +82,11 @@ lib/nokogiri/css/syntax_error.rb
|
|
73
82
|
lib/nokogiri/css/tokenizer.rb
|
74
83
|
lib/nokogiri/css/tokenizer.rex
|
75
84
|
lib/nokogiri/css/xpath_visitor.rb
|
76
|
-
lib/nokogiri/decorators.rb
|
77
|
-
lib/nokogiri/decorators/hpricot.rb
|
78
|
-
lib/nokogiri/decorators/hpricot/node.rb
|
79
|
-
lib/nokogiri/decorators/hpricot/node_set.rb
|
80
|
-
lib/nokogiri/decorators/hpricot/xpath_visitor.rb
|
81
85
|
lib/nokogiri/decorators/slop.rb
|
82
86
|
lib/nokogiri/ffi/html/document.rb
|
83
87
|
lib/nokogiri/ffi/html/element_description.rb
|
84
88
|
lib/nokogiri/ffi/html/entity_lookup.rb
|
85
|
-
lib/nokogiri/ffi/html/sax/
|
89
|
+
lib/nokogiri/ffi/html/sax/parser_context.rb
|
86
90
|
lib/nokogiri/ffi/io_callbacks.rb
|
87
91
|
lib/nokogiri/ffi/libxml.rb
|
88
92
|
lib/nokogiri/ffi/structs/common_node.rb
|
@@ -90,13 +94,19 @@ lib/nokogiri/ffi/structs/html_elem_desc.rb
|
|
90
94
|
lib/nokogiri/ffi/structs/html_entity_desc.rb
|
91
95
|
lib/nokogiri/ffi/structs/xml_alloc.rb
|
92
96
|
lib/nokogiri/ffi/structs/xml_attr.rb
|
97
|
+
lib/nokogiri/ffi/structs/xml_attribute.rb
|
93
98
|
lib/nokogiri/ffi/structs/xml_buffer.rb
|
94
99
|
lib/nokogiri/ffi/structs/xml_document.rb
|
95
100
|
lib/nokogiri/ffi/structs/xml_dtd.rb
|
101
|
+
lib/nokogiri/ffi/structs/xml_element.rb
|
102
|
+
lib/nokogiri/ffi/structs/xml_element_content.rb
|
103
|
+
lib/nokogiri/ffi/structs/xml_entity.rb
|
104
|
+
lib/nokogiri/ffi/structs/xml_enumeration.rb
|
96
105
|
lib/nokogiri/ffi/structs/xml_node.rb
|
97
106
|
lib/nokogiri/ffi/structs/xml_node_set.rb
|
98
107
|
lib/nokogiri/ffi/structs/xml_notation.rb
|
99
108
|
lib/nokogiri/ffi/structs/xml_ns.rb
|
109
|
+
lib/nokogiri/ffi/structs/xml_parser_context.rb
|
100
110
|
lib/nokogiri/ffi/structs/xml_relax_ng.rb
|
101
111
|
lib/nokogiri/ffi/structs/xml_sax_handler.rb
|
102
112
|
lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb
|
@@ -108,11 +118,15 @@ lib/nokogiri/ffi/structs/xml_xpath_object.rb
|
|
108
118
|
lib/nokogiri/ffi/structs/xml_xpath_parser_context.rb
|
109
119
|
lib/nokogiri/ffi/structs/xslt_stylesheet.rb
|
110
120
|
lib/nokogiri/ffi/xml/attr.rb
|
121
|
+
lib/nokogiri/ffi/xml/attribute_decl.rb
|
111
122
|
lib/nokogiri/ffi/xml/cdata.rb
|
112
123
|
lib/nokogiri/ffi/xml/comment.rb
|
113
124
|
lib/nokogiri/ffi/xml/document.rb
|
114
125
|
lib/nokogiri/ffi/xml/document_fragment.rb
|
115
126
|
lib/nokogiri/ffi/xml/dtd.rb
|
127
|
+
lib/nokogiri/ffi/xml/element_content.rb
|
128
|
+
lib/nokogiri/ffi/xml/element_decl.rb
|
129
|
+
lib/nokogiri/ffi/xml/entity_decl.rb
|
116
130
|
lib/nokogiri/ffi/xml/entity_reference.rb
|
117
131
|
lib/nokogiri/ffi/xml/namespace.rb
|
118
132
|
lib/nokogiri/ffi/xml/node.rb
|
@@ -121,6 +135,7 @@ lib/nokogiri/ffi/xml/processing_instruction.rb
|
|
121
135
|
lib/nokogiri/ffi/xml/reader.rb
|
122
136
|
lib/nokogiri/ffi/xml/relax_ng.rb
|
123
137
|
lib/nokogiri/ffi/xml/sax/parser.rb
|
138
|
+
lib/nokogiri/ffi/xml/sax/parser_context.rb
|
124
139
|
lib/nokogiri/ffi/xml/sax/push_parser.rb
|
125
140
|
lib/nokogiri/ffi/xml/schema.rb
|
126
141
|
lib/nokogiri/ffi/xml/syntax_error.rb
|
@@ -128,7 +143,6 @@ lib/nokogiri/ffi/xml/text.rb
|
|
128
143
|
lib/nokogiri/ffi/xml/xpath.rb
|
129
144
|
lib/nokogiri/ffi/xml/xpath_context.rb
|
130
145
|
lib/nokogiri/ffi/xslt/stylesheet.rb
|
131
|
-
lib/nokogiri/hpricot.rb
|
132
146
|
lib/nokogiri/html.rb
|
133
147
|
lib/nokogiri/html/builder.rb
|
134
148
|
lib/nokogiri/html/document.rb
|
@@ -136,17 +150,22 @@ lib/nokogiri/html/document_fragment.rb
|
|
136
150
|
lib/nokogiri/html/element_description.rb
|
137
151
|
lib/nokogiri/html/entity_lookup.rb
|
138
152
|
lib/nokogiri/html/sax/parser.rb
|
153
|
+
lib/nokogiri/html/sax/parser_context.rb
|
139
154
|
lib/nokogiri/syntax_error.rb
|
140
155
|
lib/nokogiri/version.rb
|
141
156
|
lib/nokogiri/version_warning.rb
|
142
157
|
lib/nokogiri/xml.rb
|
143
158
|
lib/nokogiri/xml/attr.rb
|
159
|
+
lib/nokogiri/xml/attribute_decl.rb
|
144
160
|
lib/nokogiri/xml/builder.rb
|
145
161
|
lib/nokogiri/xml/cdata.rb
|
162
|
+
lib/nokogiri/xml/character_data.rb
|
146
163
|
lib/nokogiri/xml/document.rb
|
147
164
|
lib/nokogiri/xml/document_fragment.rb
|
148
165
|
lib/nokogiri/xml/dtd.rb
|
149
|
-
lib/nokogiri/xml/
|
166
|
+
lib/nokogiri/xml/element_content.rb
|
167
|
+
lib/nokogiri/xml/element_decl.rb
|
168
|
+
lib/nokogiri/xml/entity_decl.rb
|
150
169
|
lib/nokogiri/xml/fragment_handler.rb
|
151
170
|
lib/nokogiri/xml/namespace.rb
|
152
171
|
lib/nokogiri/xml/node.rb
|
@@ -154,13 +173,16 @@ lib/nokogiri/xml/node/save_options.rb
|
|
154
173
|
lib/nokogiri/xml/node_set.rb
|
155
174
|
lib/nokogiri/xml/notation.rb
|
156
175
|
lib/nokogiri/xml/parse_options.rb
|
176
|
+
lib/nokogiri/xml/pp.rb
|
177
|
+
lib/nokogiri/xml/pp/character_data.rb
|
178
|
+
lib/nokogiri/xml/pp/node.rb
|
157
179
|
lib/nokogiri/xml/processing_instruction.rb
|
158
180
|
lib/nokogiri/xml/reader.rb
|
159
181
|
lib/nokogiri/xml/relax_ng.rb
|
160
182
|
lib/nokogiri/xml/sax.rb
|
161
183
|
lib/nokogiri/xml/sax/document.rb
|
162
|
-
lib/nokogiri/xml/sax/legacy_handlers.rb
|
163
184
|
lib/nokogiri/xml/sax/parser.rb
|
185
|
+
lib/nokogiri/xml/sax/parser_context.rb
|
164
186
|
lib/nokogiri/xml/sax/push_parser.rb
|
165
187
|
lib/nokogiri/xml/schema.rb
|
166
188
|
lib/nokogiri/xml/syntax_error.rb
|
@@ -186,31 +208,17 @@ test/files/exslt.xslt
|
|
186
208
|
test/files/foo/foo.xsd
|
187
209
|
test/files/po.xml
|
188
210
|
test/files/po.xsd
|
211
|
+
test/files/shift_jis.html
|
189
212
|
test/files/shift_jis.xml
|
190
213
|
test/files/snuggles.xml
|
214
|
+
test/files/staff.dtd
|
191
215
|
test/files/staff.xml
|
192
216
|
test/files/staff.xslt
|
193
217
|
test/files/tlm.html
|
194
218
|
test/files/valid_bar.xml
|
195
219
|
test/helper.rb
|
196
|
-
test/hpricot/files/basic.xhtml
|
197
|
-
test/hpricot/files/boingboing.html
|
198
|
-
test/hpricot/files/cy0.html
|
199
|
-
test/hpricot/files/immob.html
|
200
|
-
test/hpricot/files/pace_application.html
|
201
|
-
test/hpricot/files/tenderlove.html
|
202
|
-
test/hpricot/files/uswebgen.html
|
203
|
-
test/hpricot/files/utf8.html
|
204
|
-
test/hpricot/files/week9.html
|
205
|
-
test/hpricot/files/why.xml
|
206
|
-
test/hpricot/load_files.rb
|
207
|
-
test/hpricot/test_alter.rb
|
208
|
-
test/hpricot/test_builder.rb
|
209
|
-
test/hpricot/test_parser.rb
|
210
|
-
test/hpricot/test_paths.rb
|
211
|
-
test/hpricot/test_preserved.rb
|
212
|
-
test/hpricot/test_xml.rb
|
213
220
|
test/html/sax/test_parser.rb
|
221
|
+
test/html/sax/test_parser_context.rb
|
214
222
|
test/html/test_builder.rb
|
215
223
|
test/html/test_document.rb
|
216
224
|
test/html/test_document_encoding.rb
|
@@ -218,6 +226,7 @@ test/html/test_document_fragment.rb
|
|
218
226
|
test/html/test_element_description.rb
|
219
227
|
test/html/test_named_characters.rb
|
220
228
|
test/html/test_node.rb
|
229
|
+
test/html/test_node_encoding.rb
|
221
230
|
test/test_convert_xpath.rb
|
222
231
|
test/test_css_cache.rb
|
223
232
|
test/test_gc.rb
|
@@ -228,8 +237,10 @@ test/test_xslt_transforms.rb
|
|
228
237
|
test/xml/node/test_save_options.rb
|
229
238
|
test/xml/node/test_subclass.rb
|
230
239
|
test/xml/sax/test_parser.rb
|
240
|
+
test/xml/sax/test_parser_context.rb
|
231
241
|
test/xml/sax/test_push_parser.rb
|
232
242
|
test/xml/test_attr.rb
|
243
|
+
test/xml/test_attribute_decl.rb
|
233
244
|
test/xml/test_builder.rb
|
234
245
|
test/xml/test_cdata.rb
|
235
246
|
test/xml/test_comment.rb
|
@@ -238,6 +249,9 @@ test/xml/test_document_encoding.rb
|
|
238
249
|
test/xml/test_document_fragment.rb
|
239
250
|
test/xml/test_dtd.rb
|
240
251
|
test/xml/test_dtd_encoding.rb
|
252
|
+
test/xml/test_element_content.rb
|
253
|
+
test/xml/test_element_decl.rb
|
254
|
+
test/xml/test_entity_decl.rb
|
241
255
|
test/xml/test_entity_reference.rb
|
242
256
|
test/xml/test_namespace.rb
|
243
257
|
test/xml/test_node.rb
|
@@ -249,6 +263,7 @@ test/xml/test_processing_instruction.rb
|
|
249
263
|
test/xml/test_reader_encoding.rb
|
250
264
|
test/xml/test_relax_ng.rb
|
251
265
|
test/xml/test_schema.rb
|
266
|
+
test/xml/test_syntax_error.rb
|
252
267
|
test/xml/test_text.rb
|
253
268
|
test/xml/test_unparented_node.rb
|
254
269
|
test/xml/test_xpath.rb
|
data/README.ja.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= Nokogiri
|
2
2
|
|
3
|
-
* http://nokogiri.org
|
3
|
+
* http://nokogiri.org
|
4
4
|
* http://github.com/tenderlove/nokogiri/wikis
|
5
5
|
* http://github.com/tenderlove/nokogiri/tree/master
|
6
6
|
* http://groups.google.com/group/nokogiri-talk
|
@@ -19,7 +19,6 @@ enough of it.
|
|
19
19
|
* XPath support for document searching
|
20
20
|
* CSS3 selector support for document searching
|
21
21
|
* XML/HTML builder
|
22
|
-
* Drop in replacement for Hpricot (though not bug for bug)
|
23
22
|
|
24
23
|
Nokogiri parses and searches XML/HTML very quickly, and also has
|
25
24
|
correctly implemented CSS3 selector support as well as XPath support.
|
@@ -28,12 +27,10 @@ Here is a speed test:
|
|
28
27
|
|
29
28
|
* http://gist.github.com/24605
|
30
29
|
|
31
|
-
Nokogiri also features an Hpricot compatibility layer to help ease the change
|
32
|
-
to using correct CSS and XPath.
|
33
|
-
|
34
30
|
== SUPPORT:
|
35
31
|
|
36
|
-
The Nokogiri mailing list
|
32
|
+
The Nokogiri {mailing list}[http://groups.google.com/group/nokogiri-talk]
|
33
|
+
is available here:
|
37
34
|
|
38
35
|
* http://groups.google.com/group/nokogiri-talk
|
39
36
|
|
@@ -87,7 +84,7 @@ The IRC channel is #nokogiri on freenode.
|
|
87
84
|
|
88
85
|
== DEVELOPMENT:
|
89
86
|
|
90
|
-
Developing Nokogiri requires racc and
|
87
|
+
Developing Nokogiri requires racc and rexical.
|
91
88
|
|
92
89
|
* rake install:deps
|
93
90
|
* rake test
|
data/Rakefile
CHANGED
@@ -21,8 +21,8 @@ HOE = Hoe.spec 'nokogiri' do
|
|
21
21
|
self.extra_rdoc_files = FileList['*.rdoc']
|
22
22
|
self.clean_globs = [
|
23
23
|
'lib/nokogiri/*.{o,so,bundle,a,log,dll}',
|
24
|
-
'lib/nokogiri/1.{8,9}',
|
25
24
|
'lib/nokogiri/nokogiri.rb',
|
25
|
+
'lib/nokogiri/1.{8,9}',
|
26
26
|
GENERATED_PARSER,
|
27
27
|
GENERATED_TOKENIZER,
|
28
28
|
'cross',
|
@@ -35,28 +35,20 @@ HOE = Hoe.spec 'nokogiri' do
|
|
35
35
|
self.spec_extras = { :extensions => ["ext/nokogiri/extconf.rb"] }
|
36
36
|
end
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
rd.options << '-d' if (`which dot` =~ /\/dot/) unless
|
41
|
-
rd.rdoc_dir = 'doc'
|
42
|
-
|
43
|
-
rd.rdoc_files += HOE.spec.require_paths
|
44
|
-
rd.rdoc_files += HOE.spec.extra_rdoc_files
|
38
|
+
task :ws_docs do
|
39
|
+
title = "#{HOE.name}-#{HOE.version} Documentation"
|
45
40
|
|
46
|
-
|
41
|
+
options = []
|
42
|
+
options << "--main=#{HOE.readme_file}"
|
43
|
+
options << '--format=activerecord'
|
44
|
+
options << '--threads=1'
|
45
|
+
options << "--title=#{title.inspect}"
|
47
46
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
rd.options << HOE.spec.rdoc_options[title_index + 1]
|
54
|
-
end
|
55
|
-
else
|
56
|
-
title = "#{HOE.name}-#{HOE.version} Documentation"
|
57
|
-
title = "#{HOE.rubyforge_name}'s " + title if HOE.rubyforge_name != HOE.name
|
58
|
-
rd.options << '--title' << title
|
59
|
-
end
|
47
|
+
options += HOE.spec.require_paths
|
48
|
+
options += HOE.spec.extra_rdoc_files
|
49
|
+
require 'rdoc/rdoc'
|
50
|
+
ENV['RAILS_ROOT'] ||= File.expand_path(File.join('..', 'nokogiri_ws'))
|
51
|
+
RDoc::RDoc.new.document options
|
60
52
|
end
|
61
53
|
|
62
54
|
unless java
|
@@ -103,7 +95,7 @@ end
|
|
103
95
|
|
104
96
|
namespace :gem do
|
105
97
|
namespace :dev do
|
106
|
-
task :spec do
|
98
|
+
task :spec => [ GENERATED_PARSER, GENERATED_TOKENIZER ] do
|
107
99
|
File.open("#{HOE.name}.gemspec", 'w') do |f|
|
108
100
|
HOE.spec.version = "#{HOE.version}.#{Time.now.strftime("%Y%m%d%H%M%S")}"
|
109
101
|
f.write(HOE.spec.to_ruby)
|
data/bin/nokogiri
CHANGED
@@ -6,6 +6,8 @@ require 'uri'
|
|
6
6
|
require 'rubygems'
|
7
7
|
require 'nokogiri'
|
8
8
|
|
9
|
+
parse_class = Nokogiri
|
10
|
+
|
9
11
|
opts = OptionParser.new do |opts|
|
10
12
|
opts.banner = "Nokogiri: an HTML, XML, SAX, and Reader parser"
|
11
13
|
opts.define_head "Usage: nokogiri <uri|path> [options]"
|
@@ -16,6 +18,10 @@ opts = OptionParser.new do |opts|
|
|
16
18
|
opts.separator ""
|
17
19
|
opts.separator "Options:"
|
18
20
|
|
21
|
+
opts.on("--type [TYPE]", [:xml, :html]) do |v|
|
22
|
+
parse_class = {:xml => Nokogiri::XML, :html => Nokogiri::HTML}[v]
|
23
|
+
end
|
24
|
+
|
19
25
|
opts.on_tail("-?", "--help", "Show this message") do
|
20
26
|
puts opts
|
21
27
|
exit
|
@@ -36,11 +42,7 @@ if uri.to_s.strip.empty?
|
|
36
42
|
exit 1
|
37
43
|
end
|
38
44
|
|
39
|
-
|
40
|
-
@doc = Nokogiri(open(uri).read)
|
41
|
-
else
|
42
|
-
@doc = Nokogiri(File.read(uri))
|
43
|
-
end
|
45
|
+
@doc = parse_class.parse(open(uri).read)
|
44
46
|
|
45
47
|
puts "Your document is stored in @doc..."
|
46
48
|
IRB.start
|