nokogiri 1.4.7-x86-mswin32-60 → 1.5.0-x86-mswin32-60

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.

Files changed (132) hide show
  1. data/CHANGELOG.ja.rdoc +59 -1
  2. data/CHANGELOG.rdoc +51 -2
  3. data/Manifest.txt +66 -66
  4. data/README.ja.rdoc +4 -0
  5. data/README.rdoc +31 -3
  6. data/Rakefile +111 -135
  7. data/bin/nokogiri +1 -2
  8. data/ext/nokogiri/extconf.rb +9 -3
  9. data/ext/nokogiri/nokogiri.c +21 -3
  10. data/ext/nokogiri/nokogiri.h +0 -2
  11. data/ext/nokogiri/xml_node.c +0 -6
  12. data/ext/nokogiri/xml_relax_ng.c +0 -7
  13. data/ext/nokogiri/xml_sax_parser.c +9 -4
  14. data/ext/nokogiri/xslt_stylesheet.c +5 -1
  15. data/lib/nokogiri.rb +19 -25
  16. data/lib/nokogiri/1.8/nokogiri.so +0 -0
  17. data/lib/nokogiri/1.9/nokogiri.so +0 -0
  18. data/lib/nokogiri/css.rb +0 -1
  19. data/lib/nokogiri/html.rb +1 -0
  20. data/lib/nokogiri/html/document.rb +9 -2
  21. data/lib/nokogiri/html/element_description_defaults.rb +671 -0
  22. data/lib/nokogiri/version.rb +76 -31
  23. data/lib/nokogiri/xml/attribute_decl.rb +1 -1
  24. data/lib/nokogiri/xml/builder.rb +7 -0
  25. data/lib/nokogiri/xml/document.rb +17 -1
  26. data/lib/nokogiri/xml/document_fragment.rb +14 -0
  27. data/lib/nokogiri/xml/dtd.rb +1 -1
  28. data/lib/nokogiri/xml/element_decl.rb +1 -1
  29. data/lib/nokogiri/xml/entity_decl.rb +1 -1
  30. data/lib/nokogiri/xml/node.rb +39 -15
  31. data/lib/nokogiri/xml/node/save_options.rb +14 -5
  32. data/lib/nokogiri/xml/node_set.rb +7 -0
  33. data/lib/nokogiri/xml/reader.rb +2 -2
  34. data/lib/nokogiri/xml/sax/document.rb +2 -2
  35. data/lib/nokogiri/xslt/stylesheet.rb +1 -1
  36. data/nokogiri_help_responses.md +40 -0
  37. data/tasks/cross_compile.rb +134 -155
  38. data/tasks/nokogiri.org.rb +18 -0
  39. data/tasks/test.rb +2 -2
  40. data/test/files/metacharset.html +10 -0
  41. data/test/files/noencoding.html +47 -0
  42. data/test/helper.rb +2 -1
  43. data/test/html/sax/test_parser.rb +22 -5
  44. data/test/html/test_document.rb +21 -2
  45. data/test/html/test_document_encoding.rb +9 -1
  46. data/test/html/test_document_fragment.rb +5 -3
  47. data/test/html/test_element_description.rb +4 -2
  48. data/test/test_memory_leak.rb +4 -39
  49. data/test/test_nokogiri.rb +14 -20
  50. data/test/test_reader.rb +12 -8
  51. data/test/xml/node/test_save_options.rb +10 -2
  52. data/test/xml/sax/test_parser.rb +14 -7
  53. data/test/xml/test_attribute_decl.rb +7 -3
  54. data/test/xml/test_builder.rb +17 -0
  55. data/test/xml/test_document.rb +31 -4
  56. data/test/xml/test_dtd.rb +13 -3
  57. data/test/xml/test_element_content.rb +1 -1
  58. data/test/xml/test_element_decl.rb +1 -1
  59. data/test/xml/test_entity_decl.rb +12 -10
  60. data/test/xml/test_namespace.rb +7 -5
  61. data/test/xml/test_node.rb +21 -10
  62. data/test/xml/test_node_reparenting.rb +16 -3
  63. data/test/xml/test_node_set.rb +34 -0
  64. data/test/xslt/test_custom_functions.rb +2 -2
  65. data/test/xslt/test_exception_handling.rb +37 -0
  66. metadata +110 -88
  67. data/lib/nokogiri/ffi/encoding_handler.rb +0 -42
  68. data/lib/nokogiri/ffi/html/document.rb +0 -28
  69. data/lib/nokogiri/ffi/html/element_description.rb +0 -81
  70. data/lib/nokogiri/ffi/html/entity_lookup.rb +0 -16
  71. data/lib/nokogiri/ffi/html/sax/parser_context.rb +0 -38
  72. data/lib/nokogiri/ffi/io_callbacks.rb +0 -42
  73. data/lib/nokogiri/ffi/libxml.rb +0 -420
  74. data/lib/nokogiri/ffi/structs/common_node.rb +0 -38
  75. data/lib/nokogiri/ffi/structs/html_elem_desc.rb +0 -24
  76. data/lib/nokogiri/ffi/structs/html_entity_desc.rb +0 -13
  77. data/lib/nokogiri/ffi/structs/xml_alloc.rb +0 -16
  78. data/lib/nokogiri/ffi/structs/xml_attr.rb +0 -20
  79. data/lib/nokogiri/ffi/structs/xml_attribute.rb +0 -27
  80. data/lib/nokogiri/ffi/structs/xml_buffer.rb +0 -16
  81. data/lib/nokogiri/ffi/structs/xml_char_encoding_handler.rb +0 -11
  82. data/lib/nokogiri/ffi/structs/xml_document.rb +0 -117
  83. data/lib/nokogiri/ffi/structs/xml_dtd.rb +0 -28
  84. data/lib/nokogiri/ffi/structs/xml_element.rb +0 -26
  85. data/lib/nokogiri/ffi/structs/xml_element_content.rb +0 -17
  86. data/lib/nokogiri/ffi/structs/xml_entity.rb +0 -32
  87. data/lib/nokogiri/ffi/structs/xml_enumeration.rb +0 -12
  88. data/lib/nokogiri/ffi/structs/xml_node.rb +0 -28
  89. data/lib/nokogiri/ffi/structs/xml_node_set.rb +0 -53
  90. data/lib/nokogiri/ffi/structs/xml_notation.rb +0 -11
  91. data/lib/nokogiri/ffi/structs/xml_ns.rb +0 -15
  92. data/lib/nokogiri/ffi/structs/xml_parser_context.rb +0 -20
  93. data/lib/nokogiri/ffi/structs/xml_parser_input.rb +0 -19
  94. data/lib/nokogiri/ffi/structs/xml_relax_ng.rb +0 -14
  95. data/lib/nokogiri/ffi/structs/xml_sax_handler.rb +0 -51
  96. data/lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb +0 -124
  97. data/lib/nokogiri/ffi/structs/xml_schema.rb +0 -13
  98. data/lib/nokogiri/ffi/structs/xml_syntax_error.rb +0 -31
  99. data/lib/nokogiri/ffi/structs/xml_text_reader.rb +0 -12
  100. data/lib/nokogiri/ffi/structs/xml_xpath_context.rb +0 -38
  101. data/lib/nokogiri/ffi/structs/xml_xpath_object.rb +0 -35
  102. data/lib/nokogiri/ffi/structs/xml_xpath_parser_context.rb +0 -20
  103. data/lib/nokogiri/ffi/structs/xslt_stylesheet.rb +0 -13
  104. data/lib/nokogiri/ffi/weak_bucket.rb +0 -40
  105. data/lib/nokogiri/ffi/xml/attr.rb +0 -41
  106. data/lib/nokogiri/ffi/xml/attribute_decl.rb +0 -27
  107. data/lib/nokogiri/ffi/xml/cdata.rb +0 -19
  108. data/lib/nokogiri/ffi/xml/comment.rb +0 -18
  109. data/lib/nokogiri/ffi/xml/document.rb +0 -174
  110. data/lib/nokogiri/ffi/xml/document_fragment.rb +0 -21
  111. data/lib/nokogiri/ffi/xml/dtd.rb +0 -67
  112. data/lib/nokogiri/ffi/xml/element_content.rb +0 -43
  113. data/lib/nokogiri/ffi/xml/element_decl.rb +0 -19
  114. data/lib/nokogiri/ffi/xml/entity_decl.rb +0 -36
  115. data/lib/nokogiri/ffi/xml/entity_reference.rb +0 -19
  116. data/lib/nokogiri/ffi/xml/namespace.rb +0 -44
  117. data/lib/nokogiri/ffi/xml/node.rb +0 -559
  118. data/lib/nokogiri/ffi/xml/node_set.rb +0 -150
  119. data/lib/nokogiri/ffi/xml/processing_instruction.rb +0 -20
  120. data/lib/nokogiri/ffi/xml/reader.rb +0 -236
  121. data/lib/nokogiri/ffi/xml/relax_ng.rb +0 -85
  122. data/lib/nokogiri/ffi/xml/sax/parser.rb +0 -143
  123. data/lib/nokogiri/ffi/xml/sax/parser_context.rb +0 -79
  124. data/lib/nokogiri/ffi/xml/sax/push_parser.rb +0 -51
  125. data/lib/nokogiri/ffi/xml/schema.rb +0 -109
  126. data/lib/nokogiri/ffi/xml/syntax_error.rb +0 -98
  127. data/lib/nokogiri/ffi/xml/text.rb +0 -18
  128. data/lib/nokogiri/ffi/xml/xpath.rb +0 -9
  129. data/lib/nokogiri/ffi/xml/xpath_context.rb +0 -153
  130. data/lib/nokogiri/ffi/xslt/stylesheet.rb +0 -77
  131. data/lib/nokogiri/version_warning.rb +0 -14
  132. data/test/ffi/test_document.rb +0 -35
