nokogiri 1.4.7-java → 1.5.0.beta.1-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of nokogiri might be problematic. Click here for more details.

Files changed (178) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG.ja.rdoc +8 -83
  3. data/CHANGELOG.rdoc +6 -80
  4. data/Manifest.txt +4 -74
  5. data/README.ja.rdoc +5 -1
  6. data/README.rdoc +8 -22
  7. data/Rakefile +79 -60
  8. data/bin/nokogiri +1 -6
  9. data/deps.rip +5 -0
  10. data/ext/nokogiri/extconf.rb +32 -53
  11. data/ext/nokogiri/nokogiri.c +0 -2
  12. data/ext/nokogiri/nokogiri.h +0 -9
  13. data/ext/nokogiri/xml_document.c +0 -14
  14. data/ext/nokogiri/xml_dtd.c +2 -2
  15. data/ext/nokogiri/xml_io.c +7 -32
  16. data/ext/nokogiri/xml_node.c +31 -103
  17. data/ext/nokogiri/xml_node_set.c +8 -8
  18. data/ext/nokogiri/xml_reader.c +1 -20
  19. data/ext/nokogiri/xml_sax_parser.c +3 -5
  20. data/ext/nokogiri/xml_sax_parser_context.c +0 -40
  21. data/ext/nokogiri/xml_xpath_context.c +2 -35
  22. data/ext/nokogiri/xslt_stylesheet.c +6 -124
  23. data/lib/isorelax.jar +0 -0
  24. data/lib/jing.jar +0 -0
  25. data/lib/nekodtd.jar +0 -0
  26. data/lib/nekohtml.jar +0 -0
  27. data/lib/nokogiri.rb +7 -3
  28. data/lib/nokogiri/css.rb +3 -6
  29. data/lib/nokogiri/css/generated_parser.rb +669 -0
  30. data/lib/nokogiri/css/generated_tokenizer.rb +145 -0
  31. data/lib/nokogiri/css/parser.rb +70 -665
  32. data/lib/nokogiri/css/parser.y +1 -6
  33. data/lib/nokogiri/css/tokenizer.rb +3 -148
  34. data/lib/nokogiri/css/tokenizer.rex +1 -1
  35. data/lib/nokogiri/css/xpath_visitor.rb +14 -16
  36. data/lib/nokogiri/decorators/slop.rb +3 -5
  37. data/lib/nokogiri/html.rb +3 -2
  38. data/lib/nokogiri/html/document.rb +18 -134
  39. data/lib/nokogiri/html/document_fragment.rb +21 -26
  40. data/lib/nokogiri/html/element_description_defaults.rb +671 -0
  41. data/lib/nokogiri/html/sax/parser.rb +2 -6
  42. data/lib/nokogiri/nokogiri.jar +0 -0
  43. data/lib/nokogiri/version.rb +4 -9
  44. data/lib/nokogiri/xml/attribute_decl.rb +1 -1
  45. data/lib/nokogiri/xml/builder.rb +1 -1
  46. data/lib/nokogiri/xml/document.rb +3 -27
  47. data/lib/nokogiri/xml/document_fragment.rb +2 -9
  48. data/lib/nokogiri/xml/dtd.rb +1 -12
  49. data/lib/nokogiri/xml/element_decl.rb +1 -1
  50. data/lib/nokogiri/xml/entity_decl.rb +1 -1
  51. data/lib/nokogiri/xml/node.rb +75 -172
  52. data/lib/nokogiri/xml/node/save_options.rb +0 -10
  53. data/lib/nokogiri/xml/node_set.rb +3 -28
  54. data/lib/nokogiri/xml/parse_options.rb +0 -8
  55. data/lib/nokogiri/xml/reader.rb +6 -44
  56. data/lib/nokogiri/xml/sax/document.rb +5 -9
  57. data/lib/nokogiri/xml/schema.rb +1 -7
  58. data/lib/nokogiri/xslt.rb +5 -9
  59. data/lib/xercesImpl.jar +0 -0
  60. data/tasks/cross_compile.rb +12 -27
  61. data/tasks/test.rb +0 -0
  62. data/test/css/test_parser.rb +19 -40
  63. data/test/css/test_tokenizer.rb +0 -8
  64. data/test/helper.rb +1 -4
  65. data/test/html/sax/test_parser.rb +21 -47
  66. data/test/html/sax/test_parser_context.rb +2 -2
  67. data/test/html/test_document.rb +3 -58
  68. data/test/html/test_document_encoding.rb +0 -53
  69. data/test/html/test_document_fragment.rb +13 -82
  70. data/test/html/test_element_description.rb +4 -2
  71. data/test/html/test_node.rb +0 -9
  72. data/test/test_memory_leak.rb +2 -57
  73. data/test/test_nokogiri.rb +14 -20
  74. data/test/test_reader.rb +7 -47
  75. data/test/test_xslt_transforms.rb +5 -8
  76. data/test/xml/sax/test_parser.rb +17 -34
  77. data/test/xml/sax/test_parser_context.rb +0 -50
  78. data/test/xml/sax/test_push_parser.rb +1 -18
  79. data/test/xml/test_attr.rb +4 -31
  80. data/test/xml/test_attribute_decl.rb +7 -3
  81. data/test/xml/test_builder.rb +5 -5
  82. data/test/xml/test_cdata.rb +3 -3
  83. data/test/xml/test_document.rb +18 -15
  84. data/test/xml/test_document_fragment.rb +20 -19
  85. data/test/xml/test_dtd.rb +13 -18
  86. data/test/xml/test_element_content.rb +1 -1
  87. data/test/xml/test_element_decl.rb +1 -1
  88. data/test/xml/test_entity_decl.rb +12 -10
  89. data/test/xml/test_namespace.rb +7 -5
  90. data/test/xml/test_node.rb +15 -54
  91. data/test/xml/test_node_reparenting.rb +42 -85
  92. data/test/xml/test_node_set.rb +2 -61
  93. data/test/xml/test_schema.rb +0 -5
  94. data/test/xml/test_text.rb +2 -11
  95. data/test/xml/test_unparented_node.rb +1 -1
  96. data/test/xml/test_xpath.rb +7 -43
  97. metadata +442 -473
  98. metadata.gz.sig +0 -0
  99. data/.gemtest +0 -0
  100. data/ext/nokogiri/depend +0 -358
  101. data/ext/nokogiri/libcharset-1.dll +0 -0
  102. data/ext/nokogiri/libexslt.dll +0 -0
  103. data/ext/nokogiri/libiconv-2.dll +0 -0
  104. data/ext/nokogiri/libxml2.dll +0 -0
  105. data/ext/nokogiri/libxslt.dll +0 -0
  106. data/ext/nokogiri/xml_libxml2_hacks.c +0 -112
  107. data/ext/nokogiri/xml_libxml2_hacks.h +0 -12
  108. data/ext/nokogiri/zlib1.dll +0 -0
  109. data/lib/nokogiri/css/parser_extras.rb +0 -91
  110. data/lib/nokogiri/ffi/encoding_handler.rb +0 -42
  111. data/lib/nokogiri/ffi/html/document.rb +0 -28
  112. data/lib/nokogiri/ffi/html/element_description.rb +0 -81
  113. data/lib/nokogiri/ffi/html/entity_lookup.rb +0 -16
  114. data/lib/nokogiri/ffi/html/sax/parser_context.rb +0 -38
  115. data/lib/nokogiri/ffi/io_callbacks.rb +0 -42
  116. data/lib/nokogiri/ffi/libxml.rb +0 -420
  117. data/lib/nokogiri/ffi/structs/common_node.rb +0 -38
  118. data/lib/nokogiri/ffi/structs/html_elem_desc.rb +0 -24
  119. data/lib/nokogiri/ffi/structs/html_entity_desc.rb +0 -13
  120. data/lib/nokogiri/ffi/structs/xml_alloc.rb +0 -16
  121. data/lib/nokogiri/ffi/structs/xml_attr.rb +0 -20
  122. data/lib/nokogiri/ffi/structs/xml_attribute.rb +0 -27
  123. data/lib/nokogiri/ffi/structs/xml_buffer.rb +0 -16
  124. data/lib/nokogiri/ffi/structs/xml_char_encoding_handler.rb +0 -11
  125. data/lib/nokogiri/ffi/structs/xml_document.rb +0 -117
  126. data/lib/nokogiri/ffi/structs/xml_dtd.rb +0 -28
  127. data/lib/nokogiri/ffi/structs/xml_element.rb +0 -26
  128. data/lib/nokogiri/ffi/structs/xml_element_content.rb +0 -17
  129. data/lib/nokogiri/ffi/structs/xml_entity.rb +0 -32
  130. data/lib/nokogiri/ffi/structs/xml_enumeration.rb +0 -12
  131. data/lib/nokogiri/ffi/structs/xml_node.rb +0 -28
  132. data/lib/nokogiri/ffi/structs/xml_node_set.rb +0 -53
  133. data/lib/nokogiri/ffi/structs/xml_notation.rb +0 -11
  134. data/lib/nokogiri/ffi/structs/xml_ns.rb +0 -15
  135. data/lib/nokogiri/ffi/structs/xml_parser_context.rb +0 -20
  136. data/lib/nokogiri/ffi/structs/xml_parser_input.rb +0 -19
  137. data/lib/nokogiri/ffi/structs/xml_relax_ng.rb +0 -14
  138. data/lib/nokogiri/ffi/structs/xml_sax_handler.rb +0 -51
  139. data/lib/nokogiri/ffi/structs/xml_sax_push_parser_context.rb +0 -124
  140. data/lib/nokogiri/ffi/structs/xml_schema.rb +0 -13
  141. data/lib/nokogiri/ffi/structs/xml_syntax_error.rb +0 -31
  142. data/lib/nokogiri/ffi/structs/xml_text_reader.rb +0 -12
  143. data/lib/nokogiri/ffi/structs/xml_xpath_context.rb +0 -38
  144. data/lib/nokogiri/ffi/structs/xml_xpath_object.rb +0 -35
  145. data/lib/nokogiri/ffi/structs/xml_xpath_parser_context.rb +0 -20
  146. data/lib/nokogiri/ffi/structs/xslt_stylesheet.rb +0 -13
  147. data/lib/nokogiri/ffi/weak_bucket.rb +0 -40
  148. data/lib/nokogiri/ffi/xml/attr.rb +0 -41
  149. data/lib/nokogiri/ffi/xml/attribute_decl.rb +0 -27
  150. data/lib/nokogiri/ffi/xml/cdata.rb +0 -19
  151. data/lib/nokogiri/ffi/xml/comment.rb +0 -18
  152. data/lib/nokogiri/ffi/xml/document.rb +0 -174
  153. data/lib/nokogiri/ffi/xml/document_fragment.rb +0 -21
  154. data/lib/nokogiri/ffi/xml/dtd.rb +0 -67
  155. data/lib/nokogiri/ffi/xml/element_content.rb +0 -43
  156. data/lib/nokogiri/ffi/xml/element_decl.rb +0 -19
  157. data/lib/nokogiri/ffi/xml/entity_decl.rb +0 -36
  158. data/lib/nokogiri/ffi/xml/entity_reference.rb +0 -19
  159. data/lib/nokogiri/ffi/xml/namespace.rb +0 -44
  160. data/lib/nokogiri/ffi/xml/node.rb +0 -559
  161. data/lib/nokogiri/ffi/xml/node_set.rb +0 -150
  162. data/lib/nokogiri/ffi/xml/processing_instruction.rb +0 -20
  163. data/lib/nokogiri/ffi/xml/reader.rb +0 -236
  164. data/lib/nokogiri/ffi/xml/relax_ng.rb +0 -85
  165. data/lib/nokogiri/ffi/xml/sax/parser.rb +0 -143
  166. data/lib/nokogiri/ffi/xml/sax/parser_context.rb +0 -79
  167. data/lib/nokogiri/ffi/xml/sax/push_parser.rb +0 -51
  168. data/lib/nokogiri/ffi/xml/schema.rb +0 -109
  169. data/lib/nokogiri/ffi/xml/syntax_error.rb +0 -98
  170. data/lib/nokogiri/ffi/xml/text.rb +0 -18
  171. data/lib/nokogiri/ffi/xml/xpath.rb +0 -9
  172. data/lib/nokogiri/ffi/xml/xpath_context.rb +0 -153
  173. data/lib/nokogiri/ffi/xslt/stylesheet.rb +0 -77
  174. data/test/decorators/test_slop.rb +0 -16
  175. data/test/ffi/test_document.rb +0 -35
  176. data/test/files/encoding.html +0 -82
  177. data/test/files/encoding.xhtml +0 -84
  178. data/test/xslt/test_custom_functions.rb +0 -94
