nokogiri 1.4.1-java → 1.4.2-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 (115) hide show
  1. data/CHANGELOG.ja.rdoc +45 -0
  2. data/CHANGELOG.rdoc +53 -1
  3. data/Manifest.txt +3 -3
  4. data/README.ja.rdoc +1 -1
  5. data/README.rdoc +11 -5
  6. data/Rakefile +13 -79
  7. data/ext/nokogiri/extconf.rb +22 -74
  8. data/ext/nokogiri/html_document.c +17 -8
  9. data/ext/nokogiri/html_element_description.c +20 -16
  10. data/ext/nokogiri/html_entity_lookup.c +2 -2
  11. data/ext/nokogiri/html_sax_parser_context.c +10 -8
  12. data/ext/nokogiri/libcharset-1.dll +0 -0
  13. data/ext/nokogiri/libexslt.dll +0 -0
  14. data/ext/nokogiri/libiconv-2.dll +0 -0
  15. data/ext/nokogiri/libxml2.dll +0 -0
  16. data/ext/nokogiri/libxslt.dll +0 -0
  17. data/ext/nokogiri/nokogiri.c +0 -1
  18. data/ext/nokogiri/nokogiri.h +33 -28
  19. data/ext/nokogiri/xml_attr.c +7 -5
  20. data/ext/nokogiri/xml_attribute_decl.c +5 -2
  21. data/ext/nokogiri/xml_cdata.c +4 -2
  22. data/ext/nokogiri/xml_comment.c +4 -2
  23. data/ext/nokogiri/xml_document.c +93 -15
  24. data/ext/nokogiri/xml_document.h +0 -1
  25. data/ext/nokogiri/xml_document_fragment.c +4 -2
  26. data/ext/nokogiri/xml_dtd.c +18 -8
  27. data/ext/nokogiri/xml_element_content.c +2 -2
  28. data/ext/nokogiri/xml_entity_decl.c +15 -2
  29. data/ext/nokogiri/xml_entity_reference.c +4 -2
  30. data/ext/nokogiri/xml_io.c +1 -1
  31. data/ext/nokogiri/xml_namespace.c +5 -3
  32. data/ext/nokogiri/xml_node.c +353 -114
  33. data/ext/nokogiri/xml_node_set.c +35 -22
  34. data/ext/nokogiri/xml_node_set.h +1 -1
  35. data/ext/nokogiri/xml_processing_instruction.c +4 -2
  36. data/ext/nokogiri/xml_reader.c +119 -47
  37. data/ext/nokogiri/xml_relax_ng.c +21 -12
  38. data/ext/nokogiri/xml_sax_parser.c +6 -3
  39. data/ext/nokogiri/xml_sax_parser.h +13 -17
  40. data/ext/nokogiri/xml_sax_parser_context.c +8 -6
  41. data/ext/nokogiri/xml_sax_push_parser.c +7 -6
  42. data/ext/nokogiri/xml_schema.c +62 -13
  43. data/ext/nokogiri/xml_syntax_error.c +18 -12
  44. data/ext/nokogiri/xml_syntax_error.h +1 -1
  45. data/ext/nokogiri/xml_text.c +4 -2
  46. data/ext/nokogiri/xml_xpath_context.c +60 -23
  47. data/ext/nokogiri/xslt_stylesheet.c +14 -3
  48. data/ext/nokogiri/zlib1.dll +0 -0
  49. data/lib/nokogiri.rb +17 -0
  50. data/lib/nokogiri/css/generated_parser.rb +72 -62
  51. data/lib/nokogiri/css/generated_tokenizer.rb +23 -24
  52. data/lib/nokogiri/css/parser.y +3 -1
  53. data/lib/nokogiri/css/tokenizer.rex +3 -3
  54. data/lib/nokogiri/css/xpath_visitor.rb +8 -3
  55. data/lib/nokogiri/ffi/html/sax/parser_context.rb +3 -3
  56. data/lib/nokogiri/ffi/libxml.rb +16 -2
  57. data/lib/nokogiri/ffi/structs/common_node.rb +15 -3
  58. data/lib/nokogiri/ffi/structs/xml_document.rb +13 -4
  59. data/lib/nokogiri/ffi/structs/xml_xpath_context.rb +3 -2
  60. data/lib/nokogiri/ffi/weak_bucket.rb +40 -0
  61. data/lib/nokogiri/ffi/xml/document.rb +27 -0
  62. data/lib/nokogiri/ffi/xml/entity_decl.rb +9 -0
  63. data/lib/nokogiri/ffi/xml/node.rb +142 -61
  64. data/lib/nokogiri/ffi/xml/node_set.rb +15 -12
  65. data/lib/nokogiri/ffi/xml/reader.rb +5 -0
  66. data/lib/nokogiri/ffi/xml/schema.rb +17 -0
  67. data/lib/nokogiri/ffi/xml/syntax_error.rb +4 -4
  68. data/lib/nokogiri/ffi/xml/xpath.rb +0 -10
  69. data/lib/nokogiri/ffi/xml/xpath_context.rb +22 -9
  70. data/lib/nokogiri/ffi/xslt/stylesheet.rb +3 -0
  71. data/lib/nokogiri/html/document.rb +5 -3
  72. data/lib/nokogiri/html/document_fragment.rb +28 -7
  73. data/lib/nokogiri/nokogiri.rb +1 -0
  74. data/lib/nokogiri/version.rb +6 -2
  75. data/lib/nokogiri/version_warning.rb +6 -3
  76. data/lib/nokogiri/xml.rb +1 -1
  77. data/lib/nokogiri/xml/builder.rb +35 -22
  78. data/lib/nokogiri/xml/document.rb +44 -12
  79. data/lib/nokogiri/xml/document_fragment.rb +16 -12
  80. data/lib/nokogiri/xml/entity_decl.rb +4 -0
  81. data/lib/nokogiri/xml/node.rb +152 -95
  82. data/lib/nokogiri/xml/node_set.rb +2 -1
  83. data/lib/nokogiri/xml/sax/push_parser.rb +1 -1
  84. data/lib/nokogiri/xml/schema.rb +1 -5
  85. data/lib/nokogiri/xml/syntax_error.rb +4 -0
  86. data/lib/nokogiri/xml/text.rb +9 -0
  87. data/lib/nokogiri/xml/xpath/syntax_error.rb +3 -0
  88. data/tasks/cross_compile.rb +157 -0
  89. data/tasks/test.rb +0 -6
  90. data/test/css/test_xpath_visitor.rb +9 -0
  91. data/test/helper.rb +49 -11
  92. data/test/html/sax/test_parser.rb +11 -1
  93. data/test/html/test_document.rb +8 -0
  94. data/test/html/test_document_fragment.rb +14 -2
  95. data/test/html/test_element_description.rb +5 -1
  96. data/test/html/test_node.rb +5 -66
  97. data/test/test_reader.rb +28 -0
  98. data/test/test_xslt_transforms.rb +14 -0
  99. data/test/xml/test_builder.rb +43 -0
  100. data/test/xml/test_cdata.rb +12 -0
  101. data/test/xml/test_document.rb +74 -39
  102. data/test/xml/test_document_fragment.rb +36 -0
  103. data/test/xml/test_entity_decl.rb +37 -0
  104. data/test/xml/test_node.rb +192 -65
  105. data/test/xml/test_node_reparenting.rb +253 -236
  106. data/test/xml/test_node_set.rb +67 -0
  107. data/test/xml/test_text.rb +8 -0
  108. data/test/xml/test_xpath.rb +32 -0
  109. metadata +119 -48
  110. data.tar.gz.sig +0 -0
  111. data/ext/nokogiri/iconv.dll +0 -0
  112. data/ext/nokogiri/xml_xpath.c +0 -53
  113. data/ext/nokogiri/xml_xpath.h +0 -11
  114. data/lib/nokogiri/xml/fragment_handler.rb +0 -79
  115. metadata.gz.sig +0 -0