@@ -1,3 +1,53 @@
1
+ == 1.5.0 / 2011年7月1日
2
+
3
+ * Notes
4
+
5
+ * See changelog from 1.4.7
6
+
7
+ * Features
8
+
9
+ * extracted sets of Node::SaveOptions into Node::SaveOptions::DEFAULT_{X,H,XH}TML (refactor)
10
+
11
+ * Bugfixes
12
+
13
+ * default output of XML on JRuby is no longer formatted due to
14
+ inconsistent whitespace handling. #415
15
+ * (JRuby) making empty NodeSets with null `nodes` member safe to operate on. #443
16
+ * Fix a bug in advanced encoding detection that leads to partially
17
+ duplicated document when parsing an HTML file with unknown
18
+ encoding.
19
+ * Add support for <meta charset="...">.
20
+
21
+
22
+ == 1.5.0 beta3 2010年12月2日
23
+
24
+ * 註
25
+
26
+ * JRubyでの性能改善
27
+ * 1.4.4からの変更点を参照
28
+
29
+ * バグの修正
30
+
31
+ * Node#inner_textはnilを返さなくなった. (JRuby) #264
32
+
33
+ == 1.5.0 beta2 2010年7月30日
34
+
35
+ * 註
36
+
37
+ * 1.4.3からの変更点を参照
38
+
39
+ == 1.5.0 beta1 2010年5月22日
40
+
41
+ * 註
42
+
43
+ * 新しいピュアJavaバックエンドによりJRubyサポートを追加
44
+
45
+ * 廃止
46
+
47
+ * Ruby 1.8.6は非推奨となった. インストールできるかもしれないが、正式なサポートは終了.
48
+ * LibXML 2.6.16および古いバージョンは非推奨. インストールできない.
49
+ * FFIサポートは削除された.
50
+
1
51
  === 1.4.7 / 2011年7月1日
2
52
 
3
53
  * バグの修正
