nokogiri 1.10.10-java → 1.11.0-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.

Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/LICENSE-DEPENDENCIES.md +1015 -947
  4. data/README.md +165 -91
  5. data/ext/java/nokogiri/HtmlDocument.java +34 -46
  6. data/ext/java/nokogiri/HtmlSaxParserContext.java +88 -58
  7. data/ext/java/nokogiri/HtmlSaxPushParser.java +1 -1
  8. data/ext/java/nokogiri/NokogiriService.java +1 -1
  9. data/ext/java/nokogiri/XmlAttr.java +13 -20
  10. data/ext/java/nokogiri/XmlAttributeDecl.java +11 -12
  11. data/ext/java/nokogiri/XmlCdata.java +3 -4
  12. data/ext/java/nokogiri/XmlComment.java +1 -1
  13. data/ext/java/nokogiri/XmlDocument.java +148 -175
  14. data/ext/java/nokogiri/XmlDocumentFragment.java +13 -31
  15. data/ext/java/nokogiri/XmlDtd.java +5 -8
  16. data/ext/java/nokogiri/XmlElement.java +1 -20
  17. data/ext/java/nokogiri/XmlElementDecl.java +23 -28
  18. data/ext/java/nokogiri/XmlEntityDecl.java +23 -27
  19. data/ext/java/nokogiri/XmlEntityReference.java +2 -2
  20. data/ext/java/nokogiri/XmlNamespace.java +72 -89
  21. data/ext/java/nokogiri/XmlNode.java +303 -406
  22. data/ext/java/nokogiri/XmlNodeSet.java +70 -76
  23. data/ext/java/nokogiri/XmlReader.java +12 -13
  24. data/ext/java/nokogiri/XmlRelaxng.java +10 -3
  25. data/ext/java/nokogiri/XmlSaxParserContext.java +15 -10
  26. data/ext/java/nokogiri/XmlSchema.java +87 -27
  27. data/ext/java/nokogiri/XmlSyntaxError.java +2 -6
  28. data/ext/java/nokogiri/XmlText.java +12 -9
  29. data/ext/java/nokogiri/XmlXpathContext.java +55 -25
  30. data/ext/java/nokogiri/XsltStylesheet.java +7 -15
  31. data/ext/java/nokogiri/internals/HtmlDomParserContext.java +52 -46
  32. data/ext/java/nokogiri/internals/NokogiriHandler.java +1 -1
  33. data/ext/java/nokogiri/internals/NokogiriHelpers.java +71 -135
  34. data/ext/java/nokogiri/internals/NokogiriNamespaceCache.java +90 -58
  35. data/ext/java/nokogiri/internals/NokogiriNamespaceContext.java +9 -2
  36. data/ext/java/nokogiri/internals/NokogiriXPathFunction.java +67 -10
  37. data/ext/java/nokogiri/internals/NokogiriXPathFunctionResolver.java +4 -2
  38. data/ext/java/nokogiri/internals/ParserContext.java +27 -73
  39. data/ext/java/nokogiri/internals/ReaderNode.java +2 -4
  40. data/ext/java/nokogiri/internals/XmlDomParserContext.java +18 -33
  41. data/ext/nokogiri/depend +476 -357
  42. data/ext/nokogiri/extconf.rb +507 -357
  43. data/ext/nokogiri/html_document.c +79 -78
  44. data/ext/nokogiri/html_sax_parser_context.c +2 -2
  45. data/ext/nokogiri/nokogiri.c +34 -40
  46. data/ext/nokogiri/xml_document.c +18 -4
  47. data/ext/nokogiri/xml_io.c +8 -6
  48. data/ext/nokogiri/xml_node.c +21 -1
  49. data/ext/nokogiri/xml_node_set.c +1 -1
  50. data/ext/nokogiri/xml_reader.c +6 -17
  51. data/ext/nokogiri/xml_relax_ng.c +29 -11
  52. data/ext/nokogiri/xml_sax_parser.c +2 -7
  53. data/ext/nokogiri/xml_sax_parser_context.c +2 -2
  54. data/ext/nokogiri/xml_schema.c +55 -13
  55. data/ext/nokogiri/xml_xpath_context.c +80 -4
  56. data/ext/nokogiri/xslt_stylesheet.c +1 -8
  57. data/lib/nokogiri.rb +22 -22
  58. data/lib/nokogiri/css.rb +1 -0
  59. data/lib/nokogiri/css/node.rb +1 -0
  60. data/lib/nokogiri/css/parser.rb +63 -62
  61. data/lib/nokogiri/css/parser.y +2 -2
  62. data/lib/nokogiri/css/parser_extras.rb +39 -36
  63. data/lib/nokogiri/css/syntax_error.rb +1 -0
  64. data/lib/nokogiri/css/tokenizer.rb +1 -0
  65. data/lib/nokogiri/css/xpath_visitor.rb +73 -43
  66. data/lib/nokogiri/decorators/slop.rb +1 -0
  67. data/lib/nokogiri/html.rb +1 -0
  68. data/lib/nokogiri/html/builder.rb +1 -0
  69. data/lib/nokogiri/html/document.rb +13 -26
  70. data/lib/nokogiri/html/document_fragment.rb +1 -0
  71. data/lib/nokogiri/html/element_description.rb +1 -0
  72. data/lib/nokogiri/html/element_description_defaults.rb +1 -0
  73. data/lib/nokogiri/html/entity_lookup.rb +1 -0
  74. data/lib/nokogiri/html/sax/parser.rb +1 -0
  75. data/lib/nokogiri/html/sax/parser_context.rb +1 -0
  76. data/lib/nokogiri/html/sax/push_parser.rb +1 -0
  77. data/lib/nokogiri/jruby/dependencies.rb +20 -0
  78. data/lib/nokogiri/nokogiri.jar +0 -0
  79. data/lib/nokogiri/syntax_error.rb +1 -0
  80. data/lib/nokogiri/version.rb +3 -109
  81. data/lib/nokogiri/version/constant.rb +5 -0
  82. data/lib/nokogiri/version/info.rb +182 -0
  83. data/lib/nokogiri/xml.rb +1 -0
  84. data/lib/nokogiri/xml/attr.rb +1 -0
  85. data/lib/nokogiri/xml/attribute_decl.rb +1 -0
  86. data/lib/nokogiri/xml/builder.rb +3 -2
  87. data/lib/nokogiri/xml/cdata.rb +1 -0
  88. data/lib/nokogiri/xml/character_data.rb +1 -0
  89. data/lib/nokogiri/xml/document.rb +20 -15
  90. data/lib/nokogiri/xml/document_fragment.rb +5 -6
  91. data/lib/nokogiri/xml/dtd.rb +1 -0
  92. data/lib/nokogiri/xml/element_content.rb +1 -0
  93. data/lib/nokogiri/xml/element_decl.rb +1 -0
  94. data/lib/nokogiri/xml/entity_decl.rb +1 -0
  95. data/lib/nokogiri/xml/entity_reference.rb +1 -0
  96. data/lib/nokogiri/xml/namespace.rb +1 -0
  97. data/lib/nokogiri/xml/node.rb +587 -249
  98. data/lib/nokogiri/xml/node/save_options.rb +1 -0
  99. data/lib/nokogiri/xml/node_set.rb +1 -0
  100. data/lib/nokogiri/xml/notation.rb +1 -0
  101. data/lib/nokogiri/xml/parse_options.rb +10 -3
  102. data/lib/nokogiri/xml/pp.rb +1 -0
  103. data/lib/nokogiri/xml/pp/character_data.rb +1 -0
  104. data/lib/nokogiri/xml/pp/node.rb +1 -0
  105. data/lib/nokogiri/xml/processing_instruction.rb +1 -0
  106. data/lib/nokogiri/xml/reader.rb +7 -3
  107. data/lib/nokogiri/xml/relax_ng.rb +7 -2
  108. data/lib/nokogiri/xml/sax.rb +1 -0
  109. data/lib/nokogiri/xml/sax/document.rb +1 -0
  110. data/lib/nokogiri/xml/sax/parser.rb +1 -0
  111. data/lib/nokogiri/xml/sax/parser_context.rb +1 -0
  112. data/lib/nokogiri/xml/sax/push_parser.rb +1 -0
  113. data/lib/nokogiri/xml/schema.rb +13 -4
  114. data/lib/nokogiri/xml/searchable.rb +25 -16
  115. data/lib/nokogiri/xml/syntax_error.rb +1 -0
  116. data/lib/nokogiri/xml/text.rb +1 -0
  117. data/lib/nokogiri/xml/xpath.rb +1 -0
  118. data/lib/nokogiri/xml/xpath/syntax_error.rb +1 -0
  119. data/lib/nokogiri/xml/xpath_context.rb +1 -0
  120. data/lib/nokogiri/xslt.rb +1 -0
  121. data/lib/nokogiri/xslt/stylesheet.rb +1 -0
  122. data/lib/xsd/xmlparser/nokogiri.rb +1 -0
  123. metadata +86 -159
  124. data/ext/java/nokogiri/internals/NokogiriEncodingReaderWrapper.java +0 -107
  125. data/ext/java/nokogiri/internals/UncloseableInputStream.java +0 -102
  126. data/ext/nokogiri/html_document.h +0 -10
  127. data/ext/nokogiri/html_element_description.h +0 -10
  128. data/ext/nokogiri/html_entity_lookup.h +0 -8
  129. data/ext/nokogiri/html_sax_parser_context.h +0 -11
  130. data/ext/nokogiri/html_sax_push_parser.h +0 -9
  131. data/ext/nokogiri/nokogiri.h +0 -121
  132. data/ext/nokogiri/xml_attr.h +0 -9
  133. data/ext/nokogiri/xml_attribute_decl.h +0 -9
  134. data/ext/nokogiri/xml_cdata.h +0 -9
  135. data/ext/nokogiri/xml_comment.h +0 -9
  136. data/ext/nokogiri/xml_document.h +0 -23
  137. data/ext/nokogiri/xml_document_fragment.h +0 -10
  138. data/ext/nokogiri/xml_dtd.h +0 -10
  139. data/ext/nokogiri/xml_element_content.h +0 -10
  140. data/ext/nokogiri/xml_element_decl.h +0 -9
  141. data/ext/nokogiri/xml_encoding_handler.h +0 -8
  142. data/ext/nokogiri/xml_entity_decl.h +0 -10
  143. data/ext/nokogiri/xml_entity_reference.h +0 -9
  144. data/ext/nokogiri/xml_io.h +0 -11
  145. data/ext/nokogiri/xml_libxml2_hacks.h +0 -12
  146. data/ext/nokogiri/xml_namespace.h +0 -14
  147. data/ext/nokogiri/xml_node.h +0 -13
  148. data/ext/nokogiri/xml_node_set.h +0 -12
  149. data/ext/nokogiri/xml_processing_instruction.h +0 -9
  150. data/ext/nokogiri/xml_reader.h +0 -10
  151. data/ext/nokogiri/xml_relax_ng.h +0 -9
  152. data/ext/nokogiri/xml_sax_parser.h +0 -39
  153. data/ext/nokogiri/xml_sax_parser_context.h +0 -10
  154. data/ext/nokogiri/xml_sax_push_parser.h +0 -9
  155. data/ext/nokogiri/xml_schema.h +0 -9
  156. data/ext/nokogiri/xml_syntax_error.h +0 -13
  157. data/ext/nokogiri/xml_text.h +0 -9
  158. data/ext/nokogiri/xml_xpath_context.h +0 -10
  159. data/ext/nokogiri/xslt_stylesheet.h +0 -14