@@ -459,6 +459,15 @@ module Nokogiri
459
459
  assert_equal employees.length, employees[0, employees.length].length
460
460
  end
461
461
 
462
+ def test_slice_waaaaaay_off_the_end
463
+ xml = Nokogiri::XML::Builder.new {
464
+ root { 100.times { div } }
465
+ }.doc
466
+ nodes = xml.css "div"
467
+ assert_equal 1, nodes.slice(99, 100_000).length
468
+ assert_equal 0, nodes.slice(100, 100_000).length
469
+ end
470
+
462
471
  def test_array_slice_with_start_and_end
463
472
  employees = @xml.search("//employee")
464
473
  assert_equal [employees[1], employees[2], employees[3]], employees[1,3].to_a
@@ -577,6 +586,64 @@ module Nokogiri
577
586
 
578
587
  assert_equal children, children.reverse.reverse
579
588
  end
589
+
590
+ def test_node_set_dup_result_has_document_and_is_decorated
591
+ x = Module.new do
592
+ def awesome! ; end
593
+ end
594
+ util_decorate(@xml, x)
595
+ node_set = @xml.css("address")
596
+ new_set = node_set.dup
597
+ assert_equal node_set.document, new_set.document
598
+ assert new_set.respond_to?(:awesome!)
599
+ end
600
+
601
+ def test_node_set_union_result_has_document_and_is_decorated
602
+ x = Module.new do
603
+ def awesome! ; end
604
+ end
605
+ util_decorate(@xml, x)
606
+ node_set1 = @xml.css("address")
607
+ node_set2 = @xml.css("address")
608
+ new_set = node_set1 | node_set2
609
+ assert_equal node_set1.document, new_set.document
610
+ assert new_set.respond_to?(:awesome!)
611
+ end
612
+
613
+ def test_node_set_intersection_result_has_document_and_is_decorated
614
+ x = Module.new do
615
+ def awesome! ; end
616
+ end
617
+ util_decorate(@xml, x)
618
+ node_set1 = @xml.css("address")
619
+ node_set2 = @xml.css("address")
620
+ new_set = node_set1 & node_set2
621
+ assert_equal node_set1.document, new_set.document
622
+ assert new_set.respond_to?(:awesome!)
623
+ end
624
+
625
+ def test_node_set_difference_result_has_document_and_is_decorated
626
+ x = Module.new do
627
+ def awesome! ; end
628
+ end
629
+ util_decorate(@xml, x)
630
+ node_set1 = @xml.css("address")
631
+ node_set2 = @xml.css("address")
632
+ new_set = node_set1 - node_set2
633
+ assert_equal node_set1.document, new_set.document
634
+ assert new_set.respond_to?(:awesome!)
635
+ end
636
+
637
+ def test_node_set_slice_result_has_document_and_is_decorated
638
+ x = Module.new do
639
+ def awesome! ; end
640
+ end
641
+ util_decorate(@xml, x)
642
+ node_set = @xml.css("address")
643
+ new_set = node_set[0..-1]
644
+ assert_equal node_set.document, new_set.document
645
+ assert new_set.respond_to?(:awesome!)
646
+ end
580
647
  end