@@ -11,7 +61,7 @@
11
61
  * このバージョンは、1.4.5と機能的に同じです
12
62
  * Rubyの1.8.6のサポートが復元されている
13
63
 
14
- === 1.4.5 / 2011年6月15日
64
+ === 1.4.5 / 未リリース
15
65
 
16
66
  * 新機能
17
67
 
@@ -60,6 +110,7 @@
60
110
  * XML::Reader#empty_element? - 子の無いエレメントにtrueを返す  #262
61
111
  * Node#remove_namespaces! - 1.4.2では 名前空間のみを取り除いていたが、
62
112
  1.4.3 では名前空間及び、名前空間宣言も取り除く #294
113
+ * NodeSet#{at_xpath,at_css,>} はNodeの同名メソッドと同様の動作
63
114
 
64
115
  * バグの修正
65
116
 
@@ -72,6 +123,8 @@
72
123
  * xmlFirstElementChild et al.による libxml2バージョンでの不適合性を修正 #303
73
124
  * XML::Attr#add_namespace (!)文字通りの機能実現!  #252
74
125
  * HTML::DocumentFragment が文字列に存在するエンコードを使用 #305
126
+ * CSS3の間接セレクタ"E ~ F G"がXPathの"//F//G[preceding-sibling::E]"へと
127
+ 誤変換されてしまうのを修正
75
128
 
76
129
  === 1.4.2 2010年5月22日
77
130
 
@@ -93,6 +146,10 @@
93
146
  * Nokogiri::XML::Node#first_element_child は一番最初のELEMENT子ノードを返す
94
147
  * Nokogiri::XML::Node#last_element_child は最後のELEMENT子ノードを返す
95
148
  * Nokogiri::XML::Node#elements は全てのELEMENT子ノードを返す
149
+ * Nokogiri::XML::Node#add_child, #add_previous_sibling, #before,
150
+ #add_next_sibling, #after, #inner_html, #swap, #replaceはNode,
151
+ DocumentFragment, NodeSetおよびマークアップ文字列を受け付ける
152
+ * Node#fragment? はノードがDocumentFragmentかどうかを示す
96
153
 
97
154
  * バグの修正
98
155
 
@@ -111,6 +168,7 @@
111
168
  GH #204
112
169
  * XML::DocumentFragment はML::Node#parse を使用して子を限定する
113
170
  * XML Reader内のメモリリーク修正  sdorさん、ありがとう! GH#244
171
+ * Node#replaceはRDocの通り新しい子ノードを返す(selfを返していた)
114
172
 
115
173
  * ノート
116
174
 
@@ -1,3 +1,52 @@
1
+ == 1.5.0 / 2011-07-01
2
+
3
+ * Notes
4
+
5
+ * See changelog from 1.4.7
6
+
7
+ * Features
8
+
9
+ * extracted sets of Node::SaveOptions into Node::SaveOptions::DEFAULT_{X,H,XH}TML (refactor)
10
+
11
+ * Bugfixes
12
+
13
+ * default output of XML on JRuby is no longer formatted due to
14
+ inconsistent whitespace handling. #415
15
+ * (JRuby) making empty NodeSets with null `nodes` member safe to operate on. #443
16
+ * Fix a bug in advanced encoding detection that leads to partially
17
+ duplicated document when parsing an HTML file with unknown
18
+ encoding.
19
+ * Add support for <meta charset="...">.
20
+
21
+ == 1.5.0 beta3 / 2010/12/02
22
+
23
+ * Notes
24
+
25
+ * JRuby performance tuning
26
+ * See changelog from 1.4.4
27
+
28
+ * Bugfixes
29
+
30
+ * Node#inner_text no longer returns nil. (JRuby) #264
31
+
32
+ == 1.5.0 beta2 / 2010/07/30
33
+
34
+ * Notes
35
+
36
+ * See changelog from 1.4.3
37
+
38
+ == 1.5.0 beta1 / 2010/05/22
39
+
40
+ * Notes
41
+
42
+ * JRuby support is provided by a new pure-java backend.
43
+
44
+ * Deprecations
45
+
46
+ * Ruby 1.8.6 is deprecated. Nokogiri will install, but official support is ended.
47
+ * LibXML 2.6.16 and earlier are deprecated. Nokogiri will refuse to install.
48
+ * FFI support is removed.
49
+
1
50
  === 1.4.7 / 2011-07-01
2
51
 
3
52
  * Bugfixes
@@ -13,7 +62,7 @@
13
62
  * This version is functionally identical to 1.4.5.
14
63
  * Ruby 1.8.6 support has been restored.
15
64
 
16
- === 1.4.5 / 2011-06-15
65
+ === 1.4.5 / 2011-05-19
17
66
 
18
67
  * New Features
19
68
 
@@ -81,7 +130,7 @@
81
130
  * XML::Attr#add_namespace now works as expected. #252
82
131
  * HTML::DocumentFragment uses the string's encoding. #305
83
132
  * Fix the CSS3 selector translation rule for the general sibling combinator
84
- (a.k.a. preceding selector) that incorrectly converted "E + F G" to
133
+ (a.k.a. preceding selector) that incorrectly converted "E ~ F G" to
85
134
  "//F//G[preceding-sibling::E]".
86
135
 
87
136
  === 1.4.2 / 2010/05/22
@@ -7,6 +7,61 @@ README.ja.rdoc
7
7
  README.rdoc
8
8
  Rakefile
9
9
  bin/nokogiri
