nokogiri 1.18.0-aarch64-linux-gnu

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 (203) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +39 -0
  3. data/LICENSE-DEPENDENCIES.md +2224 -0
  4. data/LICENSE.md +9 -0
  5. data/README.md +293 -0
  6. data/bin/nokogiri +131 -0
  7. data/dependencies.yml +42 -0
  8. data/ext/nokogiri/depend +38 -0
  9. data/ext/nokogiri/extconf.rb +1173 -0
  10. data/ext/nokogiri/gumbo.c +610 -0
  11. data/ext/nokogiri/html4_document.c +171 -0
  12. data/ext/nokogiri/html4_element_description.c +299 -0
  13. data/ext/nokogiri/html4_entity_lookup.c +37 -0
  14. data/ext/nokogiri/html4_sax_parser.c +40 -0
  15. data/ext/nokogiri/html4_sax_parser_context.c +98 -0
  16. data/ext/nokogiri/html4_sax_push_parser.c +96 -0
  17. data/ext/nokogiri/include/libexslt/exslt.h +108 -0
  18. data/ext/nokogiri/include/libexslt/exsltconfig.h +70 -0
  19. data/ext/nokogiri/include/libexslt/exsltexports.h +63 -0
  20. data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +336 -0
  21. data/ext/nokogiri/include/libxml2/libxml/HTMLtree.h +147 -0
  22. data/ext/nokogiri/include/libxml2/libxml/SAX.h +202 -0
  23. data/ext/nokogiri/include/libxml2/libxml/SAX2.h +171 -0
  24. data/ext/nokogiri/include/libxml2/libxml/c14n.h +115 -0
  25. data/ext/nokogiri/include/libxml2/libxml/catalog.h +182 -0
  26. data/ext/nokogiri/include/libxml2/libxml/chvalid.h +230 -0
  27. data/ext/nokogiri/include/libxml2/libxml/debugXML.h +217 -0
  28. data/ext/nokogiri/include/libxml2/libxml/dict.h +82 -0
  29. data/ext/nokogiri/include/libxml2/libxml/encoding.h +244 -0
  30. data/ext/nokogiri/include/libxml2/libxml/entities.h +166 -0
  31. data/ext/nokogiri/include/libxml2/libxml/globals.h +41 -0
  32. data/ext/nokogiri/include/libxml2/libxml/hash.h +251 -0
  33. data/ext/nokogiri/include/libxml2/libxml/list.h +137 -0
  34. data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +186 -0
  35. data/ext/nokogiri/include/libxml2/libxml/nanohttp.h +98 -0
  36. data/ext/nokogiri/include/libxml2/libxml/parser.h +1390 -0
  37. data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +671 -0
  38. data/ext/nokogiri/include/libxml2/libxml/pattern.h +106 -0
  39. data/ext/nokogiri/include/libxml2/libxml/relaxng.h +219 -0
  40. data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +959 -0
  41. data/ext/nokogiri/include/libxml2/libxml/schematron.h +143 -0
  42. data/ext/nokogiri/include/libxml2/libxml/threads.h +87 -0
  43. data/ext/nokogiri/include/libxml2/libxml/tree.h +1382 -0
  44. data/ext/nokogiri/include/libxml2/libxml/uri.h +106 -0
  45. data/ext/nokogiri/include/libxml2/libxml/valid.h +477 -0
  46. data/ext/nokogiri/include/libxml2/libxml/xinclude.h +136 -0
  47. data/ext/nokogiri/include/libxml2/libxml/xlink.h +189 -0
  48. data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +438 -0
  49. data/ext/nokogiri/include/libxml2/libxml/xmlautomata.h +146 -0
  50. data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +962 -0
  51. data/ext/nokogiri/include/libxml2/libxml/xmlexports.h +146 -0
  52. data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +188 -0
  53. data/ext/nokogiri/include/libxml2/libxml/xmlmodule.h +57 -0
  54. data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +436 -0
  55. data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +215 -0
  56. data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +102 -0
  57. data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +249 -0
  58. data/ext/nokogiri/include/libxml2/libxml/xmlschemastypes.h +152 -0
  59. data/ext/nokogiri/include/libxml2/libxml/xmlstring.h +140 -0
  60. data/ext/nokogiri/include/libxml2/libxml/xmlunicode.h +366 -0
  61. data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +347 -0
  62. data/ext/nokogiri/include/libxml2/libxml/xmlwriter.h +489 -0
  63. data/ext/nokogiri/include/libxml2/libxml/xpath.h +579 -0
  64. data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +633 -0
  65. data/ext/nokogiri/include/libxml2/libxml/xpointer.h +138 -0
  66. data/ext/nokogiri/include/libxslt/attributes.h +39 -0
  67. data/ext/nokogiri/include/libxslt/documents.h +93 -0
  68. data/ext/nokogiri/include/libxslt/extensions.h +262 -0
  69. data/ext/nokogiri/include/libxslt/extra.h +72 -0
  70. data/ext/nokogiri/include/libxslt/functions.h +78 -0
  71. data/ext/nokogiri/include/libxslt/imports.h +75 -0
  72. data/ext/nokogiri/include/libxslt/keys.h +53 -0
  73. data/ext/nokogiri/include/libxslt/namespaces.h +68 -0
  74. data/ext/nokogiri/include/libxslt/numbersInternals.h +73 -0
  75. data/ext/nokogiri/include/libxslt/pattern.h +84 -0
  76. data/ext/nokogiri/include/libxslt/preproc.h +43 -0
  77. data/ext/nokogiri/include/libxslt/security.h +104 -0
  78. data/ext/nokogiri/include/libxslt/templates.h +77 -0
  79. data/ext/nokogiri/include/libxslt/transform.h +207 -0
  80. data/ext/nokogiri/include/libxslt/variables.h +118 -0
  81. data/ext/nokogiri/include/libxslt/xslt.h +110 -0
  82. data/ext/nokogiri/include/libxslt/xsltInternals.h +1995 -0
  83. data/ext/nokogiri/include/libxslt/xsltconfig.h +146 -0
  84. data/ext/nokogiri/include/libxslt/xsltexports.h +64 -0
  85. data/ext/nokogiri/include/libxslt/xsltlocale.h +44 -0
  86. data/ext/nokogiri/include/libxslt/xsltutils.h +343 -0
  87. data/ext/nokogiri/libxml2_polyfill.c +114 -0
  88. data/ext/nokogiri/nokogiri.c +294 -0
  89. data/ext/nokogiri/nokogiri.h +238 -0
  90. data/ext/nokogiri/test_global_handlers.c +40 -0
  91. data/ext/nokogiri/xml_attr.c +103 -0
  92. data/ext/nokogiri/xml_attribute_decl.c +70 -0
  93. data/ext/nokogiri/xml_cdata.c +62 -0
  94. data/ext/nokogiri/xml_comment.c +57 -0
  95. data/ext/nokogiri/xml_document.c +784 -0
  96. data/ext/nokogiri/xml_document_fragment.c +29 -0
  97. data/ext/nokogiri/xml_dtd.c +208 -0
  98. data/ext/nokogiri/xml_element_content.c +131 -0
  99. data/ext/nokogiri/xml_element_decl.c +69 -0
  100. data/ext/nokogiri/xml_encoding_handler.c +112 -0
  101. data/ext/nokogiri/xml_entity_decl.c +112 -0
  102. data/ext/nokogiri/xml_entity_reference.c +50 -0
  103. data/ext/nokogiri/xml_namespace.c +181 -0
  104. data/ext/nokogiri/xml_node.c +2459 -0
  105. data/ext/nokogiri/xml_node_set.c +518 -0
  106. data/ext/nokogiri/xml_processing_instruction.c +54 -0
  107. data/ext/nokogiri/xml_reader.c +777 -0
  108. data/ext/nokogiri/xml_relax_ng.c +149 -0
  109. data/ext/nokogiri/xml_sax_parser.c +403 -0
  110. data/ext/nokogiri/xml_sax_parser_context.c +390 -0
  111. data/ext/nokogiri/xml_sax_push_parser.c +206 -0
  112. data/ext/nokogiri/xml_schema.c +226 -0
  113. data/ext/nokogiri/xml_syntax_error.c +93 -0
  114. data/ext/nokogiri/xml_text.c +59 -0
  115. data/ext/nokogiri/xml_xpath_context.c +486 -0
  116. data/ext/nokogiri/xslt_stylesheet.c +421 -0
  117. data/gumbo-parser/CHANGES.md +63 -0
  118. data/gumbo-parser/Makefile +129 -0
  119. data/gumbo-parser/THANKS +27 -0
  120. data/lib/nokogiri/3.1/nokogiri.so +0 -0
  121. data/lib/nokogiri/3.2/nokogiri.so +0 -0
  122. data/lib/nokogiri/3.3/nokogiri.so +0 -0
  123. data/lib/nokogiri/3.4/nokogiri.so +0 -0
  124. data/lib/nokogiri/class_resolver.rb +67 -0
  125. data/lib/nokogiri/css/node.rb +58 -0
  126. data/lib/nokogiri/css/parser.rb +772 -0
  127. data/lib/nokogiri/css/parser.y +277 -0
  128. data/lib/nokogiri/css/parser_extras.rb +36 -0
  129. data/lib/nokogiri/css/selector_cache.rb +38 -0
  130. data/lib/nokogiri/css/syntax_error.rb +9 -0
  131. data/lib/nokogiri/css/tokenizer.rb +155 -0
  132. data/lib/nokogiri/css/tokenizer.rex +57 -0
  133. data/lib/nokogiri/css/xpath_visitor.rb +375 -0
  134. data/lib/nokogiri/css.rb +132 -0
  135. data/lib/nokogiri/decorators/slop.rb +42 -0
  136. data/lib/nokogiri/encoding_handler.rb +57 -0
  137. data/lib/nokogiri/extension.rb +32 -0
  138. data/lib/nokogiri/gumbo.rb +15 -0
  139. data/lib/nokogiri/html.rb +48 -0
  140. data/lib/nokogiri/html4/builder.rb +37 -0
  141. data/lib/nokogiri/html4/document.rb +235 -0
  142. data/lib/nokogiri/html4/document_fragment.rb +166 -0
  143. data/lib/nokogiri/html4/element_description.rb +25 -0
  144. data/lib/nokogiri/html4/element_description_defaults.rb +2040 -0
  145. data/lib/nokogiri/html4/encoding_reader.rb +121 -0
  146. data/lib/nokogiri/html4/entity_lookup.rb +15 -0
  147. data/lib/nokogiri/html4/sax/parser.rb +48 -0
  148. data/lib/nokogiri/html4/sax/parser_context.rb +15 -0
  149. data/lib/nokogiri/html4/sax/push_parser.rb +37 -0
  150. data/lib/nokogiri/html4.rb +42 -0
  151. data/lib/nokogiri/html5/builder.rb +40 -0
  152. data/lib/nokogiri/html5/document.rb +199 -0
  153. data/lib/nokogiri/html5/document_fragment.rb +200 -0
  154. data/lib/nokogiri/html5/node.rb +103 -0
  155. data/lib/nokogiri/html5.rb +368 -0
  156. data/lib/nokogiri/jruby/dependencies.rb +3 -0
  157. data/lib/nokogiri/jruby/nokogiri_jars.rb +43 -0
  158. data/lib/nokogiri/syntax_error.rb +6 -0
  159. data/lib/nokogiri/version/constant.rb +6 -0
  160. data/lib/nokogiri/version/info.rb +224 -0
  161. data/lib/nokogiri/version.rb +4 -0
  162. data/lib/nokogiri/xml/attr.rb +66 -0
  163. data/lib/nokogiri/xml/attribute_decl.rb +22 -0
  164. data/lib/nokogiri/xml/builder.rb +494 -0
  165. data/lib/nokogiri/xml/cdata.rb +13 -0
  166. data/lib/nokogiri/xml/character_data.rb +9 -0
  167. data/lib/nokogiri/xml/document.rb +514 -0
  168. data/lib/nokogiri/xml/document_fragment.rb +276 -0
  169. data/lib/nokogiri/xml/dtd.rb +34 -0
  170. data/lib/nokogiri/xml/element_content.rb +46 -0
  171. data/lib/nokogiri/xml/element_decl.rb +17 -0
  172. data/lib/nokogiri/xml/entity_decl.rb +23 -0
  173. data/lib/nokogiri/xml/entity_reference.rb +20 -0
  174. data/lib/nokogiri/xml/namespace.rb +57 -0
  175. data/lib/nokogiri/xml/node/save_options.rb +76 -0
  176. data/lib/nokogiri/xml/node.rb +1650 -0
  177. data/lib/nokogiri/xml/node_set.rb +449 -0
  178. data/lib/nokogiri/xml/notation.rb +19 -0
  179. data/lib/nokogiri/xml/parse_options.rb +213 -0
  180. data/lib/nokogiri/xml/pp/character_data.rb +21 -0
  181. data/lib/nokogiri/xml/pp/node.rb +73 -0
  182. data/lib/nokogiri/xml/pp.rb +4 -0
  183. data/lib/nokogiri/xml/processing_instruction.rb +11 -0
  184. data/lib/nokogiri/xml/reader.rb +139 -0
  185. data/lib/nokogiri/xml/relax_ng.rb +75 -0
  186. data/lib/nokogiri/xml/sax/document.rb +258 -0
  187. data/lib/nokogiri/xml/sax/parser.rb +199 -0
  188. data/lib/nokogiri/xml/sax/parser_context.rb +129 -0
  189. data/lib/nokogiri/xml/sax/push_parser.rb +64 -0
  190. data/lib/nokogiri/xml/sax.rb +54 -0
  191. data/lib/nokogiri/xml/schema.rb +140 -0
  192. data/lib/nokogiri/xml/searchable.rb +274 -0
  193. data/lib/nokogiri/xml/syntax_error.rb +94 -0
  194. data/lib/nokogiri/xml/text.rb +11 -0
  195. data/lib/nokogiri/xml/xpath/syntax_error.rb +13 -0
  196. data/lib/nokogiri/xml/xpath.rb +21 -0
  197. data/lib/nokogiri/xml/xpath_context.rb +27 -0
  198. data/lib/nokogiri/xml.rb +65 -0
  199. data/lib/nokogiri/xslt/stylesheet.rb +49 -0
  200. data/lib/nokogiri/xslt.rb +129 -0
  201. data/lib/nokogiri.rb +128 -0
  202. data/lib/xsd/xmlparser/nokogiri.rb +105 -0
  203. metadata +321 -0
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Summary: library of generic URI related routines
3
+ * Description: library of generic URI related routines
4
+ * Implements RFC 2396
5
+ *
6
+ * Copy: See Copyright for the status of this software.
7
+ *
8
+ * Author: Daniel Veillard
9
+ */
10
+
11
+ #ifndef __XML_URI_H__
12
+ #define __XML_URI_H__
13
+
14
+ #include <stdio.h>
15
+ #include <libxml/xmlversion.h>
16
+ #include <libxml/xmlstring.h>
17
+
18
+ #ifdef __cplusplus
19
+ extern "C" {
20
+ #endif
21
+
22
+ /**
23
+ * xmlURI:
24
+ *
25
+ * A parsed URI reference. This is a struct containing the various fields
26
+ * as described in RFC 2396 but separated for further processing.
27
+ *
28
+ * Note: query is a deprecated field which is incorrectly unescaped.
29
+ * query_raw takes precedence over query if the former is set.
30
+ * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
31
+ */
32
+ typedef struct _xmlURI xmlURI;
33
+ typedef xmlURI *xmlURIPtr;
34
+ struct _xmlURI {
35
+ char *scheme; /* the URI scheme */
36
+ char *opaque; /* opaque part */
37
+ char *authority; /* the authority part */
38
+ char *server; /* the server part */
39
+ char *user; /* the user part */
40
+ int port; /* the port number */
41
+ char *path; /* the path string */
42
+ char *query; /* the query string (deprecated - use with caution) */
43
+ char *fragment; /* the fragment identifier */
44
+ int cleanup; /* parsing potentially unclean URI */
45
+ char *query_raw; /* the query string (as it appears in the URI) */
46
+ };
47
+
48
+ /*
49
+ * This function is in tree.h:
50
+ * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
51
+ * xmlNodePtr cur);
52
+ */
53
+ XMLPUBFUN xmlURIPtr
54
+ xmlCreateURI (void);
55
+ XMLPUBFUN int
56
+ xmlBuildURISafe (const xmlChar *URI,
57
+ const xmlChar *base,
58
+ xmlChar **out);
59
+ XMLPUBFUN xmlChar *
60
+ xmlBuildURI (const xmlChar *URI,
61
+ const xmlChar *base);
62
+ XMLPUBFUN int
63
+ xmlBuildRelativeURISafe (const xmlChar *URI,
64
+ const xmlChar *base,
65
+ xmlChar **out);
66
+ XMLPUBFUN xmlChar *
67
+ xmlBuildRelativeURI (const xmlChar *URI,
68
+ const xmlChar *base);
69
+ XMLPUBFUN xmlURIPtr
70
+ xmlParseURI (const char *str);
71
+ XMLPUBFUN int
72
+ xmlParseURISafe (const char *str,
73
+ xmlURIPtr *uri);
74
+ XMLPUBFUN xmlURIPtr
75
+ xmlParseURIRaw (const char *str,
76
+ int raw);
77
+ XMLPUBFUN int
78
+ xmlParseURIReference (xmlURIPtr uri,
79
+ const char *str);
80
+ XMLPUBFUN xmlChar *
81
+ xmlSaveUri (xmlURIPtr uri);
82
+ XMLPUBFUN void
83
+ xmlPrintURI (FILE *stream,
84
+ xmlURIPtr uri);
85
+ XMLPUBFUN xmlChar *
86
+ xmlURIEscapeStr (const xmlChar *str,
87
+ const xmlChar *list);
88
+ XMLPUBFUN char *
89
+ xmlURIUnescapeString (const char *str,
90
+ int len,
91
+ char *target);
92
+ XMLPUBFUN int
93
+ xmlNormalizeURIPath (char *path);
94
+ XMLPUBFUN xmlChar *
95
+ xmlURIEscape (const xmlChar *str);
96
+ XMLPUBFUN void
97
+ xmlFreeURI (xmlURIPtr uri);
98
+ XMLPUBFUN xmlChar*
99
+ xmlCanonicPath (const xmlChar *path);
100
+ XMLPUBFUN xmlChar*
101
+ xmlPathToURI (const xmlChar *path);
102
+
103
+ #ifdef __cplusplus
104
+ }
105
+ #endif
106
+ #endif /* __XML_URI_H__ */
@@ -0,0 +1,477 @@
1
+ /*
2
+ * Summary: The DTD validation
3
+ * Description: API for the DTD handling and the validity checking
4
+ *
5
+ * Copy: See Copyright for the status of this software.
6
+ *
7
+ * Author: Daniel Veillard
8
+ */
9
+
10
+
11
+ #ifndef __XML_VALID_H__
12
+ #define __XML_VALID_H__
13
+
14
+ /** DOC_DISABLE */
15
+ #include <libxml/xmlversion.h>
16
+ #include <libxml/xmlerror.h>
17
+ #define XML_TREE_INTERNALS
18
+ #include <libxml/tree.h>
19
+ #undef XML_TREE_INTERNALS
20
+ #include <libxml/list.h>
21
+ #include <libxml/xmlautomata.h>
22
+ #include <libxml/xmlregexp.h>
23
+ /** DOC_ENABLE */
24
+
25
+ #ifdef __cplusplus
26
+ extern "C" {
27
+ #endif
28
+
29
+ /*
30
+ * Validation state added for non-determinist content model.
31
+ */
32
+ typedef struct _xmlValidState xmlValidState;
33
+ typedef xmlValidState *xmlValidStatePtr;
34
+
35
+ /**
36
+ * xmlValidityErrorFunc:
37
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
38
+ * but comes from ctxt->userData (which normally contains such
39
+ * a pointer); ctxt->userData can be changed by the user.
40
+ * @msg: the string to format *printf like vararg
41
+ * @...: remaining arguments to the format
42
+ *
43
+ * Callback called when a validity error is found. This is a message
44
+ * oriented function similar to an *printf function.
45
+ */
46
+ typedef void (*xmlValidityErrorFunc) (void *ctx,
47
+ const char *msg,
48
+ ...) LIBXML_ATTR_FORMAT(2,3);
49
+
50
+ /**
51
+ * xmlValidityWarningFunc:
52
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
53
+ * but comes from ctxt->userData (which normally contains such
54
+ * a pointer); ctxt->userData can be changed by the user.
55
+ * @msg: the string to format *printf like vararg
56
+ * @...: remaining arguments to the format
57
+ *
58
+ * Callback called when a validity warning is found. This is a message
59
+ * oriented function similar to an *printf function.
60
+ */
61
+ typedef void (*xmlValidityWarningFunc) (void *ctx,
62
+ const char *msg,
63
+ ...) LIBXML_ATTR_FORMAT(2,3);
64
+
65
+ /*
66
+ * xmlValidCtxt:
67
+ * An xmlValidCtxt is used for error reporting when validating.
68
+ */
69
+ typedef struct _xmlValidCtxt xmlValidCtxt;
70
+ typedef xmlValidCtxt *xmlValidCtxtPtr;
71
+ struct _xmlValidCtxt {
72
+ void *userData; /* user specific data block */
73
+ xmlValidityErrorFunc error; /* the callback in case of errors */
74
+ xmlValidityWarningFunc warning; /* the callback in case of warning */
75
+
76
+ /* Node analysis stack used when validating within entities */
77
+ xmlNodePtr node; /* Current parsed Node */
78
+ int nodeNr; /* Depth of the parsing stack */
79
+ int nodeMax; /* Max depth of the parsing stack */
80
+ xmlNodePtr *nodeTab; /* array of nodes */
81
+
82
+ unsigned int flags; /* internal flags */
83
+ xmlDocPtr doc; /* the document */
84
+ int valid; /* temporary validity check result */
85
+
86
+ /* state state used for non-determinist content validation */
87
+ xmlValidState *vstate; /* current state */
88
+ int vstateNr; /* Depth of the validation stack */
89
+ int vstateMax; /* Max depth of the validation stack */
90
+ xmlValidState *vstateTab; /* array of validation states */
91
+
92
+ #ifdef LIBXML_REGEXP_ENABLED
93
+ xmlAutomataPtr am; /* the automata */
94
+ xmlAutomataStatePtr state; /* used to build the automata */
95
+ #else
96
+ void *am;
97
+ void *state;
98
+ #endif
99
+ };
100
+
101
+ /*
102
+ * ALL notation declarations are stored in a table.
103
+ * There is one table per DTD.
104
+ */
105
+
106
+ typedef struct _xmlHashTable xmlNotationTable;
107
+ typedef xmlNotationTable *xmlNotationTablePtr;
108
+
109
+ /*
110
+ * ALL element declarations are stored in a table.
111
+ * There is one table per DTD.
112
+ */
113
+
114
+ typedef struct _xmlHashTable xmlElementTable;
115
+ typedef xmlElementTable *xmlElementTablePtr;
116
+
117
+ /*
118
+ * ALL attribute declarations are stored in a table.
119
+ * There is one table per DTD.
120
+ */
121
+
122
+ typedef struct _xmlHashTable xmlAttributeTable;
123
+ typedef xmlAttributeTable *xmlAttributeTablePtr;
124
+
125
+ /*
126
+ * ALL IDs attributes are stored in a table.
127
+ * There is one table per document.
128
+ */
129
+
130
+ typedef struct _xmlHashTable xmlIDTable;
131
+ typedef xmlIDTable *xmlIDTablePtr;
132
+
133
+ /*
134
+ * ALL Refs attributes are stored in a table.
135
+ * There is one table per document.
136
+ */
137
+
138
+ typedef struct _xmlHashTable xmlRefTable;
139
+ typedef xmlRefTable *xmlRefTablePtr;
140
+
141
+ /* Notation */
142
+ XMLPUBFUN xmlNotationPtr
143
+ xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
144
+ xmlDtdPtr dtd,
145
+ const xmlChar *name,
146
+ const xmlChar *PublicID,
147
+ const xmlChar *SystemID);
148
+ #ifdef LIBXML_TREE_ENABLED
149
+ XMLPUBFUN xmlNotationTablePtr
150
+ xmlCopyNotationTable (xmlNotationTablePtr table);
151
+ #endif /* LIBXML_TREE_ENABLED */
152
+ XMLPUBFUN void
153
+ xmlFreeNotationTable (xmlNotationTablePtr table);
154
+ #ifdef LIBXML_OUTPUT_ENABLED
155
+ XML_DEPRECATED
156
+ XMLPUBFUN void
157
+ xmlDumpNotationDecl (xmlBufferPtr buf,
158
+ xmlNotationPtr nota);
159
+ /* XML_DEPRECATED, still used in lxml */
160
+ XMLPUBFUN void
161
+ xmlDumpNotationTable (xmlBufferPtr buf,
162
+ xmlNotationTablePtr table);
163
+ #endif /* LIBXML_OUTPUT_ENABLED */
164
+
165
+ /* Element Content */
166
+ /* the non Doc version are being deprecated */
167
+ XMLPUBFUN xmlElementContentPtr
168
+ xmlNewElementContent (const xmlChar *name,
169
+ xmlElementContentType type);
170
+ XMLPUBFUN xmlElementContentPtr
171
+ xmlCopyElementContent (xmlElementContentPtr content);
172
+ XMLPUBFUN void
173
+ xmlFreeElementContent (xmlElementContentPtr cur);
174
+ /* the new versions with doc argument */
175
+ XMLPUBFUN xmlElementContentPtr
176
+ xmlNewDocElementContent (xmlDocPtr doc,
177
+ const xmlChar *name,
178
+ xmlElementContentType type);
179
+ XMLPUBFUN xmlElementContentPtr
180
+ xmlCopyDocElementContent(xmlDocPtr doc,
181
+ xmlElementContentPtr content);
182
+ XMLPUBFUN void
183
+ xmlFreeDocElementContent(xmlDocPtr doc,
184
+ xmlElementContentPtr cur);
185
+ XMLPUBFUN void
186
+ xmlSnprintfElementContent(char *buf,
187
+ int size,
188
+ xmlElementContentPtr content,
189
+ int englob);
190
+ #ifdef LIBXML_OUTPUT_ENABLED
191
+ XML_DEPRECATED
192
+ XMLPUBFUN void
193
+ xmlSprintfElementContent(char *buf,
194
+ xmlElementContentPtr content,
195
+ int englob);
196
+ #endif /* LIBXML_OUTPUT_ENABLED */
197
+
198
+ /* Element */
199
+ XMLPUBFUN xmlElementPtr
200
+ xmlAddElementDecl (xmlValidCtxtPtr ctxt,
201
+ xmlDtdPtr dtd,
202
+ const xmlChar *name,
203
+ xmlElementTypeVal type,
204
+ xmlElementContentPtr content);
205
+ #ifdef LIBXML_TREE_ENABLED
206
+ XMLPUBFUN xmlElementTablePtr
207
+ xmlCopyElementTable (xmlElementTablePtr table);
208
+ #endif /* LIBXML_TREE_ENABLED */
209
+ XMLPUBFUN void
210
+ xmlFreeElementTable (xmlElementTablePtr table);
211
+ #ifdef LIBXML_OUTPUT_ENABLED
212
+ XML_DEPRECATED
213
+ XMLPUBFUN void
214
+ xmlDumpElementTable (xmlBufferPtr buf,
215
+ xmlElementTablePtr table);
216
+ XML_DEPRECATED
217
+ XMLPUBFUN void
218
+ xmlDumpElementDecl (xmlBufferPtr buf,
219
+ xmlElementPtr elem);
220
+ #endif /* LIBXML_OUTPUT_ENABLED */
221
+
222
+ /* Enumeration */
223
+ XMLPUBFUN xmlEnumerationPtr
224
+ xmlCreateEnumeration (const xmlChar *name);
225
+ XMLPUBFUN void
226
+ xmlFreeEnumeration (xmlEnumerationPtr cur);
227
+ #ifdef LIBXML_TREE_ENABLED
228
+ XMLPUBFUN xmlEnumerationPtr
229
+ xmlCopyEnumeration (xmlEnumerationPtr cur);
230
+ #endif /* LIBXML_TREE_ENABLED */
231
+
232
+ /* Attribute */
233
+ XMLPUBFUN xmlAttributePtr
234
+ xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
235
+ xmlDtdPtr dtd,
236
+ const xmlChar *elem,
237
+ const xmlChar *name,
238
+ const xmlChar *ns,
239
+ xmlAttributeType type,
240
+ xmlAttributeDefault def,
241
+ const xmlChar *defaultValue,
242
+ xmlEnumerationPtr tree);
243
+ #ifdef LIBXML_TREE_ENABLED
244
+ XMLPUBFUN xmlAttributeTablePtr
245
+ xmlCopyAttributeTable (xmlAttributeTablePtr table);
246
+ #endif /* LIBXML_TREE_ENABLED */
247
+ XMLPUBFUN void
248
+ xmlFreeAttributeTable (xmlAttributeTablePtr table);
249
+ #ifdef LIBXML_OUTPUT_ENABLED
250
+ XML_DEPRECATED
251
+ XMLPUBFUN void
252
+ xmlDumpAttributeTable (xmlBufferPtr buf,
253
+ xmlAttributeTablePtr table);
254
+ XML_DEPRECATED
255
+ XMLPUBFUN void
256
+ xmlDumpAttributeDecl (xmlBufferPtr buf,
257
+ xmlAttributePtr attr);
258
+ #endif /* LIBXML_OUTPUT_ENABLED */
259
+
260
+ /* IDs */
261
+ XMLPUBFUN int
262
+ xmlAddIDSafe (xmlAttrPtr attr,
263
+ const xmlChar *value);
264
+ XMLPUBFUN xmlIDPtr
265
+ xmlAddID (xmlValidCtxtPtr ctxt,
266
+ xmlDocPtr doc,
267
+ const xmlChar *value,
268
+ xmlAttrPtr attr);
269
+ XMLPUBFUN void
270
+ xmlFreeIDTable (xmlIDTablePtr table);
271
+ XMLPUBFUN xmlAttrPtr
272
+ xmlGetID (xmlDocPtr doc,
273
+ const xmlChar *ID);
274
+ XMLPUBFUN int
275
+ xmlIsID (xmlDocPtr doc,
276
+ xmlNodePtr elem,
277
+ xmlAttrPtr attr);
278
+ XMLPUBFUN int
279
+ xmlRemoveID (xmlDocPtr doc,
280
+ xmlAttrPtr attr);
281
+
282
+ /* IDREFs */
283
+ XML_DEPRECATED
284
+ XMLPUBFUN xmlRefPtr
285
+ xmlAddRef (xmlValidCtxtPtr ctxt,
286
+ xmlDocPtr doc,
287
+ const xmlChar *value,
288
+ xmlAttrPtr attr);
289
+ XML_DEPRECATED
290
+ XMLPUBFUN void
291
+ xmlFreeRefTable (xmlRefTablePtr table);
292
+ XML_DEPRECATED
293
+ XMLPUBFUN int
294
+ xmlIsRef (xmlDocPtr doc,
295
+ xmlNodePtr elem,
296
+ xmlAttrPtr attr);
297
+ XML_DEPRECATED
298
+ XMLPUBFUN int
299
+ xmlRemoveRef (xmlDocPtr doc,
300
+ xmlAttrPtr attr);
301
+ XML_DEPRECATED
302
+ XMLPUBFUN xmlListPtr
303
+ xmlGetRefs (xmlDocPtr doc,
304
+ const xmlChar *ID);
305
+
306
+ /**
307
+ * The public function calls related to validity checking.
308
+ */
309
+ #ifdef LIBXML_VALID_ENABLED
310
+ /* Allocate/Release Validation Contexts */
311
+ XMLPUBFUN xmlValidCtxtPtr
312
+ xmlNewValidCtxt(void);
313
+ XMLPUBFUN void
314
+ xmlFreeValidCtxt(xmlValidCtxtPtr);
315
+
316
+ XML_DEPRECATED
317
+ XMLPUBFUN int
318
+ xmlValidateRoot (xmlValidCtxtPtr ctxt,
319
+ xmlDocPtr doc);
320
+ XML_DEPRECATED
321
+ XMLPUBFUN int
322
+ xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
323
+ xmlDocPtr doc,
324
+ xmlElementPtr elem);
325
+ XML_DEPRECATED
326
+ XMLPUBFUN xmlChar *
327
+ xmlValidNormalizeAttributeValue(xmlDocPtr doc,
328
+ xmlNodePtr elem,
329
+ const xmlChar *name,
330
+ const xmlChar *value);
331
+ XML_DEPRECATED
332
+ XMLPUBFUN xmlChar *
333
+ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
334
+ xmlDocPtr doc,
335
+ xmlNodePtr elem,
336
+ const xmlChar *name,
337
+ const xmlChar *value);
338
+ XML_DEPRECATED
339
+ XMLPUBFUN int
340
+ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
341
+ xmlDocPtr doc,
342
+ xmlAttributePtr attr);
343
+ XML_DEPRECATED
344
+ XMLPUBFUN int
345
+ xmlValidateAttributeValue(xmlAttributeType type,
346
+ const xmlChar *value);
347
+ XML_DEPRECATED
348
+ XMLPUBFUN int
349
+ xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
350
+ xmlDocPtr doc,
351
+ xmlNotationPtr nota);
352
+ XMLPUBFUN int
353
+ xmlValidateDtd (xmlValidCtxtPtr ctxt,
354
+ xmlDocPtr doc,
355
+ xmlDtdPtr dtd);
356
+ XML_DEPRECATED
357
+ XMLPUBFUN int
358
+ xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
359
+ xmlDocPtr doc);
360
+ XMLPUBFUN int
361
+ xmlValidateDocument (xmlValidCtxtPtr ctxt,
362
+ xmlDocPtr doc);
363
+ XMLPUBFUN int
364
+ xmlValidateElement (xmlValidCtxtPtr ctxt,
365
+ xmlDocPtr doc,
366
+ xmlNodePtr elem);
367
+ XML_DEPRECATED
368
+ XMLPUBFUN int
369
+ xmlValidateOneElement (xmlValidCtxtPtr ctxt,
370
+ xmlDocPtr doc,
371
+ xmlNodePtr elem);
372
+ XML_DEPRECATED
373
+ XMLPUBFUN int
374
+ xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
375
+ xmlDocPtr doc,
376
+ xmlNodePtr elem,
377
+ xmlAttrPtr attr,
378
+ const xmlChar *value);
379
+ XML_DEPRECATED
380
+ XMLPUBFUN int
381
+ xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
382
+ xmlDocPtr doc,
383
+ xmlNodePtr elem,
384
+ const xmlChar *prefix,
385
+ xmlNsPtr ns,
386
+ const xmlChar *value);
387
+ XML_DEPRECATED
388
+ XMLPUBFUN int
389
+ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
390
+ xmlDocPtr doc);
391
+ #endif /* LIBXML_VALID_ENABLED */
392
+
393
+ #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
394
+ XML_DEPRECATED
395
+ XMLPUBFUN int
396
+ xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
397
+ xmlDocPtr doc,
398
+ const xmlChar *notationName);
399
+ #endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
400
+
401
+ XMLPUBFUN int
402
+ xmlIsMixedElement (xmlDocPtr doc,
403
+ const xmlChar *name);
404
+ XMLPUBFUN xmlAttributePtr
405
+ xmlGetDtdAttrDesc (xmlDtdPtr dtd,
406
+ const xmlChar *elem,
407
+ const xmlChar *name);
408
+ XMLPUBFUN xmlAttributePtr
409
+ xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
410
+ const xmlChar *elem,
411
+ const xmlChar *name,
412
+ const xmlChar *prefix);
413
+ XMLPUBFUN xmlNotationPtr
414
+ xmlGetDtdNotationDesc (xmlDtdPtr dtd,
415
+ const xmlChar *name);
416
+ XMLPUBFUN xmlElementPtr
417
+ xmlGetDtdQElementDesc (xmlDtdPtr dtd,
418
+ const xmlChar *name,
419
+ const xmlChar *prefix);
420
+ XMLPUBFUN xmlElementPtr
421
+ xmlGetDtdElementDesc (xmlDtdPtr dtd,
422
+ const xmlChar *name);
423
+
424
+ #ifdef LIBXML_VALID_ENABLED
425
+
426
+ XMLPUBFUN int
427
+ xmlValidGetPotentialChildren(xmlElementContent *ctree,
428
+ const xmlChar **names,
429
+ int *len,
430
+ int max);
431
+
432
+ XMLPUBFUN int
433
+ xmlValidGetValidElements(xmlNode *prev,
434
+ xmlNode *next,
435
+ const xmlChar **names,
436
+ int max);
437
+ XMLPUBFUN int
438
+ xmlValidateNameValue (const xmlChar *value);
439
+ XMLPUBFUN int
440
+ xmlValidateNamesValue (const xmlChar *value);
441
+ XMLPUBFUN int
442
+ xmlValidateNmtokenValue (const xmlChar *value);
443
+ XMLPUBFUN int
444
+ xmlValidateNmtokensValue(const xmlChar *value);
445
+
446
+ #ifdef LIBXML_REGEXP_ENABLED
447
+ /*
448
+ * Validation based on the regexp support
449
+ */
450
+ XML_DEPRECATED
451
+ XMLPUBFUN int
452
+ xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
453
+ xmlElementPtr elem);
454
+
455
+ XML_DEPRECATED
456
+ XMLPUBFUN int
457
+ xmlValidatePushElement (xmlValidCtxtPtr ctxt,
458
+ xmlDocPtr doc,
459
+ xmlNodePtr elem,
460
+ const xmlChar *qname);
461
+ XML_DEPRECATED
462
+ XMLPUBFUN int
463
+ xmlValidatePushCData (xmlValidCtxtPtr ctxt,
464
+ const xmlChar *data,
465
+ int len);
466
+ XML_DEPRECATED
467
+ XMLPUBFUN int
468
+ xmlValidatePopElement (xmlValidCtxtPtr ctxt,
469
+ xmlDocPtr doc,
470
+ xmlNodePtr elem,
471
+ const xmlChar *qname);
472
+ #endif /* LIBXML_REGEXP_ENABLED */
473
+ #endif /* LIBXML_VALID_ENABLED */
474
+ #ifdef __cplusplus
475
+ }
476
+ #endif
477
+ #endif /* __XML_VALID_H__ */
@@ -0,0 +1,136 @@
1
+ /*
2
+ * Summary: implementation of XInclude
3
+ * Description: API to handle XInclude processing,
4
+ * implements the
5
+ * World Wide Web Consortium Last Call Working Draft 10 November 2003
6
+ * http://www.w3.org/TR/2003/WD-xinclude-20031110
7
+ *
8
+ * Copy: See Copyright for the status of this software.
9
+ *
10
+ * Author: Daniel Veillard
11
+ */
12
+
13
+ #ifndef __XML_XINCLUDE_H__
14
+ #define __XML_XINCLUDE_H__
15
+
16
+ #include <libxml/xmlversion.h>
17
+ #include <libxml/xmlerror.h>
18
+ #include <libxml/tree.h>
19
+
20
+ #ifdef LIBXML_XINCLUDE_ENABLED
21
+
22
+ #ifdef __cplusplus
23
+ extern "C" {
24
+ #endif
25
+
26
+ /**
27
+ * XINCLUDE_NS:
28
+ *
29
+ * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
30
+ */
31
+ #define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
32
+ /**
33
+ * XINCLUDE_OLD_NS:
34
+ *
35
+ * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
36
+ */
37
+ #define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
38
+ /**
39
+ * XINCLUDE_NODE:
40
+ *
41
+ * Macro defining "include"
42
+ */
43
+ #define XINCLUDE_NODE (const xmlChar *) "include"
44
+ /**
45
+ * XINCLUDE_FALLBACK:
46
+ *
47
+ * Macro defining "fallback"
48
+ */
49
+ #define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
50
+ /**
51
+ * XINCLUDE_HREF:
52
+ *
53
+ * Macro defining "href"
54
+ */
55
+ #define XINCLUDE_HREF (const xmlChar *) "href"
56
+ /**
57
+ * XINCLUDE_PARSE:
58
+ *
59
+ * Macro defining "parse"
60
+ */
61
+ #define XINCLUDE_PARSE (const xmlChar *) "parse"
62
+ /**
63
+ * XINCLUDE_PARSE_XML:
64
+ *
65
+ * Macro defining "xml"
66
+ */
67
+ #define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
68
+ /**
69
+ * XINCLUDE_PARSE_TEXT:
70
+ *
71
+ * Macro defining "text"
72
+ */
73
+ #define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
74
+ /**
75
+ * XINCLUDE_PARSE_ENCODING:
76
+ *
77
+ * Macro defining "encoding"
78
+ */
79
+ #define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
80
+ /**
81
+ * XINCLUDE_PARSE_XPOINTER:
82
+ *
83
+ * Macro defining "xpointer"
84
+ */
85
+ #define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
86
+
87
+ typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
88
+ typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
89
+
90
+ /*
91
+ * standalone processing
92
+ */
93
+ XMLPUBFUN int
94
+ xmlXIncludeProcess (xmlDocPtr doc);
95
+ XMLPUBFUN int
96
+ xmlXIncludeProcessFlags (xmlDocPtr doc,
97
+ int flags);
98
+ XMLPUBFUN int
99
+ xmlXIncludeProcessFlagsData(xmlDocPtr doc,
100
+ int flags,
101
+ void *data);
102
+ XMLPUBFUN int
103
+ xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
104
+ int flags,
105
+ void *data);
106
+ XMLPUBFUN int
107
+ xmlXIncludeProcessTree (xmlNodePtr tree);
108
+ XMLPUBFUN int
109
+ xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
110
+ int flags);
111
+ /*
112
+ * contextual processing
113
+ */
114
+ XMLPUBFUN xmlXIncludeCtxtPtr
115
+ xmlXIncludeNewContext (xmlDocPtr doc);
116
+ XMLPUBFUN int
117
+ xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
118
+ int flags);
119
+ XMLPUBFUN void
120
+ xmlXIncludeSetErrorHandler(xmlXIncludeCtxtPtr ctxt,
121
+ xmlStructuredErrorFunc handler,
122
+ void *data);
123
+ XMLPUBFUN int
124
+ xmlXIncludeGetLastError (xmlXIncludeCtxtPtr ctxt);
125
+ XMLPUBFUN void
126
+ xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
127
+ XMLPUBFUN int
128
+ xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
129
+ xmlNodePtr tree);
130
+ #ifdef __cplusplus
131
+ }
132
+ #endif
133
+
134
+ #endif /* LIBXML_XINCLUDE_ENABLED */
135
+
136
+ #endif /* __XML_XINCLUDE_H__ */