581
648
  end
582
649
  end
@@ -25,6 +25,14 @@ module Nokogiri
25
25
  node = Nokogiri::XML::Element.new('foo', doc)
26
26
  text = Text.new('hello world', node)
27
27
  end
28
+
29
+ def test_content=
30
+ node = Text.new('foo', Document.new)
31
+ assert_equal('foo', node.content)
32
+ node.content = '& <foo> &amp;'
33
+ assert_equal('& <foo> &amp;', node.content)
34
+ assert_equal('&amp; &lt;foo&gt; &amp;amp;', node.to_xml)
35
+ end
28
36
  end
29
37
  end
30
38
  end
@@ -27,9 +27,30 @@ module Nokogiri
27
27
  def my_filter set, attribute, value
28
28
  set.find_all { |x| x[attribute] == value }
29
29
  end
30
+
31
+ def saves_node_set node_set
32
+ @things = node_set
33
+ end
30
34
  }.new
31
35
  end
32
36
 
37
+ def test_unknown_attribute
38
+ assert_equal 0, @xml.xpath('//employee[@id="asdfasdf"]/@fooo').length
39
+ assert_nil @xml.xpath('//employee[@id="asdfasdf"]/@fooo')[0]
40
+ end
41
+
42
+ def test_boolean
43
+ assert_equal false, @xml.xpath('1 = 2')
44
+ end
45
+
46
+ def test_number
47
+ assert_equal 2, @xml.xpath('1 + 1')
48
+ end
49
+
50
+ def test_string
51
+ assert_equal 'foo', @xml.xpath('concat("fo", "o")')
52
+ end
53
+
33
54
  def test_css_search_uses_custom_selectors_with_arguments