10
+ ext/java/nokogiri/EncodingHandler.java
11
+ ext/java/nokogiri/HtmlDocument.java
12
+ ext/java/nokogiri/HtmlElementDescription.java
13
+ ext/java/nokogiri/HtmlEntityLookup.java
14
+ ext/java/nokogiri/HtmlSaxParserContext.java
15
+ ext/java/nokogiri/NokogiriService.java
16
+ ext/java/nokogiri/XmlAttr.java
17
+ ext/java/nokogiri/XmlAttributeDecl.java
18
+ ext/java/nokogiri/XmlCdata.java
19
+ ext/java/nokogiri/XmlComment.java
20
+ ext/java/nokogiri/XmlDocument.java
21
+ ext/java/nokogiri/XmlDocumentFragment.java
22
+ ext/java/nokogiri/XmlDtd.java
23
+ ext/java/nokogiri/XmlElement.java
24
+ ext/java/nokogiri/XmlElementContent.java
25
+ ext/java/nokogiri/XmlElementDecl.java
26
+ ext/java/nokogiri/XmlEntityDecl.java
27
+ ext/java/nokogiri/XmlEntityReference.java
28
+ ext/java/nokogiri/XmlNamespace.java
29
+ ext/java/nokogiri/XmlNode.java
30
+ ext/java/nokogiri/XmlNodeSet.java
31
+ ext/java/nokogiri/XmlProcessingInstruction.java
32
+ ext/java/nokogiri/XmlReader.java
33
+ ext/java/nokogiri/XmlRelaxng.java
34
+ ext/java/nokogiri/XmlSaxParserContext.java
35
+ ext/java/nokogiri/XmlSaxPushParser.java
36
+ ext/java/nokogiri/XmlSchema.java
37
+ ext/java/nokogiri/XmlSyntaxError.java
38
+ ext/java/nokogiri/XmlText.java
39
+ ext/java/nokogiri/XmlXpathContext.java
40
+ ext/java/nokogiri/XsltStylesheet.java
41
+ ext/java/nokogiri/internals/HtmlDomParserContext.java
42
+ ext/java/nokogiri/internals/NokogiriDocumentCache.java
43
+ ext/java/nokogiri/internals/NokogiriErrorHandler.java
44
+ ext/java/nokogiri/internals/NokogiriHandler.java
45
+ ext/java/nokogiri/internals/NokogiriHelpers.java
46
+ ext/java/nokogiri/internals/NokogiriNamespaceCache.java
47
+ ext/java/nokogiri/internals/NokogiriNamespaceContext.java
48
+ ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler.java
49
+ ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler4NekoHtml.java
50
+ ext/java/nokogiri/internals/NokogiriStrictErrorHandler.java
51
+ ext/java/nokogiri/internals/NokogiriXPathFunction.java
52
+ ext/java/nokogiri/internals/NokogiriXPathFunctionResolver.java
53
+ ext/java/nokogiri/internals/NokogiriXPathVariableResolver.java
54
+ ext/java/nokogiri/internals/NokogiriXsltErrorListener.java
55
+ ext/java/nokogiri/internals/ParserContext.java
56
+ ext/java/nokogiri/internals/PushInputStream.java
57
+ ext/java/nokogiri/internals/ReaderNode.java
58
+ ext/java/nokogiri/internals/SaveContextVisitor.java
59
+ ext/java/nokogiri/internals/SchemaErrorHandler.java
60
+ ext/java/nokogiri/internals/XmlDeclHandler.java
61
+ ext/java/nokogiri/internals/XmlDomParser.java
62
+ ext/java/nokogiri/internals/XmlDomParserContext.java
63
+ ext/java/nokogiri/internals/XmlSaxParser.java
64
+ ext/java/nokogiri/internals/XsltExtensionFunction.java
10
65
  ext/nokogiri/depend
11
66
  ext/nokogiri/extconf.rb
12
67
  ext/nokogiri/html_document.c
@@ -75,6 +130,10 @@ ext/nokogiri/xml_xpath_context.c
75
130
  ext/nokogiri/xml_xpath_context.h
76
131
  ext/nokogiri/xslt_stylesheet.c
77
132
  ext/nokogiri/xslt_stylesheet.h
133
+ lib/isorelax.jar
134
+ lib/jing.jar
135
+ lib/nekodtd.jar
136
+ lib/nekohtml.jar
78
137
  lib/nokogiri.rb
79
138
  lib/nokogiri/css.rb
80
139
  lib/nokogiri/css/node.rb
@@ -86,81 +145,17 @@ lib/nokogiri/css/tokenizer.rb
86
145
  lib/nokogiri/css/tokenizer.rex
87
146
  lib/nokogiri/css/xpath_visitor.rb
88
147
  lib/nokogiri/decorators/slop.rb
