nokogiri 1.11.1 → 1.11.2
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.
- checksums.yaml +4 -4
- data/LICENSE-DEPENDENCIES.md +12 -12
- data/LICENSE.md +1 -1
- data/README.md +20 -15
- data/ext/nokogiri/depend +34 -474
- data/ext/nokogiri/extconf.rb +253 -183
- data/ext/nokogiri/html_document.c +10 -15
- data/ext/nokogiri/html_element_description.c +84 -71
- data/ext/nokogiri/html_entity_lookup.c +21 -16
- data/ext/nokogiri/html_sax_parser_context.c +66 -65
- data/ext/nokogiri/html_sax_push_parser.c +29 -27
- data/ext/nokogiri/libxml2_backwards_compat.c +121 -0
- data/ext/nokogiri/nokogiri.c +171 -63
- data/ext/nokogiri/nokogiri.h +158 -75
- data/ext/nokogiri/test_global_handlers.c +3 -4
- data/ext/nokogiri/xml_attr.c +15 -15
- data/ext/nokogiri/xml_attribute_decl.c +18 -18
- data/ext/nokogiri/xml_cdata.c +13 -18
- data/ext/nokogiri/xml_comment.c +19 -26
- data/ext/nokogiri/xml_document.c +221 -164
- data/ext/nokogiri/xml_document_fragment.c +13 -15
- data/ext/nokogiri/xml_dtd.c +54 -48
- data/ext/nokogiri/xml_element_content.c +30 -27
- data/ext/nokogiri/xml_element_decl.c +22 -22
- data/ext/nokogiri/xml_encoding_handler.c +17 -11
- data/ext/nokogiri/xml_entity_decl.c +32 -30
- data/ext/nokogiri/xml_entity_reference.c +16 -18
- data/ext/nokogiri/xml_namespace.c +56 -49
- data/ext/nokogiri/xml_node.c +338 -286
- data/ext/nokogiri/xml_node_set.c +168 -156
- data/ext/nokogiri/xml_processing_instruction.c +17 -19
- data/ext/nokogiri/xml_reader.c +191 -157
- data/ext/nokogiri/xml_relax_ng.c +29 -23
- data/ext/nokogiri/xml_sax_parser.c +117 -112
- data/ext/nokogiri/xml_sax_parser_context.c +100 -85
- data/ext/nokogiri/xml_sax_push_parser.c +34 -27
- data/ext/nokogiri/xml_schema.c +48 -42
- data/ext/nokogiri/xml_syntax_error.c +21 -23
- data/ext/nokogiri/xml_text.c +13 -17
- data/ext/nokogiri/xml_xpath_context.c +134 -127
- data/ext/nokogiri/xslt_stylesheet.c +157 -157
- data/lib/nokogiri.rb +1 -22
- data/lib/nokogiri/css/parser.rb +1 -1
- data/lib/nokogiri/extension.rb +26 -0
- data/lib/nokogiri/html/document_fragment.rb +15 -15
- data/lib/nokogiri/version/constant.rb +1 -1
- data/lib/nokogiri/version/info.rb +31 -8
- data/lib/nokogiri/xml/document.rb +31 -11
- data/lib/nokogiri/xml/node.rb +38 -42
- data/lib/nokogiri/xml/reader.rb +2 -9
- data/lib/nokogiri/xml/xpath.rb +1 -3
- data/lib/nokogiri/xml/xpath/syntax_error.rb +1 -1
- data/patches/libxml2/0010-parser.c-shrink-the-input-buffer-when-appropriate.patch +70 -0
- metadata +8 -41
- data/ext/nokogiri/html_document.h +0 -10
- data/ext/nokogiri/html_element_description.h +0 -10
- data/ext/nokogiri/html_entity_lookup.h +0 -8
- data/ext/nokogiri/html_sax_parser_context.h +0 -11
- data/ext/nokogiri/html_sax_push_parser.h +0 -9
- data/ext/nokogiri/xml_attr.h +0 -9
- data/ext/nokogiri/xml_attribute_decl.h +0 -9
- data/ext/nokogiri/xml_cdata.h +0 -9
- data/ext/nokogiri/xml_comment.h +0 -9
- data/ext/nokogiri/xml_document.h +0 -23
- data/ext/nokogiri/xml_document_fragment.h +0 -10
- data/ext/nokogiri/xml_dtd.h +0 -10
- data/ext/nokogiri/xml_element_content.h +0 -10
- data/ext/nokogiri/xml_element_decl.h +0 -9
- data/ext/nokogiri/xml_encoding_handler.h +0 -8
- data/ext/nokogiri/xml_entity_decl.h +0 -10
- data/ext/nokogiri/xml_entity_reference.h +0 -9
- data/ext/nokogiri/xml_io.c +0 -63
- data/ext/nokogiri/xml_io.h +0 -11
- data/ext/nokogiri/xml_libxml2_hacks.c +0 -112
- data/ext/nokogiri/xml_libxml2_hacks.h +0 -12
- data/ext/nokogiri/xml_namespace.h +0 -14
- data/ext/nokogiri/xml_node.h +0 -13
- data/ext/nokogiri/xml_node_set.h +0 -12
- data/ext/nokogiri/xml_processing_instruction.h +0 -9
- data/ext/nokogiri/xml_reader.h +0 -10
- data/ext/nokogiri/xml_relax_ng.h +0 -9
- data/ext/nokogiri/xml_sax_parser.h +0 -39
- data/ext/nokogiri/xml_sax_parser_context.h +0 -10
- data/ext/nokogiri/xml_sax_push_parser.h +0 -9
- data/ext/nokogiri/xml_schema.h +0 -9
- data/ext/nokogiri/xml_syntax_error.h +0 -25
- data/ext/nokogiri/xml_text.h +0 -9
- data/ext/nokogiri/xml_xpath_context.h +0 -10
- data/ext/nokogiri/xslt_stylesheet.h +0 -14
@@ -1,12 +0,0 @@
|
|
1
|
-
#ifndef HAVE_XMLFIRSTELEMENTCHILD
|
2
|
-
|
3
|
-
#ifndef XML_LIBXML2_HACKS
|
4
|
-
#define XML_LIBXML2_HACKS
|
5
|
-
|
6
|
-
xmlNodePtr xmlFirstElementChild(xmlNodePtr parent);
|
7
|
-
xmlNodePtr xmlNextElementSibling(xmlNodePtr node);
|
8
|
-
xmlNodePtr xmlLastElementChild(xmlNodePtr parent);
|
9
|
-
|
10
|
-
#endif
|
11
|
-
|
12
|
-
#endif
|
@@ -1,14 +0,0 @@
|
|
1
|
-
#ifndef NOKOGIRI_XML_NAMESPACE
|
2
|
-
#define NOKOGIRI_XML_NAMESPACE
|
3
|
-
|
4
|
-
#include <nokogiri.h>
|
5
|
-
|
6
|
-
void init_xml_namespace();
|
7
|
-
|
8
|
-
extern VALUE cNokogiriXmlNamespace ;
|
9
|
-
|
10
|
-
VALUE Nokogiri_wrap_xml_namespace(xmlDocPtr doc, xmlNsPtr node);
|
11
|
-
|
12
|
-
#define NOKOGIRI_NAMESPACE_EH(node) ((node)->type == XML_NAMESPACE_DECL)
|
13
|
-
|
14
|
-
#endif
|
data/ext/nokogiri/xml_node.h
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
#ifndef NOKOGIRI_XML_NODE
|
2
|
-
#define NOKOGIRI_XML_NODE
|
3
|
-
|
4
|
-
#include <nokogiri.h>
|
5
|
-
|
6
|
-
void init_xml_node();
|
7
|
-
|
8
|
-
extern VALUE cNokogiriXmlNode ;
|
9
|
-
extern VALUE cNokogiriXmlElement ;
|
10
|
-
|
11
|
-
VALUE Nokogiri_wrap_xml_node(VALUE klass, xmlNodePtr node) ;
|
12
|
-
void Nokogiri_xml_node_properties(xmlNodePtr node, VALUE attr_hash) ;
|
13
|
-
#endif
|
data/ext/nokogiri/xml_node_set.h
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
#ifndef NOKOGIRI_XML_NODE_SET
|
2
|
-
#define NOKOGIRI_XML_NODE_SET
|
3
|
-
|
4
|
-
#include <nokogiri.h>
|
5
|
-
void init_xml_node_set();
|
6
|
-
|
7
|
-
extern VALUE cNokogiriXmlNodeSet ;
|
8
|
-
VALUE Nokogiri_wrap_xml_node_set(xmlNodeSetPtr node_set, VALUE document) ;
|
9
|
-
VALUE Nokogiri_wrap_xml_node_set_node(xmlNodePtr node, VALUE node_set) ;
|
10
|
-
VALUE Nokogiri_wrap_xml_node_set_namespace(xmlNsPtr node, VALUE node_set) ;
|
11
|
-
|
12
|
-
#endif
|
data/ext/nokogiri/xml_reader.h
DELETED
data/ext/nokogiri/xml_relax_ng.h
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
#ifndef NOKOGIRI_XML_SAX_PARSER
|
2
|
-
#define NOKOGIRI_XML_SAX_PARSER
|
3
|
-
|
4
|
-
#include <nokogiri.h>
|
5
|
-
|
6
|
-
void init_xml_sax_parser();
|
7
|
-
|
8
|
-
extern VALUE cNokogiriXmlSaxParser ;
|
9
|
-
|
10
|
-
typedef struct _nokogiriSAXTuple {
|
11
|
-
xmlParserCtxtPtr ctxt;
|
12
|
-
VALUE self;
|
13
|
-
} nokogiriSAXTuple;
|
14
|
-
|
15
|
-
typedef nokogiriSAXTuple * nokogiriSAXTuplePtr;
|
16
|
-
|
17
|
-
#define NOKOGIRI_SAX_SELF(_ctxt) \
|
18
|
-
((nokogiriSAXTuplePtr)(_ctxt))->self
|
19
|
-
|
20
|
-
#define NOKOGIRI_SAX_CTXT(_ctxt) \
|
21
|
-
((nokogiriSAXTuplePtr)(_ctxt))->ctxt
|
22
|
-
|
23
|
-
#define NOKOGIRI_SAX_TUPLE_NEW(_ctxt, _self) \
|
24
|
-
nokogiri_sax_tuple_new(_ctxt, _self)
|
25
|
-
|
26
|
-
static inline nokogiriSAXTuplePtr
|
27
|
-
nokogiri_sax_tuple_new(xmlParserCtxtPtr ctxt, VALUE self)
|
28
|
-
{
|
29
|
-
nokogiriSAXTuplePtr tuple = malloc(sizeof(nokogiriSAXTuple));
|
30
|
-
tuple->self = self;
|
31
|
-
tuple->ctxt = ctxt;
|
32
|
-
return tuple;
|
33
|
-
}
|
34
|
-
|
35
|
-
#define NOKOGIRI_SAX_TUPLE_DESTROY(_tuple) \
|
36
|
-
free(_tuple) \
|
37
|
-
|
38
|
-
#endif
|
39
|
-
|
data/ext/nokogiri/xml_schema.h
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
#ifndef NOKOGIRI_XML_SYNTAX_ERROR
|
2
|
-
#define NOKOGIRI_XML_SYNTAX_ERROR
|
3
|
-
|
4
|
-
#include <nokogiri.h>
|
5
|
-
|
6
|
-
typedef struct _libxmlStructuredErrorHandlerState {
|
7
|
-
void *user_data;
|
8
|
-
xmlStructuredErrorFunc handler;
|
9
|
-
} libxmlStructuredErrorHandlerState ;
|
10
|
-
|
11
|
-
void init_xml_syntax_error();
|
12
|
-
|
13
|
-
void Nokogiri_structured_error_func_save(libxmlStructuredErrorHandlerState *handler_state);
|
14
|
-
void Nokogiri_structured_error_func_save_and_set(libxmlStructuredErrorHandlerState *handler_state,
|
15
|
-
void *user_data,
|
16
|
-
xmlStructuredErrorFunc handler);
|
17
|
-
void Nokogiri_structured_error_func_restore(libxmlStructuredErrorHandlerState *handler_state);
|
18
|
-
|
19
|
-
VALUE Nokogiri_wrap_xml_syntax_error(xmlErrorPtr error);
|
20
|
-
void Nokogiri_error_array_pusher(void *ctx, xmlErrorPtr error);
|
21
|
-
NORETURN(void Nokogiri_error_raise(void *ctx, xmlErrorPtr error));
|
22
|
-
|
23
|
-
extern VALUE cNokogiriXmlSyntaxError;
|
24
|
-
|
25
|
-
#endif /* NOKOGIRI_XML_SYNTAX_ERROR */
|
data/ext/nokogiri/xml_text.h
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
#ifndef NOKOGIRI_XML_XPATH_CONTEXT
|
2
|
-
#define NOKOGIRI_XML_XPATH_CONTEXT
|
3
|
-
|
4
|
-
#include <nokogiri.h>
|
5
|
-
|
6
|
-
void init_xml_xpath_context();
|
7
|
-
void Nokogiri_marshal_xpath_funcall_and_return_values(xmlXPathParserContextPtr ctx, int nargs, VALUE handler, const char* function_name) ;
|
8
|
-
|
9
|
-
extern VALUE cNokogiriXmlXpathContext;
|
10
|
-
#endif
|
@@ -1,14 +0,0 @@
|
|
1
|
-
#ifndef NOKOGIRI_XSLT_STYLESHEET
|
2
|
-
#define NOKOGIRI_XSLT_STYLESHEET
|
3
|
-
|
4
|
-
#include <nokogiri.h>
|
5
|
-
|
6
|
-
void init_xslt_stylesheet();
|
7
|
-
|
8
|
-
extern VALUE cNokogiriXsltStylesheet ;
|
9
|
-
|
10
|
-
typedef struct _nokogiriXsltStylesheetTuple {
|
11
|
-
xsltStylesheetPtr ss;
|
12
|
-
VALUE func_instances;
|
13
|
-
} nokogiriXsltStylesheetTuple;
|
14
|
-
#endif
|