nokogiri-backupify 1.5.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. data/.autotest +26 -0
  2. data/CHANGELOG.ja.rdoc +509 -0
  3. data/CHANGELOG.rdoc +490 -0
  4. data/Manifest.txt +274 -0
  5. data/README.ja.rdoc +106 -0
  6. data/README.rdoc +150 -0
  7. data/Rakefile +217 -0
  8. data/bin/nokogiri +54 -0
  9. data/deps.rip +5 -0
  10. data/ext/java/nokogiri/EncodingHandler.java +124 -0
  11. data/ext/java/nokogiri/HtmlDocument.java +146 -0
  12. data/ext/java/nokogiri/HtmlElementDescription.java +145 -0
  13. data/ext/java/nokogiri/HtmlEntityLookup.java +79 -0
  14. data/ext/java/nokogiri/HtmlSaxParserContext.java +256 -0
  15. data/ext/java/nokogiri/NokogiriService.java +466 -0
  16. data/ext/java/nokogiri/XmlAttr.java +183 -0
  17. data/ext/java/nokogiri/XmlAttributeDecl.java +130 -0
  18. data/ext/java/nokogiri/XmlCdata.java +89 -0
  19. data/ext/java/nokogiri/XmlComment.java +84 -0
  20. data/ext/java/nokogiri/XmlDocument.java +514 -0
  21. data/ext/java/nokogiri/XmlDocumentFragment.java +216 -0
  22. data/ext/java/nokogiri/XmlDtd.java +464 -0
  23. data/ext/java/nokogiri/XmlElement.java +221 -0
  24. data/ext/java/nokogiri/XmlElementContent.java +382 -0
  25. data/ext/java/nokogiri/XmlElementDecl.java +147 -0
  26. data/ext/java/nokogiri/XmlEntityDecl.java +161 -0
  27. data/ext/java/nokogiri/XmlEntityReference.java +75 -0
  28. data/ext/java/nokogiri/XmlNamespace.java +127 -0
  29. data/ext/java/nokogiri/XmlNode.java +1392 -0
  30. data/ext/java/nokogiri/XmlNodeSet.java +284 -0
  31. data/ext/java/nokogiri/XmlProcessingInstruction.java +103 -0
  32. data/ext/java/nokogiri/XmlReader.java +409 -0
  33. data/ext/java/nokogiri/XmlRelaxng.java +199 -0
  34. data/ext/java/nokogiri/XmlSaxParserContext.java +353 -0
  35. data/ext/java/nokogiri/XmlSaxPushParser.java +182 -0
  36. data/ext/java/nokogiri/XmlSchema.java +175 -0
  37. data/ext/java/nokogiri/XmlSyntaxError.java +114 -0
  38. data/ext/java/nokogiri/XmlText.java +135 -0
  39. data/ext/java/nokogiri/XmlXpathContext.java +175 -0
  40. data/ext/java/nokogiri/XsltStylesheet.java +181 -0
  41. data/ext/java/nokogiri/internals/HtmlDomParserContext.java +205 -0
  42. data/ext/java/nokogiri/internals/NokogiriDocumentCache.java +73 -0
  43. data/ext/java/nokogiri/internals/NokogiriErrorHandler.java +80 -0
  44. data/ext/java/nokogiri/internals/NokogiriHandler.java +326 -0
  45. data/ext/java/nokogiri/internals/NokogiriHelpers.java +583 -0
  46. data/ext/java/nokogiri/internals/NokogiriNamespaceCache.java +170 -0
  47. data/ext/java/nokogiri/internals/NokogiriNamespaceContext.java +118 -0
  48. data/ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler.java +73 -0
  49. data/ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler4NekoHtml.java +121 -0
  50. data/ext/java/nokogiri/internals/NokogiriStrictErrorHandler.java +78 -0
  51. data/ext/java/nokogiri/internals/NokogiriXPathFunction.java +120 -0
  52. data/ext/java/nokogiri/internals/NokogiriXPathFunctionResolver.java +56 -0
  53. data/ext/java/nokogiri/internals/ParserContext.java +278 -0
  54. data/ext/java/nokogiri/internals/PushInputStream.java +411 -0
  55. data/ext/java/nokogiri/internals/ReaderNode.java +473 -0
  56. data/ext/java/nokogiri/internals/SaveContext.java +282 -0
  57. data/ext/java/nokogiri/internals/SchemaErrorHandler.java +68 -0
  58. data/ext/java/nokogiri/internals/XmlDeclHandler.java +42 -0
  59. data/ext/java/nokogiri/internals/XmlDomParser.java +77 -0
  60. data/ext/java/nokogiri/internals/XmlDomParserContext.java +233 -0
  61. data/ext/java/nokogiri/internals/XmlSaxParser.java +65 -0
  62. data/ext/java/nokogiri/internals/XsltExtensionFunction.java +72 -0
  63. data/ext/nokogiri/depend +358 -0
  64. data/ext/nokogiri/extconf.rb +124 -0
  65. data/ext/nokogiri/html_document.c +154 -0
  66. data/ext/nokogiri/html_document.h +10 -0
  67. data/ext/nokogiri/html_element_description.c +276 -0
  68. data/ext/nokogiri/html_element_description.h +10 -0
  69. data/ext/nokogiri/html_entity_lookup.c +32 -0
  70. data/ext/nokogiri/html_entity_lookup.h +8 -0
  71. data/ext/nokogiri/html_sax_parser_context.c +94 -0
  72. data/ext/nokogiri/html_sax_parser_context.h +11 -0
  73. data/ext/nokogiri/nokogiri.c +92 -0
  74. data/ext/nokogiri/nokogiri.h +160 -0
  75. data/ext/nokogiri/xml_attr.c +94 -0
  76. data/ext/nokogiri/xml_attr.h +9 -0
  77. data/ext/nokogiri/xml_attribute_decl.c +70 -0
  78. data/ext/nokogiri/xml_attribute_decl.h +9 -0
  79. data/ext/nokogiri/xml_cdata.c +56 -0
  80. data/ext/nokogiri/xml_cdata.h +9 -0
  81. data/ext/nokogiri/xml_comment.c +54 -0
  82. data/ext/nokogiri/xml_comment.h +9 -0
  83. data/ext/nokogiri/xml_document.c +478 -0
  84. data/ext/nokogiri/xml_document.h +23 -0
  85. data/ext/nokogiri/xml_document_fragment.c +48 -0
  86. data/ext/nokogiri/xml_document_fragment.h +10 -0
  87. data/ext/nokogiri/xml_dtd.c +202 -0
  88. data/ext/nokogiri/xml_dtd.h +10 -0
  89. data/ext/nokogiri/xml_element_content.c +123 -0
  90. data/ext/nokogiri/xml_element_content.h +10 -0
  91. data/ext/nokogiri/xml_element_decl.c +69 -0
  92. data/ext/nokogiri/xml_element_decl.h +9 -0
  93. data/ext/nokogiri/xml_encoding_handler.c +79 -0
  94. data/ext/nokogiri/xml_encoding_handler.h +8 -0
  95. data/ext/nokogiri/xml_entity_decl.c +110 -0
  96. data/ext/nokogiri/xml_entity_decl.h +10 -0
  97. data/ext/nokogiri/xml_entity_reference.c +52 -0
  98. data/ext/nokogiri/xml_entity_reference.h +9 -0
  99. data/ext/nokogiri/xml_io.c +31 -0
  100. data/ext/nokogiri/xml_io.h +11 -0
  101. data/ext/nokogiri/xml_libxml2_hacks.c +112 -0
  102. data/ext/nokogiri/xml_libxml2_hacks.h +12 -0
  103. data/ext/nokogiri/xml_namespace.c +84 -0
  104. data/ext/nokogiri/xml_namespace.h +13 -0
  105. data/ext/nokogiri/xml_node.c +1384 -0
  106. data/ext/nokogiri/xml_node.h +13 -0
  107. data/ext/nokogiri/xml_node_set.c +418 -0
  108. data/ext/nokogiri/xml_node_set.h +9 -0
  109. data/ext/nokogiri/xml_processing_instruction.c +56 -0
  110. data/ext/nokogiri/xml_processing_instruction.h +9 -0
  111. data/ext/nokogiri/xml_reader.c +684 -0
  112. data/ext/nokogiri/xml_reader.h +10 -0
  113. data/ext/nokogiri/xml_relax_ng.c +161 -0
  114. data/ext/nokogiri/xml_relax_ng.h +9 -0
  115. data/ext/nokogiri/xml_sax_parser.c +288 -0
  116. data/ext/nokogiri/xml_sax_parser.h +39 -0
  117. data/ext/nokogiri/xml_sax_parser_context.c +199 -0
  118. data/ext/nokogiri/xml_sax_parser_context.h +10 -0
  119. data/ext/nokogiri/xml_sax_push_parser.c +115 -0
  120. data/ext/nokogiri/xml_sax_push_parser.h +9 -0
  121. data/ext/nokogiri/xml_schema.c +205 -0
  122. data/ext/nokogiri/xml_schema.h +9 -0
  123. data/ext/nokogiri/xml_syntax_error.c +58 -0
  124. data/ext/nokogiri/xml_syntax_error.h +13 -0
  125. data/ext/nokogiri/xml_text.c +50 -0
  126. data/ext/nokogiri/xml_text.h +9 -0
  127. data/ext/nokogiri/xml_xpath_context.c +309 -0
  128. data/ext/nokogiri/xml_xpath_context.h +9 -0
  129. data/ext/nokogiri/xslt_stylesheet.c +258 -0
  130. data/ext/nokogiri/xslt_stylesheet.h +9 -0
  131. data/lib/isorelax.jar +0 -0
  132. data/lib/jing.jar +0 -0
  133. data/lib/nekodtd.jar +0 -0
  134. data/lib/nekohtml.jar +0 -0
  135. data/lib/nokogiri.rb +143 -0
  136. data/lib/nokogiri/css.rb +23 -0
  137. data/lib/nokogiri/css/node.rb +99 -0
  138. data/lib/nokogiri/css/parser.rb +677 -0
  139. data/lib/nokogiri/css/parser.y +237 -0
  140. data/lib/nokogiri/css/parser_extras.rb +91 -0
  141. data/lib/nokogiri/css/syntax_error.rb +7 -0
  142. data/lib/nokogiri/css/tokenizer.rb +152 -0
  143. data/lib/nokogiri/css/tokenizer.rex +55 -0
  144. data/lib/nokogiri/css/xpath_visitor.rb +171 -0
  145. data/lib/nokogiri/decorators/slop.rb +35 -0
  146. data/lib/nokogiri/html.rb +36 -0
  147. data/lib/nokogiri/html/builder.rb +35 -0
  148. data/lib/nokogiri/html/document.rb +221 -0
  149. data/lib/nokogiri/html/document_fragment.rb +41 -0
  150. data/lib/nokogiri/html/element_description.rb +23 -0
  151. data/lib/nokogiri/html/element_description_defaults.rb +671 -0
  152. data/lib/nokogiri/html/entity_lookup.rb +13 -0
  153. data/lib/nokogiri/html/sax/parser.rb +52 -0
  154. data/lib/nokogiri/html/sax/parser_context.rb +16 -0
  155. data/lib/nokogiri/syntax_error.rb +4 -0
  156. data/lib/nokogiri/version.rb +35 -0
  157. data/lib/nokogiri/xml.rb +67 -0
  158. data/lib/nokogiri/xml/attr.rb +14 -0
  159. data/lib/nokogiri/xml/attribute_decl.rb +18 -0
  160. data/lib/nokogiri/xml/builder.rb +418 -0
  161. data/lib/nokogiri/xml/cdata.rb +11 -0
  162. data/lib/nokogiri/xml/character_data.rb +7 -0
  163. data/lib/nokogiri/xml/document.rb +218 -0
  164. data/lib/nokogiri/xml/document_fragment.rb +84 -0
  165. data/lib/nokogiri/xml/dtd.rb +22 -0
  166. data/lib/nokogiri/xml/element_content.rb +36 -0
  167. data/lib/nokogiri/xml/element_decl.rb +13 -0
  168. data/lib/nokogiri/xml/entity_decl.rb +19 -0
  169. data/lib/nokogiri/xml/namespace.rb +13 -0
  170. data/lib/nokogiri/xml/node.rb +907 -0
  171. data/lib/nokogiri/xml/node/save_options.rb +45 -0
  172. data/lib/nokogiri/xml/node_set.rb +350 -0
  173. data/lib/nokogiri/xml/notation.rb +6 -0
  174. data/lib/nokogiri/xml/parse_options.rb +85 -0
  175. data/lib/nokogiri/xml/pp.rb +2 -0
  176. data/lib/nokogiri/xml/pp/character_data.rb +18 -0
  177. data/lib/nokogiri/xml/pp/node.rb +56 -0
  178. data/lib/nokogiri/xml/processing_instruction.rb +8 -0
  179. data/lib/nokogiri/xml/reader.rb +112 -0
  180. data/lib/nokogiri/xml/relax_ng.rb +32 -0
  181. data/lib/nokogiri/xml/sax.rb +4 -0
  182. data/lib/nokogiri/xml/sax/document.rb +164 -0
  183. data/lib/nokogiri/xml/sax/parser.rb +115 -0
  184. data/lib/nokogiri/xml/sax/parser_context.rb +16 -0
  185. data/lib/nokogiri/xml/sax/push_parser.rb +60 -0
  186. data/lib/nokogiri/xml/schema.rb +57 -0
  187. data/lib/nokogiri/xml/syntax_error.rb +47 -0
  188. data/lib/nokogiri/xml/text.rb +9 -0
  189. data/lib/nokogiri/xml/xpath.rb +10 -0
  190. data/lib/nokogiri/xml/xpath/syntax_error.rb +11 -0
  191. data/lib/nokogiri/xml/xpath_context.rb +16 -0
  192. data/lib/nokogiri/xslt.rb +52 -0
  193. data/lib/nokogiri/xslt/stylesheet.rb +25 -0
  194. data/lib/xercesImpl.jar +0 -0
  195. data/lib/xsd/xmlparser/nokogiri.rb +90 -0
  196. data/tasks/cross_compile.rb +177 -0
  197. data/tasks/test.rb +94 -0
  198. data/test/css/test_nthiness.rb +159 -0
  199. data/test/css/test_parser.rb +303 -0
  200. data/test/css/test_tokenizer.rb +198 -0
  201. data/test/css/test_xpath_visitor.rb +85 -0
  202. data/test/decorators/test_slop.rb +16 -0
  203. data/test/files/2ch.html +108 -0
  204. data/test/files/address_book.rlx +12 -0
  205. data/test/files/address_book.xml +10 -0
  206. data/test/files/bar/bar.xsd +4 -0
  207. data/test/files/dont_hurt_em_why.xml +422 -0
  208. data/test/files/exslt.xml +8 -0
  209. data/test/files/exslt.xslt +35 -0
  210. data/test/files/foo/foo.xsd +4 -0
  211. data/test/files/po.xml +32 -0
  212. data/test/files/po.xsd +66 -0
  213. data/test/files/shift_jis.html +10 -0
  214. data/test/files/shift_jis.xml +5 -0
  215. data/test/files/snuggles.xml +3 -0
  216. data/test/files/staff.dtd +10 -0
  217. data/test/files/staff.xml +59 -0
  218. data/test/files/staff.xslt +32 -0
  219. data/test/files/tlm.html +850 -0
  220. data/test/files/valid_bar.xml +2 -0
  221. data/test/helper.rb +171 -0
  222. data/test/html/sax/test_parser.rb +136 -0
  223. data/test/html/sax/test_parser_context.rb +48 -0
  224. data/test/html/test_builder.rb +164 -0
  225. data/test/html/test_document.rb +457 -0
  226. data/test/html/test_document_encoding.rb +123 -0
  227. data/test/html/test_document_fragment.rb +255 -0
  228. data/test/html/test_element_description.rb +100 -0
  229. data/test/html/test_named_characters.rb +14 -0
  230. data/test/html/test_node.rb +190 -0
  231. data/test/html/test_node_encoding.rb +27 -0
  232. data/test/test_convert_xpath.rb +135 -0
  233. data/test/test_css_cache.rb +45 -0
  234. data/test/test_encoding_handler.rb +46 -0
  235. data/test/test_memory_leak.rb +52 -0
  236. data/test/test_nokogiri.rb +132 -0
  237. data/test/test_reader.rb +403 -0
  238. data/test/test_soap4r_sax.rb +52 -0
  239. data/test/test_xslt_transforms.rb +189 -0
  240. data/test/xml/node/test_save_options.rb +20 -0
  241. data/test/xml/node/test_subclass.rb +44 -0
  242. data/test/xml/sax/test_parser.rb +338 -0
  243. data/test/xml/sax/test_parser_context.rb +113 -0
  244. data/test/xml/sax/test_push_parser.rb +156 -0
  245. data/test/xml/test_attr.rb +65 -0
  246. data/test/xml/test_attribute_decl.rb +86 -0
  247. data/test/xml/test_builder.rb +210 -0
  248. data/test/xml/test_cdata.rb +50 -0
  249. data/test/xml/test_comment.rb +29 -0
  250. data/test/xml/test_document.rb +675 -0
  251. data/test/xml/test_document_encoding.rb +26 -0
  252. data/test/xml/test_document_fragment.rb +192 -0
  253. data/test/xml/test_dtd.rb +107 -0
  254. data/test/xml/test_dtd_encoding.rb +33 -0
  255. data/test/xml/test_element_content.rb +56 -0
  256. data/test/xml/test_element_decl.rb +73 -0
  257. data/test/xml/test_entity_decl.rb +122 -0
  258. data/test/xml/test_entity_reference.rb +21 -0
  259. data/test/xml/test_namespace.rb +70 -0
  260. data/test/xml/test_node.rb +899 -0
  261. data/test/xml/test_node_attributes.rb +34 -0
  262. data/test/xml/test_node_encoding.rb +107 -0
  263. data/test/xml/test_node_reparenting.rb +321 -0
  264. data/test/xml/test_node_set.rb +708 -0
  265. data/test/xml/test_parse_options.rb +52 -0
  266. data/test/xml/test_processing_instruction.rb +30 -0
  267. data/test/xml/test_reader_encoding.rb +126 -0
  268. data/test/xml/test_relax_ng.rb +60 -0
  269. data/test/xml/test_schema.rb +89 -0
  270. data/test/xml/test_syntax_error.rb +12 -0
  271. data/test/xml/test_text.rb +47 -0
  272. data/test/xml/test_unparented_node.rb +381 -0
  273. data/test/xml/test_xpath.rb +237 -0
  274. data/test/xslt/test_custom_functions.rb +94 -0
  275. metadata +525 -0