89
- lib/nokogiri/ffi/encoding_handler.rb
90
- lib/nokogiri/ffi/html/document.rb
91
- lib/nokogiri/ffi/html/element_description.rb
92
- lib/nokogiri/ffi/html/entity_lookup.rb
93
- lib/nokogiri/ffi/html/sax/parser_context.rb
94
- lib/nokogiri/ffi/io_callbacks.rb
95
- lib/nokogiri/ffi/libxml.rb
96
- lib/nokogiri/ffi/structs/common_node.rb
97
- lib/nokogiri/ffi/structs/html_elem_desc.rb
98
- lib/nokogiri/ffi/structs/html_entity_desc.rb
99
- lib/nokogiri/ffi/structs/xml_alloc.rb
100
- lib/nokogiri/ffi/structs/xml_attr.rb
101
- lib/nokogiri/ffi/structs/xml_attribute.rb
102
- lib/nokogiri/ffi/structs/xml_buffer.rb
103
- lib/nokogiri/ffi/structs/xml_char_encoding_handler.rb
104
- lib/nokogiri/ffi/structs/xml_document.rb
105
- lib/nokogiri/ffi/structs/xml_dtd.rb
106
- lib/nokogiri/ffi/structs/xml_element.rb
107
- lib/nokogiri/ffi/structs/xml_element_content.rb
108
- lib/nokogiri/ffi/structs/xml_entity.rb
109
- lib/nokogiri/ffi/structs/xml_enumeration.rb
110
- lib/nokogiri/ffi/structs/xml_node.rb
111
- lib/nokogiri/ffi/structs/xml_node_set.rb
112
- lib/nokogiri/ffi/structs/xml_notation.rb
113
- lib/nokogiri/ffi/structs/xml_ns.rb
114
- lib/nokogiri/ffi/structs/xml_parser_context.rb
115
- lib/nokogiri/ffi/structs/xml_parser_input.rb
116
- lib/nokogiri/ffi/structs/xml_relax_ng.rb
117
- lib/nokogiri/ffi/structs/xml_sax_handler.rb
118
- lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb
119
- lib/nokogiri/ffi/structs/xml_schema.rb
120
- lib/nokogiri/ffi/structs/xml_syntax_error.rb
121
- lib/nokogiri/ffi/structs/xml_text_reader.rb
122
- lib/nokogiri/ffi/structs/xml_xpath_context.rb
123
- lib/nokogiri/ffi/structs/xml_xpath_object.rb
124
- lib/nokogiri/ffi/structs/xml_xpath_parser_context.rb
125
- lib/nokogiri/ffi/structs/xslt_stylesheet.rb
126
- lib/nokogiri/ffi/weak_bucket.rb
127
- lib/nokogiri/ffi/xml/attr.rb
128
- lib/nokogiri/ffi/xml/attribute_decl.rb
129
- lib/nokogiri/ffi/xml/cdata.rb
130
- lib/nokogiri/ffi/xml/comment.rb
131
- lib/nokogiri/ffi/xml/document.rb
132
- lib/nokogiri/ffi/xml/document_fragment.rb
133
- lib/nokogiri/ffi/xml/dtd.rb
134
- lib/nokogiri/ffi/xml/element_content.rb
135
- lib/nokogiri/ffi/xml/element_decl.rb
136
- lib/nokogiri/ffi/xml/entity_decl.rb
137
- lib/nokogiri/ffi/xml/entity_reference.rb
138
- lib/nokogiri/ffi/xml/namespace.rb
139
- lib/nokogiri/ffi/xml/node.rb
140
- lib/nokogiri/ffi/xml/node_set.rb
141
- lib/nokogiri/ffi/xml/processing_instruction.rb
142
- lib/nokogiri/ffi/xml/reader.rb
143
- lib/nokogiri/ffi/xml/relax_ng.rb
144
- lib/nokogiri/ffi/xml/sax/parser.rb
145
- lib/nokogiri/ffi/xml/sax/parser_context.rb
146
- lib/nokogiri/ffi/xml/sax/push_parser.rb
147
- lib/nokogiri/ffi/xml/schema.rb
148
- lib/nokogiri/ffi/xml/syntax_error.rb
149
- lib/nokogiri/ffi/xml/text.rb
150
- lib/nokogiri/ffi/xml/xpath.rb
151
- lib/nokogiri/ffi/xml/xpath_context.rb
152
- lib/nokogiri/ffi/xslt/stylesheet.rb
153
148
  lib/nokogiri/html.rb
154
149
  lib/nokogiri/html/builder.rb
155
150
  lib/nokogiri/html/document.rb
156
151
  lib/nokogiri/html/document_fragment.rb
157
152
  lib/nokogiri/html/element_description.rb
153
+ lib/nokogiri/html/element_description_defaults.rb
158
154
  lib/nokogiri/html/entity_lookup.rb
159
155
  lib/nokogiri/html/sax/parser.rb
160
156
  lib/nokogiri/html/sax/parser_context.rb
161
157
  lib/nokogiri/syntax_error.rb
162
158
  lib/nokogiri/version.rb
163
- lib/nokogiri/version_warning.rb
164
159
  lib/nokogiri/xml.rb
165
160
  lib/nokogiri/xml/attr.rb
166
161
  lib/nokogiri/xml/attribute_decl.rb
@@ -198,15 +193,17 @@ lib/nokogiri/xml/xpath/syntax_error.rb
198
193
  lib/nokogiri/xml/xpath_context.rb
199
194
  lib/nokogiri/xslt.rb
200
195
  lib/nokogiri/xslt/stylesheet.rb
196
+ lib/xercesImpl.jar
201
197
  lib/xsd/xmlparser/nokogiri.rb
198
+ nokogiri_help_responses.md
202
199
  tasks/cross_compile.rb
200
+ tasks/nokogiri.org.rb
203
201
  tasks/test.rb
204
202
  test/css/test_nthiness.rb
205
203
  test/css/test_parser.rb
206
204
  test/css/test_tokenizer.rb
207
205
  test/css/test_xpath_visitor.rb
208
206
  test/decorators/test_slop.rb
209
- test/ffi/test_document.rb
210
207
  test/files/2ch.html
211
208
  test/files/address_book.rlx
212
209
  test/files/address_book.xml
@@ -217,6 +214,8 @@ test/files/encoding.xhtml
217
214
  test/files/exslt.xml
218
215
  test/files/exslt.xslt
219
216
  test/files/foo/foo.xsd
217
+ test/files/metacharset.html
218
+ test/files/noencoding.html
220
219
  test/files/po.xml
221
220
  test/files/po.xsd
222
221
  test/files/shift_jis.html
@@ -281,3 +280,4 @@ test/xml/test_text.rb
281
280
  test/xml/test_unparented_node.rb
282
281
  test/xml/test_xpath.rb
283
282
  test/xslt/test_custom_functions.rb
283
+ test/xslt/test_exception_handling.rb
@@ -81,6 +81,10 @@ Copyright (c) 2008 - 2010:
81
81
 
