nokogiri 1.5.5-x86-mswin32-60 → 1.5.6.rc2-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.

@@ -1,4 +1,17 @@
1
- == 1.5.5 / unreleased
1
+ == 1.5.6 / unreleased
2
+
3
+ * Features
4
+
5
+ * Bugfixes
6
+
7
+ * JRuby で '#' で始まる文字列を名前とする EntityReference を作ろうとすると INVALID_CHARACTER_ERR という例外がはっせいする。 #719
8
+ * JRuby では Nodeのサブクラスのnamespaceを正しく文字列に変換しない。 #715
9
+ * Nokogiri now detects XSLT transform errors. #731 (Thanks, Justin Fitzsimmons!)
10
+ * Raise an ArgumentError if an invalid encoding is passed to the SAX parser. #756 (Thanks, Bradley Schaefer!)
11
+ * JRuby Node#content now renders newlines properly. #737 (Thanks, Piotr Szmielew!)
12
+
13
+
14
+ == 1.5.5 / 2012年6月24日
2
15
 
3
16
  * Features
4
17
 
@@ -17,6 +30,7 @@
17
30
  * JRuby で Nokogiri::XML::Node を継承したクラスを定義すると、namespace が表示されない。 #695
18
31
  * JRuby で RDF::RDFXML::Writer をインスタンス化しようとすると NAMESPACE_ERR (org.w3c.dom.DOMException) が発生する. #683
19
32
  * JRuby で xpath に namespaces を指定すると例外が発生する. #493
33
+ * JRuby の Entity 解決は C version の Nokogiri と同じ結果にならないといけない。#704, #647, #703
20
34
 
21
35
 
22
36
  == 1.5.4 / 2012年6月12日
@@ -1,4 +1,17 @@
1
- == 1.5.5 / unreleased
1
+ == 1.5.6 / unreleased
2
+
3
+ * Features
4
+
5
+ * Bugfixes
6
+
7
+ * JRuby raises INVALID_CHARACTER_ERR exception when EntityReference name starts with '#'. #719
8
+ * JRuby doesn't coerce namespaces out of strings on a direct subclass of Node. #715
9
+ * Nokogiri now detects XSLT transform errors. #731 (Thanks, Justin Fitzsimmons!)
10
+ * Raise an ArgumentError if an invalid encoding is passed to the SAX parser. #756 (Thanks, Bradley Schaefer!)
11
+ * JRuby Node#content now renders newlines properly. #737 (Thanks, Piotr Szmielew!)
12
+
13
+
14
+ == 1.5.5 / 2012-06-24
2
15
 
3
16
  * Features
4
17
 
@@ -17,6 +30,7 @@
17
30
  * JRuby renders nodes without their namespace when subclassing Node. #695
18
31
  * JRuby raises NAMESPACE_ERR (org.w3c.dom.DOMException) while instantiating RDF::RDFXML::Writer. #683
19
32
  * JRuby is not able to use namespaces in xpath. #493
33
+ * JRuby's Entity resolving should be consistent with C-Nokogiri #704, #647, #703
20
34
 
21
35
 
22
36
  == 1.5.4 / 2012-06-12
@@ -43,8 +43,13 @@ ext/java/nokogiri/XmlSyntaxError.java
43
43
  ext/java/nokogiri/XmlText.java
44
44
  ext/java/nokogiri/XmlXpathContext.java
45
45
  ext/java/nokogiri/XsltStylesheet.java
46
+ ext/java/nokogiri/internals/ClosedStreamException.java
46
47
  ext/java/nokogiri/internals/HtmlDomParserContext.java
48
+ ext/java/nokogiri/internals/NokogiriBlockingQueueInputStream.java
47
49
  ext/java/nokogiri/internals/NokogiriDocumentCache.java
50
+ ext/java/nokogiri/internals/NokogiriDomParser.java
51
+ ext/java/nokogiri/internals/NokogiriEncodingReaderWrapper.java
52
+ ext/java/nokogiri/internals/NokogiriEntityResolver.java
48
53
  ext/java/nokogiri/internals/NokogiriErrorHandler.java
49
54
  ext/java/nokogiri/internals/NokogiriHandler.java
50
55
  ext/java/nokogiri/internals/NokogiriHelpers.java
@@ -62,7 +67,6 @@ ext/java/nokogiri/internals/ReaderNode.java
62
67
  ext/java/nokogiri/internals/SaveContextVisitor.java
63
68
  ext/java/nokogiri/internals/SchemaErrorHandler.java
64
69
  ext/java/nokogiri/internals/XmlDeclHandler.java
65
- ext/java/nokogiri/internals/XmlDomParser.java
66
70
  ext/java/nokogiri/internals/XmlDomParserContext.java
67
71
  ext/java/nokogiri/internals/XmlSaxParser.java
68
72
  ext/java/nokogiri/internals/XsltExtensionFunction.java
@@ -230,6 +234,9 @@ test/files/snuggles.xml
230
234
  test/files/staff.dtd
231
235
  test/files/staff.xml
232
236
  test/files/staff.xslt
237
+ test/files/test_document_url/bar.xml
238
+ test/files/test_document_url/document.dtd
239
+ test/files/test_document_url/document.xml
233
240
  test/files/tlm.html
234
241
  test/files/to_be_xincluded.xml
235
242
  test/files/valid_bar.xml
