nokogiri 1.16.7 → 1.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +11 -21
- data/README.md +4 -0
- data/dependencies.yml +6 -6
- data/ext/nokogiri/extconf.rb +191 -137
- data/ext/nokogiri/gumbo.c +69 -53
- data/ext/nokogiri/html4_document.c +10 -4
- data/ext/nokogiri/html4_element_description.c +18 -18
- data/ext/nokogiri/html4_sax_parser.c +40 -0
- data/ext/nokogiri/html4_sax_parser_context.c +48 -58
- data/ext/nokogiri/html4_sax_push_parser.c +25 -24
- data/ext/nokogiri/libxml2_polyfill.c +114 -0
- data/ext/nokogiri/nokogiri.c +9 -2
- data/ext/nokogiri/nokogiri.h +18 -33
- data/ext/nokogiri/xml_attr.c +1 -1
- data/ext/nokogiri/xml_cdata.c +2 -10
- data/ext/nokogiri/xml_comment.c +3 -8
- data/ext/nokogiri/xml_document.c +163 -156
- data/ext/nokogiri/xml_document_fragment.c +10 -25
- data/ext/nokogiri/xml_dtd.c +1 -1
- data/ext/nokogiri/xml_element_content.c +9 -9
- data/ext/nokogiri/xml_encoding_handler.c +4 -4
- data/ext/nokogiri/xml_namespace.c +6 -6
- data/ext/nokogiri/xml_node.c +141 -104
- data/ext/nokogiri/xml_node_set.c +46 -44
- data/ext/nokogiri/xml_reader.c +54 -58
- data/ext/nokogiri/xml_relax_ng.c +35 -56
- data/ext/nokogiri/xml_sax_parser.c +156 -88
- data/ext/nokogiri/xml_sax_parser_context.c +213 -131
- data/ext/nokogiri/xml_sax_push_parser.c +68 -49
- data/ext/nokogiri/xml_schema.c +50 -85
- data/ext/nokogiri/xml_syntax_error.c +19 -11
- data/ext/nokogiri/xml_text.c +2 -4
- data/ext/nokogiri/xml_xpath_context.c +2 -2
- data/ext/nokogiri/xslt_stylesheet.c +8 -8
- data/gumbo-parser/src/error.c +76 -48
- data/gumbo-parser/src/error.h +5 -1
- data/gumbo-parser/src/nokogiri_gumbo.h +11 -2
- data/gumbo-parser/src/parser.c +61 -23
- data/gumbo-parser/src/tokenizer.c +6 -6
- data/lib/nokogiri/class_resolver.rb +1 -1
- data/lib/nokogiri/css/node.rb +6 -2
- data/lib/nokogiri/css/parser.rb +6 -4
- data/lib/nokogiri/css/parser.y +2 -2
- data/lib/nokogiri/css/parser_extras.rb +6 -66
- data/lib/nokogiri/css/selector_cache.rb +38 -0
- data/lib/nokogiri/css/tokenizer.rb +4 -4
- data/lib/nokogiri/css/tokenizer.rex +9 -8
- data/lib/nokogiri/css/xpath_visitor.rb +42 -6
- data/lib/nokogiri/css.rb +86 -20
- data/lib/nokogiri/decorators/slop.rb +3 -5
- data/lib/nokogiri/encoding_handler.rb +2 -2
- data/lib/nokogiri/html4/document.rb +44 -23
- data/lib/nokogiri/html4/document_fragment.rb +124 -12
- data/lib/nokogiri/html4/encoding_reader.rb +1 -1
- data/lib/nokogiri/html4/sax/parser.rb +23 -38
- data/lib/nokogiri/html4/sax/parser_context.rb +4 -9
- data/lib/nokogiri/html4.rb +9 -14
- data/lib/nokogiri/html5/builder.rb +40 -0
- data/lib/nokogiri/html5/document.rb +61 -30
- data/lib/nokogiri/html5/document_fragment.rb +130 -20
- data/lib/nokogiri/html5/node.rb +4 -4
- data/lib/nokogiri/html5.rb +114 -72
- data/lib/nokogiri/version/constant.rb +1 -1
- data/lib/nokogiri/xml/builder.rb +8 -1
- data/lib/nokogiri/xml/document.rb +70 -26
- data/lib/nokogiri/xml/document_fragment.rb +84 -13
- data/lib/nokogiri/xml/node.rb +82 -11
- data/lib/nokogiri/xml/node_set.rb +9 -7
- data/lib/nokogiri/xml/parse_options.rb +1 -1
- data/lib/nokogiri/xml/pp/node.rb +6 -1
- data/lib/nokogiri/xml/reader.rb +46 -13
- data/lib/nokogiri/xml/relax_ng.rb +57 -20
- data/lib/nokogiri/xml/sax/document.rb +174 -83
- data/lib/nokogiri/xml/sax/parser.rb +115 -41
- data/lib/nokogiri/xml/sax/parser_context.rb +116 -8
- data/lib/nokogiri/xml/sax/push_parser.rb +3 -0
- data/lib/nokogiri/xml/sax.rb +48 -0
- data/lib/nokogiri/xml/schema.rb +112 -45
- data/lib/nokogiri/xml/searchable.rb +6 -8
- data/lib/nokogiri/xml/syntax_error.rb +22 -0
- data/lib/nokogiri/xml.rb +13 -24
- data/lib/nokogiri/xslt.rb +3 -9
- data/lib/xsd/xmlparser/nokogiri.rb +3 -4
- data/ports/archives/libxml2-2.13.5.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.42.tar.xz +0 -0
- metadata +10 -9
- data/ext/nokogiri/libxml2_backwards_compat.c +0 -121
- data/patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch +0 -25
- data/ports/archives/libxml2-2.12.9.tar.xz +0 -0
- data/ports/archives/libxslt-1.1.39.tar.xz +0 -0
@@ -1,121 +0,0 @@
|
|
1
|
-
#ifndef HAVE_XMLFIRSTELEMENTCHILD
|
2
|
-
#include <nokogiri.h>
|
3
|
-
/**
|
4
|
-
* xmlFirstElementChild:
|
5
|
-
* @parent: the parent node
|
6
|
-
*
|
7
|
-
* Finds the first child node of that element which is a Element node
|
8
|
-
* Note the handling of entities references is different than in
|
9
|
-
* the W3C DOM element traversal spec since we don't have back reference
|
10
|
-
* from entities content to entities references.
|
11
|
-
*
|
12
|
-
* Returns the first element child or NULL if not available
|
13
|
-
*/
|
14
|
-
xmlNodePtr
|
15
|
-
xmlFirstElementChild(xmlNodePtr parent)
|
16
|
-
{
|
17
|
-
xmlNodePtr cur = NULL;
|
18
|
-
|
19
|
-
if (parent == NULL) {
|
20
|
-
return (NULL);
|
21
|
-
}
|
22
|
-
switch (parent->type) {
|
23
|
-
case XML_ELEMENT_NODE:
|
24
|
-
case XML_ENTITY_NODE:
|
25
|
-
case XML_DOCUMENT_NODE:
|
26
|
-
case XML_HTML_DOCUMENT_NODE:
|
27
|
-
cur = parent->children;
|
28
|
-
break;
|
29
|
-
default:
|
30
|
-
return (NULL);
|
31
|
-
}
|
32
|
-
while (cur != NULL) {
|
33
|
-
if (cur->type == XML_ELEMENT_NODE) {
|
34
|
-
return (cur);
|
35
|
-
}
|
36
|
-
cur = cur->next;
|
37
|
-
}
|
38
|
-
return (NULL);
|
39
|
-
}
|
40
|
-
|
41
|
-
/**
|
42
|
-
* xmlNextElementSibling:
|
43
|
-
* @node: the current node
|
44
|
-
*
|
45
|
-
* Finds the first closest next sibling of the node which is an
|
46
|
-
* element node.
|
47
|
-
* Note the handling of entities references is different than in
|
48
|
-
* the W3C DOM element traversal spec since we don't have back reference
|
49
|
-
* from entities content to entities references.
|
50
|
-
*
|
51
|
-
* Returns the next element sibling or NULL if not available
|
52
|
-
*/
|
53
|
-
xmlNodePtr
|
54
|
-
xmlNextElementSibling(xmlNodePtr node)
|
55
|
-
{
|
56
|
-
if (node == NULL) {
|
57
|
-
return (NULL);
|
58
|
-
}
|
59
|
-
switch (node->type) {
|
60
|
-
case XML_ELEMENT_NODE:
|
61
|
-
case XML_TEXT_NODE:
|
62
|
-
case XML_CDATA_SECTION_NODE:
|
63
|
-
case XML_ENTITY_REF_NODE:
|
64
|
-
case XML_ENTITY_NODE:
|
65
|
-
case XML_PI_NODE:
|
66
|
-
case XML_COMMENT_NODE:
|
67
|
-
case XML_DTD_NODE:
|
68
|
-
case XML_XINCLUDE_START:
|
69
|
-
case XML_XINCLUDE_END:
|
70
|
-
node = node->next;
|
71
|
-
break;
|
72
|
-
default:
|
73
|
-
return (NULL);
|
74
|
-
}
|
75
|
-
while (node != NULL) {
|
76
|
-
if (node->type == XML_ELEMENT_NODE) {
|
77
|
-
return (node);
|
78
|
-
}
|
79
|
-
node = node->next;
|
80
|
-
}
|
81
|
-
return (NULL);
|
82
|
-
}
|
83
|
-
|
84
|
-
/**
|
85
|
-
* xmlLastElementChild:
|
86
|
-
* @parent: the parent node
|
87
|
-
*
|
88
|
-
* Finds the last child node of that element which is a Element node
|
89
|
-
* Note the handling of entities references is different than in
|
90
|
-
* the W3C DOM element traversal spec since we don't have back reference
|
91
|
-
* from entities content to entities references.
|
92
|
-
*
|
93
|
-
* Returns the last element child or NULL if not available
|
94
|
-
*/
|
95
|
-
xmlNodePtr
|
96
|
-
xmlLastElementChild(xmlNodePtr parent)
|
97
|
-
{
|
98
|
-
xmlNodePtr cur = NULL;
|
99
|
-
|
100
|
-
if (parent == NULL) {
|
101
|
-
return (NULL);
|
102
|
-
}
|
103
|
-
switch (parent->type) {
|
104
|
-
case XML_ELEMENT_NODE:
|
105
|
-
case XML_ENTITY_NODE:
|
106
|
-
case XML_DOCUMENT_NODE:
|
107
|
-
case XML_HTML_DOCUMENT_NODE:
|
108
|
-
cur = parent->last;
|
109
|
-
break;
|
110
|
-
default:
|
111
|
-
return (NULL);
|
112
|
-
}
|
113
|
-
while (cur != NULL) {
|
114
|
-
if (cur->type == XML_ELEMENT_NODE) {
|
115
|
-
return (cur);
|
116
|
-
}
|
117
|
-
cur = cur->prev;
|
118
|
-
}
|
119
|
-
return (NULL);
|
120
|
-
}
|
121
|
-
#endif
|
@@ -1,25 +0,0 @@
|
|
1
|
-
From 0b6ae484761fa01242fe8b67b54e3eb2d282d83d Mon Sep 17 00:00:00 2001
|
2
|
-
From: Mike Dalessio <mike.dalessio@gmail.com>
|
3
|
-
Date: Wed, 4 Dec 2019 08:43:51 -0500
|
4
|
-
Subject: [PATCH] fix libxml2.la's path
|
5
|
-
|
6
|
-
---
|
7
|
-
Makefile.in | 2 +-
|
8
|
-
1 file changed, 1 insertion(+), 1 deletion(-)
|
9
|
-
|
10
|
-
diff --git a/Makefile.in b/Makefile.in
|
11
|
-
index cf96d41..1372d8b 100644
|
12
|
-
--- a/Makefile.in
|
13
|
-
+++ b/Makefile.in
|
14
|
-
@@ -1057,7 +1057,7 @@ clean-noinstLTLIBRARIES:
|
15
|
-
rm -f $${locs}; \
|
16
|
-
}
|
17
|
-
|
18
|
-
-libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) $(EXTRA_libxml2_la_DEPENDENCIES)
|
19
|
-
+$(top_builddir)/libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) $(EXTRA_libxml2_la_DEPENDENCIES)
|
20
|
-
$(AM_V_CCLD)$(libxml2_la_LINK) -rpath $(libdir) $(libxml2_la_OBJECTS) $(libxml2_la_LIBADD) $(LIBS)
|
21
|
-
|
22
|
-
testdso.la: $(testdso_la_OBJECTS) $(testdso_la_DEPENDENCIES) $(EXTRA_testdso_la_DEPENDENCIES)
|
23
|
-
--
|
24
|
-
2.17.1
|
25
|
-
|
Binary file
|
Binary file
|