82
82
  * {Aaron Patterson}[http://tenderlovemaking.com]
83
83
  * {Mike Dalessio}[http://mike.daless.io]
84
+ * {Charles Nutter}[http://blog.headius.com]
85
+ * {Sergio Arbeo}[http://www.serabe.com]
86
+ * {Patrick Mahoney}[http://polycrystal.org]
87
+ * {Yoko Harada}[http://yokolet.blogspot.com]
84
88
 
85
89
  Permission is hereby granted, free of charge, to any person obtaining
86
90
  a copy of this software and associated documentation files (the
@@ -112,10 +112,34 @@ Binary packages are available for:
112
112
 
113
113
  == DEVELOPMENT:
114
114
 
115
- Developing Nokogiri requires racc and rexical.
115
+ === Developing on C Ruby (MRI)
116
116
 
117
- * rake install:deps
118
- * rake test
117
+ Developing Nokogiri requires racc and rexical to generate the parser and
118
+ tokenizer. To start development, make sure you have `libxml2` and `libxslt`
119
+ installed.
120
+
121
+ Then install hoe and rake-compiler:
122
+
123
+ $ gem install hoe rake-compiler racc rexical minitest
124
+
125
+ Then run rake:
126
+
127
+ $ rake
128
+
129
+ === Developing on JRuby
130
+
131
+ Currently, development with JRuby depends on C Ruby being installed. With
132
+ normal C Ruby, install racc and rexical:
133
+
134
+ $ gem install racc rexical
135
+
136
+ Make sure hoe and rake compiler are installed with JRuby:
137
+
138
+ $ jgem install hoe rake-compiler
139
+
140
+ Then run rake:
141
+
142
+ $ jruby -S rake
119
143
 
120
144
  == LICENSE:
121
145
 
@@ -125,6 +149,10 @@ Copyright (c) 2008 - 2010:
125
149
 
126
150
  * {Aaron Patterson}[http://tenderlovemaking.com]
127
151
  * {Mike Dalessio}[http://mike.daless.io]
152
+ * {Charles Nutter}[http://blog.headius.com]
153
+ * {Sergio Arbeo}[http://www.serabe.com]
154
+ * {Patrick Mahoney}[http://polycrystal.org]
155
+ * {Yoko Harada}[http://yokolet.blogspot.com]
128
156
 
129
157
  Permission is hereby granted, free of charge, to any person obtaining
130
158
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,147 +1,115 @@
1
1
  # -*- ruby -*-
2
-
3
2
  require 'rubygems'
4
- gem 'hoe', '>= 2.1.0'
5
- require 'hoe'
6
3
 
7
- windows = RUBY_PLATFORM =~ /(mswin|mingw)/i
8
- java = RUBY_PLATFORM =~ /java/
4
+ gem 'hoe'
5
+ require 'hoe'
6
+ Hoe.plugin :debugging
7
+ Hoe.plugin :git
8
+ Hoe.plugin :gemspec
9
+ Hoe.plugin :bundler
10
+ Hoe.add_include_dirs '.' # for ruby 1.9.2
9
11
 
10
12
  GENERATED_PARSER = "lib/nokogiri/css/parser.rb"
11
13
  GENERATED_TOKENIZER = "lib/nokogiri/css/tokenizer.rb"
12
- CROSS_DIR = File.join(File.dirname(__FILE__), 'tmp', 'cross')
14
+ CROSS_DIR = File.join(File.dirname(__FILE__), 'ports')
13
15
 
14
- # Make sure hoe-debugging is installed
15
- Hoe.plugin :debugging
16
- Hoe.plugin :git
16
+ def java?
17
+ !! (RUBY_PLATFORM =~ /java/)
18
+ end
19
+
20
+ require 'tasks/nokogiri.org'
17
21
 
18
22
  HOE = Hoe.spec 'nokogiri' do
19
- developer('Aaron Patterson', 'aaronp@rubyforge.org')
20
- developer('Mike Dalessio', 'mike.dalessio@gmail.com')
21
- self.readme_file = ['README', ENV['HLANG'], 'rdoc'].compact.join('.')
22
- self.history_file = ['CHANGELOG', ENV['HLANG'], 'rdoc'].compact.join('.')
23
- self.extra_rdoc_files = FileList['*.rdoc','ext/nokogiri/*.c']
24
- self.clean_globs = [
25
- "ext/nokogiri/*.dll",
23
+ developer 'Aaron Patterson', 'aaronp@rubyforge.org'
24
+ developer 'Mike Dalessio', 'mike.dalessio@gmail.com'
25
+ developer 'Yoko Harada', 'yokolet@gmail.com'
26
+
27
+ self.readme_file = ['README', ENV['HLANG'], 'rdoc'].compact.join('.')
28
+ self.history_file = ['CHANGELOG', ENV['HLANG'], 'rdoc'].compact.join('.')
29
+
30
+ self.extra_rdoc_files = FileList['*.rdoc','ext/nokogiri/*.c']
31
+
32
+ self.clean_globs += [
33
+ 'nokogiri.gemspec',
26
34
  'lib/nokogiri/*.{o,so,bundle,a,log,dll}',
35
+ 'lib/nokogiri/nokogiri.{so,dylib,rb,bundle}',
27
36
  'lib/nokogiri/nokogiri.rb',
28
37
  'lib/nokogiri/1.{8,9}',
29
38
  GENERATED_PARSER,
30
- GENERATED_TOKENIZER,
31
- CROSS_DIR
39
+ GENERATED_TOKENIZER
32
40
  ]
33
41
 
34
- %w{ racc rexical rake-compiler }.each do |dep|
35
- extra_dev_deps << [dep, '>= 0']
36
- end
37
- extra_dev_deps << ["minitest", ">= 1.6.0"]
42
+ self.extra_dev_deps += [
43
+ ["racc", ">= 1.4.6"],
44
+ ["rexical", ">= 1.0.5"],
45
+ ["rake-compiler", ">= 0.7.9"],
46
+ ["minitest", "~> 2.2.2"],
47
+ ["mini_portile", ">= 0.2.2"],
48
+ ["hoe-debugging", ">= 0"],
49
+ ["hoe-git", ">= 0"],
50
+ ["hoe-gemspec", ">= 0"],
51
+ ["hoe-bundler", ">= 0"]
52
+ ]
38
53
 
39
- self.spec_extras = { :extensions => ["ext/nokogiri/extconf.rb"] }
54
+ if java?
55
+ self.spec_extras = { :platform => 'java' }
56
+ else
57
+ self.spec_extras = {
58
+ :extensions => ["ext/nokogiri/extconf.rb"],
59
+ :required_ruby_version => '>= 1.8.7'
60
+ }
61
+ end
40
62
 
41
63
  self.testlib = :minitest
42
64
  end
43
- Hoe.add_include_dirs '.'
44
-
45
- task :ws_docs do
46
- title = "#{HOE.name}-#{HOE.version} Documentation"
47
-
48
- options = []
49
- options << "--main=#{HOE.readme_file}"
50
- options << '--format=activerecord'
51
- options << '--threads=1'
52
- options << "--title=#{title.inspect}"
53
-
54
- options += HOE.spec.require_paths
55
- options += HOE.spec.extra_rdoc_files
56
- require 'rdoc/rdoc'
57
- ENV['RAILS_ROOT'] ||= File.expand_path(File.join('..', 'nokogiri_ws'))
58
- RDoc::RDoc.new.document options
59
- end
60
65
 
61
- unless java
62
- gem 'rake-compiler', '>= 0.4.1'
66
+ # ----------------------------------------
67
+
68
+ if java?
69
+ # TODO: clean this section up.
70
+ require "rake/javaextensiontask"
71
+ Rake::JavaExtensionTask.new("nokogiri", HOE.spec) do |ext|
72
+ jruby_home = RbConfig::CONFIG['prefix']
73
+ ext.ext_dir = 'ext/java'
74
+ ext.lib_dir = 'lib/nokogiri'
75
+ jars = ["#{jruby_home}/lib/jruby.jar"] + FileList['lib/*.jar']
76
+ ext.classpath = jars.map { |x| File.expand_path x }.join ':'
77
+ end
78
+
79
+ gem_build_path = File.join 'pkg', HOE.spec.full_name
80
+
81
+ task gem_build_path => [:compile] do
82
+ cp 'lib/nokogiri/nokogiri.jar', File.join(gem_build_path, 'lib', 'nokogiri')
83
+ HOE.spec.files += ['lib/nokogiri/nokogiri.jar']
84
+ end
85
+ else
86
+ require 'tasks/cross_compile'
63
87
  require "rake/extensiontask"
64
88
 
65
- RET = Rake::ExtensionTask.new("nokogiri", HOE.spec) do |ext|
66
- ext.lib_dir = File.join(*['lib', 'nokogiri', ENV['FAT_DIR']].compact)
89
+ HOE.spec.files.reject! { |f| f =~ %r{\.(java|jar)$} }
67
90
 
91
+ Rake::ExtensionTask.new("nokogiri", HOE.spec) do |ext|
92
+ ext.lib_dir = File.join(*['lib', 'nokogiri', ENV['FAT_DIR']].compact)
68
93
  ext.config_options << ENV['EXTOPTS']
69
- ext.cross_compile = true
94
+ ext.cross_compile = true
70
95
  ext.cross_platform = ["x86-mswin32-60", "x86-mingw32"]
71
- ext.cross_config_options <<
72
- "--with-xml2-include=#{File.join(CROSS_DIR, 'include', 'libxml2')}"
73
- ext.cross_config_options <<
74
- "--with-xml2-lib=#{File.join(CROSS_DIR, 'lib')}"
75
- ext.cross_config_options << "--with-iconv-dir=#{CROSS_DIR}"
76
- ext.cross_config_options << "--with-xslt-dir=#{CROSS_DIR}"
96
+ ext.cross_config_options << "--with-xml2-include=#{File.join($recipes[:libxml2].path, 'include', 'libxml2')}"
97
+ ext.cross_config_options << "--with-xml2-lib=#{File.join($recipes[:libxml2].path, 'lib')}"
98
+ ext.cross_config_options << "--with-iconv-dir=#{$recipes[:libiconv].path}"
99
+ ext.cross_config_options << "--with-xslt-dir=#{$recipes[:libxslt].path}"
77
100
  ext.cross_config_options << "--with-zlib-dir=#{CROSS_DIR}"
78
101
  end
79
102
  end
80
103
 
81
- namespace :gem do
82
- namespace :dev do
83
- task :spec => [ GENERATED_PARSER, GENERATED_TOKENIZER ] do
84
- File.open("#{HOE.name}.gemspec", 'w') do |f|
85
- HOE.spec.version = "#{HOE.version}.#{Time.now.strftime("%Y%m%d%H%M%S")}"
86
- f.write(HOE.spec.to_ruby)
87
- end
88
- end
89
- end
90
-
91
- desc "Build a gem targetted for JRuby"
92
- task :jruby => ['gem:jruby:spec'] do
93
- raise "ERROR: please run this task under jruby" unless java
94
- system "gem build nokogiri.gemspec"
95
- FileUtils.mkdir_p "pkg"
96
- FileUtils.mv Dir.glob("nokogiri*-java.gem"), "pkg"
97
- end
104
+ # ----------------------------------------
98
105
 
99
- namespace :jruby do
100
- task :spec => [GENERATED_PARSER, GENERATED_TOKENIZER, :"gem:jruby:dlls"] do
101
- File.open("#{HOE.name}.gemspec", 'w') do |f|
102
- HOE.spec.platform = 'java'
103
- HOE.spec.files << GENERATED_PARSER
104
- HOE.spec.files << GENERATED_TOKENIZER
105
- HOE.spec.files += Dir["ext/nokogiri/*.dll"]
106
- HOE.spec.extensions = []
107
- HOE.spec.add_dependency 'weakling', '>= 0.0.3'
108
- f.write(HOE.spec.to_ruby)
109
- end
110
- end
111
-
112
- task :dlls do
113
- def run cmd
114
- puts(cmd) || system(cmd) || raise("command failed")
115
- end
116
-
117
- dlldir = "tmp/dlls"
118
- FileUtils.mkdir_p dlldir
119
- Dir.chdir dlldir do
120
- unless File.exists? "nokogiri-1.4.3.1-java.gem"
121
- run "wget http://rubygems.org/downloads/nokogiri-1.4.3.1-java.gem"
122
- end
123
- unless File.exists? "data.tar.gz"
124
- run "tar -xf nokogiri-1.4.3.1-java.gem"
125
- end
126
- FileUtils.rm_rf "unpack"
127
- FileUtils.mkdir "unpack"
128
- Dir.chdir "unpack" do
129
- run "tar -zxf ../data.tar.gz"
130
- end
131
- end
132
-
133
- Dir["#{dlldir}/unpack/ext/nokogiri/*.dll"].each do |file|
134
- cp file, "ext/nokogiri"
135
- end
136
- end
137
- end
138
-
139
- task :spec => ['gem:dev:spec']
140
- end
106
+ desc "Generate css/parser.rb and css/tokenizer.rex"
107
+ task 'generate' => [GENERATED_PARSER, GENERATED_TOKENIZER]
108
+ task 'gem:spec' => 'generate' if Rake::Task.task_defined?("gem:spec")
141
109
 
142
110
  file GENERATED_PARSER => "lib/nokogiri/css/parser.y" do |t|
143
- racc = Config::CONFIG['target_os'] =~ /mswin32/ ? '' : `which racc`.strip
144
- racc = "#{::Config::CONFIG['bindir']}/racc" if racc.empty?
111
+ racc = RbConfig::CONFIG['target_os'] =~ /mswin32/ ? '' : `which racc`.strip
112
+ racc = "#{::RbConfig::CONFIG['bindir']}/racc" if racc.empty?
145
113
  sh "#{racc} -l -o #{t.name} #{t.prerequisites.first}"
146
114
  end
147
115
 
@@ -149,13 +117,13 @@ file GENERATED_TOKENIZER => "lib/nokogiri/css/tokenizer.rex" do |t|
149
117
  sh "rex --independent -o #{t.name} #{t.prerequisites.first}"
150
118
  end
151
119
 
152
- require 'tasks/test'
153
- begin
154
- require 'tasks/cross_compile' unless java
155
- rescue RuntimeError => e
156
- warn "WARNING: Could not perform some cross-compiling: #{e}"
120
+ [:compile, :check_manifest].each do |task_name|
121
+ Rake::Task[task_name].prerequisites << GENERATED_PARSER
122
+ Rake::Task[task_name].prerequisites << GENERATED_TOKENIZER
157
123
  end
158
124
 
125
+ # ----------------------------------------
126
+
159
127
  desc "set environment variables to build and/or test with debug options"
160
128
  task :debug do
161
129
  ENV['NOKOGIRI_DEBUG'] = "true"
@@ -163,29 +131,37 @@ task :debug do
163
131
  ENV['CFLAGS'] += " -DDEBUG"
164
132
  end
165
133
 
166
- # required_ruby_version
134
+ require 'tasks/test'
167
135
 
168
- # Only do this on unix, since we can't build on windows
169
- unless windows || java || ENV['NOKOGIRI_FFI']
170
- [:compile, :check_manifest].each do |task_name|
171
- Rake::Task[task_name].prerequisites << GENERATED_PARSER
172
- Rake::Task[task_name].prerequisites << GENERATED_TOKENIZER
136
+ Rake::Task[:test].prerequisites << :compile
137
+ Rake::Task[:test].prerequisites << :check_extra_deps unless java?
138
+ if Hoe.plugins.include?(:debugging)
139
+ ['valgrind', 'valgrind:mem', 'valgrind:mem0'].each do |task_name|
140
+ Rake::Task["test:#{task_name}"].prerequisites << :compile
173
141
  end
142
+ end
174
143
 
175
- Rake::Task[:test].prerequisites << :compile
176
- Rake::Task[:test].prerequisites << :check_extra_deps
177
- if Hoe.plugins.include?(:debugging)
178
- ['valgrind', 'valgrind:mem', 'valgrind:mem0'].each do |task_name|
179
- Rake::Task["test:#{task_name}"].prerequisites << :compile
180
- end
181
- end
182
- else
183
- [:test, :check_manifest].each do |task_name|
184
- if Rake::Task[task_name]
185
- Rake::Task[task_name].prerequisites << GENERATED_PARSER
186
- Rake::Task[task_name].prerequisites << GENERATED_TOKENIZER
144
+ # ----------------------------------------
145
+
146
+ desc "build a windows gem without all the ceremony."
147
+ task "gem:windows" => "gem" do
148
+ rake_compiler_config = YAML.load_file("#{ENV['HOME']}/.rake-compiler/config.yml")
149
+
150
+ # check that rake-compiler config contains the right patchlevels of 1.8.6 and 1.9.1. see #279.
151
+ ["1.8.6-p383", "1.9.1-p243"].each do |version|
152
+ majmin, patchlevel = version.split("-")
153
+ rbconfig = "rbconfig-#{majmin}"
154
+ unless rake_compiler_config.key?(rbconfig) && rake_compiler_config[rbconfig] =~ /-#{patchlevel}/
155
+ raise "rake-compiler '#{rbconfig}' not #{patchlevel}. try running 'env --unset=HOST rake-compiler cross-ruby VERSION=#{version}'"
187
156
  end
188
157
  end
158
+
159
+ # verify that --export-all is in the 1.9.1 rbconfig. see #279,#374,#375.
160
+ rbconfig_191 = rake_compiler_config["rbconfig-1.9.1"]
161
+ raise "rbconfig #{rbconfig_191} needs --export-all in its DLDFLAGS value" if File.read(rbconfig_191).grep(/CONFIG\["DLDFLAGS"\].*--export-all/).empty?
162
+
163
+ pkg_config_path = [:libxslt, :libxml2].collect { |pkg| File.join($recipes[pkg].path, "lib/pkgconfig") }.join(":")
164
+ sh("env PKG_CONFIG_PATH=#{pkg_config_path} RUBY_CC_VERSION=1.8.6:1.9.1 rake cross native gem") || raise("build failed!")
189
165
  end
190
166
 
191
167
  # vim: syntax=Ruby