@@ -1,94 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- require "helper"
4
-
5
- module Nokogiri
6
- module XSLT
7
- class TestCustomFunctions < Nokogiri::TestCase
8
- def setup
9
- super
10
- @xml = Nokogiri.XML(<<-EOXML)
11
- <?xml version="1.0" encoding="UTF-8"?>
12
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
13
- "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
14
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
15
- <head>
16
- <meta http-equiv="Content-type" content="application/xhtml+xml"/>
17
- <title>Foo</title>
18
- </head>
19
- <body>
20
- <h1>Foo</h1>
21
- <p>Lorem ipsum.</p>
22
- </body>
23
- </html>
24
- EOXML
25
- end
26
-
27
- def test_function
28
- skip("xslt custom functions not implemented under FFI") if Nokogiri.ffi?
29
- foo = Class.new do
30
- def capitalize nodes
31
- nodes.first.content.upcase
32
- end
33
- end
34
-
35
- XSLT.register "http://e.org/functions", foo
36
-
37
- xsl = Nokogiri.XSLT(<<-EOXSL)
38
- <?xml version="1.0"?>
39
- <xsl:stylesheet version="1.0"
40
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
41
- xmlns:f="http://e.org/functions"
42
- extension-element-prefixes="f">
43
-
44
- <xsl:template match="text()">
45
- <xsl:copy-of select="f:capitalize(.)"/>
46
- </xsl:template>
47
-
48
- <xsl:template match="@*|node()">
49
- <xsl:copy>
50
- <xsl:apply-templates select="@*|node()"/>
51
- <xsl:apply-imports/>
52
- </xsl:copy>
53
- </xsl:template>
54
-
55
- </xsl:stylesheet>
56
- EOXSL
57
- result = xsl.transform @xml
58
- assert_equal 'FOO', result.css('title').first.text
59
- end
60
-
61
- def test_function_XSLT
62
- skip("xslt custom functions not implemented under FFI") if Nokogiri.ffi?
63
- foo = Class.new do
64
- def america nodes
65
- nodes.first.content.upcase
66
- end
67
- end
68
-
69
- xsl = Nokogiri.XSLT(<<-EOXSL, "http://e.org/functions" => foo)
70
- <?xml version="1.0"?>
71
- <xsl:stylesheet version="1.0"
72
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
73
- xmlns:f="http://e.org/functions"
74
- extension-element-prefixes="f">
75
-
76
- <xsl:template match="text()">
77
- <xsl:copy-of select="f:america(.)"/>
78
- </xsl:template>
79
-
80
- <xsl:template match="@*|node()">
81
- <xsl:copy>
82
- <xsl:apply-templates select="@*|node()"/>
83
- <xsl:apply-imports/>
84
- </xsl:copy>
85
- </xsl:template>
86
-
87
- </xsl:stylesheet>
88
- EOXSL
89
- result = xsl.transform @xml
90
- assert_equal 'FOO', result.css('title').first.text
91
- end
92
- end
93
- end
94
- end