libxml-ruby 0.9.7 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/CHANGES +53 -0
  2. data/Rakefile +1 -0
  3. data/ext/libxml/build.log +4 -0
  4. data/ext/libxml/cbg.c +86 -86
  5. data/ext/libxml/libxml.c +878 -876
  6. data/ext/libxml/ruby_libxml.h +8 -4
  7. data/ext/libxml/ruby_xml_attr.c +36 -168
  8. data/ext/libxml/ruby_xml_attr.h +2 -4
  9. data/ext/libxml/ruby_xml_attr_decl.c +177 -0
  10. data/ext/libxml/ruby_xml_attr_decl.h +13 -0
  11. data/ext/libxml/ruby_xml_attributes.c +29 -20
  12. data/ext/libxml/ruby_xml_document.c +895 -898
  13. data/ext/libxml/ruby_xml_dtd.c +18 -1
  14. data/ext/libxml/ruby_xml_dtd.h +1 -0
  15. data/ext/libxml/ruby_xml_encoding.c +116 -0
  16. data/ext/libxml/ruby_xml_encoding.h +12 -0
  17. data/ext/libxml/ruby_xml_error.c +8 -2
  18. data/ext/libxml/ruby_xml_html_parser.c +53 -74
  19. data/ext/libxml/ruby_xml_html_parser.h +2 -3
  20. data/ext/libxml/ruby_xml_html_parser_context.c +145 -0
  21. data/ext/libxml/ruby_xml_html_parser_context.h +12 -0
  22. data/ext/libxml/ruby_xml_html_parser_options.c +48 -0
  23. data/ext/libxml/ruby_xml_html_parser_options.h +12 -0
  24. data/ext/libxml/ruby_xml_input_cbg.c +1 -1
  25. data/ext/libxml/ruby_xml_io.c +30 -0
  26. data/ext/libxml/ruby_xml_io.h +9 -0
  27. data/ext/libxml/ruby_xml_namespace.c +34 -16
  28. data/ext/libxml/ruby_xml_namespace.h +2 -2
  29. data/ext/libxml/ruby_xml_namespaces.c +6 -6
  30. data/ext/libxml/ruby_xml_node.c +1367 -1324
  31. data/ext/libxml/ruby_xml_node.h +2 -2
  32. data/ext/libxml/ruby_xml_parser.c +26 -78
  33. data/ext/libxml/ruby_xml_parser.h +1 -1
  34. data/ext/libxml/ruby_xml_parser_context.c +284 -13
  35. data/ext/libxml/ruby_xml_parser_context.h +1 -2
  36. data/ext/libxml/ruby_xml_parser_options.c +75 -0
  37. data/ext/libxml/ruby_xml_parser_options.h +14 -0
  38. data/ext/libxml/ruby_xml_reader.c +277 -183
  39. data/ext/libxml/ruby_xml_sax_parser.c +60 -57
  40. data/ext/libxml/ruby_xml_xpath_context.c +43 -8
  41. data/ext/libxml/ruby_xml_xpath_expression.c +6 -0
  42. data/ext/libxml/ruby_xml_xpath_object.c +107 -95
  43. data/ext/libxml/ruby_xml_xpath_object.h +9 -1
  44. data/ext/libxml/ruby_xml_xpointer.c +107 -107
  45. data/ext/libxml/version.h +2 -2
  46. data/ext/vc/libxml_ruby.vcproj +43 -3
  47. data/lib/libxml.rb +2 -3
  48. data/lib/libxml/attr.rb +71 -2
  49. data/lib/libxml/attr_decl.rb +81 -0
  50. data/lib/libxml/document.rb +78 -14
  51. data/lib/libxml/html_parser.rb +75 -42
  52. data/lib/libxml/node.rb +11 -0
  53. data/lib/libxml/parser.rb +106 -62
  54. data/lib/libxml/reader.rb +12 -0
  55. data/lib/libxml/sax_parser.rb +42 -52
  56. data/lib/libxml/xpath_object.rb +15 -0
  57. data/test/model/atom.xml +12 -12
  58. data/test/model/bands.xml +4 -4
  59. data/test/model/books.xml +146 -147
  60. data/test/model/merge_bug_data.xml +1 -1
  61. data/test/model/rubynet.xml +1 -0
  62. data/test/model/shiporder.rng +1 -1
  63. data/test/model/shiporder.xml +22 -22
  64. data/test/model/shiporder.xsd +30 -30
  65. data/test/model/xinclude.xml +1 -1
  66. data/test/{tc_node_attr.rb → tc_attr.rb} +1 -1
  67. data/test/tc_attr_decl.rb +131 -0
  68. data/test/tc_deprecated_require.rb +1 -3
  69. data/test/tc_document.rb +13 -3
  70. data/test/tc_document_write.rb +5 -5
  71. data/test/tc_dtd.rb +13 -5
  72. data/test/tc_html_parser.rb +14 -26
  73. data/test/tc_node_cdata.rb +1 -3
  74. data/test/tc_node_comment.rb +2 -4
  75. data/test/tc_node_edit.rb +2 -3
  76. data/test/tc_node_text.rb +35 -1
  77. data/test/tc_node_write.rb +3 -3
  78. data/test/tc_node_xlink.rb +2 -4
  79. data/test/tc_parser.rb +163 -70
  80. data/test/tc_parser_context.rb +103 -42
  81. data/test/tc_reader.rb +173 -45
  82. data/test/tc_relaxng.rb +2 -2
  83. data/test/tc_sax_parser.rb +48 -52
  84. data/test/tc_schema.rb +2 -2
  85. data/test/tc_xpath.rb +37 -6
  86. data/test/tc_xpath_context.rb +7 -1
  87. data/test/tc_xpath_expression.rb +1 -3
  88. data/test/tc_xpointer.rb +1 -3
  89. data/test/test_suite.rb +2 -3
  90. metadata +20 -13
  91. data/ext/libxml/ruby_xml_input.c +0 -329
  92. data/ext/libxml/ruby_xml_input.h +0 -20
  93. data/lib/libxml/parser_context.rb +0 -17
  94. data/lib/libxml/parser_options.rb +0 -25
  95. data/test/model/simple.xml +0 -7
  96. data/test/tc_input.rb +0 -13
  97. data/test/tc_well_formed.rb +0 -11
