nokogiri 1.10.10 → 1.14.3-aarch64-linux

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 (251) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +44 -0
  3. data/LICENSE-DEPENDENCIES.md +1632 -1022
  4. data/LICENSE.md +1 -1
  5. data/README.md +185 -96
  6. data/bin/nokogiri +63 -50
  7. data/dependencies.yml +33 -66
  8. data/ext/nokogiri/depend +38 -358
  9. data/ext/nokogiri/extconf.rb +819 -421
  10. data/ext/nokogiri/gumbo.c +594 -0
  11. data/ext/nokogiri/html4_document.c +166 -0
  12. data/ext/nokogiri/html4_element_description.c +294 -0
  13. data/ext/nokogiri/html4_entity_lookup.c +37 -0
  14. data/ext/nokogiri/html4_sax_parser_context.c +114 -0
  15. data/ext/nokogiri/html4_sax_push_parser.c +95 -0
  16. data/ext/nokogiri/include/libexslt/exslt.h +108 -0
  17. data/ext/nokogiri/include/libexslt/exsltconfig.h +70 -0
  18. data/ext/nokogiri/include/libexslt/exsltexports.h +63 -0
  19. data/ext/nokogiri/include/libxml2/libxml/HTMLparser.h +306 -0
  20. data/ext/nokogiri/include/libxml2/libxml/HTMLtree.h +147 -0
  21. data/ext/nokogiri/include/libxml2/libxml/SAX.h +204 -0
  22. data/ext/nokogiri/include/libxml2/libxml/SAX2.h +172 -0
  23. data/ext/nokogiri/include/libxml2/libxml/c14n.h +128 -0
  24. data/ext/nokogiri/include/libxml2/libxml/catalog.h +182 -0
  25. data/ext/nokogiri/include/libxml2/libxml/chvalid.h +230 -0
  26. data/ext/nokogiri/include/libxml2/libxml/debugXML.h +217 -0
  27. data/ext/nokogiri/include/libxml2/libxml/dict.h +81 -0
  28. data/ext/nokogiri/include/libxml2/libxml/encoding.h +232 -0
  29. data/ext/nokogiri/include/libxml2/libxml/entities.h +153 -0
  30. data/ext/nokogiri/include/libxml2/libxml/globals.h +499 -0
  31. data/ext/nokogiri/include/libxml2/libxml/hash.h +236 -0
  32. data/ext/nokogiri/include/libxml2/libxml/list.h +137 -0
  33. data/ext/nokogiri/include/libxml2/libxml/nanoftp.h +186 -0
  34. data/ext/nokogiri/include/libxml2/libxml/nanohttp.h +81 -0
  35. data/ext/nokogiri/include/libxml2/libxml/parser.h +1244 -0
  36. data/ext/nokogiri/include/libxml2/libxml/parserInternals.h +656 -0
  37. data/ext/nokogiri/include/libxml2/libxml/pattern.h +100 -0
  38. data/ext/nokogiri/include/libxml2/libxml/relaxng.h +218 -0
  39. data/ext/nokogiri/include/libxml2/libxml/schemasInternals.h +958 -0
  40. data/ext/nokogiri/include/libxml2/libxml/schematron.h +142 -0
  41. data/ext/nokogiri/include/libxml2/libxml/threads.h +91 -0
  42. data/ext/nokogiri/include/libxml2/libxml/tree.h +1312 -0
  43. data/ext/nokogiri/include/libxml2/libxml/uri.h +94 -0
  44. data/ext/nokogiri/include/libxml2/libxml/valid.h +463 -0
  45. data/ext/nokogiri/include/libxml2/libxml/xinclude.h +129 -0
  46. data/ext/nokogiri/include/libxml2/libxml/xlink.h +189 -0
  47. data/ext/nokogiri/include/libxml2/libxml/xmlIO.h +368 -0
  48. data/ext/nokogiri/include/libxml2/libxml/xmlautomata.h +146 -0
  49. data/ext/nokogiri/include/libxml2/libxml/xmlerror.h +947 -0
  50. data/ext/nokogiri/include/libxml2/libxml/xmlexports.h +77 -0
  51. data/ext/nokogiri/include/libxml2/libxml/xmlmemory.h +226 -0
  52. data/ext/nokogiri/include/libxml2/libxml/xmlmodule.h +57 -0
  53. data/ext/nokogiri/include/libxml2/libxml/xmlreader.h +428 -0
  54. data/ext/nokogiri/include/libxml2/libxml/xmlregexp.h +222 -0
  55. data/ext/nokogiri/include/libxml2/libxml/xmlsave.h +88 -0
  56. data/ext/nokogiri/include/libxml2/libxml/xmlschemas.h +246 -0
  57. data/ext/nokogiri/include/libxml2/libxml/xmlschemastypes.h +152 -0
  58. data/ext/nokogiri/include/libxml2/libxml/xmlstring.h +140 -0
  59. data/ext/nokogiri/include/libxml2/libxml/xmlunicode.h +202 -0
  60. data/ext/nokogiri/include/libxml2/libxml/xmlversion.h +503 -0
  61. data/ext/nokogiri/include/libxml2/libxml/xmlwriter.h +488 -0
  62. data/ext/nokogiri/include/libxml2/libxml/xpath.h +575 -0
  63. data/ext/nokogiri/include/libxml2/libxml/xpathInternals.h +632 -0
  64. data/ext/nokogiri/include/libxml2/libxml/xpointer.h +137 -0
  65. data/ext/nokogiri/include/libxslt/attributes.h +38 -0
  66. data/ext/nokogiri/include/libxslt/documents.h +93 -0
  67. data/ext/nokogiri/include/libxslt/extensions.h +262 -0
  68. data/ext/nokogiri/include/libxslt/extra.h +72 -0
  69. data/ext/nokogiri/include/libxslt/functions.h +78 -0
  70. data/ext/nokogiri/include/libxslt/imports.h +75 -0
  71. data/ext/nokogiri/include/libxslt/keys.h +53 -0
  72. data/ext/nokogiri/include/libxslt/namespaces.h +68 -0
  73. data/ext/nokogiri/include/libxslt/numbersInternals.h +73 -0
  74. data/ext/nokogiri/include/libxslt/pattern.h +84 -0
  75. data/ext/nokogiri/include/libxslt/preproc.h +43 -0
  76. data/ext/nokogiri/include/libxslt/security.h +104 -0
  77. data/ext/nokogiri/include/libxslt/templates.h +77 -0
  78. data/ext/nokogiri/include/libxslt/transform.h +207 -0
  79. data/ext/nokogiri/include/libxslt/variables.h +118 -0
  80. data/ext/nokogiri/include/libxslt/xslt.h +110 -0
  81. data/ext/nokogiri/include/libxslt/xsltInternals.h +1982 -0
  82. data/ext/nokogiri/include/libxslt/xsltconfig.h +179 -0
  83. data/ext/nokogiri/include/libxslt/xsltexports.h +64 -0
  84. data/ext/nokogiri/include/libxslt/xsltlocale.h +76 -0
  85. data/ext/nokogiri/include/libxslt/xsltutils.h +310 -0
  86. data/ext/nokogiri/libxml2_backwards_compat.c +121 -0
  87. data/ext/nokogiri/nokogiri.c +228 -104
  88. data/ext/nokogiri/nokogiri.h +204 -90
  89. data/ext/nokogiri/test_global_handlers.c +40 -0
  90. data/ext/nokogiri/xml_attr.c +17 -17
  91. data/ext/nokogiri/xml_attribute_decl.c +22 -22
  92. data/ext/nokogiri/xml_cdata.c +15 -20
  93. data/ext/nokogiri/xml_comment.c +19 -26
  94. data/ext/nokogiri/xml_document.c +306 -225
  95. data/ext/nokogiri/xml_document_fragment.c +12 -16
  96. data/ext/nokogiri/xml_dtd.c +64 -58
  97. data/ext/nokogiri/xml_element_content.c +33 -28
  98. data/ext/nokogiri/xml_element_decl.c +26 -26
  99. data/ext/nokogiri/xml_encoding_handler.c +45 -20
  100. data/ext/nokogiri/xml_entity_decl.c +37 -35
  101. data/ext/nokogiri/xml_entity_reference.c +16 -18
  102. data/ext/nokogiri/xml_namespace.c +136 -61
  103. data/ext/nokogiri/xml_node.c +1344 -672
  104. data/ext/nokogiri/xml_node_set.c +178 -168
  105. data/ext/nokogiri/xml_processing_instruction.c +17 -19
  106. data/ext/nokogiri/xml_reader.c +316 -190
  107. data/ext/nokogiri/xml_relax_ng.c +52 -30
  108. data/ext/nokogiri/xml_sax_parser.c +130 -124
  109. data/ext/nokogiri/xml_sax_parser_context.c +110 -89
  110. data/ext/nokogiri/xml_sax_push_parser.c +36 -29
  111. data/ext/nokogiri/xml_schema.c +98 -50
  112. data/ext/nokogiri/xml_syntax_error.c +42 -21
  113. data/ext/nokogiri/xml_text.c +14 -18
  114. data/ext/nokogiri/xml_xpath_context.c +263 -148
  115. data/ext/nokogiri/xslt_stylesheet.c +271 -178
  116. data/gumbo-parser/CHANGES.md +63 -0
  117. data/gumbo-parser/Makefile +111 -0
  118. data/gumbo-parser/THANKS +27 -0
  119. data/lib/nokogiri/2.7/nokogiri.so +0 -0
  120. data/lib/nokogiri/3.0/nokogiri.so +0 -0
  121. data/lib/nokogiri/3.1/nokogiri.so +0 -0
  122. data/lib/nokogiri/3.2/nokogiri.so +0 -0
  123. data/lib/nokogiri/class_resolver.rb +67 -0
  124. data/lib/nokogiri/css/node.rb +10 -8
  125. data/lib/nokogiri/css/parser.rb +397 -377
  126. data/lib/nokogiri/css/parser.y +250 -245
  127. data/lib/nokogiri/css/parser_extras.rb +54 -49
  128. data/lib/nokogiri/css/syntax_error.rb +3 -1
  129. data/lib/nokogiri/css/tokenizer.rb +5 -3
  130. data/lib/nokogiri/css/tokenizer.rex +3 -2
  131. data/lib/nokogiri/css/xpath_visitor.rb +223 -94
  132. data/lib/nokogiri/css.rb +56 -17
  133. data/lib/nokogiri/decorators/slop.rb +9 -7
  134. data/lib/nokogiri/encoding_handler.rb +57 -0
  135. data/lib/nokogiri/extension.rb +32 -0
  136. data/lib/nokogiri/gumbo.rb +15 -0
  137. data/lib/nokogiri/html.rb +38 -27
  138. data/lib/nokogiri/{html → html4}/builder.rb +4 -2
  139. data/lib/nokogiri/html4/document.rb +214 -0
  140. data/lib/nokogiri/html4/document_fragment.rb +54 -0
  141. data/lib/nokogiri/{html → html4}/element_description.rb +3 -1
  142. data/lib/nokogiri/html4/element_description_defaults.rb +572 -0
  143. data/lib/nokogiri/html4/encoding_reader.rb +121 -0
  144. data/lib/nokogiri/{html → html4}/entity_lookup.rb +4 -2
  145. data/lib/nokogiri/{html → html4}/sax/parser.rb +17 -16
  146. data/lib/nokogiri/html4/sax/parser_context.rb +20 -0
  147. data/lib/nokogiri/{html → html4}/sax/push_parser.rb +12 -11
  148. data/lib/nokogiri/html4.rb +47 -0
  149. data/lib/nokogiri/html5/document.rb +168 -0
  150. data/lib/nokogiri/html5/document_fragment.rb +90 -0
  151. data/lib/nokogiri/html5/node.rb +98 -0
  152. data/lib/nokogiri/html5.rb +389 -0
  153. data/lib/nokogiri/jruby/dependencies.rb +3 -0
  154. data/lib/nokogiri/jruby/nokogiri_jars.rb +43 -0
  155. data/lib/nokogiri/syntax_error.rb +2 -0
  156. data/lib/nokogiri/version/constant.rb +6 -0
  157. data/lib/nokogiri/version/info.rb +223 -0
  158. data/lib/nokogiri/version.rb +3 -108
  159. data/lib/nokogiri/xml/attr.rb +55 -3
  160. data/lib/nokogiri/xml/attribute_decl.rb +3 -1
  161. data/lib/nokogiri/xml/builder.rb +75 -34
  162. data/lib/nokogiri/xml/cdata.rb +3 -1
  163. data/lib/nokogiri/xml/character_data.rb +2 -0
  164. data/lib/nokogiri/xml/document.rb +312 -126
  165. data/lib/nokogiri/xml/document_fragment.rb +93 -48
  166. data/lib/nokogiri/xml/dtd.rb +4 -2
  167. data/lib/nokogiri/xml/element_content.rb +2 -0
  168. data/lib/nokogiri/xml/element_decl.rb +3 -1
  169. data/lib/nokogiri/xml/entity_decl.rb +4 -2
  170. data/lib/nokogiri/xml/entity_reference.rb +2 -0
  171. data/lib/nokogiri/xml/namespace.rb +45 -0
  172. data/lib/nokogiri/xml/node/save_options.rb +15 -8
  173. data/lib/nokogiri/xml/node.rb +1067 -406
  174. data/lib/nokogiri/xml/node_set.rb +135 -59
  175. data/lib/nokogiri/xml/notation.rb +13 -0
  176. data/lib/nokogiri/xml/parse_options.rb +145 -52
  177. data/lib/nokogiri/xml/pp/character_data.rb +9 -6
  178. data/lib/nokogiri/xml/pp/node.rb +27 -26
  179. data/lib/nokogiri/xml/pp.rb +4 -2
  180. data/lib/nokogiri/xml/processing_instruction.rb +4 -1
  181. data/lib/nokogiri/xml/reader.rb +21 -28
  182. data/lib/nokogiri/xml/relax_ng.rb +8 -2
  183. data/lib/nokogiri/xml/sax/document.rb +45 -49
  184. data/lib/nokogiri/xml/sax/parser.rb +39 -36
  185. data/lib/nokogiri/xml/sax/parser_context.rb +8 -3
  186. data/lib/nokogiri/xml/sax/push_parser.rb +6 -5
  187. data/lib/nokogiri/xml/sax.rb +6 -4
  188. data/lib/nokogiri/xml/schema.rb +19 -9
  189. data/lib/nokogiri/xml/searchable.rb +112 -72
  190. data/lib/nokogiri/xml/syntax_error.rb +6 -4
  191. data/lib/nokogiri/xml/text.rb +2 -0
  192. data/lib/nokogiri/xml/xpath/syntax_error.rb +4 -2
  193. data/lib/nokogiri/xml/xpath.rb +15 -4
  194. data/lib/nokogiri/xml/xpath_context.rb +3 -3
  195. data/lib/nokogiri/xml.rb +38 -37
  196. data/lib/nokogiri/xslt/stylesheet.rb +3 -1
  197. data/lib/nokogiri/xslt.rb +29 -20
  198. data/lib/nokogiri.rb +48 -72
  199. data/lib/xsd/xmlparser/nokogiri.rb +29 -25
  200. metadata +146 -307
  201. data/ext/nokogiri/html_document.c +0 -170
  202. data/ext/nokogiri/html_document.h +0 -10
  203. data/ext/nokogiri/html_element_description.c +0 -279
  204. data/ext/nokogiri/html_element_description.h +0 -10
  205. data/ext/nokogiri/html_entity_lookup.c +0 -32
  206. data/ext/nokogiri/html_entity_lookup.h +0 -8
  207. data/ext/nokogiri/html_sax_parser_context.c +0 -116
  208. data/ext/nokogiri/html_sax_parser_context.h +0 -11
  209. data/ext/nokogiri/html_sax_push_parser.c +0 -87
  210. data/ext/nokogiri/html_sax_push_parser.h +0 -9
  211. data/ext/nokogiri/xml_attr.h +0 -9
  212. data/ext/nokogiri/xml_attribute_decl.h +0 -9
  213. data/ext/nokogiri/xml_cdata.h +0 -9
  214. data/ext/nokogiri/xml_comment.h +0 -9
  215. data/ext/nokogiri/xml_document.h +0 -23
  216. data/ext/nokogiri/xml_document_fragment.h +0 -10
  217. data/ext/nokogiri/xml_dtd.h +0 -10
  218. data/ext/nokogiri/xml_element_content.h +0 -10
  219. data/ext/nokogiri/xml_element_decl.h +0 -9
  220. data/ext/nokogiri/xml_encoding_handler.h +0 -8
  221. data/ext/nokogiri/xml_entity_decl.h +0 -10
  222. data/ext/nokogiri/xml_entity_reference.h +0 -9
  223. data/ext/nokogiri/xml_io.c +0 -61
  224. data/ext/nokogiri/xml_io.h +0 -11
  225. data/ext/nokogiri/xml_libxml2_hacks.c +0 -112
  226. data/ext/nokogiri/xml_libxml2_hacks.h +0 -12
  227. data/ext/nokogiri/xml_namespace.h +0 -14
  228. data/ext/nokogiri/xml_node.h +0 -13
  229. data/ext/nokogiri/xml_node_set.h +0 -12
  230. data/ext/nokogiri/xml_processing_instruction.h +0 -9
  231. data/ext/nokogiri/xml_reader.h +0 -10
  232. data/ext/nokogiri/xml_relax_ng.h +0 -9
  233. data/ext/nokogiri/xml_sax_parser.h +0 -39
  234. data/ext/nokogiri/xml_sax_parser_context.h +0 -10
  235. data/ext/nokogiri/xml_sax_push_parser.h +0 -9
  236. data/ext/nokogiri/xml_schema.h +0 -9
  237. data/ext/nokogiri/xml_syntax_error.h +0 -13
  238. data/ext/nokogiri/xml_text.h +0 -9
  239. data/ext/nokogiri/xml_xpath_context.h +0 -10
  240. data/ext/nokogiri/xslt_stylesheet.h +0 -14
  241. data/lib/nokogiri/html/document.rb +0 -335
  242. data/lib/nokogiri/html/document_fragment.rb +0 -49
  243. data/lib/nokogiri/html/element_description_defaults.rb +0 -671
  244. data/lib/nokogiri/html/sax/parser_context.rb +0 -16
  245. data/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch +0 -78
  246. data/patches/libxml2/0002-Remove-script-macro-support.patch +0 -40
  247. data/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch +0 -44
  248. data/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch +0 -25
  249. data/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch +0 -32
  250. data/ports/archives/libxml2-2.9.10.tar.gz +0 -0
  251. data/ports/archives/libxslt-1.1.34.tar.gz +0 -0
