Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 1 | /* |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 2 | * Summary: internal interfaces for XML Schemas |
| 3 | * Description: internal interfaces for the XML Schemas handling |
| 4 | * and schema validity checking |
Daniel Veillard | 567a45b | 2005-10-18 19:11:55 +0000 | [diff] [blame] | 5 | * The Schemas development is a Work In Progress. |
| 6 | * Some of those interfaces are not garanteed to be API or ABI stable ! |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 7 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 8 | * Copy: See Copyright for the status of this software. |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 9 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 10 | * Author: Daniel Veillard |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | |
| 14 | #ifndef __XML_SCHEMA_INTERNALS_H__ |
| 15 | #define __XML_SCHEMA_INTERNALS_H__ |
| 16 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 17 | #include <libxml/xmlversion.h> |
Igor Zlatkovic | 7ae91bc | 2002-11-08 17:18:52 +0000 | [diff] [blame] | 18 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 19 | #ifdef LIBXML_SCHEMAS_ENABLED |
| 20 | |
| 21 | #include <libxml/xmlregexp.h> |
Daniel Veillard | 8326e73 | 2003-01-07 00:19:07 +0000 | [diff] [blame] | 22 | #include <libxml/hash.h> |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 23 | #include <libxml/dict.h> |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 24 | |
| 25 | #ifdef __cplusplus |
| 26 | extern "C" { |
| 27 | #endif |
| 28 | |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 29 | typedef enum { |
| 30 | XML_SCHEMAS_UNKNOWN = 0, |
Audric Schiltknecht | cad102b | 2016-04-15 22:41:24 +0800 | [diff] [blame] | 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 |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 77 | } xmlSchemaValType; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 78 | |
| 79 | /* |
| 80 | * XML Schemas defines multiple type of types. |
| 81 | */ |
| 82 | typedef enum { |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 83 | XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 84 | XML_SCHEMA_TYPE_ANY, |
| 85 | XML_SCHEMA_TYPE_FACET, |
| 86 | XML_SCHEMA_TYPE_SIMPLE, |
| 87 | XML_SCHEMA_TYPE_COMPLEX, |
Kasimier T. Buchcik | 4efd90d | 2005-06-09 10:32:53 +0000 | [diff] [blame] | 88 | XML_SCHEMA_TYPE_SEQUENCE = 6, |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 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, |
Daniel Veillard | 13e04c6 | 2002-04-23 17:51:29 +0000 | [diff] [blame] | 98 | XML_SCHEMA_TYPE_ATTRIBUTEGROUP, |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 99 | XML_SCHEMA_TYPE_GROUP, |
| 100 | XML_SCHEMA_TYPE_NOTATION, |
| 101 | XML_SCHEMA_TYPE_LIST, |
| 102 | XML_SCHEMA_TYPE_UNION, |
William M. Brack | e709195 | 2004-05-11 15:09:58 +0000 | [diff] [blame] | 103 | XML_SCHEMA_TYPE_ANY_ATTRIBUTE, |
Kasimier T. Buchcik | e8a550b | 2005-01-27 12:49:31 +0000 | [diff] [blame] | 104 | XML_SCHEMA_TYPE_IDC_UNIQUE, |
| 105 | XML_SCHEMA_TYPE_IDC_KEY, |
| 106 | XML_SCHEMA_TYPE_IDC_KEYREF, |
Daniel Veillard | f8e3db0 | 2012-09-11 13:26:36 +0800 | [diff] [blame] | 107 | XML_SCHEMA_TYPE_PARTICLE = 25, |
| 108 | XML_SCHEMA_TYPE_ATTRIBUTE_USE, |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 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, |
Kasimier T. Buchcik | 256401b | 2005-04-01 15:36:42 +0000 | [diff] [blame] | 120 | XML_SCHEMA_FACET_MINLENGTH, |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 121 | XML_SCHEMA_EXTRA_QNAMEREF = 2000, |
| 122 | XML_SCHEMA_EXTRA_ATTR_USE_PROHIB |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 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, |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 131 | XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */ |
Daniel Veillard | 88c5891 | 2002-04-23 07:12:20 +0000 | [diff] [blame] | 132 | XML_SCHEMA_CONTENT_BASIC, |
| 133 | XML_SCHEMA_CONTENT_ANY |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 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 | /** |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame] | 156 | * XML_SCHEMAS_ANYATTR_SKIP: |
| 157 | * |
| 158 | * Skip unknown attribute from validation |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 159 | * Obsolete, not used anymore. |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 160 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 161 | #define XML_SCHEMAS_ANYATTR_SKIP 1 |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame] | 162 | /** |
| 163 | * XML_SCHEMAS_ANYATTR_LAX: |
| 164 | * |
| 165 | * Ignore validation non definition on attributes |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 166 | * Obsolete, not used anymore. |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame] | 167 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 168 | #define XML_SCHEMAS_ANYATTR_LAX 2 |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame] | 169 | /** |
| 170 | * XML_SCHEMAS_ANYATTR_STRICT: |
| 171 | * |
| 172 | * Apply strict validation rules on attributes |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 173 | * Obsolete, not used anymore. |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame] | 174 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 175 | #define XML_SCHEMAS_ANYATTR_STRICT 3 |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 176 | /** |
| 177 | * XML_SCHEMAS_ANY_SKIP: |
| 178 | * |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 179 | * Skip unknown attribute from validation |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 180 | */ |
| 181 | #define XML_SCHEMAS_ANY_SKIP 1 |
| 182 | /** |
| 183 | * XML_SCHEMAS_ANY_LAX: |
| 184 | * |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 185 | * Used by wildcards. |
| 186 | * Validate if type found, don't worry if not found |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 187 | */ |
| 188 | #define XML_SCHEMAS_ANY_LAX 2 |
| 189 | /** |
| 190 | * XML_SCHEMAS_ANY_STRICT: |
| 191 | * |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 192 | * Used by wildcards. |
| 193 | * Apply strict validation rules |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 194 | */ |
| 195 | #define XML_SCHEMAS_ANY_STRICT 3 |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 196 | /** |
Daniel Veillard | c85d0fe | 2004-04-16 16:46:51 +0000 | [diff] [blame] | 197 | * XML_SCHEMAS_ATTR_USE_PROHIBITED: |
| 198 | * |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 199 | * Used by wildcards. |
Daniel Veillard | c85d0fe | 2004-04-16 16:46:51 +0000 | [diff] [blame] | 200 | * The attribute is prohibited. |
| 201 | */ |
| 202 | #define XML_SCHEMAS_ATTR_USE_PROHIBITED 0 |
Daniel Veillard | c85d0fe | 2004-04-16 16:46:51 +0000 | [diff] [blame] | 203 | /** |
| 204 | * XML_SCHEMAS_ATTR_USE_REQUIRED: |
| 205 | * |
| 206 | * The attribute is required. |
| 207 | */ |
| 208 | #define XML_SCHEMAS_ATTR_USE_REQUIRED 1 |
Daniel Veillard | c85d0fe | 2004-04-16 16:46:51 +0000 | [diff] [blame] | 209 | /** |
| 210 | * XML_SCHEMAS_ATTR_USE_OPTIONAL: |
| 211 | * |
| 212 | * The attribute is optional. |
| 213 | */ |
| 214 | #define XML_SCHEMAS_ATTR_USE_OPTIONAL 2 |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 215 | /** |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 216 | * XML_SCHEMAS_ATTR_GLOBAL: |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 217 | * |
| 218 | * allow elements in no namespace |
| 219 | */ |
| 220 | #define XML_SCHEMAS_ATTR_GLOBAL 1 << 0 |
Daniel Veillard | c85d0fe | 2004-04-16 16:46:51 +0000 | [diff] [blame] | 221 | /** |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 222 | * XML_SCHEMAS_ATTR_NSDEFAULT: |
| 223 | * |
| 224 | * allow elements in no namespace |
| 225 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 226 | #define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 227 | /** |
Kasimier T. Buchcik | 8787640 | 2004-09-29 13:29:03 +0000 | [diff] [blame] | 228 | * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED: |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 229 | * |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 230 | * this is set when the "type" and "ref" references |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 231 | * have been resolved. |
| 232 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 233 | #define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 234 | /** |
| 235 | * XML_SCHEMAS_ATTR_FIXED: |
| 236 | * |
| 237 | * the attribute has a fixed value |
| 238 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 239 | #define XML_SCHEMAS_ATTR_FIXED 1 << 9 |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 240 | |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame] | 241 | /** |
| 242 | * xmlSchemaAttribute: |
| 243 | * An attribute definition. |
| 244 | */ |
| 245 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 246 | typedef struct _xmlSchemaAttribute xmlSchemaAttribute; |
| 247 | typedef xmlSchemaAttribute *xmlSchemaAttributePtr; |
| 248 | struct _xmlSchemaAttribute { |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 249 | xmlSchemaTypeType type; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 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 */ |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 255 | const xmlChar *typeName; /* the local name of the type definition */ |
| 256 | const xmlChar *typeNs; /* the ns URI of the type definition */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 257 | xmlSchemaAnnotPtr annot; |
| 258 | |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 259 | xmlSchemaTypePtr base; /* Deprecated; not used */ |
| 260 | int occurs; /* Deprecated; not used */ |
| 261 | const xmlChar *defValue; /* The initial value of the value constraint */ |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 262 | xmlSchemaTypePtr subtypes; /* the type definition */ |
Daniel Veillard | 75bb3bb | 2003-05-12 15:25:56 +0000 | [diff] [blame] | 263 | xmlNodePtr node; |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 264 | const xmlChar *targetNamespace; |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 265 | int flags; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 266 | const xmlChar *refPrefix; /* Deprecated; not used */ |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 267 | xmlSchemaValPtr defVal; /* The compiled value constraint */ |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 268 | xmlSchemaAttributePtr refDecl; /* Deprecated; not used */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 269 | }; |
| 270 | |
| 271 | /** |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 272 | * xmlSchemaAttributeLink: |
| 273 | * Used to build a list of attribute uses on complexType definitions. |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 274 | * WARNING: Deprecated; not used. |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 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 */ |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 309 | const xmlChar *id; /* Deprecated; not used */ |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 310 | xmlSchemaAnnotPtr annot; |
| 311 | xmlNodePtr node; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 312 | int minOccurs; /* Deprecated; not used */ |
| 313 | int maxOccurs; /* Deprecated; not used */ |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 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 already builded. |
| 325 | */ |
| 326 | #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0 |
| 327 | /** |
| 328 | * XML_SCHEMAS_ATTRGROUP_GLOBAL: |
| 329 | * |
| 330 | * The attribute wildcard has been already builded. |
| 331 | */ |
| 332 | #define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1 |
Kasimier T. Buchcik | 383434b | 2004-09-03 18:55:35 +0000 | [diff] [blame] | 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 |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 339 | |
| 340 | /** |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 341 | * XML_SCHEMAS_ATTRGROUP_REDEFINED: |
| 342 | * |
| 343 | * The attr group was redefined. |
| 344 | */ |
| 345 | #define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3 |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 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 |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 352 | |
| 353 | /** |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 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 { |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 362 | xmlSchemaTypeType type; /* The kind of type */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 363 | struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 364 | const xmlChar *name; |
| 365 | const xmlChar *id; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 366 | const xmlChar *ref; /* Deprecated; not used */ |
| 367 | const xmlChar *refNs; /* Deprecated; not used */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 368 | xmlSchemaAnnotPtr annot; |
| 369 | |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 370 | xmlSchemaAttributePtr attributes; /* Deprecated; not used */ |
Daniel Veillard | 75bb3bb | 2003-05-12 15:25:56 +0000 | [diff] [blame] | 371 | xmlNodePtr node; |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 372 | int flags; |
| 373 | xmlSchemaWildcardPtr attributeWildcard; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 374 | const xmlChar *refPrefix; /* Deprecated; not used */ |
| 375 | xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */ |
Kasimier T. Buchcik | 31113c7 | 2005-01-13 16:57:20 +0000 | [diff] [blame] | 376 | const xmlChar *targetNamespace; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 377 | void *attrUses; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 378 | }; |
| 379 | |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 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 ... */ |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 389 | xmlSchemaTypePtr type;/* the linked type */ |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 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 | }; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 402 | |
| 403 | /** |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 404 | * XML_SCHEMAS_TYPE_MIXED: |
| 405 | * |
| 406 | * the element content type is mixed |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 407 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 408 | #define XML_SCHEMAS_TYPE_MIXED 1 << 0 |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 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 | */ |
Kasimier T. Buchcik | 256401b | 2005-04-01 15:36:42 +0000 | [diff] [blame] | 433 | #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */ |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 434 | /** |
| 435 | * XML_SCHEMAS_TYPE_VARIETY_ABSENT: |
| 436 | * |
| 437 | * the simpleType has a variety of "absent". |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 438 | * TODO: Actually not necessary :-/, since if |
| 439 | * none of the variety flags occur then it's |
| 440 | * automatically absent. |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 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 | /** |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 486 | * XML_SCHEMAS_TYPE_FINAL_DEFAULT: |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 487 | * |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 488 | * the simpleType has a final of "default". |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 489 | */ |
| 490 | #define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13 |
| 491 | /** |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 492 | * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE: |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 493 | * |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 494 | * Marks the item as a builtin primitive. |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 495 | */ |
| 496 | #define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14 |
Kasimier T. Buchcik | 383434b | 2004-09-03 18:55:35 +0000 | [diff] [blame] | 497 | /** |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 498 | * XML_SCHEMAS_TYPE_MARKED: |
Kasimier T. Buchcik | 383434b | 2004-09-03 18:55:35 +0000 | [diff] [blame] | 499 | * |
| 500 | * Marks the item as marked; used for circular checks. |
| 501 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 502 | #define XML_SCHEMAS_TYPE_MARKED 1 << 16 |
Kasimier T. Buchcik | 8787640 | 2004-09-29 13:29:03 +0000 | [diff] [blame] | 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 | /** |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 517 | * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION: |
Kasimier T. Buchcik | 8787640 | 2004-09-29 13:29:03 +0000 | [diff] [blame] | 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 |
Kasimier T. Buchcik | e8a550b | 2005-01-27 12:49:31 +0000 | [diff] [blame] | 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 |
Kasimier T. Buchcik | 256401b | 2005-04-01 15:36:42 +0000 | [diff] [blame] | 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 |
Kasimier T. Buchcik | 4efd90d | 2005-06-09 10:32:53 +0000 | [diff] [blame] | 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 |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 576 | |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 577 | /** |
Kasimier T. Buchcik | 22c0c46 | 2005-09-12 19:09:46 +0000 | [diff] [blame] | 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 | /** |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 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 | /** |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 598 | * _xmlSchemaType: |
| 599 | * |
| 600 | * Schemas type definition. |
| 601 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 602 | struct _xmlSchemaType { |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 603 | xmlSchemaTypeType type; /* The kind of type */ |
| 604 | struct _xmlSchemaType *next; /* the next type if in a sequence ... */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 605 | const xmlChar *name; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 606 | const xmlChar *id ; /* Deprecated; not used */ |
| 607 | const xmlChar *ref; /* Deprecated; not used */ |
| 608 | const xmlChar *refNs; /* Deprecated; not used */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 609 | xmlSchemaAnnotPtr annot; |
| 610 | xmlSchemaTypePtr subtypes; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 611 | xmlSchemaAttributePtr attributes; /* Deprecated; not used */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 612 | xmlNodePtr node; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 613 | int minOccurs; /* Deprecated; not used */ |
| 614 | int maxOccurs; /* Deprecated; not used */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 615 | |
| 616 | int flags; |
| 617 | xmlSchemaContentType contentType; |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 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 */ |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 622 | struct _xmlSchemaType *redef; /* Deprecated; not used */ |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 623 | int recurse; /* Obsolete */ |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 624 | xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */ |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 625 | xmlSchemaWildcardPtr attributeWildcard; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 626 | int builtInType; /* Type of built-in types. */ |
| 627 | xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */ |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 628 | xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */ |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 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 */ |
Kasimier T. Buchcik | 31113c7 | 2005-01-13 16:57:20 +0000 | [diff] [blame] | 633 | const xmlChar *targetNamespace; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 634 | void *attrUses; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 635 | }; |
| 636 | |
William M. Brack | 60f394e | 2003-11-16 06:25:42 +0000 | [diff] [blame] | 637 | /* |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 638 | * xmlSchemaElement: |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 639 | * An element definition. |
| 640 | * |
| 641 | * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of |
| 642 | * structures must be kept similar |
| 643 | */ |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 644 | /** |
| 645 | * XML_SCHEMAS_ELEM_NILLABLE: |
| 646 | * |
| 647 | * the element is nillable |
| 648 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 649 | #define XML_SCHEMAS_ELEM_NILLABLE 1 << 0 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 650 | /** |
| 651 | * XML_SCHEMAS_ELEM_GLOBAL: |
| 652 | * |
| 653 | * the element is global |
| 654 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 655 | #define XML_SCHEMAS_ELEM_GLOBAL 1 << 1 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 656 | /** |
| 657 | * XML_SCHEMAS_ELEM_DEFAULT: |
| 658 | * |
| 659 | * the element has a default value |
| 660 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 661 | #define XML_SCHEMAS_ELEM_DEFAULT 1 << 2 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 662 | /** |
| 663 | * XML_SCHEMAS_ELEM_FIXED: |
| 664 | * |
| 665 | * the element has a fixed value |
| 666 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 667 | #define XML_SCHEMAS_ELEM_FIXED 1 << 3 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 668 | /** |
| 669 | * XML_SCHEMAS_ELEM_ABSTRACT: |
| 670 | * |
| 671 | * the element is abstract |
| 672 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 673 | #define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 674 | /** |
| 675 | * XML_SCHEMAS_ELEM_TOPLEVEL: |
| 676 | * |
| 677 | * the element is top level |
Daniel Veillard | 3646d64 | 2004-06-02 19:19:14 +0000 | [diff] [blame] | 678 | * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 679 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 680 | #define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 681 | /** |
| 682 | * XML_SCHEMAS_ELEM_REF: |
| 683 | * |
| 684 | * the element is a reference to a type |
| 685 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 686 | #define XML_SCHEMAS_ELEM_REF 1 << 6 |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 687 | /** |
| 688 | * XML_SCHEMAS_ELEM_NSDEFAULT: |
| 689 | * |
| 690 | * allow elements in no namespace |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 691 | * Obsolete, not used anymore. |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 692 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 693 | #define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 694 | /** |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 695 | * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED: |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 696 | * |
| 697 | * this is set when "type", "ref", "substitutionGroup" |
| 698 | * references have been resolved. |
| 699 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 700 | #define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 701 | /** |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 702 | * XML_SCHEMAS_ELEM_CIRCULAR: |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 703 | * |
| 704 | * a helper flag for the search of circular references. |
| 705 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 706 | #define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 707 | /** |
| 708 | * XML_SCHEMAS_ELEM_BLOCK_ABSENT: |
| 709 | * |
| 710 | * the "block" attribute is absent |
| 711 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 712 | #define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 713 | /** |
| 714 | * XML_SCHEMAS_ELEM_BLOCK_EXTENSION: |
| 715 | * |
| 716 | * disallowed substitutions are absent |
| 717 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 718 | #define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 719 | /** |
| 720 | * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION: |
| 721 | * |
| 722 | * disallowed substitutions: "restriction" |
| 723 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 724 | #define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 725 | /** |
| 726 | * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION: |
| 727 | * |
| 728 | * disallowed substitutions: "substituion" |
| 729 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 730 | #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 731 | /** |
| 732 | * XML_SCHEMAS_ELEM_FINAL_ABSENT: |
| 733 | * |
| 734 | * substitution group exclusions are absent |
| 735 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 736 | #define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 737 | /** |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 738 | * XML_SCHEMAS_ELEM_FINAL_EXTENSION: |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 739 | * |
| 740 | * substitution group exclusions: "extension" |
| 741 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 742 | #define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 743 | /** |
William M. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 744 | * XML_SCHEMAS_ELEM_FINAL_RESTRICTION: |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 745 | * |
| 746 | * substitution group exclusions: "restriction" |
| 747 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 748 | #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16 |
Kasimier T. Buchcik | 1a99a39 | 2005-04-08 11:23:56 +0000 | [diff] [blame] | 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 |
Kasimier T. Buchcik | 4efd90d | 2005-06-09 10:32:53 +0000 | [diff] [blame] | 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 |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 762 | |
| 763 | typedef struct _xmlSchemaElement xmlSchemaElement; |
| 764 | typedef xmlSchemaElement *xmlSchemaElementPtr; |
| 765 | struct _xmlSchemaElement { |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 766 | xmlSchemaTypeType type; /* The kind of type */ |
| 767 | struct _xmlSchemaType *next; /* Not used? */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 768 | const xmlChar *name; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 769 | const xmlChar *id; /* Deprecated; not used */ |
| 770 | const xmlChar *ref; /* Deprecated; not used */ |
| 771 | const xmlChar *refNs; /* Deprecated; not used */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 772 | xmlSchemaAnnotPtr annot; |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 773 | xmlSchemaTypePtr subtypes; /* the type definition */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 774 | xmlSchemaAttributePtr attributes; |
| 775 | xmlNodePtr node; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 776 | int minOccurs; /* Deprecated; not used */ |
| 777 | int maxOccurs; /* Deprecated; not used */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 778 | |
| 779 | int flags; |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 780 | const xmlChar *targetNamespace; |
| 781 | const xmlChar *namedType; |
| 782 | const xmlChar *namedTypeNs; |
| 783 | const xmlChar *substGroup; |
| 784 | const xmlChar *substGroupNs; |
| 785 | const xmlChar *scope; |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 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 */ |
Daniel Veillard | 88c5891 | 2002-04-23 07:12:20 +0000 | [diff] [blame] | 790 | xmlSchemaContentType contentType; |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 791 | const xmlChar *refPrefix; /* Deprecated; not used */ |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 792 | xmlSchemaValPtr defVal; /* The compiled value contraint. */ |
| 793 | void *idcs; /* The identity-constraint defs */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 794 | }; |
| 795 | |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 796 | /* |
| 797 | * XML_SCHEMAS_FACET_UNKNOWN: |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 798 | * |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 799 | * unknown facet handling |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 800 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 801 | #define XML_SCHEMAS_FACET_UNKNOWN 0 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 802 | /* |
| 803 | * XML_SCHEMAS_FACET_PRESERVE: |
| 804 | * |
| 805 | * preserve the type of the facet |
| 806 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 807 | #define XML_SCHEMAS_FACET_PRESERVE 1 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 808 | /* |
| 809 | * XML_SCHEMAS_FACET_REPLACE: |
| 810 | * |
| 811 | * replace the type of the facet |
| 812 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 813 | #define XML_SCHEMAS_FACET_REPLACE 2 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 814 | /* |
| 815 | * XML_SCHEMAS_FACET_COLLAPSE: |
| 816 | * |
| 817 | * collapse the types of the facet |
| 818 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 819 | #define XML_SCHEMAS_FACET_COLLAPSE 3 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 820 | /** |
| 821 | * A facet definition. |
| 822 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 823 | struct _xmlSchemaFacet { |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 824 | xmlSchemaTypeType type; /* The kind of type */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 825 | struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */ |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 826 | const xmlChar *value; /* The original value */ |
| 827 | const xmlChar *id; /* Obsolete */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 828 | xmlSchemaAnnotPtr annot; |
| 829 | xmlNodePtr node; |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 830 | int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 831 | int whitespace; |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 832 | xmlSchemaValPtr val; /* The compiled value */ |
| 833 | xmlRegexpPtr regexp; /* The regex for patterns */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 834 | }; |
| 835 | |
| 836 | /** |
| 837 | * A notation definition. |
| 838 | */ |
| 839 | typedef struct _xmlSchemaNotation xmlSchemaNotation; |
| 840 | typedef xmlSchemaNotation *xmlSchemaNotationPtr; |
| 841 | struct _xmlSchemaNotation { |
Kasimier T. Buchcik | 570faa5 | 2005-10-10 13:18:40 +0000 | [diff] [blame] | 842 | xmlSchemaTypeType type; /* The kind of type */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 843 | const xmlChar *name; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 844 | xmlSchemaAnnotPtr annot; |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 845 | const xmlChar *identifier; |
Kasimier T. Buchcik | 31113c7 | 2005-01-13 16:57:20 +0000 | [diff] [blame] | 846 | const xmlChar *targetNamespace; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 847 | }; |
| 848 | |
Kasimier T. Buchcik | 22c0c46 | 2005-09-12 19:09:46 +0000 | [diff] [blame] | 849 | /* |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 850 | * TODO: Actually all those flags used for the schema should sit |
Kasimier T. Buchcik | 22c0c46 | 2005-09-12 19:09:46 +0000 | [diff] [blame] | 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 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 855 | /** |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 856 | * XML_SCHEMAS_QUALIF_ELEM: |
| 857 | * |
Kasimier T. Buchcik | 22c0c46 | 2005-09-12 19:09:46 +0000 | [diff] [blame] | 858 | * Reflects elementFormDefault == qualified in |
| 859 | * an XML schema document. |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 860 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 861 | #define XML_SCHEMAS_QUALIF_ELEM 1 << 0 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 862 | /** |
| 863 | * XML_SCHEMAS_QUALIF_ATTR: |
| 864 | * |
Kasimier T. Buchcik | 22c0c46 | 2005-09-12 19:09:46 +0000 | [diff] [blame] | 865 | * Reflects attributeFormDefault == qualified in |
| 866 | * an XML schema document. |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 867 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 868 | #define XML_SCHEMAS_QUALIF_ATTR 1 << 1 |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 869 | /** |
| 870 | * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION: |
| 871 | * |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 872 | * the schema has "extension" in the set of finalDefault. |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 873 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 874 | #define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2 |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 875 | /** |
| 876 | * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION: |
| 877 | * |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 878 | * the schema has "restriction" in the set of finalDefault. |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 879 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 880 | #define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3 |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 881 | /** |
| 882 | * XML_SCHEMAS_FINAL_DEFAULT_LIST: |
| 883 | * |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 884 | * the cshema has "list" in the set of finalDefault. |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 885 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 886 | #define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4 |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 887 | /** |
| 888 | * XML_SCHEMAS_FINAL_DEFAULT_UNION: |
| 889 | * |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 890 | * the schema has "union" in the set of finalDefault. |
Daniel Veillard | 01fa615 | 2004-06-29 17:04:39 +0000 | [diff] [blame] | 891 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 892 | #define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 893 | /** |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 894 | * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION: |
| 895 | * |
| 896 | * the schema has "extension" in the set of blockDefault. |
| 897 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 898 | #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 899 | /** |
| 900 | * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION: |
| 901 | * |
| 902 | * the schema has "restriction" in the set of blockDefault. |
| 903 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 904 | #define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 905 | /** |
| 906 | * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION: |
| 907 | * |
| 908 | * the schema has "substitution" in the set of blockDefault. |
| 909 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 910 | #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 911 | /** |
| 912 | * XML_SCHEMAS_INCLUDING_CONVERT_NS: |
| 913 | * |
| 914 | * the schema is currently including an other schema with |
| 915 | * no target namespace. |
| 916 | */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 917 | #define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9 |
Daniel Veillard | c0826a7 | 2004-08-10 14:17:33 +0000 | [diff] [blame] | 918 | /** |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 919 | * _xmlSchema: |
| 920 | * |
| 921 | * A Schemas definition |
| 922 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 923 | struct _xmlSchema { |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 924 | const xmlChar *name; /* schema name */ |
| 925 | const xmlChar *targetNamespace; /* the target namespace */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 926 | const xmlChar *version; |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 927 | const xmlChar *id; /* Obsolete */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 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; |
Daniel Veillard | 10b6da4 | 2002-05-18 07:55:20 +0000 | [diff] [blame] | 937 | |
| 938 | xmlHashTablePtr schemasImports; |
Daniel Veillard | 5f7f991 | 2002-06-17 17:03:00 +0000 | [diff] [blame] | 939 | |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 940 | void *_private; /* unused by the library for users or bindings */ |
Daniel Veillard | a84c0b3 | 2003-06-02 16:58:46 +0000 | [diff] [blame] | 941 | xmlHashTablePtr groupDecl; |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 942 | xmlDictPtr dict; |
Daniel Veillard | bd2904b | 2003-11-25 15:38:59 +0000 | [diff] [blame] | 943 | void *includes; /* the includes, this is opaque for now */ |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 944 | int preserve; /* whether to free the document */ |
Kasimier T. Buchcik | 8787640 | 2004-09-29 13:29:03 +0000 | [diff] [blame] | 945 | int counter; /* used to give ononymous components unique names */ |
Kasimier T. Buchcik | ef3d07d | 2005-09-14 17:53:43 +0000 | [diff] [blame] | 946 | xmlHashTablePtr idcDef; /* All identity-constraint defs. */ |
| 947 | void *volatiles; /* Obsolete */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 948 | }; |
| 949 | |
Kasimier T. Buchcik | 876a6db | 2004-09-16 11:31:52 +0000 | [diff] [blame] | 950 | XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type); |
| 951 | XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard); |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 952 | |
| 953 | #ifdef __cplusplus |
| 954 | } |
| 955 | #endif |
| 956 | |
| 957 | #endif /* LIBXML_SCHEMAS_ENABLED */ |
| 958 | #endif /* __XML_SCHEMA_INTERNALS_H__ */ |