34
55
  set = @xml.css('employee > address:my_filter("domestic", "Yes")', @handler)
35
56
  assert set.length > 0
@@ -95,6 +116,17 @@ module Nokogiri
95
116
  assert_equal(set.to_a, @handler.things.flatten)
96
117
  end
97
118
 
119
+ def test_custom_xpath_handler_is_passed_a_decorated_node_set
120
+ x = Module.new do
121
+ def awesome! ; end
122
+ end
123
+ util_decorate(@xml, x)
124
+ set = @xml.xpath('//employee/name')
125
+ @xml.xpath('//employee[saves_node_set(name)]', @handler)
126
+ assert_equal @xml, @handler.things.document
127
+ assert @handler.things.respond_to?(:awesome!)
128
+ end
129
+
98
130
  def test_code_that_invokes_OP_RESET_inside_libxml2
99
131
  doc = "<html><body id='foo'><foo>hi</foo></body></html>"
100
132
  xpath = 'id("foo")//foo'
metadata CHANGED
@@ -1,79 +1,115 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 4
8
+ - 2
9
+ version: 1.4.2
5
10
  platform: java
6
11
  authors:
7
12
  - Aaron Patterson
8
13
  - Mike Dalessio
9
14
  autorequire:
10
15
  bindir: bin
11
- cert_chain:
12
- - |
13
- -----BEGIN CERTIFICATE-----
14
- MIIDNjCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBBMQ8wDQYDVQQDDAZhYXJv
15
- bnAxGTAXBgoJkiaJk/IsZAEZFglydWJ5Zm9yZ2UxEzARBgoJkiaJk/IsZAEZFgNv
16
- cmcwHhcNMDkxMTA1MDAwNDQ4WhcNMTAxMTA1MDAwNDQ4WjBBMQ8wDQYDVQQDDAZh
17
- YXJvbnAxGTAXBgoJkiaJk/IsZAEZFglydWJ5Zm9yZ2UxEzARBgoJkiaJk/IsZAEZ
18
- FgNvcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNSD14Gb2mCX/5
19
- fE85uW/jT7fcYI8XolrzdpzfvxD3y+Pt/yA5eciBiE+hNAWU2PM1ZMOq4MOV9EqR
20
- hYzupp/zFoC7ZZ3PF8nJBFKgfKNf0sp9o3XCUviaZjoSYNIvGQocrakQo+h3x3Od
21
- NqZWtVsLz9P/G1foUBpc95gGGBodbj/CZVc32F+xVvmejqe3RaMLGI70ZOuTcsRi
22
- t8V4T7okmUbLi6VmPYlH/9mKvU7ObRHXMYNhkkife5phh8vjsiCd8Q397+jFaL0f
23
- Cd23idNV7lbvdjIuYLV+9u5cPkDjANLAnGRaRS1x2SEfH/8g0Te6/jeKfzBH83D0
24
- 5v5HTx+HAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
25
- BBTs3LnPhoi2m7BTf9tHvNQYsOG7aTANBgkqhkiG9w0BAQUFAAOCAQEAVH7G+nSf
26
- WMPz7Iwcnd+WrWWq/mr5ke0qQoiz4tk0h7bsa3fEnUDBiMfmQhv/uBzA4Gkw9zxB
27
- IfKljsZq0yE+du/1u2Mph7dMIg2oiwMurpduPpx9sfaqsqSBBOzggxiUEmHDNrPT
28
- uTzaid0gdOx/TacZ4RwrEnx6XNkhxC2YaTH2Y68hoJzSzRGtdU2Kk6mT4YraCP+u
29
- ETP5hCJAiB5l4jC8U6wwvKQDHTMoaUu3eu/txe1PDjoe3GICzs/e6bzYBWYmKu7J
30
- 5YM3l5J4rDvIPAGH4VRr5nSs+qbZh+kCdE1khvTxH51xkR3qAfEEogAd2VlnjELM
31
- f9Gw8x3RwgLvkA==
32
- -----END CERTIFICATE-----
16
+ cert_chain: []
33
17
 