@@ -1,4 +1,4 @@
1
- = Nokogiri (鋸)
1
+ = Nokogiri (鋸) {<img src="https://secure.travis-ci.org/sparklemotion/nokogiri.png?rvm=1.9.3" />}[http://travis-ci.org/sparklemotion/nokogiri] {<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/sparklemotion/nokogiri]
2
2
 
3
3
  * http://nokogiri.org/
4
4
  * http://github.com/sparklemotion/nokogiri/wikis
@@ -1,4 +1,4 @@
1
- = Nokogiri {<img src="https://secure.travis-ci.org/sparklemotion/nokogiri.png?rvm=1.9.3" />}[http://travis-ci.org/sparklemotion/nokogiri]
1
+ = Nokogiri {<img src="https://secure.travis-ci.org/sparklemotion/nokogiri.png?rvm=1.9.3" />}[http://travis-ci.org/sparklemotion/nokogiri] {<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/sparklemotion/nokogiri]
2
2
 
3
3
  * http://nokogiri.org
4
4
  * http://github.com/sparklemotion/nokogiri/wikis
@@ -151,7 +151,7 @@ Then run rake:
151
151
 
152
152
  Copyright (c) 2008 - 2012:
153
153
 
154
- * {Aaron Patterson}[http://sparklemotionmaking.com]
154
+ * {Aaron Patterson}[http://tenderlovemaking.com]
155
155
  * {Mike Dalessio}[http://mike.daless.io]
156
156
  * {Charles Nutter}[http://blog.headius.com]
157
157
  * {Sergio Arbeo}[http://www.serabe.com]
data/ROADMAP.md CHANGED
@@ -69,6 +69,9 @@
69
69
  * we should standardize on a hash of options for these and other calls
70
70
  * what should NodeSet#xpath return?
71
71
  * https://github.com/sparklemotion/nokogiri/issues/656
72
+ * also, clean up or unify the implementations of #xpath-and-friends in Node and NodeSet
73
+ * implementations are very similar, but no shared code :(
74
+ * decorate nodes in a consistent manner
72
75
 
73
76
  ## Encoding
74
77
 
data/Rakefile CHANGED
@@ -46,14 +46,10 @@ HOE = Hoe.spec 'nokogiri' do
46
46
  ["mini_portile", ">= 0.2.2"],
47
47
  ["minitest", "~> 2.2.2"],
48
48
  ["rake", ">= 0.9"],
49
- ["rake-compiler", "= 0.8.0"]
49
+ ["rake-compiler", "= 0.8.0"],
50
+ ["racc", ">= 1.4.6"],
51
+ ["rexical", ">= 1.0.5"]
50
52
  ]
51
- if ! java?
52
- self.extra_dev_deps += [
53
- ["racc", ">= 1.4.6"],
54
- ["rexical", ">= 1.0.5"]
55
- ]
56
- end
57
53
 
58
54
  if java?
59
55
  self.spec_extras = { :platform => 'java' }
@@ -118,6 +114,20 @@ desc "Generate css/parser.rb and css/tokenizer.rex"
118
114
  task 'generate' => [GENERATED_PARSER, GENERATED_TOKENIZER]
119
115
  task 'gem:spec' => 'generate' if Rake::Task.task_defined?("gem:spec")
120
116
 
117
+ # This is a big hack to make sure that the racc and rexical
118
+ # dependencies in the Gemfile are constrainted to ruby platforms
119
+ # (i.e. MRI and Rubinius). There's no way to do that through hoe,
120
+ # and any solution will require changing hoe and hoe-bundler.
121
+ old_gemfile_task = Rake::Task['bundler:gemfile']
122
+ task 'bundler:gemfile' do
123
+ old_gemfile_task.invoke
124
+
125
+ lines = File.open('Gemfile', 'r') { |f| f.readlines }.map do |line|
126
+ line =~ /racc|rexical/ ? "#{line.strip}, :platform => :ruby" : line
127
+ end
128
+ File.open('Gemfile', 'w') { |f| lines.each { |line| f.puts line } }
129
+ end
130
+
121
131
  file GENERATED_PARSER => "lib/nokogiri/css/parser.y" do |t|
122
132
  racc = RbConfig::CONFIG['target_os'] =~ /mswin32/ ? '' : `which racc`.strip
123
133
  racc = "#{::RbConfig::CONFIG['bindir']}/racc" if racc.empty?
@@ -149,9 +159,18 @@ task :java_debug do
149
159
  ENV['JAVA_OPTS'] = '-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y' if java? && ENV['JAVA_DEBUG']
150
160
  end
151
161
 
162
+ if java?
163
+ task :test_18 => :test
164
+ task :test_19 do
165
+ ENV['JRUBY_OPTS'] = "--1.9"
166
+ Rake::Task["test"].invoke
167
+ end
168
+ end
169
+
152
170
  Rake::Task[:test].prerequisites << :compile
153
171
  Rake::Task[:test].prerequisites << :java_debug
154
172
  Rake::Task[:test].prerequisites << :check_extra_deps unless java?
173
+
155
174
  if Hoe.plugins.include?(:debugging)
156
175
  ['valgrind', 'valgrind:mem', 'valgrind:mem0'].each do |task_name|
157
176
  Rake::Task["test:#{task_name}"].prerequisites << :compile
@@ -162,6 +181,7 @@ end
162
181
 
163
182
  desc "build a windows gem without all the ceremony."
164
183
  task "gem:windows" => "gem" do
184
+ # TODO: 1.8.7-p358, 1.9.3-p194
165
185
  cross_rubies = ["1.8.7-p330", "1.9.2-p136"]
166
186
  ruby_cc_version = cross_rubies.collect { |_| _.split("-").first }.join(":") # e.g., "1.8.7:1.9.2"
167
187
  rake_compiler_config_path = "#{ENV['HOME']}/.rake-compiler/config.yml"
data/build_all CHANGED
@@ -2,14 +2,36 @@
2
2
  #
3
3
  # script to build gems for all relevant platforms:
4
4
  # - MRI et al (standard gem)
5
- # - windows (x86-mingw32 and x86-msin32-60)
5
+ # - windows (x86-mingw32 and x86-mswin32-60)
6
6
  # - jruby
7
7
  #
8
- # prerequisite is the mingw32 packages.
9
- # on ubuntu, `sudo apt-get install mingw32`
10
- # for others, read up at https://github.com/luislavena/rake-compiler
8
+ # here's what I recommend for building all the gems:
9
+ #
10
+ # 1. set up a vagrant VM guest running ubuntu lucid 32-bit.
11
+ # 2. install rvm, and install 1.8.7, 1.9.3 and jruby.
12
+ # 3. `sudo apt-get install mingw32`
13
+ #
14
+ # as you build, you may run into these problems:
15
+ #
16
+ # - on ubuntus 11 and later, you may have issues with building
17
+ # rake-compiler's rubies against openssl v2. Just comment the lines
18
+ # out from ossl_ssl.c and you'll be fine.
19
+ #
20
+ # - you may have issues with Pathname conversion to String in
21
+ # bundler. Add this to the offending bundler file:
22
+ #
23
+ # class Pathname
24
+ # def to_str
25
+ # to_s
26
+ # end
27
+ # end
28
+ #
29
+ # - you may also have to hack rubygems.rb to eliminate a reference to
30
+ # RUBY_ENGINE
11
31
  #
12
32
 
33
+ HOST=
34
+
13
35
  # Load RVM into a shell session *as a function*
14
36
  if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
15
37
  source "$HOME/.rvm/scripts/rvm"
@@ -28,31 +50,44 @@ set -o errexit
28
50
 
29
51
  # initialize
30
52
  rvm_use 1.8.7
53
+ bundle install --quiet --local || bundle install
31
54
  rm -rf tmp pkg
32
- bundle exec rake clean clobber
55
+ bundle exec rake clean
33
56
 
34
57
  # holding pen
35
58
  rm -rf gems
36
59
  mkdir -p gems
37
60
 
38
- # MRI
39
- rvm_use 1.8.7
40
- bundle exec rake gem
41
- cp -v pkg/nokogiri*.gem gems # should only be one at this point in the script
42
-
43
61
  # windows
62
+ platform=$(uname -i)
63
+ if [[ $platform =~ "64" ]] ; then
64
+ echo ""
65
+ echo "ERROR: You need to build the windows gem on a 32-bit machine!"
66
+ echo ""
67
+ exit 1
68
+ fi
44
69
  rvm_use 1.8.7
45
- bundle exec rake-compiler cross-ruby VERSION=1.8.7-p330
46
- bundle exec rake-compiler cross-ruby VERSION=1.9.2-p136
70
+ if [[ ! -a ${HOME}/.rake-compiler/ruby/ruby-1.8.7-p330/lib/ruby/1.8.7/x86_64-linux/rbconfig.rb ]] ; then
71
+ bundle exec rake-compiler cross-ruby VERSION=1.8.7-p330
72
+ fi
73
+ if [[ ! -a ${HOME}/.rake-compiler/ruby/ruby-1.9.2-p136/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb ]] ; then
74
+ bundle exec rake-compiler cross-ruby VERSION=1.9.2-p136
75
+ fi
47
76
  bundle exec rake cross
48
- rake gem:windows # don't use bundler here. it blows up. *shrug*
77
+ bundle exec rake gem:windows
49
78
  cp -v pkg/nokogiri*x86-{mingw32,mswin32}*.gem gems
50
79
 
80
+ # MRI
81
+ rvm_use 1.8.7
82
+ bundle exec rake gem
83
+ cp -v pkg/nokogiri*.gem gems # should only be one at this point in the script
84
+
51
85
  # jruby
52
- rvm_use jruby-1.6.5
86
+ rvm_use jruby
87
+ bundle install --quiet --local || bundle install
53
88
  bundle exec rake clean clobber
54
89
  rvm_use 1.8.7
55
90
  bundle exec rake generate
56
- rvm_use jruby-1.6.5
91
+ rvm_use jruby
57
92
  bundle exec rake gem
58
- cp -v pkg/nokogiri*java.gem gems
93
+ cp -v pkg/nokogiri*java.gem gems
@@ -27,6 +27,7 @@ end
27
27
 
28
28
  if RbConfig::MAKEFILE_CONFIG['CC'] =~ /mingw/
29
29
  $CFLAGS << " -DIN_LIBXML"
30
+ $LIBS << " -lz" # TODO why is this necessary?
30
31
  end
31
32
 
32
33
  if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/
@@ -156,7 +156,7 @@ static VALUE set_encoding(VALUE self, VALUE encoding)
156
156
  Data_Get_Struct(self, xmlDoc, doc);
157
157
 
158
158
  if (doc->encoding)
159
- free((char *) doc->encoding); // this may produce a gcc cast warning
159
+ free((char *) doc->encoding); /* this may produce a gcc cast warning */
160
160
 
161
161
  doc->encoding = xmlStrdup((xmlChar *)StringValuePtr(encoding));
162
162
 
@@ -109,6 +109,10 @@ static VALUE serialize(VALUE self, VALUE xmlobj)
109
109
  return rval ;
110
110
  }
111
111
 
112
+ static void swallow_superfluous_xml_errors(void * userdata, xmlErrorPtr error, ...)
113
+ {
114
+ }
115
+
112
116
  /*
113
117
  * call-seq:
114
118
  * transform(document, params = [])
@@ -126,12 +130,13 @@ static VALUE serialize(VALUE self, VALUE xmlobj)
126
130
  */
127
131
  static VALUE transform(int argc, VALUE* argv, VALUE self)
128
132
  {
129
- VALUE xmldoc, paramobj ;
133
+ VALUE xmldoc, paramobj, errstr, exception ;
130
134
  xmlDocPtr xml ;
131
135
  xmlDocPtr result ;
132
136
  nokogiriXsltStylesheetTuple *wrapper;
133
137
  const char** params ;
134
138
  long param_len, j ;
139
+ int parse_error_occurred ;
135
140
 
136
141
  rb_scan_args(argc, argv, "11", &xmldoc, &paramobj);
137
142
  if (NIL_P(paramobj)) { paramobj = rb_ary_new2(0L) ; }
@@ -158,10 +163,22 @@ static VALUE transform(int argc, VALUE* argv, VALUE self)
158
163
  }
159
164
  params[param_len] = 0 ;
160
165
 
166
+ errstr = rb_str_new(0, 0);
167
+ xsltSetGenericErrorFunc((void *)errstr, xslt_generic_error_handler);
168
+ xmlSetGenericErrorFunc(NULL, (xmlGenericErrorFunc)&swallow_superfluous_xml_errors);
169
+
161
170
  result = xsltApplyStylesheet(wrapper->ss, xml, params);
162
171
  free(params);
163
172
 
164
- if (!result) rb_raise(rb_eRuntimeError, "could not perform xslt transform on document");
173
+ xsltSetGenericErrorFunc(NULL, NULL);
174
+ xmlSetGenericErrorFunc(NULL, NULL);
175
+
176
+ parse_error_occurred = (Qfalse == rb_funcall(errstr, rb_intern("empty?"), 0));
177
+
178
+ if (parse_error_occurred) {
179
+ exception = rb_exc_new3(rb_eRuntimeError, errstr);
180
+ rb_exc_raise(exception);
181
+ }
165
182
 
166
183
  return Nokogiri_wrap_xml_document((VALUE)0, result) ;
167
184
  }
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  module Nokogiri
2
2
  # The version of Nokogiri you are using
3
- VERSION = '1.5.5'
3
+ VERSION = '1.5.6.rc2'
4
4
 
5
5
  class VersionInfo # :nodoc:
6
6
  def jruby?
@@ -299,20 +299,7 @@ module Nokogiri
299
299
  def add_previous_sibling node_or_tags
300
300
  raise ArgumentError.new("A document may not have multiple root nodes.") if parent.is_a?(XML::Document) && !node_or_tags.is_a?(XML::ProcessingInstruction)
301
301
 
302
- node_or_tags = coerce(node_or_tags)
303
- if node_or_tags.is_a?(XML::NodeSet)
304
- if text?
305
- pivot = Nokogiri::XML::Node.new 'dummy', document
306
- add_previous_sibling_node pivot
307
- else
308
- pivot = self
309
- end
310
- node_or_tags.each { |n| pivot.send :add_previous_sibling_node, n }
311
- pivot.unlink if text?
312
- else
313
- add_previous_sibling_node node_or_tags
314
- end
315
- node_or_tags
302
+ add_sibling :previous, node_or_tags
316
303
  end
317
304
 
318
305
  ###
@@ -325,20 +312,7 @@ module Nokogiri
325
312
  def add_next_sibling node_or_tags
326
313
  raise ArgumentError.new("A document may not have multiple root nodes.") if parent.is_a?(XML::Document)
327
314
 
328
- node_or_tags = coerce(node_or_tags)
329
- if node_or_tags.is_a?(XML::NodeSet)
330
- if text?
331
- pivot = Nokogiri::XML::Node.new 'dummy', document
332
- add_next_sibling_node pivot
333
- else
334
- pivot = self
335
- end
336
- node_or_tags.reverse_each { |n| pivot.send :add_next_sibling_node, n }
337
- pivot.unlink if text?
338
- else
339
- add_next_sibling_node node_or_tags
340
- end
341
- node_or_tags
315
+ add_sibling :next, node_or_tags
342
316
  end
343
317
 
344
318
  ####
@@ -761,12 +735,7 @@ module Nokogiri
761
735
  # See Node#write_to for a list of +options+. For formatted output,
762
736
  # use Node#to_xhtml instead.
763
737
  def to_html options = {}
764
- # FIXME: this is a hack around broken libxml versions
765
- return dump_html if Nokogiri.uses_libxml? && %w[2 6] === LIBXML_VERSION.split('.')[0..1]
766
-
767
- options[:save_with] |= SaveOptions::DEFAULT_HTML if options[:save_with]
768
- options[:save_with] = SaveOptions::DEFAULT_HTML unless options[:save_with]
769
- serialize(options)
738
+ to_format SaveOptions::DEFAULT_HTML, options
770
739
  end
771
740
 
772
741
  ###
@@ -787,12 +756,7 @@ module Nokogiri
787
756
  #
788
757
  # See Node#write_to for a list of +options+
789
758
  def to_xhtml options = {}
790
- # FIXME: this is a hack around broken libxml versions
791
- return dump_html if Nokogiri.uses_libxml? && %w[2 6] === LIBXML_VERSION.split('.')[0..1]
792
-
793
- options[:save_with] |= SaveOptions::DEFAULT_XHTML if options[:save_with]
794
- options[:save_with] = SaveOptions::DEFAULT_XHTML unless options[:save_with]
795
- serialize(options)
759
+ to_format SaveOptions::DEFAULT_XHTML, options
796
760
  end
797
761
 
798
762
  ###
@@ -835,11 +799,7 @@ module Nokogiri
835
799
  #
836
800
  # See Node#write_to for a list of +options+
837
801
  def write_html_to io, options = {}
838
- # FIXME: this is a hack around broken libxml versions
839
- return (io << dump_html) if Nokogiri.uses_libxml? && %w[2 6] === LIBXML_VERSION.split('.')[0..1]
840
-
841
- options[:save_with] ||= SaveOptions::DEFAULT_HTML
842
- write_to io, options
802
+ write_format_to SaveOptions::DEFAULT_HTML, io, options
843
803
  end
844
804
 
845
805
  ###
@@ -847,11 +807,7 @@ module Nokogiri
847
807
  #
848
808
  # See Node#write_to for a list of +options+
849
809
  def write_xhtml_to io, options = {}
850
- # FIXME: this is a hack around broken libxml versions
851
- return (io << dump_html) if Nokogiri.uses_libxml? && %w[2 6] === LIBXML_VERSION.split('.')[0..1]
852
-
853
- options[:save_with] ||= SaveOptions::DEFAULT_XHTML
854
- write_to io, options
810
+ write_format_to SaveOptions::DEFAULT_XHTML, io, options
855
811
  end
856
812
 
857
813
  ###
@@ -898,6 +854,43 @@ module Nokogiri
898
854
 
899
855
  private
900
856
 
857
+ def add_sibling next_or_previous, node_or_tags
858
+ impl = (next_or_previous == :next) ? :add_next_sibling_node : :add_previous_sibling_node
859
+ iter = (next_or_previous == :next) ? :reverse_each : :each
860
+
861
+ node_or_tags = coerce node_or_tags
862
+ if node_or_tags.is_a?(XML::NodeSet)
863
+ if text?
864
+ pivot = Nokogiri::XML::Node.new 'dummy', document
865
+ send impl, pivot
866
+ else
867
+ pivot = self
868
+ end
869
+ node_or_tags.send(iter) { |n| pivot.send impl, n }
870
+ pivot.unlink if text?
871
+ else
872
+ send impl, node_or_tags
873
+ end
874
+ node_or_tags
875
+ end
876
+
877
+ def to_format save_option, options
878
+ # FIXME: this is a hack around broken libxml versions
879
+ return dump_html if Nokogiri.uses_libxml? && %w[2 6] === LIBXML_VERSION.split('.')[0..1]
880
+
881
+ options[:save_with] |= save_option if options[:save_with]
882
+ options[:save_with] = save_option unless options[:save_with]
883
+ serialize(options)
884
+ end
885
+
886
+ def write_format_to save_option, io, options
887
+ # FIXME: this is a hack around broken libxml versions
888
+ return (io << dump_html) if Nokogiri.uses_libxml? && %w[2 6] === LIBXML_VERSION.split('.')[0..1]
889
+
890
+ options[:save_with] ||= save_option
891
+ write_to io, options
892
+ end
893
+
901
894
  def extract_params params # :nodoc:
902
895
  # Pop off our custom function handler if it exists
903
896
  handler = params.find { |param|
@@ -68,6 +68,7 @@ module Nokogiri
68
68
 
69
69
  # Create a new Parser with +doc+ and +encoding+
70
70
  def initialize doc = Nokogiri::XML::SAX::Document.new, encoding = 'UTF-8'
71
+ check_encoding(encoding)
71
72
  @encoding = encoding
72
73
  @document = doc
73
74
  @warned = false
@@ -87,6 +88,7 @@ module Nokogiri
87
88
  ###
88
89
  # Parse given +io+
89
90
  def parse_io io, encoding = 'ASCII'
91
+ check_encoding(encoding)
90
92
  @encoding = encoding
91
93
  ctx = ParserContext.io(io, ENCODINGS[encoding])
92
94
  yield ctx if block_given?
@@ -109,6 +111,11 @@ module Nokogiri
109
111
  yield ctx if block_given?
110
112
  ctx.parse_with self
111
113
  end
114
+
115
+ private
116
+ def check_encoding(encoding)
117
+ raise ArgumentError.new("'#{encoding}' is not a valid encoding") unless ENCODINGS[encoding]
118
+ end
112
119
  end
113
120
  end
114
121
  end
@@ -24,7 +24,7 @@ module Nokogiri
24
24
  def parse string, modules = {}
25
25
  modules.each do |url, klass|
26
26
  XSLT.register url, klass
27
- end
27
+ end
28
28
 
29
29
  if Nokogiri.jruby?
30
30
  Stylesheet.parse_stylesheet_doc(XML.parse(string), string)
@@ -4,10 +4,10 @@ HOST = Rake::ExtensionCompiler.mingw_host
4
4
 
5
5
  require 'mini_portile'
6
6
  $recipes = {}
7
- $recipes[:zlib] = MiniPortile.new "zlib", "1.2.5"
7
+ $recipes[:zlib] = MiniPortile.new "zlib", "1.2.7"
8
8
  $recipes[:libiconv] = MiniPortile.new "libiconv", "1.13.1"
9
- $recipes[:libxml2] = MiniPortile.new "libxml2", "2.7.7"
10
- $recipes[:libxslt] = MiniPortile.new "libxslt", "1.1.26"
9
+ $recipes[:libxml2] = MiniPortile.new "libxml2", "2.7.7"
10
+ $recipes[:libxslt] = MiniPortile.new "libxslt", "1.1.26"
11
11
  $recipes.each { |_, recipe| recipe.host = HOST }
12
12
 
13
13
  file "lib/nokogiri/nokogiri.rb" do
@@ -144,10 +144,7 @@ namespace :cross do
144
144
  end
145
145
  end
146
146
 
147
- HOE.clean_globs += [
148
- "#{CROSS_DIR}/*.installed",
149
- "#{CROSS_DIR}/#{HOST}",
150
- "tmp/#{HOST}",
151
- ]
147
+ require 'rake/clean'
148
+ CLOBBER.include("#{CROSS_DIR}/*.installed", "#{CROSS_DIR}/#{HOST}", "tmp/#{HOST}")
152
149
 
153
150
  task :cross => ["cross:libxslt", "lib/nokogiri/nokogiri.rb", "cross:file_list"]
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <blah>foobar</blah>
@@ -0,0 +1,4 @@
1
+ <!ENTITY bar SYSTEM "bar.xml">
2
+ <!ELEMENT document (body)>
3
+ <!ELEMENT blah ANY>
4
+ <!ELEMENT body ANY>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <!DOCTYPE document SYSTEM "document.dtd">
3
+
4
+ <document>
5
+ <body>&bar;</body>
6
+ </document>
@@ -369,6 +369,29 @@ eohtml
369
369
  assert_equal('Hello world!', node.inner_text.strip)
370
370
  end
371
371
 
372
+ def test_doc_type
373
+ html = Nokogiri::HTML(<<-eohtml)
374
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
375
+ <html xmlns="http://www.w3.org/1999/xhtml">
376
+ <body>
377
+ <p>Rainbow Dash</p>
378
+ </body>
379
+ </html>
380
+ eohtml
381
+ assert_equal "html", html.internal_subset.name
382
+ assert_equal "-//W3C//DTD XHTML 1.1//EN", html.internal_subset.external_id
383
+ assert_equal "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd", html.internal_subset.system_id
384
+ assert_equal "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">", html.to_s[0,97]
385
+ end
386
+
387
+ def test_content_size
388
+ html = Nokogiri::HTML('<div>
389
+ </div>')
390
+ assert_equal 1, html.content.size
391
+ assert_equal 1, html.content.split("").size
392
+ assert_equal "\n", html.content
393
+ end
394
+
372
395
  def test_find_by_xpath
373
396
  found = @html.xpath('//div/a')
374
397
  assert_equal 3, found.length
@@ -189,8 +189,37 @@ encoding="iso-8859-1" indent="yes"/>
189
189
  Nokogiri::XSLT.quote_params(params.to_a.flatten)))
190
190
  check_params result_doc, params
191
191
  end
192
+
193
+ def test_xslt_paramaters
194
+ xslt_str = <<-EOX
195
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
196
+ <xsl:template match="/">
197
+ <xsl:value-of select="$foo" />
198
+ </xsl:template>
199
+ </xsl:stylesheet>
200
+ EOX
201
+
202
+ xslt = Nokogiri::XSLT(xslt_str)
203
+ doc = Nokogiri::XML("<root />")
204
+ assert_match %r{bar}, xslt.transform(doc, Nokogiri::XSLT.quote_params('foo' => 'bar')).to_s
205
+ end
206
+
207
+ def test_xslt_transform_error
208
+ xslt_str = <<-EOX
209
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
210
+ <xsl:template match="/">
211
+ <xsl:value-of select="$foo" />
212
+ </xsl:template>
213
+ </xsl:stylesheet>
214
+ EOX
215
+
216
+ xslt = Nokogiri::XSLT(xslt_str)
217
+ doc = Nokogiri::XML("<root />")
218
+ assert_raises(RuntimeError) { xslt.transform(doc) }
219
+ end
192
220
  end
193
221
 
222
+
194
223
  def test_xslt_parse_error
195
224
  xslt_str = <<-EOX
196
225
  <xsl:stylesheet version="1.0"
@@ -210,6 +239,7 @@ encoding="iso-8859-1" indent="yes"/>
210
239
  assert_raises(RuntimeError) { Nokogiri::XSLT.parse(xslt_str) }
211
240
  end
212
241
 
242
+
213
243
  def test_passing_a_non_document_to_transform
214
244
  xsl = Nokogiri::XSLT('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"></xsl:stylesheet>')
215
245
  assert_raises(ArgumentError) { xsl.transform("<div></div>") }
@@ -250,6 +250,11 @@ module Nokogiri
250
250
  assert_raises(ArgumentError) { @parser.parse_memory(nil) }
251
251
  end
252
252
 
253
+ def test_bad_encoding_args
254
+ assert_raises(ArgumentError) { XML::SAX::Parser.new(Doc.new, 'not an encoding') }
255
+ assert_raises(ArgumentError) { @parser.parse_io(StringIO.new('<root/>'), 'not an encoding')}
256
+ end
257
+
253
258
  def test_ctag
254
259
  @parser.parse_memory(<<-eoxml)
255
260
  <p id="asdfasdf">
@@ -16,6 +16,18 @@ module Nokogiri
16
16
  def test_many_references
17
17
  100.times { EntityReference.new(@xml, 'foo') }
18
18
  end
19
+
20
+ def test_newline_node
21
+ # issue 719
22
+ xml = <<EOF
23
+ <?xml version="1.0" ?>
24
+ <item></item>
25
+ EOF
26
+ doc = Nokogiri::XML xml
27
+ lf_node = Nokogiri::XML::EntityReference.new(doc, "#xa")
28
+ doc.xpath('/item').first.add_child(lf_node)
29
+ assert_equal "#xa", doc.xpath('./item').first.child.name
30
+ end
19
31
  end
20
32
 
21
33
  module Common
@@ -70,6 +70,26 @@ module Nokogiri
70
70
  s = %q{<?xml version='1.0'?><!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [<!ENTITY % p ''>]>}
71
71
  Nokogiri::XML(s).remove_namespaces!
72
72
  end
73
+
74
+ def test_maintain_element_namespaces
75
+ doc = Document.new
76
+ subject = Nokogiri::XML::Node.new 'foo', doc
77
+ subject << '<foobar xmlns="barfoo"/>'
78
+ child = subject.children.first
79
+ assert_equal 'foobar', child.name
80
+ assert_equal 'barfoo', child.namespace.href
81
+ assert_empty child.attributes
82
+ end
83
+
84
+ def test_maintain_element_namespaces_in_urn
85
+ doc = Document.new
86
+ subject = Nokogiri::XML::Node.new 'foo', doc
87
+ subject << '<foobar xmlns="urn:xmpp:foospec:barfoo"/>'
88
+ child = subject.children.first
89
+ assert_equal 'foobar', child.name
90
+ assert_equal 'urn:xmpp:foospec:barfoo', child.namespace.href
91
+ assert_empty child.attributes
92
+ end
73
93
  end
74
94
  end
75
95
  end
@@ -1024,6 +1024,23 @@ EOXML
1024
1024
  assert_nil ns.prefix
1025
1025
  assert_equal ns.href, "http://bar.com"
1026
1026
  end
1027
+
1028
+ # issue 695
1029
+ def test_namespace_in_rendered_xml
1030
+ document = Nokogiri::XML::Document.new
1031
+ subject = Nokogiri::XML::Node.new 'foo', document
1032
+ ns = subject.add_namespace nil, 'bar'
1033
+ subject.namespace = ns
1034
+ assert_match(/xmlns="bar"/, subject.to_xml)
1035
+ end
1036
+
1037
+ def test_text_node_colon
1038
+ document = Nokogiri::XML::Document.new
1039
+ root = Nokogiri::XML::Node.new 'foo', document
1040
+ document.root = root
1041
+ root << "<a>hello:with_colon</a>"
1042
+ assert_match(/hello:with_colon/, document.to_xml)
1043
+ end
1027
1044
  end
1028
1045
  end
1029
1046
  end
@@ -16,6 +16,15 @@ module Nokogiri
16
16
  node.attribute_with_ns('foo', 'http://tenderlovemaking.com/').value
17
17
  end
18
18
 
19
+ def test_prefixed_attributes
20
+ doc = Nokogiri::XML "<root xml:lang='en-GB' />"
21
+
22
+ node = doc.root
23
+
24
+ assert_equal 'en-GB', node[:'xml:lang']
25
+ assert_equal nil, node[:lang]
26
+ end
27
+
19
28
  def test_namespace_key?
20
29
  doc = Nokogiri::XML <<-eoxml
21
30
  <root xmlns:tlm='http://tenderlovemaking.com/'>
data/test_all CHANGED
@@ -6,7 +6,7 @@
6
6
  # requires `rvm` to be installed. sorry about that, multiruby dudes.
7
7
  #
8
8
 
9
- RUBIES="ruby-1.9.3 jruby-1.6.5 ree-1.8.7 ruby-1.9.2 ruby-1.8.7"
9
+ RUBIES="ruby-1.9.3-p194 jruby-1.6.5.1 jruby-1.6.7.2 ree-1.8.7-2011.12 ruby-1.9.2-p290 ruby-1.8.7-p357"
10
10
  TEST_LOG=test.log
11
11
  VALGRIND_LOG=valgrind.log
12
12
 
@@ -30,7 +30,7 @@ function rvm_use {
30
30
 
31
31
  function generate_parser_and_tokenizer {
32
32
  old_ruby=$current_ruby
33
- rvm_use ruby-1.8.7
33
+ rvm_use ruby-1.8.7-p357
34
34
  bundle exec rake generate 2>&1 > /dev/null
35
35
  rvm_use $old_ruby
36
36
  }
@@ -41,14 +41,14 @@ function clean {
41
41
 
42
42
  function compile {
43
43
  echo "** compiling ..."
44
- generate_parser_and_tokenizer
44
+ # generate_parser_and_tokenizer
45
45
  bundle exec rake compile 2>&1 > /dev/null
46
46
  }
47
47
 
48
48
  for ruby in $RUBIES ; do
49
49
  rvm_use ${ruby}
50
50
  if gem list bundler | fgrep -v 1.1.rc 2>&1 > /dev/null ; then
51
- gem install bundler --pre
51
+ gem install bundler
52
52
  fi
53
53
  bundle install --quiet --local || bundle install
54
54
  clean
@@ -60,14 +60,7 @@ for ruby in $RUBIES ; do
60
60
  clean
61
61
  compile
62
62
  echo "** running tests ..."
63
- if [[ $ruby =~ "jruby" ]] ; then
64
- # I get:
65
- # /usr/lib/jvm/java-7-oracle/bin/java: symbol lookup error: /home/mike/.rvm/gems/jruby-1.6.5@nokogiri/gems/racc-1.4.7/lib/racc/cparse.so: undefined symbol: rb_catch
66
- # if I use 'bundle exec' with jruby. Anybody?
67
- rake test 2>&1 | tee -a $TEST_LOG
68
- else
69
- bundle exec rake test 2>&1 | tee -a $TEST_LOG
70
- fi
63
+ bundle exec rake test 2>&1 | tee -a $TEST_LOG
71
64
  clean
72
65
  done
73
66
 
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
5
- prerelease:
4
+ hash: -898052668
5
+ prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 5
9
- - 5
10
- version: 1.5.5
9
+ - 6
10
+ - rc
11
+ - 2
12
+ version: 1.5.6.rc2
11
13
  platform: x86-mswin32-60
12
14
  authors:
13
15
  - Aaron Patterson
@@ -18,12 +20,12 @@ autorequire:
18
20
  bindir: bin
19
21
  cert_chain: []
20
22
 
21
- date: 2012-06-23 00:00:00 Z
23
+ date: 2012-09-12 00:00:00 Z
22
24
  dependencies:
23
25
  - !ruby/object:Gem::Dependency
24
- name: hoe-bundler
25
26
  prerelease: false
26
- requirement: &id001 !ruby/object:Gem::Requirement
27
+ name: hoe-bundler
28
+ version_requirements: &id001 !ruby/object:Gem::Requirement
27
29
  none: false
28
30
  requirements:
29
31
  - - ">="
@@ -33,12 +35,12 @@ dependencies:
33
35
  - 1
34
36
  - 1
35
37
  version: "1.1"
38
+ requirement: *id001
36
39
  type: :development
37
- version_requirements: *id001
38
40
  - !ruby/object:Gem::Dependency
39
- name: hoe-debugging
40
41
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
42
+ name: hoe-debugging
43
+ version_requirements: &id002 !ruby/object:Gem::Requirement
42
44
  none: false
43
45
  requirements:
44
46
  - - ">="
@@ -49,12 +51,12 @@ dependencies:
49
51
  - 0
50
52
  - 3
51
53
  version: 1.0.3
54
+ requirement: *id002
52
55
  type: :development
53
- version_requirements: *id002
54
56
  - !ruby/object:Gem::Dependency
55
- name: hoe-gemspec
56
57
  prerelease: false
57
- requirement: &id003 !ruby/object:Gem::Requirement
58
+ name: hoe-gemspec
59
+ version_requirements: &id003 !ruby/object:Gem::Requirement
58
60
  none: false
59
61
  requirements:
60
62
  - - ">="
@@ -64,12 +66,12 @@ dependencies:
64
66
  - 1
65
67
  - 0
66
68
  version: "1.0"
69
+ requirement: *id003
67
70
  type: :development
68
- version_requirements: *id003
69
71
  - !ruby/object:Gem::Dependency
70
- name: hoe-git
71
72
  prerelease: false
72
- requirement: &id004 !ruby/object:Gem::Requirement
73
+ name: hoe-git
74
+ version_requirements: &id004 !ruby/object:Gem::Requirement
73
75
  none: false
74
76
  requirements:
75
77
  - - ">="
@@ -79,12 +81,12 @@ dependencies:
79
81
  - 1
80
82
  - 4
81
83
  version: "1.4"
84
+ requirement: *id004
82
85
  type: :development
83
- version_requirements: *id004
84
86
  - !ruby/object:Gem::Dependency
85
- name: mini_portile
86
87
  prerelease: false
87
- requirement: &id005 !ruby/object:Gem::Requirement
88
+ name: mini_portile
89
+ version_requirements: &id005 !ruby/object:Gem::Requirement
88
90
  none: false
89
91
  requirements:
90
92
  - - ">="
@@ -95,12 +97,12 @@ dependencies:
95
97
  - 2
96
98
  - 2
97
99
  version: 0.2.2
100
+ requirement: *id005
98
101
  type: :development
99
- version_requirements: *id005
100
102
  - !ruby/object:Gem::Dependency
101
- name: minitest
102
103
  prerelease: false
103
- requirement: &id006 !ruby/object:Gem::Requirement
104
+ name: minitest
105
+ version_requirements: &id006 !ruby/object:Gem::Requirement
104
106
  none: false
105
107
  requirements:
106
108
  - - ~>
@@ -111,12 +113,12 @@ dependencies:
111
113
  - 2
112
114
  - 2
113
115
  version: 2.2.2
116
+ requirement: *id006
114
117
  type: :development
115
- version_requirements: *id006
116
118
  - !ruby/object:Gem::Dependency
117
- name: rake
118
119
  prerelease: false
119
- requirement: &id007 !ruby/object:Gem::Requirement
120
+ name: rake
121
+ version_requirements: &id007 !ruby/object:Gem::Requirement
120
122
  none: false
121
123
  requirements:
122
124
  - - ">="
@@ -126,12 +128,12 @@ dependencies:
126
128
  - 0
127
129
  - 9
128
130
  version: "0.9"
131
+ requirement: *id007
129
132
  type: :development
130
- version_requirements: *id007
131
133
  - !ruby/object:Gem::Dependency
132
- name: rake-compiler
133
134
  prerelease: false
134
- requirement: &id008 !ruby/object:Gem::Requirement
135
+ name: rake-compiler
136
+ version_requirements: &id008 !ruby/object:Gem::Requirement
135
137
  none: false
136
138
  requirements:
137
139
  - - "="
@@ -142,12 +144,12 @@ dependencies:
142
144
  - 8
143
145
  - 0
144
146
  version: 0.8.0
147
+ requirement: *id008
145
148
  type: :development
146
- version_requirements: *id008
147
149
  - !ruby/object:Gem::Dependency
148
- name: racc
149
150
  prerelease: false
150
- requirement: &id009 !ruby/object:Gem::Requirement
151
+ name: racc
152
+ version_requirements: &id009 !ruby/object:Gem::Requirement
151
153
  none: false
152
154
  requirements:
153
155
  - - ">="
@@ -158,12 +160,12 @@ dependencies:
158
160
  - 4
159
161
  - 6
160
162
  version: 1.4.6
163
+ requirement: *id009
161
164
  type: :development
162
- version_requirements: *id009
163
165
  - !ruby/object:Gem::Dependency
164
- name: rexical
165
166
  prerelease: false
166
- requirement: &id010 !ruby/object:Gem::Requirement
167
+ name: rexical
168
+ version_requirements: &id010 !ruby/object:Gem::Requirement
167
169
  none: false
168
170
  requirements:
169
171
  - - ">="
@@ -174,12 +176,12 @@ dependencies:
174
176
  - 0
175
177
  - 5
176
178
  version: 1.0.5
179
+ requirement: *id010
177
180
  type: :development
178
- version_requirements: *id010
179
181
  - !ruby/object:Gem::Dependency
180
- name: rdoc
181
182
  prerelease: false
182
- requirement: &id011 !ruby/object:Gem::Requirement
183
+ name: rdoc
184
+ version_requirements: &id011 !ruby/object:Gem::Requirement
183
185
  none: false
184
186
  requirements:
185
187
  - - ~>
@@ -189,12 +191,12 @@ dependencies:
189
191
  - 3
190
192
  - 10
191
193
  version: "3.10"
194
+ requirement: *id011
192
195
  type: :development
193
- version_requirements: *id011
194
196
  - !ruby/object:Gem::Dependency
195
- name: hoe
196
197
  prerelease: false
197
- requirement: &id012 !ruby/object:Gem::Requirement
198
+ name: hoe
199
+ version_requirements: &id012 !ruby/object:Gem::Requirement
198
200
  none: false
199
201
  requirements:
200
202
  - - ~>
@@ -204,8 +206,8 @@ dependencies:
204
206
  - 2
205
207
  - 16
206
208
  version: "2.16"
209
+ requirement: *id012
207
210
  type: :development
208
- version_requirements: *id012
209
211
  description: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's\n\
210
212
  many features is the ability to search documents via XPath or CSS3 selectors.\n\n\
211
213
  XML is like violence - if it doesn\xE2\x80\x99t solve your problems, you are not using\n\
@@ -226,40 +228,40 @@ extra_rdoc_files:
226
228
  - Manifest.txt
227
229
  - README.ja.rdoc
228
230
  - README.rdoc
229
- - ext/nokogiri/xml_encoding_handler.c
230
- - ext/nokogiri/html_sax_push_parser.c
231
- - ext/nokogiri/xml_processing_instruction.c
232
231
  - ext/nokogiri/xml_text.c
233
- - ext/nokogiri/xml_entity_reference.c
234
- - ext/nokogiri/xml_relax_ng.c
235
- - ext/nokogiri/nokogiri.c
236
- - ext/nokogiri/xml_node.c
237
- - ext/nokogiri/xml_attr.c
238
- - ext/nokogiri/xml_reader.c
239
- - ext/nokogiri/xml_entity_decl.c
240
- - ext/nokogiri/xml_element_decl.c
241
- - ext/nokogiri/html_element_description.c
242
- - ext/nokogiri/xslt_stylesheet.c
243
- - ext/nokogiri/xml_syntax_error.c
244
- - ext/nokogiri/xml_document.c
245
- - ext/nokogiri/xml_dtd.c
232
+ - ext/nokogiri/xml_xpath_context.c
233
+ - ext/nokogiri/html_sax_push_parser.c
246
234
  - ext/nokogiri/xml_cdata.c
247
- - ext/nokogiri/xml_sax_parser.c
235
+ - ext/nokogiri/html_element_description.c
248
236
  - ext/nokogiri/xml_comment.c
249
- - ext/nokogiri/xml_node_set.c
250
- - ext/nokogiri/xml_xpath_context.c
251
- - ext/nokogiri/html_entity_lookup.c
252
- - ext/nokogiri/xml_sax_push_parser.c
237
+ - ext/nokogiri/xslt_stylesheet.c
238
+ - ext/nokogiri/xml_document_fragment.c
239
+ - ext/nokogiri/html_document.c
253
240
  - ext/nokogiri/xml_sax_parser_context.c
241
+ - ext/nokogiri/xml_element_content.c
242
+ - ext/nokogiri/xml_entity_decl.c
243
+ - ext/nokogiri/xml_reader.c
254
244
  - ext/nokogiri/xml_io.c
245
+ - ext/nokogiri/xml_entity_reference.c
255
246
  - ext/nokogiri/xml_libxml2_hacks.c
256
- - ext/nokogiri/html_document.c
257
- - ext/nokogiri/xml_attribute_decl.c
258
- - ext/nokogiri/xml_document_fragment.c
247
+ - ext/nokogiri/nokogiri.c
248
+ - ext/nokogiri/xml_encoding_handler.c
249
+ - ext/nokogiri/html_entity_lookup.c
250
+ - ext/nokogiri/xml_sax_parser.c
259
251
  - ext/nokogiri/xml_schema.c
260
- - ext/nokogiri/xml_element_content.c
261
- - ext/nokogiri/html_sax_parser_context.c
262
252
  - ext/nokogiri/xml_namespace.c
253
+ - ext/nokogiri/xml_processing_instruction.c
254
+ - ext/nokogiri/html_sax_parser_context.c
255
+ - ext/nokogiri/xml_document.c
256
+ - ext/nokogiri/xml_sax_push_parser.c
257
+ - ext/nokogiri/xml_relax_ng.c
258
+ - ext/nokogiri/xml_dtd.c
259
+ - ext/nokogiri/xml_attr.c
260
+ - ext/nokogiri/xml_element_decl.c
261
+ - ext/nokogiri/xml_syntax_error.c
262
+ - ext/nokogiri/xml_attribute_decl.c
263
+ - ext/nokogiri/xml_node.c
264
+ - ext/nokogiri/xml_node_set.c
263
265
  files:
264
266
  - .autotest
265
267
  - .gemtest
@@ -434,6 +436,9 @@ files:
434
436
  - test/files/staff.dtd
435
437
  - test/files/staff.xml
436
438
  - test/files/staff.xslt
439
+ - test/files/test_document_url/bar.xml
440
+ - test/files/test_document_url/document.dtd
441
+ - test/files/test_document_url/document.xml
437
442
  - test/files/tlm.html
438
443
  - test/files/to_be_xincluded.xml
439
444
  - test/files/valid_bar.xml
@@ -523,79 +528,81 @@ required_ruby_version: !ruby/object:Gem::Requirement
523
528
  required_rubygems_version: !ruby/object:Gem::Requirement
524
529
  none: false
525
530
  requirements:
526
- - - ">="
531
+ - - ">"
527
532
  - !ruby/object:Gem::Version
528
- hash: 3
533
+ hash: 25
529
534
  segments:
530
- - 0
531
- version: "0"
535
+ - 1
536
+ - 3
537
+ - 1
538
+ version: 1.3.1
532
539
  requirements: []
533
540
 
534
541
  rubyforge_project: nokogiri
535
- rubygems_version: 1.8.17
542
+ rubygems_version: 1.8.24
536
543
  signing_key:
537
544
  specification_version: 3
538
545
  summary: "Nokogiri (\xE9\x8B\xB8) is an HTML, XML, SAX, and Reader parser"
539
546
  test_files:
540
- - test/test_nokogiri.rb
541
- - test/css/test_tokenizer.rb
542
- - test/css/test_xpath_visitor.rb
543
- - test/css/test_nthiness.rb
544
- - test/css/test_parser.rb
545
- - test/xml/test_dtd_encoding.rb
546
- - test/xml/test_document_encoding.rb
547
- - test/xml/test_node_inheritance.rb
548
- - test/xml/test_entity_decl.rb
549
- - test/xml/test_node_reparenting.rb
550
- - test/xml/sax/test_parser_context.rb
551
- - test/xml/sax/test_push_parser.rb
552
- - test/xml/sax/test_parser.rb
553
- - test/xml/test_attr.rb
554
- - test/xml/test_cdata.rb
555
- - test/xml/test_document.rb
556
- - test/xml/test_node_encoding.rb
547
+ - test/test_memory_leak.rb
548
+ - test/xml/test_node_attributes.rb
557
549
  - test/xml/test_document_fragment.rb
558
- - test/xml/test_c14n.rb
559
- - test/xml/test_dtd.rb
560
- - test/xml/test_node.rb
561
- - test/xml/test_comment.rb
562
- - test/xml/test_text.rb
563
- - test/xml/node/test_save_options.rb
550
+ - test/xml/test_node_set.rb
564
551
  - test/xml/node/test_subclass.rb
565
- - test/xml/test_schema.rb
566
- - test/xml/test_node_attributes.rb
567
- - test/xml/test_namespace.rb
568
- - test/xml/test_attribute_decl.rb
569
- - test/xml/test_xpath.rb
552
+ - test/xml/node/test_save_options.rb
570
553
  - test/xml/test_processing_instruction.rb
571
- - test/xml/test_reader_encoding.rb
572
- - test/xml/test_element_decl.rb
573
- - test/xml/test_builder.rb
574
- - test/xml/test_node_set.rb
575
- - test/xml/test_syntax_error.rb
576
- - test/xml/test_parse_options.rb
554
+ - test/xml/test_node.rb
555
+ - test/xml/test_dtd.rb
577
556
  - test/xml/test_xinclude.rb
557
+ - test/xml/sax/test_parser.rb
558
+ - test/xml/sax/test_parser_context.rb
559
+ - test/xml/sax/test_push_parser.rb
560
+ - test/xml/test_parse_options.rb
578
561
  - test/xml/test_element_content.rb
562
+ - test/xml/test_dtd_encoding.rb
563
+ - test/xml/test_syntax_error.rb
564
+ - test/xml/test_text.rb
565
+ - test/xml/test_node_encoding.rb
579
566
  - test/xml/test_unparented_node.rb
580
- - test/xml/test_entity_reference.rb
567
+ - test/xml/test_cdata.rb
568
+ - test/xml/test_element_decl.rb
569
+ - test/xml/test_xpath.rb
570
+ - test/xml/test_reader_encoding.rb
571
+ - test/xml/test_comment.rb
572
+ - test/xml/test_attribute_decl.rb
573
+ - test/xml/test_document_encoding.rb
574
+ - test/xml/test_schema.rb
575
+ - test/xml/test_node_inheritance.rb
576
+ - test/xml/test_namespace.rb
581
577
  - test/xml/test_relax_ng.rb
582
- - test/test_xslt_transforms.rb
583
- - test/test_memory_leak.rb
584
- - test/test_css_cache.rb
585
- - test/decorators/test_slop.rb
586
- - test/test_soap4r_sax.rb
587
- - test/test_encoding_handler.rb
588
- - test/html/test_document_encoding.rb
589
- - test/html/test_named_characters.rb
590
- - test/html/sax/test_parser_context.rb
591
- - test/html/sax/test_parser.rb
592
- - test/html/test_document.rb
593
- - test/html/test_node_encoding.rb
578
+ - test/xml/test_entity_reference.rb
579
+ - test/xml/test_c14n.rb
580
+ - test/xml/test_attr.rb
581
+ - test/xml/test_document.rb
582
+ - test/xml/test_node_reparenting.rb
583
+ - test/xml/test_builder.rb
584
+ - test/xml/test_entity_decl.rb
585
+ - test/test_convert_xpath.rb
594
586
  - test/html/test_document_fragment.rb
595
587
  - test/html/test_node.rb
588
+ - test/html/sax/test_parser.rb
589
+ - test/html/sax/test_parser_context.rb
590
+ - test/html/test_node_encoding.rb
591
+ - test/html/test_named_characters.rb
592
+ - test/html/test_document_encoding.rb
593
+ - test/html/test_document.rb
596
594
  - test/html/test_element_description.rb
597
595
  - test/html/test_builder.rb
598
- - test/xslt/test_exception_handling.rb
596
+ - test/test_css_cache.rb
597
+ - test/test_encoding_handler.rb
598
+ - test/css/test_parser.rb
599
+ - test/css/test_xpath_visitor.rb
600
+ - test/css/test_tokenizer.rb
601
+ - test/css/test_nthiness.rb
602
+ - test/decorators/test_slop.rb
603
+ - test/test_soap4r_sax.rb
604
+ - test/test_nokogiri.rb
599
605
  - test/xslt/test_custom_functions.rb
606
+ - test/xslt/test_exception_handling.rb
600
607
  - test/test_reader.rb
601
- - test/test_convert_xpath.rb
608
+ - test/test_xslt_transforms.rb