@@ -1,10 +0,0 @@
1
- #ifndef NOKOGIRI_XML_DOCUMENT_FRAGMENT
2
- #define NOKOGIRI_XML_DOCUMENT_FRAGMENT
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_document_fragment();
7
-
8
- extern VALUE cNokogiriXmlDocumentFragment;
9
- #endif
10
-
@@ -1,10 +0,0 @@
1
- #ifndef NOKOGIRI_XML_DTD
2
- #define NOKOGIRI_XML_DTD
3
-
4
- #include <nokogiri.h>
5
-
6
- extern VALUE cNokogiriXmlDtd;
7
-
8
- void init_xml_dtd();
9
-
10
- #endif
@@ -1,10 +0,0 @@
1
- #ifndef NOKOGIRI_XML_ELEMENT_CONTENT
2
- #define NOKOGIRI_XML_ELEMENT_CONTENT
3
-
4
- #include <nokogiri.h>
5
-
6
-
7
- VALUE Nokogiri_wrap_element_content(VALUE doc, xmlElementContentPtr element);
8
- void init_xml_element_content();
9
-
10
- #endif
@@ -1,9 +0,0 @@
1
- #ifndef NOKOGIRI_XML_ELEMENT_DECL
2
- #define NOKOGIRI_XML_ELEMENT_DECL
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_element_decl();
7
-
8
- extern VALUE cNokogiriXmlElementDecl;
9
- #endif
@@ -1,8 +0,0 @@
1
- #ifndef NOKOGIRI_XML_ENCODING_HANDLER
2
- #define NOKOGIRI_XML_ENCODING_HANDLER
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_encoding_handler();
7
-
8
- #endif
@@ -1,10 +0,0 @@
1
- #ifndef NOKOGIRI_XML_ENTITY_DECL
2
- #define NOKOGIRI_XML_ENTITY_DECL
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_entity_decl();
7
-
8
- extern VALUE cNokogiriXmlEntityDecl;
9
- #endif
10
-
@@ -1,9 +0,0 @@
1
- #ifndef NOKOGIRI_XML_ENTITY_REFERENCE
2
- #define NOKOGIRI_XML_ENTITY_REFERENCE
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_entity_reference();
7
-
8
- extern VALUE cNokogiriXmlEntityReference;
9
- #endif
@@ -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
@@ -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
@@ -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
@@ -1,9 +0,0 @@
1
- #ifndef NOKOGIRI_XML_PROCESSING_INSTRUCTION
2
- #define NOKOGIRI_XML_PROCESSING_INSTRUCTION
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_processing_instruction();
7
-
8
- extern VALUE cNokogiriXmlProcessingInstruction;
9
- #endif
@@ -1,10 +0,0 @@
1
- #ifndef NOKOGIRI_XML_READER
2
- #define NOKOGIRI_XML_READER
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_reader();
7
-
8
- extern VALUE cNokogiriXmlReader;
9
-
10
- #endif
@@ -1,9 +0,0 @@
1
- #ifndef NOKOGIRI_XML_RELAX_NG
2
- #define NOKOGIRI_XML_RELAX_NG
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_relax_ng();
7
-
8
- extern VALUE cNokogiriXmlRelaxNG;
9
- #endif
@@ -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
-
@@ -1,10 +0,0 @@
1
- #ifndef NOKOGIRI_XML_SAX_PARSER_CONTEXT
2
- #define NOKOGIRI_XML_SAX_PARSER_CONTEXT
3
-
4
- #include <nokogiri.h>
5
-
6
- extern VALUE cNokogiriXmlSaxParserContext;
7
-
8
- void init_xml_sax_parser_context();
9
-
10
- #endif
@@ -1,9 +0,0 @@
1
- #ifndef NOKOGIRI_XML_SAX_PUSH_PARSER
2
- #define NOKOGIRI_XML_SAX_PUSH_PARSER
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_sax_push_parser();
7
-
8
- extern VALUE cNokogiriXmlSaxPushParser ;
9
- #endif
@@ -1,9 +0,0 @@
1
- #ifndef NOKOGIRI_XML_SCHEMA
2
- #define NOKOGIRI_XML_SCHEMA
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_schema();
7
-
8
- extern VALUE cNokogiriXmlSchema;
9
- #endif
@@ -1,13 +0,0 @@
1
- #ifndef NOKOGIRI_XML_SYNTAX_ERROR
2
- #define NOKOGIRI_XML_SYNTAX_ERROR
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_syntax_error();
7
- VALUE Nokogiri_wrap_xml_syntax_error(xmlErrorPtr error);
8
- void Nokogiri_error_array_pusher(void * ctx, xmlErrorPtr error);
9
- NORETURN(void Nokogiri_error_raise(void * ctx, xmlErrorPtr error));
10
-
11
- extern VALUE cNokogiriXmlSyntaxError;
12
- #endif
13
-
@@ -1,9 +0,0 @@
1
- #ifndef NOKOGIRI_XML_TEXT
2
- #define NOKOGIRI_XML_TEXT
3
-
4
- #include <nokogiri.h>
5
-
6
- void init_xml_text();
7
-
8
- extern VALUE cNokogiriXmlText ;
9
- #endif
@@ -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