@@ -0,0 +1,958 @@
1
+ /*
2
+ * Summary: internal interfaces for XML Schemas
3
+ * Description: internal interfaces for the XML Schemas handling
4
+ * and schema validity checking
5
+ * The Schemas development is a Work In Progress.
6
+ * Some of those interfaces are not guaranteed to be API or ABI stable !
7
+ *
8
+ * Copy: See Copyright for the status of this software.
9
+ *
10
+ * Author: Daniel Veillard
11
+ */
12
+
13
+
14
+ #ifndef __XML_SCHEMA_INTERNALS_H__
15
+ #define __XML_SCHEMA_INTERNALS_H__
16
+
17
+ #include <libxml/xmlversion.h>
18
+
19
+ #ifdef LIBXML_SCHEMAS_ENABLED
20
+
21
+ #include <libxml/xmlregexp.h>
22
+ #include <libxml/hash.h>
23
+ #include <libxml/dict.h>
24
+
25
+ #ifdef __cplusplus
26
+ extern "C" {
27
+ #endif
28
+
29
+ typedef enum {
30
+ XML_SCHEMAS_UNKNOWN = 0,
31
+ XML_SCHEMAS_STRING = 1,
32
+ XML_SCHEMAS_NORMSTRING = 2,
33
+ XML_SCHEMAS_DECIMAL = 3,
34
+ XML_SCHEMAS_TIME = 4,
35
+ XML_SCHEMAS_GDAY = 5,
36
+ XML_SCHEMAS_GMONTH = 6,
37
+ XML_SCHEMAS_GMONTHDAY = 7,
38
+ XML_SCHEMAS_GYEAR = 8,
39
+ XML_SCHEMAS_GYEARMONTH = 9,
40
+ XML_SCHEMAS_DATE = 10,
41
+ XML_SCHEMAS_DATETIME = 11,
42
+ XML_SCHEMAS_DURATION = 12,
43
+ XML_SCHEMAS_FLOAT = 13,
44
+ XML_SCHEMAS_DOUBLE = 14,
45
+ XML_SCHEMAS_BOOLEAN = 15,
46
+ XML_SCHEMAS_TOKEN = 16,
47
+ XML_SCHEMAS_LANGUAGE = 17,
48
+ XML_SCHEMAS_NMTOKEN = 18,
49
+ XML_SCHEMAS_NMTOKENS = 19,
50
+ XML_SCHEMAS_NAME = 20,
51
+ XML_SCHEMAS_QNAME = 21,
52
+ XML_SCHEMAS_NCNAME = 22,
53
+ XML_SCHEMAS_ID = 23,
54
+ XML_SCHEMAS_IDREF = 24,
55
+ XML_SCHEMAS_IDREFS = 25,
56
+ XML_SCHEMAS_ENTITY = 26,
57
+ XML_SCHEMAS_ENTITIES = 27,
58
+ XML_SCHEMAS_NOTATION = 28,
59
+ XML_SCHEMAS_ANYURI = 29,
60
+ XML_SCHEMAS_INTEGER = 30,
61
+ XML_SCHEMAS_NPINTEGER = 31,
62
+ XML_SCHEMAS_NINTEGER = 32,
63
+ XML_SCHEMAS_NNINTEGER = 33,
64
+ XML_SCHEMAS_PINTEGER = 34,
65
+ XML_SCHEMAS_INT = 35,
66
+ XML_SCHEMAS_UINT = 36,
67
+ XML_SCHEMAS_LONG = 37,
68
+ XML_SCHEMAS_ULONG = 38,
69
+ XML_SCHEMAS_SHORT = 39,
70
+ XML_SCHEMAS_USHORT = 40,
71
+ XML_SCHEMAS_BYTE = 41,
72
+ XML_SCHEMAS_UBYTE = 42,
73
+ XML_SCHEMAS_HEXBINARY = 43,
74
+ XML_SCHEMAS_BASE64BINARY = 44,
75
+ XML_SCHEMAS_ANYTYPE = 45,
76
+ XML_SCHEMAS_ANYSIMPLETYPE = 46
77
+ } xmlSchemaValType;
78
+
79
+ /*
80
+ * XML Schemas defines multiple type of types.
81
+ */
82
+ typedef enum {
83
+ XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */
84
+ XML_SCHEMA_TYPE_ANY,
85
+ XML_SCHEMA_TYPE_FACET,
86
+ XML_SCHEMA_TYPE_SIMPLE,
87
+ XML_SCHEMA_TYPE_COMPLEX,
88
+ XML_SCHEMA_TYPE_SEQUENCE = 6,
89
+ XML_SCHEMA_TYPE_CHOICE,
90
+ XML_SCHEMA_TYPE_ALL,
91
+ XML_SCHEMA_TYPE_SIMPLE_CONTENT,
92
+ XML_SCHEMA_TYPE_COMPLEX_CONTENT,
93
+ XML_SCHEMA_TYPE_UR,
94
+ XML_SCHEMA_TYPE_RESTRICTION,
95
+ XML_SCHEMA_TYPE_EXTENSION,
96
+ XML_SCHEMA_TYPE_ELEMENT,
97
+ XML_SCHEMA_TYPE_ATTRIBUTE,
98
+ XML_SCHEMA_TYPE_ATTRIBUTEGROUP,
99
+ XML_SCHEMA_TYPE_GROUP,
100
+ XML_SCHEMA_TYPE_NOTATION,
101
+ XML_SCHEMA_TYPE_LIST,
102
+ XML_SCHEMA_TYPE_UNION,
103
+ XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
104
+ XML_SCHEMA_TYPE_IDC_UNIQUE,
105
+ XML_SCHEMA_TYPE_IDC_KEY,
106
+ XML_SCHEMA_TYPE_IDC_KEYREF,
107
+ XML_SCHEMA_TYPE_PARTICLE = 25,
108
+ XML_SCHEMA_TYPE_ATTRIBUTE_USE,
109
+ XML_SCHEMA_FACET_MININCLUSIVE = 1000,
110
+ XML_SCHEMA_FACET_MINEXCLUSIVE,
111
+ XML_SCHEMA_FACET_MAXINCLUSIVE,
112
+ XML_SCHEMA_FACET_MAXEXCLUSIVE,
113
+ XML_SCHEMA_FACET_TOTALDIGITS,
114
+ XML_SCHEMA_FACET_FRACTIONDIGITS,
115
+ XML_SCHEMA_FACET_PATTERN,
116
+ XML_SCHEMA_FACET_ENUMERATION,
117
+ XML_SCHEMA_FACET_WHITESPACE,
118
+ XML_SCHEMA_FACET_LENGTH,
119
+ XML_SCHEMA_FACET_MAXLENGTH,
120
+ XML_SCHEMA_FACET_MINLENGTH,
121
+ XML_SCHEMA_EXTRA_QNAMEREF = 2000,
122
+ XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
123
+ } xmlSchemaTypeType;
124
+
125
+ typedef enum {
126
+ XML_SCHEMA_CONTENT_UNKNOWN = 0,
127
+ XML_SCHEMA_CONTENT_EMPTY = 1,
128
+ XML_SCHEMA_CONTENT_ELEMENTS,
129
+ XML_SCHEMA_CONTENT_MIXED,
130
+ XML_SCHEMA_CONTENT_SIMPLE,
131
+ XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
132
+ XML_SCHEMA_CONTENT_BASIC,
133
+ XML_SCHEMA_CONTENT_ANY
134
+ } xmlSchemaContentType;
135
+
136
+ typedef struct _xmlSchemaVal xmlSchemaVal;
137
+ typedef xmlSchemaVal *xmlSchemaValPtr;
138
+
139
+ typedef struct _xmlSchemaType xmlSchemaType;
140
+ typedef xmlSchemaType *xmlSchemaTypePtr;
141
+
142
+ typedef struct _xmlSchemaFacet xmlSchemaFacet;
143
+ typedef xmlSchemaFacet *xmlSchemaFacetPtr;
144
+
145
+ /**
146
+ * Annotation
147
+ */
148
+ typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
149
+ typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
150
+ struct _xmlSchemaAnnot {
151
+ struct _xmlSchemaAnnot *next;
152
+ xmlNodePtr content; /* the annotation */
153
+ };
154
+
155
+ /**
156
+ * XML_SCHEMAS_ANYATTR_SKIP:
157
+ *
158
+ * Skip unknown attribute from validation
159
+ * Obsolete, not used anymore.
160
+ */
161
+ #define XML_SCHEMAS_ANYATTR_SKIP 1
162
+ /**
163
+ * XML_SCHEMAS_ANYATTR_LAX:
164
+ *
165
+ * Ignore validation non definition on attributes
166
+ * Obsolete, not used anymore.
167
+ */
168
+ #define XML_SCHEMAS_ANYATTR_LAX 2
169
+ /**
170
+ * XML_SCHEMAS_ANYATTR_STRICT:
171
+ *
172
+ * Apply strict validation rules on attributes
173
+ * Obsolete, not used anymore.
174
+ */
175
+ #define XML_SCHEMAS_ANYATTR_STRICT 3
176
+ /**
177
+ * XML_SCHEMAS_ANY_SKIP:
178
+ *
179
+ * Skip unknown attribute from validation
180
+ */
181
+ #define XML_SCHEMAS_ANY_SKIP 1
182
+ /**
183
+ * XML_SCHEMAS_ANY_LAX:
184
+ *
185
+ * Used by wildcards.
186
+ * Validate if type found, don't worry if not found
187
+ */
188
+ #define XML_SCHEMAS_ANY_LAX 2
189
+ /**
190
+ * XML_SCHEMAS_ANY_STRICT:
191
+ *
192
+ * Used by wildcards.
193
+ * Apply strict validation rules
194
+ */
195
+ #define XML_SCHEMAS_ANY_STRICT 3
196
+ /**
197
+ * XML_SCHEMAS_ATTR_USE_PROHIBITED:
198
+ *
199
+ * Used by wildcards.
200
+ * The attribute is prohibited.
201
+ */
202
+ #define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
203
+ /**
204
+ * XML_SCHEMAS_ATTR_USE_REQUIRED:
205
+ *
206
+ * The attribute is required.
207
+ */
208
+ #define XML_SCHEMAS_ATTR_USE_REQUIRED 1
209
+ /**
210
+ * XML_SCHEMAS_ATTR_USE_OPTIONAL:
211
+ *
212
+ * The attribute is optional.
213
+ */
214
+ #define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
215
+ /**
216
+ * XML_SCHEMAS_ATTR_GLOBAL:
217
+ *
218
+ * allow elements in no namespace
219
+ */
220
+ #define XML_SCHEMAS_ATTR_GLOBAL 1 << 0
221
+ /**
222
+ * XML_SCHEMAS_ATTR_NSDEFAULT:
223
+ *
224
+ * allow elements in no namespace
225
+ */
226
+ #define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7
227
+ /**
228
+ * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
229
+ *
230
+ * this is set when the "type" and "ref" references
231
+ * have been resolved.
232
+ */
233
+ #define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8
234
+ /**
235
+ * XML_SCHEMAS_ATTR_FIXED:
236
+ *
237
+ * the attribute has a fixed value
238
+ */
239
+ #define XML_SCHEMAS_ATTR_FIXED 1 << 9
240
+
241
+ /**
242
+ * xmlSchemaAttribute:
243
+ * An attribute definition.
244
+ */
245
+
246
+ typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
247
+ typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
248
+ struct _xmlSchemaAttribute {
249
+ xmlSchemaTypeType type;
250
+ struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
251
+ const xmlChar *name; /* the name of the declaration */
252
+ const xmlChar *id; /* Deprecated; not used */
253
+ const xmlChar *ref; /* Deprecated; not used */
254
+ const xmlChar *refNs; /* Deprecated; not used */
255
+ const xmlChar *typeName; /* the local name of the type definition */
256
+ const xmlChar *typeNs; /* the ns URI of the type definition */
257
+ xmlSchemaAnnotPtr annot;
258
+
259
+ xmlSchemaTypePtr base; /* Deprecated; not used */
260
+ int occurs; /* Deprecated; not used */
261
+ const xmlChar *defValue; /* The initial value of the value constraint */
262
+ xmlSchemaTypePtr subtypes; /* the type definition */
263
+ xmlNodePtr node;
264
+ const xmlChar *targetNamespace;
265
+ int flags;
266
+ const xmlChar *refPrefix; /* Deprecated; not used */
267
+ xmlSchemaValPtr defVal; /* The compiled value constraint */
268
+ xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
269
+ };
270
+
271
+ /**
272
+ * xmlSchemaAttributeLink:
273
+ * Used to build a list of attribute uses on complexType definitions.
274
+ * WARNING: Deprecated; not used.
275
+ */
276
+ typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
277
+ typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
278
+ struct _xmlSchemaAttributeLink {
279
+ struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */
280
+ struct _xmlSchemaAttribute *attr;/* the linked attribute */
281
+ };
282
+
283
+ /**
284
+ * XML_SCHEMAS_WILDCARD_COMPLETE:
285
+ *
286
+ * If the wildcard is complete.
287
+ */
288
+ #define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
289
+
290
+ /**
291
+ * xmlSchemaCharValueLink:
292
+ * Used to build a list of namespaces on wildcards.
293
+ */
294
+ typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
295
+ typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr;
296
+ struct _xmlSchemaWildcardNs {
297
+ struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */
298
+ const xmlChar *value;/* the value */
299
+ };
300
+
301
+ /**
302
+ * xmlSchemaWildcard.
303
+ * A wildcard.
304
+ */
305
+ typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
306
+ typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
307
+ struct _xmlSchemaWildcard {
308
+ xmlSchemaTypeType type; /* The kind of type */
309
+ const xmlChar *id; /* Deprecated; not used */
310
+ xmlSchemaAnnotPtr annot;
311
+ xmlNodePtr node;
312
+ int minOccurs; /* Deprecated; not used */
313
+ int maxOccurs; /* Deprecated; not used */
314
+ int processContents;
315
+ int any; /* Indicates if the ns constraint is of ##any */
316
+ xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
317
+ xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */
318
+ int flags;
319
+ };
320
+
321
+ /**
322
+ * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
323
+ *
324
+ * The attribute wildcard has been built.
325
+ */
326
+ #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
327
+ /**
328
+ * XML_SCHEMAS_ATTRGROUP_GLOBAL:
329
+ *
330
+ * The attribute group has been defined.
331
+ */
332
+ #define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
333
+ /**
334
+ * XML_SCHEMAS_ATTRGROUP_MARKED:
335
+ *
336
+ * Marks the attr group as marked; used for circular checks.
337
+ */
338
+ #define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
339
+
340
+ /**
341
+ * XML_SCHEMAS_ATTRGROUP_REDEFINED:
342
+ *
343
+ * The attr group was redefined.
344
+ */
345
+ #define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
346
+ /**
347
+ * XML_SCHEMAS_ATTRGROUP_HAS_REFS:
348
+ *
349
+ * Whether this attr. group contains attr. group references.
350
+ */
351
+ #define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
352
+
353
+ /**
354
+ * An attribute group definition.
355
+ *
356
+ * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
357
+ * must be kept similar
358
+ */
359
+ typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
360
+ typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
361
+ struct _xmlSchemaAttributeGroup {
362
+ xmlSchemaTypeType type; /* The kind of type */
363
+ struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
364
+ const xmlChar *name;
365
+ const xmlChar *id;
366
+ const xmlChar *ref; /* Deprecated; not used */
367
+ const xmlChar *refNs; /* Deprecated; not used */
368
+ xmlSchemaAnnotPtr annot;
369
+
370
+ xmlSchemaAttributePtr attributes; /* Deprecated; not used */
371
+ xmlNodePtr node;
372
+ int flags;
373
+ xmlSchemaWildcardPtr attributeWildcard;
374
+ const xmlChar *refPrefix; /* Deprecated; not used */
375
+ xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
376
+ const xmlChar *targetNamespace;
377
+ void *attrUses;
378
+ };
379
+
380
+ /**
381
+ * xmlSchemaTypeLink:
382
+ * Used to build a list of types (e.g. member types of
383
+ * simpleType with variety "union").
384
+ */
385
+ typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
386
+ typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
387
+ struct _xmlSchemaTypeLink {
388
+ struct _xmlSchemaTypeLink *next;/* the next type link ... */
389
+ xmlSchemaTypePtr type;/* the linked type */
390
+ };
391
+
392
+ /**
393
+ * xmlSchemaFacetLink:
394
+ * Used to build a list of facets.
395
+ */
396
+ typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
397
+ typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr;
398
+ struct _xmlSchemaFacetLink {
399
+ struct _xmlSchemaFacetLink *next;/* the next facet link ... */
400
+ xmlSchemaFacetPtr facet;/* the linked facet */
401
+ };
402
+
403
+ /**
404
+ * XML_SCHEMAS_TYPE_MIXED:
405
+ *
406
+ * the element content type is mixed
407
+ */
408
+ #define XML_SCHEMAS_TYPE_MIXED 1 << 0
409
+ /**
410
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
411
+ *
412
+ * the simple or complex type has a derivation method of "extension".
413
+ */
414
+ #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1
415
+ /**
416
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
417
+ *
418
+ * the simple or complex type has a derivation method of "restriction".
419
+ */
420
+ #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2
421
+ /**
422
+ * XML_SCHEMAS_TYPE_GLOBAL:
423
+ *
424
+ * the type is global
425
+ */
426
+ #define XML_SCHEMAS_TYPE_GLOBAL 1 << 3
427
+ /**
428
+ * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
429
+ *
430
+ * the complexType owns an attribute wildcard, i.e.
431
+ * it can be freed by the complexType
432
+ */
433
+ #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */
434
+ /**
435
+ * XML_SCHEMAS_TYPE_VARIETY_ABSENT:
436
+ *
437
+ * the simpleType has a variety of "absent".
438
+ * TODO: Actually not necessary :-/, since if
439
+ * none of the variety flags occur then it's
440
+ * automatically absent.
441
+ */
442
+ #define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
443
+ /**
444
+ * XML_SCHEMAS_TYPE_VARIETY_LIST:
445
+ *
446
+ * the simpleType has a variety of "list".
447
+ */
448
+ #define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6
449
+ /**
450
+ * XML_SCHEMAS_TYPE_VARIETY_UNION:
451
+ *
452
+ * the simpleType has a variety of "union".
453
+ */
454
+ #define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7
455
+ /**
456
+ * XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
457
+ *
458
+ * the simpleType has a variety of "union".
459
+ */
460
+ #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8
461
+ /**
462
+ * XML_SCHEMAS_TYPE_FINAL_EXTENSION:
463
+ *
464
+ * the complexType has a final of "extension".
465
+ */
466
+ #define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9
467
+ /**
468
+ * XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
469
+ *
470
+ * the simpleType/complexType has a final of "restriction".
471
+ */
472
+ #define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10
473
+ /**
474
+ * XML_SCHEMAS_TYPE_FINAL_LIST:
475
+ *
476
+ * the simpleType has a final of "list".
477
+ */
478
+ #define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11
479
+ /**
480
+ * XML_SCHEMAS_TYPE_FINAL_UNION:
481
+ *
482
+ * the simpleType has a final of "union".
483
+ */
484
+ #define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12
485
+ /**
486
+ * XML_SCHEMAS_TYPE_FINAL_DEFAULT:
487
+ *
488
+ * the simpleType has a final of "default".
489
+ */
490
+ #define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13
491
+ /**
492
+ * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
493
+ *
494
+ * Marks the item as a builtin primitive.
495
+ */
496
+ #define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14
497
+ /**
498
+ * XML_SCHEMAS_TYPE_MARKED:
499
+ *
500
+ * Marks the item as marked; used for circular checks.
501
+ */
502
+ #define XML_SCHEMAS_TYPE_MARKED 1 << 16
503
+ /**
504
+ * XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
505
+ *
506
+ * the complexType did not specify 'block' so use the default of the
507
+ * <schema> item.
508
+ */
509
+ #define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17
510
+ /**
511
+ * XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
512
+ *
513
+ * the complexType has a 'block' of "extension".
514
+ */
515
+ #define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18
516
+ /**
517
+ * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
518
+ *
519
+ * the complexType has a 'block' of "restriction".
520
+ */
521
+ #define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19
522
+ /**
523
+ * XML_SCHEMAS_TYPE_ABSTRACT:
524
+ *
525
+ * the simple/complexType is abstract.
526
+ */
527
+ #define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20
528
+ /**
529
+ * XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
530
+ *
531
+ * indicates if the facets need a computed value
532
+ */
533
+ #define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21
534
+ /**
535
+ * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
536
+ *
537
+ * indicates that the type was typefixed
538
+ */
539
+ #define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22
540
+ /**
541
+ * XML_SCHEMAS_TYPE_INTERNAL_INVALID:
542
+ *
543
+ * indicates that the type is invalid
544
+ */
545
+ #define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
546
+ /**
547
+ * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
548
+ *
549
+ * a whitespace-facet value of "preserve"
550
+ */
551
+ #define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24
552
+ /**
553
+ * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
554
+ *
555
+ * a whitespace-facet value of "replace"
556
+ */
557
+ #define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25
558
+ /**
559
+ * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
560
+ *
561
+ * a whitespace-facet value of "collapse"
562
+ */
563
+ #define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26
564
+ /**
565
+ * XML_SCHEMAS_TYPE_HAS_FACETS:
566
+ *
567
+ * has facets
568
+ */
569
+ #define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27
570
+ /**
571
+ * XML_SCHEMAS_TYPE_NORMVALUENEEDED:
572
+ *
573
+ * indicates if the facets (pattern) need a normalized value
574
+ */
575
+ #define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28
576
+
577
+ /**
578
+ * XML_SCHEMAS_TYPE_FIXUP_1:
579
+ *
580
+ * First stage of fixup was done.
581
+ */
582
+ #define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29
583
+
584
+ /**
585
+ * XML_SCHEMAS_TYPE_REDEFINED:
586
+ *
587
+ * The type was redefined.
588
+ */
589
+ #define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
590
+ /**
591
+ * XML_SCHEMAS_TYPE_REDEFINING:
592
+ *
593
+ * The type redefines an other type.
594
+ */
595
+ /* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */
596
+
597
+ /**
598
+ * _xmlSchemaType:
599
+ *
600
+ * Schemas type definition.
601
+ */
602
+ struct _xmlSchemaType {
603
+ xmlSchemaTypeType type; /* The kind of type */
604
+ struct _xmlSchemaType *next; /* the next type if in a sequence ... */
605
+ const xmlChar *name;
606
+ const xmlChar *id ; /* Deprecated; not used */
607
+ const xmlChar *ref; /* Deprecated; not used */
608
+ const xmlChar *refNs; /* Deprecated; not used */
609
+ xmlSchemaAnnotPtr annot;
610
+ xmlSchemaTypePtr subtypes;
611
+ xmlSchemaAttributePtr attributes; /* Deprecated; not used */
612
+ xmlNodePtr node;
613
+ int minOccurs; /* Deprecated; not used */
614
+ int maxOccurs; /* Deprecated; not used */
615
+
616
+ int flags;
617
+ xmlSchemaContentType contentType;
618
+ const xmlChar *base; /* Base type's local name */
619
+ const xmlChar *baseNs; /* Base type's target namespace */
620
+ xmlSchemaTypePtr baseType; /* The base type component */
621
+ xmlSchemaFacetPtr facets; /* Local facets */
622
+ struct _xmlSchemaType *redef; /* Deprecated; not used */
623
+ int recurse; /* Obsolete */
624
+ xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
625
+ xmlSchemaWildcardPtr attributeWildcard;
626
+ int builtInType; /* Type of built-in types. */
627
+ xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
628
+ xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
629
+ const xmlChar *refPrefix; /* Deprecated; not used */
630
+ xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
631
+ Could we use @subtypes for this? */
632
+ xmlRegexpPtr contModel; /* Holds the automaton of the content model */
633
+ const xmlChar *targetNamespace;
634
+ void *attrUses;
635
+ };
636
+
637
+ /*
638
+ * xmlSchemaElement:
639
+ * An element definition.
640
+ *
641
+ * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
642
+ * structures must be kept similar
643
+ */
644
+ /**
645
+ * XML_SCHEMAS_ELEM_NILLABLE:
646
+ *
647
+ * the element is nillable
648
+ */
649
+ #define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
650
+ /**
651
+ * XML_SCHEMAS_ELEM_GLOBAL:
652
+ *
653
+ * the element is global
654
+ */
655
+ #define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
656
+ /**
657
+ * XML_SCHEMAS_ELEM_DEFAULT:
658
+ *
659
+ * the element has a default value
660
+ */
661
+ #define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
662
+ /**
663
+ * XML_SCHEMAS_ELEM_FIXED:
664
+ *
665
+ * the element has a fixed value
666
+ */
667
+ #define XML_SCHEMAS_ELEM_FIXED 1 << 3
668
+ /**
669
+ * XML_SCHEMAS_ELEM_ABSTRACT:
670
+ *
671
+ * the element is abstract
672
+ */
673
+ #define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
674
+ /**
675
+ * XML_SCHEMAS_ELEM_TOPLEVEL:
676
+ *
677
+ * the element is top level
678
+ * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
679
+ */
680
+ #define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
681
+ /**
682
+ * XML_SCHEMAS_ELEM_REF:
683
+ *
684
+ * the element is a reference to a type
685
+ */
686
+ #define XML_SCHEMAS_ELEM_REF 1 << 6
687
+ /**
688
+ * XML_SCHEMAS_ELEM_NSDEFAULT:
689
+ *
690
+ * allow elements in no namespace
691
+ * Obsolete, not used anymore.
692
+ */
693
+ #define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7
694
+ /**
695
+ * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
696
+ *
697
+ * this is set when "type", "ref", "substitutionGroup"
698
+ * references have been resolved.
699
+ */
700
+ #define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8
701
+ /**
702
+ * XML_SCHEMAS_ELEM_CIRCULAR:
703
+ *
704
+ * a helper flag for the search of circular references.
705
+ */
706
+ #define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9
707
+ /**
708
+ * XML_SCHEMAS_ELEM_BLOCK_ABSENT:
709
+ *
710
+ * the "block" attribute is absent
711
+ */
712
+ #define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10
713
+ /**
714
+ * XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
715
+ *
716
+ * disallowed substitutions are absent
717
+ */
718
+ #define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11
719
+ /**
720
+ * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
721
+ *
722
+ * disallowed substitutions: "restriction"
723
+ */
724
+ #define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12
725
+ /**
726
+ * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
727
+ *
728
+ * disallowed substitutions: "substitution"
729
+ */
730
+ #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13
731
+ /**
732
+ * XML_SCHEMAS_ELEM_FINAL_ABSENT:
733
+ *
734
+ * substitution group exclusions are absent
735
+ */
736
+ #define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14
737
+ /**
738
+ * XML_SCHEMAS_ELEM_FINAL_EXTENSION:
739
+ *
740
+ * substitution group exclusions: "extension"
741
+ */
742
+ #define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15
743
+ /**
744
+ * XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
745
+ *
746
+ * substitution group exclusions: "restriction"
747
+ */
748
+ #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
749
+ /**
750
+ * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
751
+ *
752
+ * the declaration is a substitution group head
753
+ */
754
+ #define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17
755
+ /**
756
+ * XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
757
+ *
758
+ * this is set when the elem decl has been checked against
759
+ * all constraints
760
+ */
761
+ #define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18
762
+
763
+ typedef struct _xmlSchemaElement xmlSchemaElement;
764
+ typedef xmlSchemaElement *xmlSchemaElementPtr;
765
+ struct _xmlSchemaElement {
766
+ xmlSchemaTypeType type; /* The kind of type */
767
+ struct _xmlSchemaType *next; /* Not used? */
768
+ const xmlChar *name;
769
+ const xmlChar *id; /* Deprecated; not used */
770
+ const xmlChar *ref; /* Deprecated; not used */
771
+ const xmlChar *refNs; /* Deprecated; not used */
772
+ xmlSchemaAnnotPtr annot;
773
+ xmlSchemaTypePtr subtypes; /* the type definition */
774
+ xmlSchemaAttributePtr attributes;
775
+ xmlNodePtr node;
776
+ int minOccurs; /* Deprecated; not used */
777
+ int maxOccurs; /* Deprecated; not used */
778
+
779
+ int flags;
780
+ const xmlChar *targetNamespace;
781
+ const xmlChar *namedType;
782
+ const xmlChar *namedTypeNs;
783
+ const xmlChar *substGroup;
784
+ const xmlChar *substGroupNs;
785
+ const xmlChar *scope;
786
+ const xmlChar *value; /* The original value of the value constraint. */
787
+ struct _xmlSchemaElement *refDecl; /* This will now be used for the
788
+ substitution group affiliation */
789
+ xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
790
+ xmlSchemaContentType contentType;
791
+ const xmlChar *refPrefix; /* Deprecated; not used */
792
+ xmlSchemaValPtr defVal; /* The compiled value constraint. */
793
+ void *idcs; /* The identity-constraint defs */
794
+ };
795
+
796
+ /*
797
+ * XML_SCHEMAS_FACET_UNKNOWN:
798
+ *
799
+ * unknown facet handling
800
+ */
801
+ #define XML_SCHEMAS_FACET_UNKNOWN 0
802
+ /*
803
+ * XML_SCHEMAS_FACET_PRESERVE:
804
+ *
805
+ * preserve the type of the facet
806
+ */
807
+ #define XML_SCHEMAS_FACET_PRESERVE 1
808
+ /*
809
+ * XML_SCHEMAS_FACET_REPLACE:
810
+ *
811
+ * replace the type of the facet
812
+ */
813
+ #define XML_SCHEMAS_FACET_REPLACE 2
814
+ /*
815
+ * XML_SCHEMAS_FACET_COLLAPSE:
816
+ *
817
+ * collapse the types of the facet
818
+ */
819
+ #define XML_SCHEMAS_FACET_COLLAPSE 3
820
+ /**
821
+ * A facet definition.
822
+ */
823
+ struct _xmlSchemaFacet {
824
+ xmlSchemaTypeType type; /* The kind of type */
825
+ struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
826
+ const xmlChar *value; /* The original value */
827
+ const xmlChar *id; /* Obsolete */
828
+ xmlSchemaAnnotPtr annot;
829
+ xmlNodePtr node;
830
+ int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
831
+ int whitespace;
832
+ xmlSchemaValPtr val; /* The compiled value */
833
+ xmlRegexpPtr regexp; /* The regex for patterns */
834
+ };
835
+
836
+ /**
837
+ * A notation definition.
838
+ */
839
+ typedef struct _xmlSchemaNotation xmlSchemaNotation;
840
+ typedef xmlSchemaNotation *xmlSchemaNotationPtr;
841
+ struct _xmlSchemaNotation {
842
+ xmlSchemaTypeType type; /* The kind of type */
843
+ const xmlChar *name;
844
+ xmlSchemaAnnotPtr annot;
845
+ const xmlChar *identifier;
846
+ const xmlChar *targetNamespace;
847
+ };
848
+
849
+ /*
850
+ * TODO: Actually all those flags used for the schema should sit
851
+ * on the schema parser context, since they are used only
852
+ * during parsing an XML schema document, and not available
853
+ * on the component level as per spec.
854
+ */
855
+ /**
856
+ * XML_SCHEMAS_QUALIF_ELEM:
857
+ *
858
+ * Reflects elementFormDefault == qualified in
859
+ * an XML schema document.
860
+ */
861
+ #define XML_SCHEMAS_QUALIF_ELEM 1 << 0
862
+ /**
863
+ * XML_SCHEMAS_QUALIF_ATTR:
864
+ *
865
+ * Reflects attributeFormDefault == qualified in
866
+ * an XML schema document.
867
+ */
868
+ #define XML_SCHEMAS_QUALIF_ATTR 1 << 1
869
+ /**
870
+ * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
871
+ *
872
+ * the schema has "extension" in the set of finalDefault.
873
+ */
874
+ #define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2
875
+ /**
876
+ * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
877
+ *
878
+ * the schema has "restriction" in the set of finalDefault.
879
+ */
880
+ #define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3
881
+ /**
882
+ * XML_SCHEMAS_FINAL_DEFAULT_LIST:
883
+ *
884
+ * the schema has "list" in the set of finalDefault.
885
+ */
886
+ #define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4
887
+ /**
888
+ * XML_SCHEMAS_FINAL_DEFAULT_UNION:
889
+ *
890
+ * the schema has "union" in the set of finalDefault.
891
+ */
892
+ #define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5
893
+ /**
894
+ * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
895
+ *
896
+ * the schema has "extension" in the set of blockDefault.
897
+ */
898
+ #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6
899
+ /**
900
+ * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
901
+ *
902
+ * the schema has "restriction" in the set of blockDefault.
903
+ */
904
+ #define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7
905
+ /**
906
+ * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
907
+ *
908
+ * the schema has "substitution" in the set of blockDefault.
909
+ */
910
+ #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8
911
+ /**
912
+ * XML_SCHEMAS_INCLUDING_CONVERT_NS:
913
+ *
914
+ * the schema is currently including an other schema with
915
+ * no target namespace.
916
+ */
917
+ #define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
918
+ /**
919
+ * _xmlSchema:
920
+ *
921
+ * A Schemas definition
922
+ */
923
+ struct _xmlSchema {
924
+ const xmlChar *name; /* schema name */
925
+ const xmlChar *targetNamespace; /* the target namespace */
926
+ const xmlChar *version;
927
+ const xmlChar *id; /* Obsolete */
928
+ xmlDocPtr doc;
929
+ xmlSchemaAnnotPtr annot;
930
+ int flags;
931
+
932
+ xmlHashTablePtr typeDecl;
933
+ xmlHashTablePtr attrDecl;
934
+ xmlHashTablePtr attrgrpDecl;
935
+ xmlHashTablePtr elemDecl;
936
+ xmlHashTablePtr notaDecl;
937
+
938
+ xmlHashTablePtr schemasImports;
939
+
940
+ void *_private; /* unused by the library for users or bindings */
941
+ xmlHashTablePtr groupDecl;
942
+ xmlDictPtr dict;
943
+ void *includes; /* the includes, this is opaque for now */
944
+ int preserve; /* whether to free the document */
945
+ int counter; /* used to give anonymous components unique names */
946
+ xmlHashTablePtr idcDef; /* All identity-constraint defs. */
947
+ void *volatiles; /* Obsolete */
948
+ };
949
+
950
+ XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);
951
+ XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
952
+
953
+ #ifdef __cplusplus
954
+ }
955
+ #endif
956
+
957
+ #endif /* LIBXML_SCHEMAS_ENABLED */
958
+ #endif /* __XML_SCHEMA_INTERNALS_H__ */