libxml-ruby 0.8.1-x86-mswin32-60 → 0.8.2-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. data/CHANGES +21 -0
  2. data/RAKEFILE +213 -0
  3. data/README +32 -11
  4. data/doc/rdoc/classes/LibXML.html +4 -0
  5. data/doc/rdoc/classes/LibXML/XML.html +7 -0
  6. data/doc/rdoc/classes/LibXML/XML/Attr.html +187 -177
  7. data/doc/rdoc/classes/LibXML/XML/Attributes.html +62 -61
  8. data/doc/rdoc/classes/LibXML/XML/Document.html +318 -254
  9. data/doc/rdoc/classes/LibXML/XML/Dtd.html +62 -8
  10. data/doc/rdoc/classes/LibXML/XML/Error.html +6 -0
  11. data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +59 -41
  12. data/doc/rdoc/classes/LibXML/XML/InputCallbacks.html +12 -6
  13. data/doc/rdoc/classes/LibXML/XML/NS.html +65 -50
  14. data/doc/rdoc/classes/LibXML/XML/Node.html +671 -630
  15. data/doc/rdoc/classes/LibXML/XML/Node/FailedModify.html +12 -0
  16. data/doc/rdoc/classes/LibXML/XML/Node/Set.html +64 -60
  17. data/doc/rdoc/classes/LibXML/XML/Node/SetNamespace.html +12 -0
  18. data/doc/rdoc/classes/LibXML/XML/Node/UnknownType.html +12 -0
  19. data/doc/rdoc/classes/LibXML/XML/Parser.html +407 -383
  20. data/doc/rdoc/classes/LibXML/XML/Parser/Context.html +241 -219
  21. data/doc/rdoc/classes/LibXML/XML/Parser/ParseError.html +12 -0
  22. data/doc/rdoc/classes/LibXML/XML/Reader.html +421 -331
  23. data/doc/rdoc/classes/LibXML/XML/RelaxNG.html +237 -0
  24. data/doc/rdoc/classes/LibXML/XML/SaxParser.html +79 -60
  25. data/doc/rdoc/classes/LibXML/XML/Schema.html +109 -22
  26. data/doc/rdoc/classes/LibXML/XML/State.html +6 -0
  27. data/doc/rdoc/classes/LibXML/XML/XInclude.html +6 -0
  28. data/doc/rdoc/classes/LibXML/XML/XInclude/Error.html +6 -0
  29. data/doc/rdoc/classes/LibXML/XML/XPath.html +4 -48
  30. data/doc/rdoc/classes/LibXML/XML/XPath/Context.html +6 -5
  31. data/doc/rdoc/classes/LibXML/XML/XPath/InvalidPath.html +61 -0
  32. data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +12 -8
  33. data/doc/rdoc/classes/LibXML/XML/XPointer.html +14 -8
  34. data/doc/rdoc/classes/LibXML/XML/XPointer/Context.html +6 -0
  35. data/doc/rdoc/classes/LibXML/XML/XPointer/Context/InvalidPath.html +6 -0
  36. data/doc/rdoc/classes/LibXML/XML/XPointer/InvalidExpression.html +13 -0
  37. data/doc/rdoc/created.rid +1 -1
  38. data/doc/rdoc/files/CHANGES.html +38 -10
  39. data/doc/rdoc/files/LICENSE.html +1 -1
  40. data/doc/rdoc/files/README.html +57 -23
  41. data/doc/rdoc/files/VERSION.html +1 -1
  42. data/doc/rdoc/files/ext/libxml/cbg_c.html +1 -1
  43. data/doc/rdoc/files/ext/libxml/libxml_c.html +1 -1
  44. data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +1 -1
  45. data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +1 -1
  46. data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +1 -1
  47. data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +1 -1
  48. data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +1 -1
  49. data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +1 -1
  50. data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +1 -1
  51. data/doc/rdoc/files/ext/libxml/ruby_xml_node_set_c.html +1 -1
  52. data/doc/rdoc/files/ext/libxml/ruby_xml_ns_c.html +1 -1
  53. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +1 -1
  54. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +1 -1
  55. data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +1 -1
  56. data/doc/rdoc/{classes/XML.html → files/ext/libxml/ruby_xml_relaxng_c.html} +16 -35
  57. data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +1 -1
  58. data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +1 -1
  59. data/doc/rdoc/files/ext/libxml/ruby_xml_state_c.html +1 -1
  60. data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +1 -1
  61. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +1 -1
  62. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +1 -1
  63. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +1 -1
  64. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +1 -1
  65. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_context_c.html +1 -1
  66. data/doc/rdoc/files/lib/libxml/attr_rb.html +1 -1
  67. data/doc/rdoc/files/lib/libxml/attributes_rb.html +1 -1
  68. data/doc/rdoc/files/lib/libxml/document_rb.html +1 -1
  69. data/doc/rdoc/files/lib/libxml/node_rb.html +1 -1
  70. data/doc/rdoc/files/lib/libxml/node_set_rb.html +1 -1
  71. data/doc/rdoc/files/lib/libxml/parser_options_rb.html +1 -1
  72. data/doc/rdoc/files/lib/libxml/parser_rb.html +1 -1
  73. data/doc/rdoc/files/lib/libxml/properties_rb.html +1 -1
  74. data/doc/rdoc/files/lib/libxml/tree_rb.html +1 -1
  75. data/doc/rdoc/files/lib/libxml_rb.html +2 -2
  76. data/doc/rdoc/files/lib/xml/libxml_rb.html +12 -2
  77. data/doc/rdoc/files/lib/xml_rb.html +134 -0
  78. data/doc/rdoc/fr_class_index.html +1 -1
  79. data/doc/rdoc/fr_file_index.html +2 -0
  80. data/doc/rdoc/fr_method_index.html +349 -344
  81. data/ext/libxml/libxml.c +2 -1
  82. data/ext/libxml/ruby_libxml.h +1 -0
  83. data/ext/libxml/ruby_xml_attr.c +8 -2
  84. data/ext/libxml/ruby_xml_attributes.c +5 -5
  85. data/ext/libxml/ruby_xml_document.c +41 -2
  86. data/ext/libxml/ruby_xml_dtd.c +169 -169
  87. data/ext/libxml/ruby_xml_html_parser.c +449 -449
  88. data/ext/libxml/ruby_xml_input_cbg.c +165 -165
  89. data/ext/libxml/ruby_xml_node.c +1 -1
  90. data/ext/libxml/ruby_xml_node_set.c +172 -172
  91. data/ext/libxml/ruby_xml_ns.c +145 -145
  92. data/ext/libxml/ruby_xml_parser.c +1398 -1398
  93. data/ext/libxml/ruby_xml_parser_context.c +697 -697
  94. data/ext/libxml/ruby_xml_reader.c +44 -0
  95. data/ext/libxml/ruby_xml_reader.h +14 -14
  96. data/ext/libxml/ruby_xml_relaxng.c +97 -0
  97. data/ext/libxml/ruby_xml_relaxng.h +15 -0
  98. data/ext/libxml/ruby_xml_sax_parser.c +486 -486
  99. data/ext/libxml/ruby_xml_schema.c +1 -1
  100. data/ext/libxml/ruby_xml_state.c +4 -4
  101. data/ext/libxml/ruby_xml_xinclude.c +21 -21
  102. data/ext/libxml/ruby_xml_xpath.c +89 -89
  103. data/ext/libxml/ruby_xml_xpath_context.c +283 -283
  104. data/ext/libxml/ruby_xml_xpath_object.c +5 -5
  105. data/ext/libxml/ruby_xml_xpointer.c +104 -104
  106. data/ext/libxml/ruby_xml_xpointer_context.c +22 -22
  107. data/ext/libxml/version.h +2 -2
  108. data/ext/libxml/version.h.rej +17 -0
  109. data/ext/mingw/Rakefile +41 -0
  110. data/{mingw → lib}/libiconv-2.dll +0 -0
  111. data/lib/libxml.rb +15 -4
  112. data/lib/libxml2-2.dll +0 -0
  113. data/lib/libxml_ruby.dll.a +0 -0
  114. data/lib/libxml_ruby.so +0 -0
  115. data/lib/xml.rb +14 -0
  116. data/lib/xml/libxml.rb +4 -1
  117. data/test/etc_doc_to_s.rb +1 -1
  118. data/test/ets_copy_bug.rb +1 -1
  119. data/test/ets_copy_bug3.rb +1 -1
  120. data/test/ets_doc_file.rb +1 -1
  121. data/test/ets_doc_to_s.rb +1 -1
  122. data/test/ets_node_gc.rb +1 -1
  123. data/test/ets_tsr.rb +1 -1
  124. data/test/model/shiporder.rnc +28 -0
  125. data/test/model/shiporder.rng +86 -0
  126. data/test/{tc_xml_attributes.rb → tc_attributes.rb} +1 -10
  127. data/test/{tc_xml_document.rb → tc_document.rb} +1 -1
  128. data/test/{tc_xml_document_write.rb → tc_document_write.rb} +1 -1
  129. data/test/{tc_xml_dtd.rb → tc_dtd.rb} +1 -1
  130. data/test/{tc_xml_html_parser.rb → tc_html_parser.rb} +1 -1
  131. data/test/{tc_xml_node.rb → tc_node.rb} +1 -1
  132. data/test/{tc_xml_node_attr.rb → tc_node_attr.rb} +1 -1
  133. data/test/{tc_xml_node_cdata.rb → tc_node_cdata.rb} +24 -5
  134. data/test/{tc_xml_node_comment.rb → tc_node_comment.rb} +1 -1
  135. data/test/{tc_xml_node_copy.rb → tc_node_copy.rb} +1 -1
  136. data/test/{tc_xml_node_edit.rb → tc_node_edit.rb} +1 -1
  137. data/test/{tc_xml_node_set.rb → tc_node_set.rb} +1 -1
  138. data/test/{tc_xml_node_set2.rb → tc_node_set2.rb} +1 -1
  139. data/test/{tc_xml_node_text.rb → tc_node_text.rb} +1 -1
  140. data/test/{tc_xml_node_xlink.rb → tc_node_xlink.rb} +2 -2
  141. data/test/{tc_xml_parser.rb → tc_parser.rb} +1 -1
  142. data/test/{tc_xml_parser_context.rb → tc_parser_context.rb} +1 -1
  143. data/test/{tc_xml_properties.rb → tc_properties.rb} +1 -7
  144. data/test/{tc_xml_reader.rb → tc_reader.rb} +1 -1
  145. data/test/tc_relaxng.rb +39 -0
  146. data/test/{tc_xml_sax_parser.rb → tc_sax_parser.rb} +1 -1
  147. data/test/{tc_xml_schema.rb → tc_schema.rb} +1 -1
  148. data/test/{tc_xml_traversal.rb → tc_traversal.rb} +1 -1
  149. data/test/{tc_xml_xinclude.rb → tc_xinclude.rb} +1 -1
  150. data/test/{tc_xml_xpath.rb → tc_xpath.rb} +1 -1
  151. data/test/{tc_xml_xpath_context.rb → tc_xpath_context.rb} +1 -1
  152. data/test/{tc_xml_xpointer.rb → tc_xpointer.rb} +1 -1
  153. data/test/test_suite.rb +26 -25
  154. metadata +103 -100
  155. data/benchmark/depixelate.rb +0 -632
  156. data/benchmark/hamlet.xml +0 -9055
  157. data/benchmark/sock_entries.xml +0 -507
  158. data/benchmark/throughput.rb +0 -39
  159. data/benchmark/xml_benchmarks.rb +0 -227
  160. data/mingw/libxml2-2.dll +0 -0
  161. data/mingw/libxml_ruby.so +0 -0
  162. data/test/gc.log +0 -0
  163. data/vc/libxml_ruby.sln +0 -20
  164. data/vc/libxml_ruby.vcproj +0 -389
