nokogiri 1.11.0.rc3-java → 1.11.0.rc4-java
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 +1015 -947
- data/README.md +1 -1
- data/ext/java/nokogiri/HtmlSaxParserContext.java +1 -1
- data/ext/java/nokogiri/HtmlSaxPushParser.java +1 -1
- data/ext/java/nokogiri/XmlNode.java +4 -6
- data/ext/java/nokogiri/XmlReader.java +2 -2
- data/ext/java/nokogiri/XmlRelaxng.java +10 -3
- data/ext/java/nokogiri/XmlSaxParserContext.java +8 -3
- data/ext/java/nokogiri/XmlSchema.java +84 -24
- data/ext/java/nokogiri/XmlSyntaxError.java +2 -6
- data/ext/java/nokogiri/XmlXpathContext.java +48 -18
- data/ext/java/nokogiri/internals/HtmlDomParserContext.java +51 -39
- data/ext/java/nokogiri/internals/NokogiriHandler.java +1 -1
- data/ext/java/nokogiri/internals/NokogiriNamespaceContext.java +9 -2
- data/ext/java/nokogiri/internals/NokogiriXPathFunction.java +62 -6
- data/ext/java/nokogiri/internals/NokogiriXPathFunctionResolver.java +4 -2
- data/ext/java/nokogiri/internals/XmlDomParserContext.java +2 -2
- data/ext/nokogiri/depend +476 -357
- data/ext/nokogiri/extconf.rb +441 -321
- data/ext/nokogiri/html_document.c +79 -78
- data/ext/nokogiri/html_sax_parser_context.c +2 -2
- data/ext/nokogiri/nokogiri.c +34 -46
- data/ext/nokogiri/xml_document.c +2 -2
- data/ext/nokogiri/xml_node.c +1 -1
- data/ext/nokogiri/xml_node_set.c +1 -1
- data/ext/nokogiri/xml_relax_ng.c +29 -11
- data/ext/nokogiri/xml_sax_parser.c +2 -7
- data/ext/nokogiri/xml_sax_parser_context.c +2 -2
- data/ext/nokogiri/xml_schema.c +55 -13
- data/ext/nokogiri/xml_xpath_context.c +80 -4
- data/ext/nokogiri/xslt_stylesheet.c +1 -4
- data/lib/nokogiri.rb +1 -1
- data/lib/nokogiri/css/parser.rb +3 -3
- data/lib/nokogiri/css/parser.y +2 -2
- data/lib/nokogiri/css/xpath_visitor.rb +70 -42
- data/lib/nokogiri/html/document.rb +12 -26
- data/lib/nokogiri/nokogiri.jar +0 -0
- data/lib/nokogiri/version.rb +2 -149
- data/lib/nokogiri/version/constant.rb +5 -0
- data/lib/nokogiri/version/info.rb +182 -0
- data/lib/nokogiri/xml/document.rb +17 -7
- data/lib/nokogiri/xml/document_fragment.rb +4 -6
- data/lib/nokogiri/xml/node.rb +50 -27
- data/lib/nokogiri/xml/parse_options.rb +6 -0
- data/lib/nokogiri/xml/relax_ng.rb +6 -2
- data/lib/nokogiri/xml/schema.rb +12 -4
- data/lib/nokogiri/xml/searchable.rb +3 -1
- metadata +47 -73
- 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/nokogiri.h +0 -134
- 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.h +0 -11
- 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 -13
- 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
data/ext/nokogiri/nokogiri.h
DELETED
@@ -1,134 +0,0 @@
|
|
1
|
-
#ifndef NOKOGIRI_NATIVE
|
2
|
-
#define NOKOGIRI_NATIVE
|
3
|
-
|
4
|
-
#if _MSC_VER
|
5
|
-
#ifndef WIN32_LEAN_AND_MEAN
|
6
|
-
#define WIN32_LEAN_AND_MEAN
|
7
|
-
#endif /* WIN32_LEAN_AND_MEAN */
|
8
|
-
#ifndef WIN32
|
9
|
-
#define WIN32
|
10
|
-
#endif /* WIN32 */
|
11
|
-
#include <winsock2.h>
|
12
|
-
#include <ws2tcpip.h>
|
13
|
-
#include <windows.h>
|
14
|
-
#endif
|
15
|
-
|
16
|
-
#include <stdlib.h>
|
17
|
-
#include <string.h>
|
18
|
-
#include <assert.h>
|
19
|
-
#include <stdarg.h>
|
20
|
-
|
21
|
-
#ifdef USE_INCLUDED_VASPRINTF
|
22
|
-
int vasprintf (char **strp, const char *fmt, va_list ap);
|
23
|
-
#else
|
24
|
-
|
25
|
-
#define _GNU_SOURCE
|
26
|
-
# include <stdio.h>
|
27
|
-
#undef _GNU_SOURCE
|
28
|
-
|
29
|
-
#endif
|
30
|
-
|
31
|
-
#include <libxml/parser.h>
|
32
|
-
#include <libxml/entities.h>
|
33
|
-
#include <libxml/parserInternals.h>
|
34
|
-
#include <libxml/xpath.h>
|
35
|
-
#include <libxml/xpathInternals.h>
|
36
|
-
#include <libxml/xmlreader.h>
|
37
|
-
#include <libxml/xmlsave.h>
|
38
|
-
#include <libxml/xmlschemas.h>
|
39
|
-
#include <libxml/HTMLparser.h>
|
40
|
-
#include <libxml/HTMLtree.h>
|
41
|
-
#include <libxml/relaxng.h>
|
42
|
-
#include <libxml/xinclude.h>
|
43
|
-
#include <libxslt/extensions.h>
|
44
|
-
#include <libxslt/xsltconfig.h>
|
45
|
-
#include <libxml/c14n.h>
|
46
|
-
#include <ruby.h>
|
47
|
-
#include <ruby/st.h>
|
48
|
-
#include <ruby/encoding.h>
|
49
|
-
|
50
|
-
#ifndef NORETURN
|
51
|
-
# if defined(__GNUC__)
|
52
|
-
# define NORETURN(name) __attribute__((noreturn)) name
|
53
|
-
# else
|
54
|
-
# define NORETURN(name) name
|
55
|
-
# endif
|
56
|
-
#endif
|
57
|
-
|
58
|
-
#define NOKOGIRI_STR_NEW2(str) \
|
59
|
-
NOKOGIRI_STR_NEW(str, strlen((const char *)(str)))
|
60
|
-
|
61
|
-
#define NOKOGIRI_STR_NEW(str, len) \
|
62
|
-
rb_external_str_new_with_enc((const char *)(str), (long)(len), rb_utf8_encoding())
|
63
|
-
|
64
|
-
#define RBSTR_OR_QNIL(_str) \
|
65
|
-
(_str ? NOKOGIRI_STR_NEW2(_str) : Qnil)
|
66
|
-
|
67
|
-
#include <xml_libxml2_hacks.h>
|
68
|
-
|
69
|
-
#include <xml_io.h>
|
70
|
-
#include <xml_document.h>
|
71
|
-
#include <html_entity_lookup.h>
|
72
|
-
#include <html_document.h>
|
73
|
-
#include <xml_node.h>
|
74
|
-
#include <xml_text.h>
|
75
|
-
#include <xml_cdata.h>
|
76
|
-
#include <xml_attr.h>
|
77
|
-
#include <xml_processing_instruction.h>
|
78
|
-
#include <xml_entity_reference.h>
|
79
|
-
#include <xml_document_fragment.h>
|
80
|
-
#include <xml_comment.h>
|
81
|
-
#include <xml_node_set.h>
|
82
|
-
#include <xml_dtd.h>
|
83
|
-
#include <xml_attribute_decl.h>
|
84
|
-
#include <xml_element_decl.h>
|
85
|
-
#include <xml_entity_decl.h>
|
86
|
-
#include <xml_xpath_context.h>
|
87
|
-
#include <xml_element_content.h>
|
88
|
-
#include <xml_sax_parser_context.h>
|
89
|
-
#include <xml_sax_parser.h>
|
90
|
-
#include <xml_sax_push_parser.h>
|
91
|
-
#include <xml_reader.h>
|
92
|
-
#include <html_sax_parser_context.h>
|
93
|
-
#include <html_sax_push_parser.h>
|
94
|
-
#include <xslt_stylesheet.h>
|
95
|
-
#include <xml_syntax_error.h>
|
96
|
-
#include <xml_schema.h>
|
97
|
-
#include <xml_relax_ng.h>
|
98
|
-
#include <html_element_description.h>
|
99
|
-
#include <xml_namespace.h>
|
100
|
-
#include <xml_encoding_handler.h>
|
101
|
-
|
102
|
-
extern VALUE mNokogiri ;
|
103
|
-
extern VALUE mNokogiriXml ;
|
104
|
-
extern VALUE mNokogiriXmlSax ;
|
105
|
-
extern VALUE mNokogiriHtml ;
|
106
|
-
extern VALUE mNokogiriHtmlSax ;
|
107
|
-
extern VALUE mNokogiriXslt ;
|
108
|
-
|
109
|
-
void nokogiri_root_node(xmlNodePtr);
|
110
|
-
void nokogiri_root_nsdef(xmlNsPtr, xmlDocPtr);
|
111
|
-
|
112
|
-
#ifdef DEBUG
|
113
|
-
|
114
|
-
#define NOKOGIRI_DEBUG_START(p) if (getenv("NOKOGIRI_NO_FREE")) return ; if (getenv("NOKOGIRI_DEBUG")) fprintf(stderr,"nokogiri: %s:%d %p start\n", __FILE__, __LINE__, p);
|
115
|
-
#define NOKOGIRI_DEBUG_END(p) if (getenv("NOKOGIRI_DEBUG")) fprintf(stderr,"nokogiri: %s:%d %p end\n", __FILE__, __LINE__, p);
|
116
|
-
|
117
|
-
#else
|
118
|
-
|
119
|
-
#define NOKOGIRI_DEBUG_START(p)
|
120
|
-
#define NOKOGIRI_DEBUG_END(p)
|
121
|
-
|
122
|
-
#endif
|
123
|
-
|
124
|
-
#ifndef __builtin_expect
|
125
|
-
# if defined(__GNUC__)
|
126
|
-
# define __builtin_expect(expr, c) __builtin_expect((long)(expr), (long)(c))
|
127
|
-
# endif
|
128
|
-
#endif
|
129
|
-
|
130
|
-
#define XMLNS_PREFIX "xmlns"
|
131
|
-
#define XMLNS_PREFIX_LEN 6 /* including either colon or \0 */
|
132
|
-
#define XMLNS_BUFFER_LEN 128
|
133
|
-
|
134
|
-
#endif
|
data/ext/nokogiri/xml_attr.h
DELETED
data/ext/nokogiri/xml_cdata.h
DELETED
data/ext/nokogiri/xml_comment.h
DELETED
data/ext/nokogiri/xml_document.h
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
#ifndef NOKOGIRI_XML_DOCUMENT
|
2
|
-
#define NOKOGIRI_XML_DOCUMENT
|
3
|
-
|
4
|
-
#include <nokogiri.h>
|
5
|
-
|
6
|
-
struct _nokogiriTuple {
|
7
|
-
VALUE doc;
|
8
|
-
st_table *unlinkedNodes;
|
9
|
-
VALUE node_cache;
|
10
|
-
};
|
11
|
-
typedef struct _nokogiriTuple nokogiriTuple;
|
12
|
-
typedef nokogiriTuple * nokogiriTuplePtr;
|
13
|
-
|
14
|
-
void init_xml_document();
|
15
|
-
VALUE Nokogiri_wrap_xml_document(VALUE klass, xmlDocPtr doc);
|
16
|
-
|
17
|
-
#define DOC_RUBY_OBJECT_TEST(x) ((nokogiriTuplePtr)(x->_private))
|
18
|
-
#define DOC_RUBY_OBJECT(x) (((nokogiriTuplePtr)(x->_private))->doc)
|
19
|
-
#define DOC_UNLINKED_NODE_HASH(x) (((nokogiriTuplePtr)(x->_private))->unlinkedNodes)
|
20
|
-
#define DOC_NODE_CACHE(x) (((nokogiriTuplePtr)(x->_private))->node_cache)
|
21
|
-
|
22
|
-
extern VALUE cNokogiriXmlDocument ;
|
23
|
-
#endif
|
data/ext/nokogiri/xml_dtd.h
DELETED
data/ext/nokogiri/xml_io.h
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
#ifndef NOKOGIRI_XML_IO
|
2
|
-
#define NOKOGIRI_XML_IO
|
3
|
-
|
4
|
-
#include <nokogiri.h>
|
5
|
-
|
6
|
-
int io_read_callback(void * ctx, char * buffer, int len);
|
7
|
-
int io_write_callback(void * ctx, char * buffer, int len);
|
8
|
-
int io_close_callback(void * ctx);
|
9
|
-
void init_nokogiri_io();
|
10
|
-
|
11
|
-
#endif
|
@@ -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
|
-
|