34
- date: 2009-12-10 00:00:00 -08:00
18
+ date: 2010-05-22 00:00:00 -04:00
35
19
  default_executable: nokogiri
36
20
  dependencies:
37
21
  - !ruby/object:Gem::Dependency
38
- name: racc
22
+ name: rubyforge
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 2
30
+ - 0
31
+ - 4
32
+ version: 2.0.4
39
33
  type: :development
40
- version_requirement:
41
- version_requirements: !ruby/object:Gem::Requirement
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: racc
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
42
39
  requirements:
43
40
  - - ">="
44
41
  - !ruby/object:Gem::Version
42
+ segments:
43
+ - 0
45
44
  version: "0"
46
- version:
45
+ type: :development
46
+ version_requirements: *id002
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rexical
49
- type: :development
50
- version_requirement:
51
- version_requirements: !ruby/object:Gem::Requirement
49
+ prerelease: false
50
+ requirement: &id003 !ruby/object:Gem::Requirement
52
51
  requirements:
53
52
  - - ">="
54
53
  - !ruby/object:Gem::Version
54
+ segments:
55
+ - 0
55
56
  version: "0"
56
- version:
57
+ type: :development
58
+ version_requirements: *id003
57
59
  - !ruby/object:Gem::Dependency
58
60
  name: rake-compiler
59
- type: :development
60
- version_requirement:
61
- version_requirements: !ruby/object:Gem::Requirement
61
+ prerelease: false
62
+ requirement: &id004 !ruby/object:Gem::Requirement
62
63
  requirements:
63
64
  - - ">="
64
65
  - !ruby/object:Gem::Version
66
+ segments:
67
+ - 0
65
68
  version: "0"
66
- version:
69
+ type: :development
70
+ version_requirements: *id004
71
+ - !ruby/object:Gem::Dependency
72
+ name: minitest
73
+ prerelease: false
74
+ requirement: &id005 !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ segments:
79
+ - 1
80
+ - 6
81
+ - 0
82
+ version: 1.6.0
83
+ type: :development
84
+ version_requirements: *id005
67
85
  - !ruby/object:Gem::Dependency
68
86
  name: hoe
87
+ prerelease: false
88
+ requirement: &id006 !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ segments:
93
+ - 2
94
+ - 6
95
+ - 0
96
+ version: 2.6.0
69
97
  type: :development
70
- version_requirement:
71
- version_requirements: !ruby/object:Gem::Requirement
98
+ version_requirements: *id006
99
+ - !ruby/object:Gem::Dependency
100
+ name: weakling
101
+ prerelease: false
102
+ requirement: &id007 !ruby/object:Gem::Requirement
72
103
  requirements:
73
104
  - - ">="
74
105
  - !ruby/object:Gem::Version
75
- version: 2.3.3
76
- version:
106
+ segments:
107
+ - 0
108
+ - 0
109
+ - 3
110
+ version: 0.0.3
111
+ type: :runtime
112
+ version_requirements: *id007
77
113
  description: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's\n\
78
114
  many features is the ability to search documents via XPath or CSS3 selectors.\n\n\
79
115
  XML is like violence - if it doesn\xE2\x80\x99t solve your problems, you are not using\n\
@@ -91,6 +127,38 @@ extra_rdoc_files:
91
127
  - CHANGELOG.rdoc
92
128
  - README.ja.rdoc
93
129
  - README.rdoc
