libxml-ruby 5.0.4 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/HISTORY +10 -6
- data/README.rdoc +1 -1
- data/ext/libxml/extconf.rb +5 -0
- data/ext/libxml/ruby_xml.c +556 -556
- data/ext/libxml/ruby_xml_attributes.h +17 -17
- data/ext/libxml/ruby_xml_document.c +1129 -1129
- data/ext/libxml/ruby_xml_dtd.c +257 -257
- data/ext/libxml/ruby_xml_encoding.c +250 -250
- data/ext/libxml/ruby_xml_error.c +1003 -1003
- data/ext/libxml/ruby_xml_error.h +14 -14
- data/ext/libxml/ruby_xml_html_parser_context.c +351 -351
- data/ext/libxml/ruby_xml_input_cbg.c +188 -188
- data/ext/libxml/ruby_xml_namespace.c +151 -151
- data/ext/libxml/ruby_xml_parser.h +10 -10
- data/ext/libxml/ruby_xml_parser_context.c +1009 -1009
- data/ext/libxml/ruby_xml_parser_options.c +74 -74
- data/ext/libxml/ruby_xml_parser_options.h +10 -10
- data/ext/libxml/ruby_xml_sax2_handler.c +326 -326
- data/ext/libxml/ruby_xml_sax_parser.c +108 -108
- data/ext/libxml/ruby_xml_version.h +9 -9
- data/lib/libxml/attr.rb +122 -122
- data/lib/libxml/attr_decl.rb +80 -80
- data/lib/libxml/attributes.rb +13 -13
- data/lib/libxml/document.rb +194 -194
- data/lib/libxml/error.rb +95 -95
- data/lib/libxml/hpricot.rb +77 -77
- data/lib/libxml/html_parser.rb +96 -96
- data/lib/libxml/namespace.rb +61 -61
- data/lib/libxml/namespaces.rb +37 -37
- data/lib/libxml/node.rb +323 -323
- data/lib/libxml/parser.rb +102 -102
- data/lib/libxml/sax_callbacks.rb +179 -179
- data/lib/libxml/sax_parser.rb +40 -40
- data/lib/libxml/tree.rb +28 -28
- data/lib/libxml.rb +4 -4
- data/lib/xml/libxml.rb +10 -10
- data/lib/xml.rb +13 -13
- data/libxml-ruby.gemspec +50 -49
- data/test/test_document.rb +140 -140
- data/test/test_document_write.rb +142 -142
- data/test/test_dtd.rb +126 -126
- data/test/test_encoding.rb +126 -126
- data/test/test_error.rb +194 -194
- data/test/test_helper.rb +20 -20
- data/test/test_namespace.rb +58 -58
- data/test/test_node.rb +235 -235
- data/test/test_node_write.rb +93 -93
- data/test/test_parser.rb +333 -333
- data/test/test_reader.rb +364 -364
- data/test/test_xml.rb +168 -168
- metadata +5 -4
@@ -1,74 +1,74 @@
|
|
1
|
-
/* Please see the LICENSE file for copyright and distribution information */
|
2
|
-
|
3
|
-
#include <stdarg.h>
|
4
|
-
#include "ruby_libxml.h"
|
5
|
-
|
6
|
-
/* Document-class: LibXML::XML::Parser::Options
|
7
|
-
*
|
8
|
-
* Options that control the operation of the HTMLParser. The easiest
|
9
|
-
* way to set a parser's options is to use the methods
|
10
|
-
* XML::Parser.file, XML::Parser.io or XML::Parser.string.
|
11
|
-
* For additional control, see XML::Parser::Context#options=.
|
12
|
-
*/
|
13
|
-
|
14
|
-
VALUE mXMLParserOptions;
|
15
|
-
|
16
|
-
void rxml_init_parser_options(void)
|
17
|
-
{
|
18
|
-
mXMLParserOptions = rb_define_module_under(cXMLParser, "Options");
|
19
|
-
|
20
|
-
/* recover on errors */
|
21
|
-
rb_define_const(mXMLParserOptions, "RECOVER", INT2NUM(XML_PARSE_RECOVER));
|
22
|
-
/* substitute entities */
|
23
|
-
rb_define_const(mXMLParserOptions, "NOENT", INT2NUM(XML_PARSE_NOENT));
|
24
|
-
/* load the external subset */
|
25
|
-
rb_define_const(mXMLParserOptions, "DTDLOAD", INT2NUM(XML_PARSE_DTDLOAD));
|
26
|
-
/* default DTD attributes */
|
27
|
-
rb_define_const(mXMLParserOptions, "DTDATTR", INT2NUM(XML_PARSE_DTDATTR));
|
28
|
-
/* validate with the DTD */
|
29
|
-
rb_define_const(mXMLParserOptions, "DTDVALID", INT2NUM(XML_PARSE_DTDVALID));
|
30
|
-
/* suppress error reports */
|
31
|
-
rb_define_const(mXMLParserOptions, "NOERROR", INT2NUM(XML_PARSE_NOERROR));
|
32
|
-
/* suppress warning reports */
|
33
|
-
rb_define_const(mXMLParserOptions, "NOWARNING", INT2NUM(XML_PARSE_NOWARNING));
|
34
|
-
/* pedantic error reporting */
|
35
|
-
rb_define_const(mXMLParserOptions, "PEDANTIC", INT2NUM(XML_PARSE_PEDANTIC));
|
36
|
-
/* remove blank nodes */
|
37
|
-
rb_define_const(mXMLParserOptions, "NOBLANKS", INT2NUM(XML_PARSE_NOBLANKS));
|
38
|
-
/* use the SAX1 interface internally */
|
39
|
-
rb_define_const(mXMLParserOptions, "SAX1", INT2NUM(XML_PARSE_SAX1));
|
40
|
-
/* Implement XInclude substitition */
|
41
|
-
rb_define_const(mXMLParserOptions, "XINCLUDE", INT2NUM(XML_PARSE_XINCLUDE));
|
42
|
-
/* Forbid network access */
|
43
|
-
rb_define_const(mXMLParserOptions, "NONET", INT2NUM(XML_PARSE_NONET));
|
44
|
-
/* Do not reuse the context dictionnary */
|
45
|
-
rb_define_const(mXMLParserOptions, "NODICT", INT2NUM(XML_PARSE_NODICT));
|
46
|
-
/* remove redundant namespaces declarations */
|
47
|
-
rb_define_const(mXMLParserOptions, "NSCLEAN", INT2NUM(XML_PARSE_NSCLEAN));
|
48
|
-
/* merge CDATA as text nodes */
|
49
|
-
rb_define_const(mXMLParserOptions, "NOCDATA", INT2NUM(XML_PARSE_NOCDATA));
|
50
|
-
#if LIBXML_VERSION >= 20621
|
51
|
-
/* do not generate XINCLUDE START/END nodes */
|
52
|
-
rb_define_const(mXMLParserOptions, "NOXINCNODE", INT2NUM(XML_PARSE_NOXINCNODE));
|
53
|
-
#endif
|
54
|
-
#if LIBXML_VERSION >= 20700
|
55
|
-
/* compact small text nodes */
|
56
|
-
rb_define_const(mXMLParserOptions, "COMPACT", INT2NUM(XML_PARSE_COMPACT));
|
57
|
-
/* parse using XML-1.0 before update 5 */
|
58
|
-
rb_define_const(mXMLParserOptions, "OLD10", INT2NUM(XML_PARSE_OLD10));
|
59
|
-
/* do not fixup XINCLUDE xml:base uris */
|
60
|
-
rb_define_const(mXMLParserOptions, "NOBASEFIX", INT2NUM(XML_PARSE_NOBASEFIX));
|
61
|
-
#endif
|
62
|
-
#if LIBXML_VERSION >= 20703
|
63
|
-
/* relax any hardcoded limit from the parser */
|
64
|
-
rb_define_const(mXMLParserOptions, "HUGE", INT2NUM(XML_PARSE_HUGE));
|
65
|
-
#endif
|
66
|
-
#if LIBXML_VERSION >= 21106
|
67
|
-
/* parse using SAX2 interface before 2.7.0 */
|
68
|
-
rb_define_const(mXMLParserOptions, "OLDSAX", INT2NUM(XML_PARSE_OLDSAX));
|
69
|
-
/* ignore internal document encoding hint */
|
70
|
-
rb_define_const(mXMLParserOptions, "IGNORE_ENC", INT2NUM(XML_PARSE_IGNORE_ENC));
|
71
|
-
/* Store big lines numbers in text PSVI field */
|
72
|
-
rb_define_const(mXMLParserOptions, "BIG_LINES", INT2NUM(XML_PARSE_BIG_LINES));
|
73
|
-
#endif
|
74
|
-
}
|
1
|
+
/* Please see the LICENSE file for copyright and distribution information */
|
2
|
+
|
3
|
+
#include <stdarg.h>
|
4
|
+
#include "ruby_libxml.h"
|
5
|
+
|
6
|
+
/* Document-class: LibXML::XML::Parser::Options
|
7
|
+
*
|
8
|
+
* Options that control the operation of the HTMLParser. The easiest
|
9
|
+
* way to set a parser's options is to use the methods
|
10
|
+
* XML::Parser.file, XML::Parser.io or XML::Parser.string.
|
11
|
+
* For additional control, see XML::Parser::Context#options=.
|
12
|
+
*/
|
13
|
+
|
14
|
+
VALUE mXMLParserOptions;
|
15
|
+
|
16
|
+
void rxml_init_parser_options(void)
|
17
|
+
{
|
18
|
+
mXMLParserOptions = rb_define_module_under(cXMLParser, "Options");
|
19
|
+
|
20
|
+
/* recover on errors */
|
21
|
+
rb_define_const(mXMLParserOptions, "RECOVER", INT2NUM(XML_PARSE_RECOVER));
|
22
|
+
/* substitute entities */
|
23
|
+
rb_define_const(mXMLParserOptions, "NOENT", INT2NUM(XML_PARSE_NOENT));
|
24
|
+
/* load the external subset */
|
25
|
+
rb_define_const(mXMLParserOptions, "DTDLOAD", INT2NUM(XML_PARSE_DTDLOAD));
|
26
|
+
/* default DTD attributes */
|
27
|
+
rb_define_const(mXMLParserOptions, "DTDATTR", INT2NUM(XML_PARSE_DTDATTR));
|
28
|
+
/* validate with the DTD */
|
29
|
+
rb_define_const(mXMLParserOptions, "DTDVALID", INT2NUM(XML_PARSE_DTDVALID));
|
30
|
+
/* suppress error reports */
|
31
|
+
rb_define_const(mXMLParserOptions, "NOERROR", INT2NUM(XML_PARSE_NOERROR));
|
32
|
+
/* suppress warning reports */
|
33
|
+
rb_define_const(mXMLParserOptions, "NOWARNING", INT2NUM(XML_PARSE_NOWARNING));
|
34
|
+
/* pedantic error reporting */
|
35
|
+
rb_define_const(mXMLParserOptions, "PEDANTIC", INT2NUM(XML_PARSE_PEDANTIC));
|
36
|
+
/* remove blank nodes */
|
37
|
+
rb_define_const(mXMLParserOptions, "NOBLANKS", INT2NUM(XML_PARSE_NOBLANKS));
|
38
|
+
/* use the SAX1 interface internally */
|
39
|
+
rb_define_const(mXMLParserOptions, "SAX1", INT2NUM(XML_PARSE_SAX1));
|
40
|
+
/* Implement XInclude substitition */
|
41
|
+
rb_define_const(mXMLParserOptions, "XINCLUDE", INT2NUM(XML_PARSE_XINCLUDE));
|
42
|
+
/* Forbid network access */
|
43
|
+
rb_define_const(mXMLParserOptions, "NONET", INT2NUM(XML_PARSE_NONET));
|
44
|
+
/* Do not reuse the context dictionnary */
|
45
|
+
rb_define_const(mXMLParserOptions, "NODICT", INT2NUM(XML_PARSE_NODICT));
|
46
|
+
/* remove redundant namespaces declarations */
|
47
|
+
rb_define_const(mXMLParserOptions, "NSCLEAN", INT2NUM(XML_PARSE_NSCLEAN));
|
48
|
+
/* merge CDATA as text nodes */
|
49
|
+
rb_define_const(mXMLParserOptions, "NOCDATA", INT2NUM(XML_PARSE_NOCDATA));
|
50
|
+
#if LIBXML_VERSION >= 20621
|
51
|
+
/* do not generate XINCLUDE START/END nodes */
|
52
|
+
rb_define_const(mXMLParserOptions, "NOXINCNODE", INT2NUM(XML_PARSE_NOXINCNODE));
|
53
|
+
#endif
|
54
|
+
#if LIBXML_VERSION >= 20700
|
55
|
+
/* compact small text nodes */
|
56
|
+
rb_define_const(mXMLParserOptions, "COMPACT", INT2NUM(XML_PARSE_COMPACT));
|
57
|
+
/* parse using XML-1.0 before update 5 */
|
58
|
+
rb_define_const(mXMLParserOptions, "OLD10", INT2NUM(XML_PARSE_OLD10));
|
59
|
+
/* do not fixup XINCLUDE xml:base uris */
|
60
|
+
rb_define_const(mXMLParserOptions, "NOBASEFIX", INT2NUM(XML_PARSE_NOBASEFIX));
|
61
|
+
#endif
|
62
|
+
#if LIBXML_VERSION >= 20703
|
63
|
+
/* relax any hardcoded limit from the parser */
|
64
|
+
rb_define_const(mXMLParserOptions, "HUGE", INT2NUM(XML_PARSE_HUGE));
|
65
|
+
#endif
|
66
|
+
#if LIBXML_VERSION >= 21106
|
67
|
+
/* parse using SAX2 interface before 2.7.0 */
|
68
|
+
rb_define_const(mXMLParserOptions, "OLDSAX", INT2NUM(XML_PARSE_OLDSAX));
|
69
|
+
/* ignore internal document encoding hint */
|
70
|
+
rb_define_const(mXMLParserOptions, "IGNORE_ENC", INT2NUM(XML_PARSE_IGNORE_ENC));
|
71
|
+
/* Store big lines numbers in text PSVI field */
|
72
|
+
rb_define_const(mXMLParserOptions, "BIG_LINES", INT2NUM(XML_PARSE_BIG_LINES));
|
73
|
+
#endif
|
74
|
+
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
/* Please see the LICENSE file for copyright and distribution information */
|
2
|
-
|
3
|
-
#ifndef __RXML_PARSER_OPTIONS__
|
4
|
-
#define __RXML_PARSER_OPTIONS__
|
5
|
-
|
6
|
-
extern VALUE mXMLParserOptions;
|
7
|
-
|
8
|
-
void rxml_init_parser_options(void);
|
9
|
-
|
10
|
-
#endif
|
1
|
+
/* Please see the LICENSE file for copyright and distribution information */
|
2
|
+
|
3
|
+
#ifndef __RXML_PARSER_OPTIONS__
|
4
|
+
#define __RXML_PARSER_OPTIONS__
|
5
|
+
|
6
|
+
extern VALUE mXMLParserOptions;
|
7
|
+
|
8
|
+
void rxml_init_parser_options(void);
|
9
|
+
|
10
|
+
#endif
|