@@ -1,20 +0,0 @@
1
- /* $Id: rxml_parser.h 39 2006-02-21 20:40:16Z roscopeco $ */
2
-
3
- /* Please see the LICENSE file for copyright and distribution information */
4
-
5
- #ifndef __RXML_INPUT__
6
- #define __RXML_INPUT__
7
-
8
- extern VALUE cXMLInput;
9
-
10
- extern ID BASE_URL_ATTR;
11
- extern ID ENCODING_ATTR;
12
- extern ID FILE_ATTR;
13
- extern ID IO_ATTR;
14
- extern ID STRING_ATTR;
15
-
16
- void ruby_init_xml_input();
17
- int rxml_read_callback(void *context, char *buffer, int len);
18
- VALUE rxml_input_encoding_to_s(VALUE klass, VALUE encoding);
19
-
20
- #endif
@@ -1,17 +0,0 @@
1
- # $Id: libxml.rb 374 2008-07-11 04:51:41Z cfis $
2
-
3
- module LibXML
4
- module XML
5
- class Parser
6
- class Context
7
- def options
8
- warn("ParserContext#options has been removed from the bindings")
9
- end
10
-
11
- def options=(value)
12
- warn("ParserContext#options has been removed from the bindings")
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,25 +0,0 @@
1
- # $Id: libxml.rb 374 2008-07-11 04:51:41Z cfis $
2
-
3
- module LibXML
4
- module XML
5
- module XMLParserOptions
6
- XML_PARSE_RECOVER = 1 # recover on errors
7
- XML_PARSE_NOENT = 2 # substitute entities
8
- XML_PARSE_DTDLOAD = 4 # load the external subset
9
- XML_PARSE_DTDATTR = 8 # default DTD attributes
10
- XML_PARSE_DTDVALID = 16 # validate with the DTD
11
- XML_PARSE_NOERROR = 32 # suppress error reports
12
- XML_PARSE_NOWARNING = 64 # suppress warning reports
13
- XML_PARSE_PEDANTIC = 128 # pedantic error reporting
14
- XML_PARSE_NOBLANKS = 256 # remove blank nodes
15
- XML_PARSE_SAX1 = 512 # use the SAX1 interface internally
16
- XML_PARSE_XINCLUDE = 1024 # Implement XInclude substitition
17
- XML_PARSE_NONET = 2048 # Forbid network access
18
- XML_PARSE_NODICT = 4096 # Do not reuse the context dictionnary
19
- XML_PARSE_NSCLEAN = 8192 # remove redundant namespaces declarations
20
- XML_PARSE_NOCDATA = 16384 # merge CDATA as text nodes
21
- XML_PARSE_NOXINCNODE = 32768 # do not generate XINCLUDE START/END nodes
22
- XML_PARSE_COMPACT = 65536 # compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree)
23
- end
24
- end
25
- end
@@ -1,7 +0,0 @@
1
- <root>
2
- <foo>123</foo>
3
- <bar x='1' y='2'>
4
- <fuga>test1</fuga>
5
- <fuga>test2</fuga>
6
- </bar>
7
- </root>
@@ -1,13 +0,0 @@
1
- require 'xml'
2
- require 'test/unit'
3
-
4
- class TestInput < Test::Unit::TestCase
5
- def test_latin1
6
- assert_equal(XML::Input::ISO_8859_1, 10)
7
- end
8
-
9
- def test_latin1_to_s
10
- encoding_str = XML::Input.encoding_to_s(XML::Input::ISO_8859_1)
11
- assert_equal('ISO-8859-1', encoding_str)
12
- end
13
- end
@@ -1,11 +0,0 @@
1
- require 'xml'
2
- require 'test/unit'
3
-
4
- class TestWellFormed < Test::Unit::TestCase
5
- def test_xml_node_doc_get()
6
- parser = XML::Parser.new
7
- parser.string = "<p>I am well formed</p>"
8
- parser.parse
9
- assert(parser.context.well_formed?)
10
- end
11
- end