130
+ - ext/nokogiri/html_document.c
131
+ - ext/nokogiri/html_element_description.c
132
+ - ext/nokogiri/html_entity_lookup.c
133
+ - ext/nokogiri/html_sax_parser_context.c
134
+ - ext/nokogiri/nokogiri.c
135
+ - ext/nokogiri/xml_attr.c
136
+ - ext/nokogiri/xml_attribute_decl.c
137
+ - ext/nokogiri/xml_cdata.c
138
+ - ext/nokogiri/xml_comment.c
139
+ - ext/nokogiri/xml_document.c
140
+ - ext/nokogiri/xml_document_fragment.c
141
+ - ext/nokogiri/xml_dtd.c
142
+ - ext/nokogiri/xml_element_content.c
143
+ - ext/nokogiri/xml_element_decl.c
144
+ - ext/nokogiri/xml_encoding_handler.c
145
+ - ext/nokogiri/xml_entity_decl.c
146
+ - ext/nokogiri/xml_entity_reference.c
147
+ - ext/nokogiri/xml_io.c
148
+ - ext/nokogiri/xml_namespace.c
149
+ - ext/nokogiri/xml_node.c
150
+ - ext/nokogiri/xml_node_set.c
151
+ - ext/nokogiri/xml_processing_instruction.c
152
+ - ext/nokogiri/xml_reader.c
153
+ - ext/nokogiri/xml_relax_ng.c
154
+ - ext/nokogiri/xml_sax_parser.c
155
+ - ext/nokogiri/xml_sax_parser_context.c
156
+ - ext/nokogiri/xml_sax_push_parser.c
157
+ - ext/nokogiri/xml_schema.c
158
+ - ext/nokogiri/xml_syntax_error.c
159
+ - ext/nokogiri/xml_text.c
160
+ - ext/nokogiri/xml_xpath_context.c
161
+ - ext/nokogiri/xslt_stylesheet.c
94
162
  files:
95
163
  - .autotest
96
164
  - CHANGELOG.ja.rdoc
@@ -162,8 +230,6 @@ files:
162
230
  - ext/nokogiri/xml_syntax_error.h
163
231
  - ext/nokogiri/xml_text.c
164
232
  - ext/nokogiri/xml_text.h
165
- - ext/nokogiri/xml_xpath.c
166
- - ext/nokogiri/xml_xpath.h
167
233
  - ext/nokogiri/xml_xpath_context.c
168
234
  - ext/nokogiri/xml_xpath_context.h
169
235
  - ext/nokogiri/xslt_stylesheet.c
@@ -216,6 +282,7 @@ files:
216
282
  - lib/nokogiri/ffi/structs/xml_xpath_object.rb
217
283
  - lib/nokogiri/ffi/structs/xml_xpath_parser_context.rb
218
284
  - lib/nokogiri/ffi/structs/xslt_stylesheet.rb
285
+ - lib/nokogiri/ffi/weak_bucket.rb
219
286
  - lib/nokogiri/ffi/xml/attr.rb
220
287
  - lib/nokogiri/ffi/xml/attribute_decl.rb
221
288
  - lib/nokogiri/ffi/xml/cdata.rb
@@ -265,7 +332,6 @@ files:
265
332
  - lib/nokogiri/xml/element_content.rb
266
333
  - lib/nokogiri/xml/element_decl.rb
267
334
  - lib/nokogiri/xml/entity_decl.rb
268
- - lib/nokogiri/xml/fragment_handler.rb
269
335
  - lib/nokogiri/xml/namespace.rb
270
336
  - lib/nokogiri/xml/node.rb
271
337
  - lib/nokogiri/xml/node/save_options.rb
@@ -285,12 +351,14 @@ files:
285
351
  - lib/nokogiri/xml/sax/push_parser.rb
286
352
  - lib/nokogiri/xml/schema.rb
287
353
  - lib/nokogiri/xml/syntax_error.rb
354
+ - lib/nokogiri/xml/text.rb
288
355
  - lib/nokogiri/xml/xpath.rb
289
356
  - lib/nokogiri/xml/xpath/syntax_error.rb
290
357
  - lib/nokogiri/xml/xpath_context.rb
291
358
  - lib/nokogiri/xslt.rb