@@ -0,0 +1,237 @@
1
+ require "helper"
2
+
3
+ module Nokogiri
4
+ module XML
5
+ class TestXPath < Nokogiri::TestCase
6
+
7
+ # ** WHY ALL THOSE _if Nokogiri.uses_libxml?_ **
8
+ # Hi, my dear readers,
9
+ #
10
+ # After reading these tests you may be wondering why all those ugly
11
+ # if Nokogiri.uses_libxml? sparsed over the whole document. Well, let
12
+ # me explain it. While using XPath in Java, you need the extension
13
+ # functions to be in a namespace. This is not required by XPath, afaik,
14
+ # but it is an usual convention though.
15
+ #
16
+ # Furthermore, CSS does not support extension functions but it does in
17
+ # Nokogiri. Result: you cannot use them in JRuby impl. At least, until
18
+ # the CSS to XPath parser is patched, and let me say that there are more
19
+ # important features to add before that happens. I hope you will forgive
20
+ # me.
21
+ #
22
+ # Yours truly,
23
+ #
24
+ # The guy whose headaches belong to Nokogiri JRuby impl.
25
+
26
+
27
+ def setup
28
+ super
29
+
30
+ @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE)
31
+
32
+ @ns = @xml.root.namespaces
33
+
34
+ # TODO: Maybe I should move this to the original code.
35
+ @ns["nokogiri"] = "http://www.nokogiri.org/default_ns/ruby/extensions_functions"
36
+
37
+ @handler = Class.new {
38
+ attr_reader :things
39
+
40
+ def initialize
41
+ @things = []
42
+ end
43
+
44
+ def thing thing
45
+ @things << thing
46
+ thing
47
+ end
48
+
49
+ def returns_array node_set
50
+ @things << node_set.to_a
51
+ node_set.to_a
52
+ end
53
+
54
+ def my_filter set, attribute, value
55
+ set.find_all { |x| x[attribute] == value }
56
+ end
57
+
58
+ def saves_node_set node_set
59
+ @things = node_set
60
+ end
61
+ }.new
62
+ end
63
+
64
+ def test_variable_binding
65
+ assert_equal 4, @xml.xpath('//address[@domestic=$value]', nil, :value => 'Yes').length
66
+ end
67
+
68
+ def test_unknown_attribute
69
+ assert_equal 0, @xml.xpath('//employee[@id="asdfasdf"]/@fooo').length
70
+ assert_nil @xml.xpath('//employee[@id="asdfasdf"]/@fooo')[0]
71
+ end
72
+
73
+ def test_boolean
74
+ assert_equal false, @xml.xpath('1 = 2')
75
+ end
76
+
77
+ def test_number
78
+ assert_equal 2, @xml.xpath('1 + 1')
79
+ end
80
+
81
+ def test_string
82
+ assert_equal 'foo', @xml.xpath('concat("fo", "o")')
83
+ end
84
+
85
+ def test_css_search_uses_custom_selectors_with_arguments
86
+ set = if Nokogiri.uses_libxml?
87
+ @xml.css('employee > address:my_filter("domestic", "Yes")', @handler)
88
+ else
89
+ @xml.xpath("//employee/address[nokogiri:my_filter(., \"domestic\", \"Yes\")]", @ns, @handler)
90
+ end
91
+ assert set.length > 0
92
+ set.each do |node|
93
+ assert_equal 'Yes', node['domestic']
94
+ end
95
+ end
96
+
97
+ def test_css_search_uses_custom_selectors
98
+ set = @xml.xpath('//employee')
99
+ assert_nothing_raised do
100
+ if Nokogiri.uses_libxml?
101
+ @xml.css('employee:thing()', @handler)
102
+ else
103
+ @xml.xpath("//employee[nokogiri:thing(.)]", @ns, @handler)
104
+ end
105
+ end
106
+ assert_equal(set.length, @handler.things.length)
107
+ assert_equal(set.to_a, @handler.things.flatten)
108
+ end
109
+
110
+ def test_pass_self_to_function
111
+ set = if Nokogiri.uses_libxml?
112
+ @xml.xpath('//employee/address[my_filter(., "domestic", "Yes")]', @handler)
113
+ else
114
+ @xml.xpath('//employee/address[nokogiri:my_filter(., "domestic", "Yes")]', @ns, @handler)
115
+ end
116
+ assert set.length > 0
117
+ set.each do |node|
118
+ assert_equal 'Yes', node['domestic']
119
+ end
120
+ end
121
+
122
+ def test_custom_xpath_function_gets_strings
123
+ set = @xml.xpath('//employee')
124
+ if Nokogiri.uses_libxml?
125
+ @xml.xpath('//employee[thing("asdf")]', @handler)
126
+ else
127
+ @xml.xpath('//employee[nokogiri:thing("asdf")]', @ns, @handler)
128
+ end
129
+ assert_equal(set.length, @handler.things.length)
130
+ assert_equal(['asdf'] * set.length, @handler.things)
131
+ end
132
+
133
+ def test_custom_xpath_gets_true_booleans
134
+ set = @xml.xpath('//employee')
135
+ if Nokogiri.uses_libxml?
136
+ @xml.xpath('//employee[thing(true())]', @handler)
137
+ else
138
+ @xml.xpath("//employee[nokogiri:thing(true())]", @ns, @handler)
139
+ end
140
+ assert_equal(set.length, @handler.things.length)
141
+ assert_equal([true] * set.length, @handler.things)
142
+ end
143
+
144
+ def test_custom_xpath_gets_false_booleans
145
+ set = @xml.xpath('//employee')
146
+ if Nokogiri.uses_libxml?
147
+ @xml.xpath('//employee[thing(false())]', @handler)
148
+ else
149
+ @xml.xpath("//employee[nokogiri:thing(false())]", @ns, @handler)
150
+ end
151
+ assert_equal(set.length, @handler.things.length)
152
+ assert_equal([false] * set.length, @handler.things)
153
+ end
154
+
155
+ def test_custom_xpath_gets_numbers
156
+ set = @xml.xpath('//employee')
157
+ if Nokogiri.uses_libxml?
158
+ @xml.xpath('//employee[thing(10)]', @handler)
159
+ else
160
+ @xml.xpath('//employee[nokogiri:thing(10)]', @ns, @handler)
161
+ end
162
+ assert_equal(set.length, @handler.things.length)
163
+ assert_equal([10] * set.length, @handler.things)
164
+ end
165
+
166
+ def test_custom_xpath_gets_node_sets
167
+ set = @xml.xpath('//employee/name')
168
+ if Nokogiri.uses_libxml?
169
+ @xml.xpath('//employee[thing(name)]', @handler)
170
+ else
171
+ @xml.xpath('//employee[nokogiri:thing(name)]', @ns, @handler)
172
+ end
173
+ assert_equal(set.length, @handler.things.length)
174
+ assert_equal(set.to_a, @handler.things.flatten)
175
+ end
176
+
177
+ def test_custom_xpath_gets_node_sets_and_returns_array
178
+ set = @xml.xpath('//employee/name')
179
+ if Nokogiri.uses_libxml?
180
+ @xml.xpath('//employee[returns_array(name)]', @handler)
181
+ else
182
+ @xml.xpath('//employee[nokogiri:returns_array(name)]', @ns, @handler)
183
+ end
184
+ assert_equal(set.length, @handler.things.length)
185
+ assert_equal(set.to_a, @handler.things.flatten)
186
+ end
187
+
188
+ def test_custom_xpath_handler_is_passed_a_decorated_node_set
189
+ x = Module.new do
190
+ def awesome! ; end
191
+ end
192
+ util_decorate(@xml, x)
193
+
194
+ assert @xml.xpath('//employee/name')
195
+
196
+ @xml.xpath('//employee[saves_node_set(name)]', @handler)
197
+ assert_equal @xml, @handler.things.document
198
+ assert @handler.things.respond_to?(:awesome!)
199
+ end
200
+
201
+ def test_code_that_invokes_OP_RESET_inside_libxml2
202
+ doc = "<html><body id='foo'><foo>hi</foo></body></html>"
203
+ xpath = 'id("foo")//foo'
204
+ nokogiri = Nokogiri::HTML.parse(doc)
205
+ assert nokogiri.xpath(xpath)
206
+ end
207
+
208
+ def test_custom_xpath_handler_with_args_under_gc_pressure
209
+ # see http://github.com/tenderlove/nokogiri/issues/#issue/345
210
+ tool_inspector = Class.new do
211
+ def name_equals(nodeset, name, *args)
212
+ nodeset.all? do |node|
213
+ args.each { |thing| thing.inspect }
214
+ node["name"] == name
215
+ end
216
+ end
217
+ end.new
218
+
219
+ xml = <<-EOXML
220
+ <toolbox>
221
+ #{"<tool name='hammer'/><tool name='wrench'/>" * 10}
222
+ </toolbox>
223
+ EOXML
224
+ doc = Nokogiri::XML xml
225
+
226
+ # long list of long arguments, to apply GC pressure during
227
+ # ruby_funcall argument marshalling
228
+ xpath = ["//tool[name_equals(.,'hammer'"]
229
+ 1000.times { xpath << "'unused argument #{'x' * 1000}'" }
230
+ xpath << "'unused argument')]"
231
+ xpath = xpath.join(',')
232
+
233
+ assert_equal doc.xpath("//tool[@name='hammer']"), doc.xpath(xpath, tool_inspector)
234
+ end
235
+ end
236
+ end
237
+ end
@@ -0,0 +1,94 @@
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("Pure Java version doesn't support this feature.") if !Nokogiri.uses_libxml?
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("Pure Java version doesn't support this feature.") if !Nokogiri.uses_libxml?
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
metadata ADDED
@@ -0,0 +1,525 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nokogiri-backupify
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: true
5
+ segments:
6
+ - 1
7
+ - 5
8
+ - 0
9
+ - beta
10
+ - 4
11
+ version: 1.5.0.beta.4
12
+ platform: ruby
13
+ authors:
14
+ - Aaron Patterson
15
+ - Mike Dalessio
16
+ autorequire:
17
+ bindir: bin
18
+ cert_chain: []
19
+
20
+ date: 2011-01-19 00:00:00 -05:00
21
+ default_executable:
22
+ dependencies:
23
+ - !ruby/object:Gem::Dependency
24
+ name: rubyforge
25
+ prerelease: false
26
+ requirement: &id001 !ruby/object:Gem::Requirement
27
+ none: false
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ segments:
32
+ - 2
33
+ - 0
34
+ - 4
35
+ version: 2.0.4
36
+ type: :development
37
+ version_requirements: *id001
38
+ - !ruby/object:Gem::Dependency
39
+ name: racc
40
+ prerelease: false
41
+ requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ type: :development
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: rexical
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ segments:
60
+ - 0
61
+ version: "0"
62
+ type: :development
63
+ version_requirements: *id003
64
+ - !ruby/object:Gem::Dependency
65
+ name: rake-compiler
66
+ prerelease: false
67
+ requirement: &id004 !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ segments:
73
+ - 0
74
+ version: "0"
75
+ type: :development
76
+ version_requirements: *id004
77
+ - !ruby/object:Gem::Dependency
78
+ name: minitest
79
+ prerelease: false
80
+ requirement: &id005 !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ segments:
86
+ - 1
87
+ - 6
88
+ - 0
89
+ version: 1.6.0
90
+ type: :development
91
+ version_requirements: *id005
92
+ - !ruby/object:Gem::Dependency
93
+ name: hoe
94
+ prerelease: false
95
+ requirement: &id006 !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ segments:
101
+ - 2
102
+ - 6
103
+ - 2
104
+ version: 2.6.2
105
+ type: :development
106
+ version_requirements: *id006
107
+ description: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's\n\
108
+ many features is the ability to search documents via XPath or CSS3 selectors.\n\n\
109
+ XML is like violence - if it doesn\xE2\x80\x99t solve your problems, you are not using\n\
110
+ enough of it."
111
+ email:
112
+ - aaronp@rubyforge.org
113
+ - mike.dalessio@gmail.com
114
+ executables:
115
+ - nokogiri
116
+ extensions:
117
+ - ext/nokogiri/extconf.rb
118
+ extra_rdoc_files:
119
+ - Manifest.txt
120
+ - CHANGELOG.ja.rdoc
121
+ - CHANGELOG.rdoc
122
+ - README.ja.rdoc
123
+ - README.rdoc
124
+ - ext/nokogiri/html_document.c
125
+ - ext/nokogiri/html_element_description.c
126
+ - ext/nokogiri/html_entity_lookup.c
127
+ - ext/nokogiri/html_sax_parser_context.c
128
+ - ext/nokogiri/nokogiri.c
129
+ - ext/nokogiri/xml_attr.c
130
+ - ext/nokogiri/xml_attribute_decl.c
131
+ - ext/nokogiri/xml_cdata.c
132
+ - ext/nokogiri/xml_comment.c
133
+ - ext/nokogiri/xml_document.c
134
+ - ext/nokogiri/xml_document_fragment.c
135
+ - ext/nokogiri/xml_dtd.c
136
+ - ext/nokogiri/xml_element_content.c
137
+ - ext/nokogiri/xml_element_decl.c
138
+ - ext/nokogiri/xml_encoding_handler.c
139
+ - ext/nokogiri/xml_entity_decl.c
140
+ - ext/nokogiri/xml_entity_reference.c
141
+ - ext/nokogiri/xml_io.c
142
+ - ext/nokogiri/xml_libxml2_hacks.c
143
+ - ext/nokogiri/xml_namespace.c
144
+ - ext/nokogiri/xml_node.c
145
+ - ext/nokogiri/xml_node_set.c
146
+ - ext/nokogiri/xml_processing_instruction.c
147
+ - ext/nokogiri/xml_reader.c
148
+ - ext/nokogiri/xml_relax_ng.c
149
+ - ext/nokogiri/xml_sax_parser.c
150
+ - ext/nokogiri/xml_sax_parser_context.c
151
+ - ext/nokogiri/xml_sax_push_parser.c
152
+ - ext/nokogiri/xml_schema.c
153
+ - ext/nokogiri/xml_syntax_error.c
154
+ - ext/nokogiri/xml_text.c
155
+ - ext/nokogiri/xml_xpath_context.c
156
+ - ext/nokogiri/xslt_stylesheet.c
157
+ files:
158
+ - .autotest
159
+ - CHANGELOG.ja.rdoc
160
+ - CHANGELOG.rdoc
161
+ - Manifest.txt
162
+ - README.ja.rdoc
163
+ - README.rdoc
164
+ - Rakefile
165
+ - bin/nokogiri
166
+ - deps.rip
167
+ - ext/java/nokogiri/EncodingHandler.java
168
+ - ext/java/nokogiri/HtmlDocument.java
169
+ - ext/java/nokogiri/HtmlElementDescription.java
170
+ - ext/java/nokogiri/HtmlEntityLookup.java
171
+ - ext/java/nokogiri/HtmlSaxParserContext.java
172
+ - ext/java/nokogiri/NokogiriService.java
173
+ - ext/java/nokogiri/XmlAttr.java
174
+ - ext/java/nokogiri/XmlAttributeDecl.java
175
+ - ext/java/nokogiri/XmlCdata.java
176
+ - ext/java/nokogiri/XmlComment.java
177
+ - ext/java/nokogiri/XmlDocument.java
178
+ - ext/java/nokogiri/XmlDocumentFragment.java
179
+ - ext/java/nokogiri/XmlDtd.java
180
+ - ext/java/nokogiri/XmlElement.java
181
+ - ext/java/nokogiri/XmlElementContent.java
182
+ - ext/java/nokogiri/XmlElementDecl.java
183
+ - ext/java/nokogiri/XmlEntityDecl.java
184
+ - ext/java/nokogiri/XmlEntityReference.java
185
+ - ext/java/nokogiri/XmlNamespace.java
186
+ - ext/java/nokogiri/XmlNode.java
187
+ - ext/java/nokogiri/XmlNodeSet.java
188
+ - ext/java/nokogiri/XmlProcessingInstruction.java
189
+ - ext/java/nokogiri/XmlReader.java
190
+ - ext/java/nokogiri/XmlRelaxng.java
191
+ - ext/java/nokogiri/XmlSaxParserContext.java
192
+ - ext/java/nokogiri/XmlSaxPushParser.java
193
+ - ext/java/nokogiri/XmlSchema.java
194
+ - ext/java/nokogiri/XmlSyntaxError.java
195
+ - ext/java/nokogiri/XmlText.java
196
+ - ext/java/nokogiri/XmlXpathContext.java
197
+ - ext/java/nokogiri/XsltStylesheet.java
198
+ - ext/java/nokogiri/internals/HtmlDomParserContext.java
199
+ - ext/java/nokogiri/internals/NokogiriDocumentCache.java
200
+ - ext/java/nokogiri/internals/NokogiriErrorHandler.java
201
+ - ext/java/nokogiri/internals/NokogiriHandler.java
202
+ - ext/java/nokogiri/internals/NokogiriHelpers.java
203
+ - ext/java/nokogiri/internals/NokogiriNamespaceCache.java
204
+ - ext/java/nokogiri/internals/NokogiriNamespaceContext.java
205
+ - ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler.java
206
+ - ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler4NekoHtml.java
207
+ - ext/java/nokogiri/internals/NokogiriStrictErrorHandler.java
208
+ - ext/java/nokogiri/internals/NokogiriXPathFunction.java
209
+ - ext/java/nokogiri/internals/NokogiriXPathFunctionResolver.java
210
+ - ext/java/nokogiri/internals/ParserContext.java
211
+ - ext/java/nokogiri/internals/PushInputStream.java
212
+ - ext/java/nokogiri/internals/ReaderNode.java
213
+ - ext/java/nokogiri/internals/SaveContext.java
214
+ - ext/java/nokogiri/internals/SchemaErrorHandler.java
215
+ - ext/java/nokogiri/internals/XmlDeclHandler.java
216
+ - ext/java/nokogiri/internals/XmlDomParser.java
217
+ - ext/java/nokogiri/internals/XmlDomParserContext.java
218
+ - ext/java/nokogiri/internals/XmlSaxParser.java
219
+ - ext/java/nokogiri/internals/XsltExtensionFunction.java
220
+ - ext/nokogiri/depend
221
+ - ext/nokogiri/extconf.rb
222
+ - ext/nokogiri/html_document.c
223
+ - ext/nokogiri/html_document.h
224
+ - ext/nokogiri/html_element_description.c
225
+ - ext/nokogiri/html_element_description.h
226
+ - ext/nokogiri/html_entity_lookup.c
227
+ - ext/nokogiri/html_entity_lookup.h
228
+ - ext/nokogiri/html_sax_parser_context.c
229
+ - ext/nokogiri/html_sax_parser_context.h
230
+ - ext/nokogiri/nokogiri.c
231
+ - ext/nokogiri/nokogiri.h
232
+ - ext/nokogiri/xml_attr.c
233
+ - ext/nokogiri/xml_attr.h
234
+ - ext/nokogiri/xml_attribute_decl.c
235
+ - ext/nokogiri/xml_attribute_decl.h
236
+ - ext/nokogiri/xml_cdata.c
237
+ - ext/nokogiri/xml_cdata.h
238
+ - ext/nokogiri/xml_comment.c
239
+ - ext/nokogiri/xml_comment.h
240
+ - ext/nokogiri/xml_document.c
241
+ - ext/nokogiri/xml_document.h
242
+ - ext/nokogiri/xml_document_fragment.c
243
+ - ext/nokogiri/xml_document_fragment.h
244
+ - ext/nokogiri/xml_dtd.c
245
+ - ext/nokogiri/xml_dtd.h
246
+ - ext/nokogiri/xml_element_content.c
247
+ - ext/nokogiri/xml_element_content.h
248
+ - ext/nokogiri/xml_element_decl.c
249
+ - ext/nokogiri/xml_element_decl.h
250
+ - ext/nokogiri/xml_encoding_handler.c
251
+ - ext/nokogiri/xml_encoding_handler.h
252
+ - ext/nokogiri/xml_entity_decl.c
253
+ - ext/nokogiri/xml_entity_decl.h
254
+ - ext/nokogiri/xml_entity_reference.c
255
+ - ext/nokogiri/xml_entity_reference.h
256
+ - ext/nokogiri/xml_io.c
257
+ - ext/nokogiri/xml_io.h
258
+ - ext/nokogiri/xml_libxml2_hacks.c
259
+ - ext/nokogiri/xml_libxml2_hacks.h
260
+ - ext/nokogiri/xml_namespace.c
261
+ - ext/nokogiri/xml_namespace.h
262
+ - ext/nokogiri/xml_node.c
263
+ - ext/nokogiri/xml_node.h
264
+ - ext/nokogiri/xml_node_set.c
265
+ - ext/nokogiri/xml_node_set.h
266
+ - ext/nokogiri/xml_processing_instruction.c
267
+ - ext/nokogiri/xml_processing_instruction.h
268
+ - ext/nokogiri/xml_reader.c
269
+ - ext/nokogiri/xml_reader.h
270
+ - ext/nokogiri/xml_relax_ng.c
271
+ - ext/nokogiri/xml_relax_ng.h
272
+ - ext/nokogiri/xml_sax_parser.c
273
+ - ext/nokogiri/xml_sax_parser.h
274
+ - ext/nokogiri/xml_sax_parser_context.c
275
+ - ext/nokogiri/xml_sax_parser_context.h
276
+ - ext/nokogiri/xml_sax_push_parser.c
277
+ - ext/nokogiri/xml_sax_push_parser.h
278
+ - ext/nokogiri/xml_schema.c
279
+ - ext/nokogiri/xml_schema.h
280
+ - ext/nokogiri/xml_syntax_error.c
281
+ - ext/nokogiri/xml_syntax_error.h
282
+ - ext/nokogiri/xml_text.c
283
+ - ext/nokogiri/xml_text.h
284
+ - ext/nokogiri/xml_xpath_context.c
285
+ - ext/nokogiri/xml_xpath_context.h
286
+ - ext/nokogiri/xslt_stylesheet.c
287
+ - ext/nokogiri/xslt_stylesheet.h
288
+ - lib/isorelax.jar
289
+ - lib/jing.jar
290
+ - lib/nekodtd.jar
291
+ - lib/nekohtml.jar
292
+ - lib/nokogiri.rb
293
+ - lib/nokogiri/css.rb
294
+ - lib/nokogiri/css/node.rb
295
+ - lib/nokogiri/css/parser.rb
296
+ - lib/nokogiri/css/parser.y
297
+ - lib/nokogiri/css/parser_extras.rb
298
+ - lib/nokogiri/css/syntax_error.rb
299
+ - lib/nokogiri/css/tokenizer.rb
300
+ - lib/nokogiri/css/tokenizer.rex
301
+ - lib/nokogiri/css/xpath_visitor.rb
302
+ - lib/nokogiri/decorators/slop.rb
303
+ - lib/nokogiri/html.rb
304
+ - lib/nokogiri/html/builder.rb
305
+ - lib/nokogiri/html/document.rb
306
+ - lib/nokogiri/html/document_fragment.rb
307
+ - lib/nokogiri/html/element_description.rb
308
+ - lib/nokogiri/html/element_description_defaults.rb
309
+ - lib/nokogiri/html/entity_lookup.rb
310
+ - lib/nokogiri/html/sax/parser.rb
311
+ - lib/nokogiri/html/sax/parser_context.rb
312
+ - lib/nokogiri/syntax_error.rb
313
+ - lib/nokogiri/version.rb
314
+ - lib/nokogiri/xml.rb
315
+ - lib/nokogiri/xml/attr.rb
316
+ - lib/nokogiri/xml/attribute_decl.rb
317
+ - lib/nokogiri/xml/builder.rb
318
+ - lib/nokogiri/xml/cdata.rb
319
+ - lib/nokogiri/xml/character_data.rb
320
+ - lib/nokogiri/xml/document.rb
321
+ - lib/nokogiri/xml/document_fragment.rb
322
+ - lib/nokogiri/xml/dtd.rb
323
+ - lib/nokogiri/xml/element_content.rb
324
+ - lib/nokogiri/xml/element_decl.rb
325
+ - lib/nokogiri/xml/entity_decl.rb
326
+ - lib/nokogiri/xml/namespace.rb
327
+ - lib/nokogiri/xml/node.rb
328
+ - lib/nokogiri/xml/node/save_options.rb
329
+ - lib/nokogiri/xml/node_set.rb
330
+ - lib/nokogiri/xml/notation.rb
331
+ - lib/nokogiri/xml/parse_options.rb
332
+ - lib/nokogiri/xml/pp.rb
333
+ - lib/nokogiri/xml/pp/character_data.rb
334
+ - lib/nokogiri/xml/pp/node.rb
335
+ - lib/nokogiri/xml/processing_instruction.rb
336
+ - lib/nokogiri/xml/reader.rb
337
+ - lib/nokogiri/xml/relax_ng.rb
338
+ - lib/nokogiri/xml/sax.rb
339
+ - lib/nokogiri/xml/sax/document.rb
340
+ - lib/nokogiri/xml/sax/parser.rb
341
+ - lib/nokogiri/xml/sax/parser_context.rb
342
+ - lib/nokogiri/xml/sax/push_parser.rb
343
+ - lib/nokogiri/xml/schema.rb
344
+ - lib/nokogiri/xml/syntax_error.rb
345
+ - lib/nokogiri/xml/text.rb
346
+ - lib/nokogiri/xml/xpath.rb
347
+ - lib/nokogiri/xml/xpath/syntax_error.rb
348
+ - lib/nokogiri/xml/xpath_context.rb
349
+ - lib/nokogiri/xslt.rb
350
+ - lib/nokogiri/xslt/stylesheet.rb
351
+ - lib/xercesImpl.jar
352
+ - lib/xsd/xmlparser/nokogiri.rb
353
+ - tasks/cross_compile.rb
354
+ - tasks/test.rb
355
+ - test/css/test_nthiness.rb
356
+ - test/css/test_parser.rb
357
+ - test/css/test_tokenizer.rb
358
+ - test/css/test_xpath_visitor.rb
359
+ - test/decorators/test_slop.rb
360
+ - test/files/2ch.html
361
+ - test/files/address_book.rlx
362
+ - test/files/address_book.xml
363
+ - test/files/bar/bar.xsd
364
+ - test/files/dont_hurt_em_why.xml
365
+ - test/files/exslt.xml
366
+ - test/files/exslt.xslt
367
+ - test/files/foo/foo.xsd
368
+ - test/files/po.xml
369
+ - test/files/po.xsd
370
+ - test/files/shift_jis.html
371
+ - test/files/shift_jis.xml
372
+ - test/files/snuggles.xml
373
+ - test/files/staff.dtd
374
+ - test/files/staff.xml
375
+ - test/files/staff.xslt
376
+ - test/files/tlm.html
377
+ - test/files/valid_bar.xml
378
+ - test/helper.rb
379
+ - test/html/sax/test_parser.rb
380
+ - test/html/sax/test_parser_context.rb
381
+ - test/html/test_builder.rb
382
+ - test/html/test_document.rb
383
+ - test/html/test_document_encoding.rb
384
+ - test/html/test_document_fragment.rb
385
+ - test/html/test_element_description.rb
386
+ - test/html/test_named_characters.rb
387
+ - test/html/test_node.rb
388
+ - test/html/test_node_encoding.rb
389
+ - test/test_convert_xpath.rb
390
+ - test/test_css_cache.rb
391
+ - test/test_encoding_handler.rb
392
+ - test/test_memory_leak.rb
393
+ - test/test_nokogiri.rb
394
+ - test/test_reader.rb
395
+ - test/test_soap4r_sax.rb
396
+ - test/test_xslt_transforms.rb
397
+ - test/xml/node/test_save_options.rb
398
+ - test/xml/node/test_subclass.rb
399
+ - test/xml/sax/test_parser.rb
400
+ - test/xml/sax/test_parser_context.rb
401
+ - test/xml/sax/test_push_parser.rb
402
+ - test/xml/test_attr.rb
403
+ - test/xml/test_attribute_decl.rb
404
+ - test/xml/test_builder.rb
405
+ - test/xml/test_cdata.rb
406
+ - test/xml/test_comment.rb
407
+ - test/xml/test_document.rb
408
+ - test/xml/test_document_encoding.rb
409
+ - test/xml/test_document_fragment.rb
410
+ - test/xml/test_dtd.rb
411
+ - test/xml/test_dtd_encoding.rb
412
+ - test/xml/test_element_content.rb
413
+ - test/xml/test_element_decl.rb
414
+ - test/xml/test_entity_decl.rb
415
+ - test/xml/test_entity_reference.rb
416
+ - test/xml/test_namespace.rb
417
+ - test/xml/test_node.rb
418
+ - test/xml/test_node_attributes.rb
419
+ - test/xml/test_node_encoding.rb
420
+ - test/xml/test_node_reparenting.rb
421
+ - test/xml/test_node_set.rb
422
+ - test/xml/test_parse_options.rb
423
+ - test/xml/test_processing_instruction.rb
424
+ - test/xml/test_reader_encoding.rb
425
+ - test/xml/test_relax_ng.rb
426
+ - test/xml/test_schema.rb
427
+ - test/xml/test_syntax_error.rb
428
+ - test/xml/test_text.rb
429
+ - test/xml/test_unparented_node.rb
430
+ - test/xml/test_xpath.rb
431
+ - test/xslt/test_custom_functions.rb
432
+ has_rdoc: true
433
+ homepage: http://nokogiri.org
434
+ licenses: []
435
+
436
+ post_install_message:
437
+ rdoc_options:
438
+ - --main
439
+ - README.rdoc
440
+ require_paths:
441
+ - lib
442
+ required_ruby_version: !ruby/object:Gem::Requirement
443
+ none: false
444
+ requirements:
445
+ - - ">="
446
+ - !ruby/object:Gem::Version
447
+ segments:
448
+ - 0
449
+ version: "0"
450
+ required_rubygems_version: !ruby/object:Gem::Requirement
451
+ none: false
452
+ requirements:
453
+ - - ">"
454
+ - !ruby/object:Gem::Version
455
+ segments:
456
+ - 1
457
+ - 3
458
+ - 1
459
+ version: 1.3.1
460
+ requirements: []
461
+
462
+ rubyforge_project: nokogiri-backupify
463
+ rubygems_version: 1.3.7
464
+ signing_key:
465
+ specification_version: 3
466
+ summary: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser"
467
+ test_files:
468
+ - test/css/test_nthiness.rb
469
+ - test/css/test_parser.rb
470
+ - test/css/test_tokenizer.rb
471
+ - test/css/test_xpath_visitor.rb
472
+ - test/decorators/test_slop.rb
473
+ - test/html/sax/test_parser.rb
474
+ - test/html/sax/test_parser_context.rb
475
+ - test/html/test_builder.rb
476
+ - test/html/test_document.rb
477
+ - test/html/test_document_encoding.rb
478
+ - test/html/test_document_fragment.rb
479
+ - test/html/test_element_description.rb
480
+ - test/html/test_named_characters.rb
481
+ - test/html/test_node.rb
482
+ - test/html/test_node_encoding.rb
483
+ - test/test_convert_xpath.rb
484
+ - test/test_css_cache.rb
485
+ - test/test_encoding_handler.rb
486
+ - test/test_memory_leak.rb
487
+ - test/test_nokogiri.rb
488
+ - test/test_reader.rb
489
+ - test/test_soap4r_sax.rb
490
+ - test/test_xslt_transforms.rb
491
+ - test/xml/node/test_save_options.rb
492
+ - test/xml/node/test_subclass.rb
493
+ - test/xml/sax/test_parser.rb
494
+ - test/xml/sax/test_parser_context.rb
495
+ - test/xml/sax/test_push_parser.rb
496
+ - test/xml/test_attr.rb
497
+ - test/xml/test_attribute_decl.rb
498
+ - test/xml/test_builder.rb
499
+ - test/xml/test_cdata.rb
500
+ - test/xml/test_comment.rb
501
+ - test/xml/test_document.rb
502
+ - test/xml/test_document_encoding.rb
503
+ - test/xml/test_document_fragment.rb
504
+ - test/xml/test_dtd.rb
505
+ - test/xml/test_dtd_encoding.rb
506
+ - test/xml/test_element_content.rb
507
+ - test/xml/test_element_decl.rb
508
+ - test/xml/test_entity_decl.rb
509
+ - test/xml/test_entity_reference.rb
510
+ - test/xml/test_namespace.rb
511
+ - test/xml/test_node.rb
512
+ - test/xml/test_node_attributes.rb
513
+ - test/xml/test_node_encoding.rb
514
+ - test/xml/test_node_reparenting.rb
515
+ - test/xml/test_node_set.rb
516
+ - test/xml/test_parse_options.rb
517
+ - test/xml/test_processing_instruction.rb
518
+ - test/xml/test_reader_encoding.rb
519
+ - test/xml/test_relax_ng.rb
520
+ - test/xml/test_schema.rb
521
+ - test/xml/test_syntax_error.rb
522
+ - test/xml/test_text.rb
523
+ - test/xml/test_unparented_node.rb
524
+ - test/xml/test_xpath.rb
525
+ - test/xslt/test_custom_functions.rb