@@ -1,4 +1,4 @@
1
- require 'libxml'
1
+ require 'xml'
2
2
 
3
3
  10_000.times {|n|
4
4
  j=XML::Node.new2(nil,"happy#{n}")
@@ -0,0 +1,28 @@
1
+ #
2
+ # relax ng schema in compact syntax; this cannot be used within libxml but
3
+ # was used to write the schema as compact syntax makes it easier to handle.
4
+ # relax ng schema in xml syntax was created using trang.
5
+ #
6
+ namespace xsi = "http://www.w3.org/2001/XMLSchema-instance"
7
+
8
+ start = shiporder
9
+
10
+ shiporder = element shiporder { attribute orderid { text },
11
+ attribute xsi:noNamespaceSchemaLocation { text },
12
+ orderperson, shipto, item* }
13
+
14
+ orderperson = element orderperson { text }
15
+
16
+ shipto = element shipto { name, address, city, country }
17
+
18
+ name = element name { text }
19
+ address = element address { text }
20
+ city = element city { text }
21
+ country = element country { text }
22
+
23
+ item = element item { title, note?, quantity, price }
24
+
25
+ title = element title { text }
26
+ note = element note { text }
27
+ quantity = element quantity { text }
28
+ price = element price { text }
@@ -0,0 +1,86 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+
4
+ relax ng schema in compact syntax; this cannot be used within libxml but
5
+ was used to write the schema as it's easier to understand
6
+
7
+ -->
8
+ <grammar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://relaxng.org/ns/structure/1.0">
9
+ <start>
10
+ <ref name="shiporder"/>
11
+ </start>
12
+ <define name="shiporder">
13
+ <element name="shiporder">
14
+ <attribute name="orderid"/>
15
+ <attribute name="xsi:noNamespaceSchemaLocation"/>
16
+ <ref name="orderperson"/>
17
+ <ref name="shipto"/>
18
+ <zeroOrMore>
19
+ <ref name="item"/>
20
+ </zeroOrMore>
21
+ </element>
22
+ </define>
23
+ <define name="orderperson">
24
+ <element name="orderperson">
25
+ <text/>
26
+ </element>
27
+ </define>
28
+ <define name="shipto">
29
+ <element name="shipto">
30
+ <ref name="name"/>
31
+ <ref name="address"/>
32
+ <ref name="city"/>
33
+ <ref name="country"/>
34
+ </element>
35
+ </define>
36
+ <define name="name">
37
+ <element name="name">
38
+ <text/>
39
+ </element>
40
+ </define>
41
+ <define name="address">
42
+ <element name="address">
43
+ <text/>
44
+ </element>
45
+ </define>
46
+ <define name="city">
47
+ <element name="city">
48
+ <text/>
49
+ </element>
50
+ </define>
51
+ <define name="country">
52
+ <element name="country">
53
+ <text/>
54
+ </element>
55
+ </define>
56
+ <define name="item">
57
+ <element name="item">
58
+ <ref name="title"/>
59
+ <optional>
60
+ <ref name="note"/>
61
+ </optional>
62
+ <ref name="quantity"/>
63
+ <ref name="price"/>
64
+ </element>
65
+ </define>
66
+ <define name="title">
67
+ <element name="title">
68
+ <text/>
69
+ </element>
70
+ </define>
71
+ <define name="note">
72
+ <element name="note">
73
+ <text/>
74
+ </element>
75
+ </define>
76
+ <define name="quantity">
77
+ <element name="quantity">
78
+ <text/>
79
+ </element>
80
+ </define>
81
+ <define name="price">
82
+ <element name="price">
83
+ <text/>
84
+ </element>
85
+ </define>
86
+ </grammar>
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require 'xml'
2
2
  require 'test/unit'
3
3
 
4
4
  class AttributesTest < Test::Unit::TestCase
@@ -45,15 +45,6 @@ class AttributesTest < Test::Unit::TestCase
45
45
  assert_equal(5, length)
46
46
  end
47
47
 
48
- def test_each_attr
49
- result = 0
50
- city_member.each_attr do |attr|
51
- assert_instance_of(XML::Attr, attr)
52
- result += 1
53
- end
54
- assert_equal(5, result)
55
- end
56
-
57
48
  def test_get_attribute
58
49
  attributes = city_member.attributes
59
50
 
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
 
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class TC_XML_Document_Write < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class TestDtd < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class TC_XML_HTMLParser < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class TestNode < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class AttrNodeTest < Test::Unit::TestCase
@@ -1,8 +1,8 @@
1
- require "libxml"
1
+ require 'xml'
2
2
  require 'test/unit'
3
3
 
4
4
  class CDataCommentTest < Test::Unit::TestCase
5
- def setup()
5
+ def setup
6
6
  xp = XML::Parser.new()
7
7
  str = '<root></root>'
8
8
  assert_equal(str, xp.string = str)
@@ -11,22 +11,41 @@ class CDataCommentTest < Test::Unit::TestCase
11
11
  @root = @doc.root
12
12
  end
13
13
 
14
- def test_libxml_node_add_cdata_01
14
+ def test_node_type
15
+ cnode = XML::Node.new_cdata('test cdata')
16
+ assert_equal(XML::Node::CDATA_SECTION_NODE, cnode.node_type)
17
+ end
18
+
19
+ def test_add_cdata
15
20
  @root << XML::Node.new_cdata('mycdata')
16
21
  assert_equal '<root><![CDATA[mycdata]]></root>',
17
22
  @root.to_s.gsub(/\n\s*/,'')
18
23
  end
19
24
 
20
- def test_libxml_node_add_cdata_02
25
+ def test_add_cdata_2
21
26
  @root << XML::Node.new_cdata('mycdata')
22
27
  assert_equal 'cdata',
23
28
  @root.child.node_type_name
24
29
  end
25
30
 
26
- def test_libxml_node_add_cdata_03
31
+ def test_add_cdata_3
27
32
  @root << el = XML::Node.new_cdata('mycdata')
28
33
  el << "_this_is_added"
29
34
  assert_equal '<root><![CDATA[mycdata_this_is_added]]></root>',
30
35
  @root.to_s.gsub(/\n\s*/,'')
31
36
  end
37
+
38
+ def test_attributes
39
+ cnode = XML::Node.new_cdata('test cdata')
40
+ assert_equal(0, cnode.attributes.length)
41
+ end
42
+
43
+ def test_set_cdata_attribute
44
+ cnode = XML::Node.new_cdata('test cdata')
45
+
46
+ # Can't create attributes on non-element nodes
47
+ assert_raise(ArgumentError) do
48
+ cnode['attr'] = '123'
49
+ end
50
+ end
32
51
  end
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class NodeCommentTest < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  # see mailing list archive
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class TestNodeEdit < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class TC_XML_Node_Set < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class TC_XML_Node_Set2 < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require 'libxml'
1
+ require 'xml'
2
2
  require 'test/unit'
3
3
 
4
4
  class TC_XML_Node_text < Test::Unit::TestCase
@@ -1,5 +1,5 @@
1
- # $Id: tc_xml_node_xlink.rb 453 2008-07-15 19:36:12Z cfis $
2
- require "libxml"
1
+ # $Id: tc_node_xlink.rb 481 2008-07-19 08:59:39Z cfis $
2
+ require "xml"
3
3
  require 'test/unit'
4
4
 
5
5
  class TC_XML_Node_XLink < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class TestParser < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class TestParserContext < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  # Properties is deprecated - use attributes instead.
@@ -28,12 +28,6 @@ class TestProperties < Test::Unit::TestCase
28
28
  assert_equal('bar', attribute.value)
29
29
  end
30
30
 
31
- def test_each_attr
32
- @doc.root.properties.each_attr do |attribute|
33
- assert_instance_of(XML::Attr, attribute)
34
- end
35
- end
36
-
37
31
  def test_no_properties
38
32
  properties = @doc.root.child.properties
39
33
  assert_instance_of(XML::Attributes, properties)
@@ -1,4 +1,4 @@
1
- require 'libxml'
1
+ require 'xml'
2
2
  require 'test/unit'
3
3
 
4
4
  class TC_XML_Reader < Test::Unit::TestCase
@@ -0,0 +1,39 @@
1
+ require "xml"
2
+ require 'test/unit'
3
+
4
+ class TestRelaxNG < Test::Unit::TestCase
5
+ def setup
6
+ xp = XML::Parser.new
7
+ @doc = XML::Document.file(File.join(File.dirname(__FILE__), 'model/shiporder.xml'))
8
+ end
9
+
10
+ def teardown
11
+ @doc = nil
12
+ end
13
+
14
+ def relaxng
15
+ document = XML::Document.file(File.join(File.dirname(__FILE__), 'model/shiporder.rng'))
16
+ relaxng = XML::RelaxNG.document(document)
17
+ end
18
+
19
+ def test_from_doc
20
+ assert_instance_of(XML::RelaxNG, relaxng)
21
+ end
22
+
23
+ def test_valid
24
+ assert(@doc.validate_relaxng(relaxng))
25
+ end
26
+
27
+ def test_invalid
28
+ new_node = XML::Node.new('invalid', 'this will mess up validation')
29
+ @doc.root.child_add(new_node)
30
+
31
+ messages = Hash.new
32
+ assert(!@doc.validate_relaxng(relaxng) do |message, error|
33
+ messages[message] = error
34
+ end)
35
+
36
+ expected = {"Did not expect element invalid there\n" => true}
37
+ assert_equal(expected, messages)
38
+ end
39
+ end
@@ -1,4 +1,4 @@
1
- require 'libxml'
1
+ require 'xml'
2
2
  require 'test/unit'
3
3
 
4
4
  # TODO this is woefully inadequate
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require "xml"
2
2
  require 'test/unit'
3
3
 
4
4
  class TestSchema < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require 'xml'
2
2
  require 'test/unit'
3
3
 
4
4
  class TestTranversal < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require 'xml'
2
2
  require 'test/unit'
3
3
 
4
4
  class TestXInclude < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require 'xml'
2
2
  require "tempfile"
3
3
  require "test/unit"
4
4
 
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require 'xml'
2
2
  require "tempfile"
3
3
  require "test/unit"
4
4
 
@@ -1,4 +1,4 @@
1
- require "libxml"
1
+ require 'xml'
2
2
  require "test/unit"
3
3
 
4
4
  class TC_XML_XPointer < Test::Unit::TestCase
@@ -1,29 +1,30 @@
1
1
  require 'tc_well_formed'
2
- require 'tc_xml_attributes'
3
- require 'tc_xml_document'
4
- require 'tc_xml_document_write'
5
- require 'tc_xml_dtd'
6
- require 'tc_xml_html_parser'
7
- require 'tc_xml_node'
8
- require 'tc_xml_node_attr'
9
- require 'tc_xml_node_cdata'
10
- require 'tc_xml_node_comment'
11
- require 'tc_xml_node_copy'
12
- require 'tc_xml_node_edit'
13
- require 'tc_xml_node_set'
14
- require 'tc_xml_node_set2'
15
- require 'tc_xml_node_text'
16
- require 'tc_xml_node_xlink'
17
- require 'tc_xml_parser'
18
- require 'tc_xml_parser_context'
19
- require 'tc_xml_reader'
20
- require 'tc_xml_sax_parser'
21
- require 'tc_xml_schema'
22
- require 'tc_xml_traversal'
23
- require 'tc_xml_xinclude'
24
- require 'tc_xml_xpath'
25
- require 'tc_xml_xpointer'
2
+ require 'tc_attributes'
3
+ require 'tc_document'
4
+ require 'tc_document_write'
5
+ require 'tc_dtd'
6
+ require 'tc_html_parser'
7
+ require 'tc_node'
8
+ require 'tc_node_attr'
9
+ require 'tc_node_cdata'
10
+ require 'tc_node_comment'
11
+ require 'tc_node_copy'
12
+ require 'tc_node_edit'
13
+ require 'tc_node_set'
14
+ require 'tc_node_set2'
15
+ require 'tc_node_text'
16
+ require 'tc_node_xlink'
17
+ require 'tc_parser'
18
+ require 'tc_parser_context'
19
+ require 'tc_reader'
20
+ require 'tc_relaxng'
21
+ require 'tc_sax_parser'
22
+ require 'tc_schema'
23
+ require 'tc_traversal'
24
+ require 'tc_xinclude'
25
+ require 'tc_xpath'
26
+ require 'tc_xpointer'
26
27
 
27
28
  # Compatibility
28
- require 'tc_xml_properties'
29
+ require 'tc_properties'
29
30
  require 'tc_deprecated_require'