292
359
  - lib/nokogiri/xslt/stylesheet.rb
293
360
  - lib/xsd/xmlparser/nokogiri.rb
361
+ - tasks/cross_compile.rb
294
362
  - tasks/test.rb
295
363
  - test/css/test_nthiness.rb
296
364
  - test/css/test_parser.rb
@@ -368,8 +436,10 @@ files:
368
436
  - test/xml/test_text.rb
369
437
  - test/xml/test_unparented_node.rb
370
438
  - test/xml/test_xpath.rb
371
- - ext/nokogiri/iconv.dll
439
+ - lib/nokogiri/nokogiri.rb
440
+ - ext/nokogiri/libcharset-1.dll
372
441
  - ext/nokogiri/libexslt.dll
442
+ - ext/nokogiri/libiconv-2.dll
373
443
  - ext/nokogiri/libxml2.dll
374
444
  - ext/nokogiri/libxslt.dll
375
445
  - ext/nokogiri/zlib1.dll
@@ -383,23 +453,24 @@ rdoc_options:
383
453
  - README.rdoc
384
454
  require_paths:
385
455
  - lib
386
- - ext
387
456
  required_ruby_version: !ruby/object:Gem::Requirement
388
457
  requirements:
389
458
  - - ">="
390
459
  - !ruby/object:Gem::Version
460
+ segments:
461
+ - 0
391
462
  version: "0"
392
- version:
393
463
  required_rubygems_version: !ruby/object:Gem::Requirement
394
464
  requirements:
395
465
  - - ">="
396
466
  - !ruby/object:Gem::Version
467
+ segments:
468
+ - 0
397
469
  version: "0"
398
- version:
399
470
  requirements: []
400
471
 
401
472
  rubyforge_project: nokogiri
402
- rubygems_version: 1.3.5
473
+ rubygems_version: 1.3.6
403
474
  signing_key:
404
475
  specification_version: 3
405
476
  summary: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser"
data.tar.gz.sig DELETED
Binary file
Binary file
@@ -1,53 +0,0 @@
1
- #include <xml_xpath.h>
2
-
3
- static void deallocate(xmlXPathObjectPtr xpath)
4
- {
5
- NOKOGIRI_DEBUG_START(xpath);
6
- xmlXPathFreeNodeSetList(xpath); // despite the name, this frees the xpath but not the contained node set
7
- NOKOGIRI_DEBUG_END(xpath);
8
- }
9
-
10
- VALUE Nokogiri_wrap_xml_xpath(xmlXPathObjectPtr xpath)
11
- {
12
- return Data_Wrap_Struct(cNokogiriXmlXpath, 0, deallocate, xpath);
13
- }
14
-
15
- /*
16
- * call-seq:
17
- * node_set
18
- *
19
- * Fetch the node set associated with this xpath context.
20
- */
21
- static VALUE node_set(VALUE self)
22
- {
23
- xmlXPathObjectPtr xpath;
24
- Data_Get_Struct(self, xmlXPathObject, xpath);
25
-
26
- VALUE node_set = Qnil;
27
-
28
- if (xpath->nodesetval)
29
- node_set = Nokogiri_wrap_xml_node_set(xpath->nodesetval);
30
-
31
- if(NIL_P(node_set))
32
- node_set = Nokogiri_wrap_xml_node_set(xmlXPathNodeSetCreate(NULL));
33
-
34
- rb_funcall(node_set, rb_intern("document="), 1, rb_iv_get(self, "@document"));
35
-
36
- return node_set;
37
- }
38
-
39
- VALUE cNokogiriXmlXpath;
40
- void init_xml_xpath(void)
41
- {
42
- VALUE module = rb_define_module("Nokogiri");
43
- VALUE xml = rb_define_module_under(module, "XML");
44
-
45
- /*
46
- * This class wraps an XPath object and should only be instantiated from
47
- * XPathContext.
48
- */
49
- VALUE klass = rb_define_class_under(xml, "XPath", rb_cObject);
50
-
51
- cNokogiriXmlXpath = klass;
52
- rb_define_method(klass, "node_set", node_set, 0);
53
- }