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 | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 5 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 6 | * Copy: See Copyright for the status of this software. |
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 | * Author: Daniel Veillard |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | |
| 12 | #ifndef __XML_SCHEMA_INTERNALS_H__ |
| 13 | #define __XML_SCHEMA_INTERNALS_H__ |
| 14 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 15 | #include <libxml/xmlversion.h> |
Igor Zlatkovic | 7ae91bc | 2002-11-08 17:18:52 +0000 | [diff] [blame] | 16 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 17 | #ifdef LIBXML_SCHEMAS_ENABLED |
| 18 | |
| 19 | #include <libxml/xmlregexp.h> |
Daniel Veillard | 8326e73 | 2003-01-07 00:19:07 +0000 | [diff] [blame] | 20 | #include <libxml/hash.h> |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 21 | #include <libxml/dict.h> |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 22 | |
| 23 | #ifdef __cplusplus |
| 24 | extern "C" { |
| 25 | #endif |
| 26 | |
| 27 | |
| 28 | /* |
| 29 | * XML Schemas defines multiple type of types. |
| 30 | */ |
| 31 | typedef enum { |
| 32 | XML_SCHEMA_TYPE_BASIC = 1, |
| 33 | XML_SCHEMA_TYPE_ANY, |
| 34 | XML_SCHEMA_TYPE_FACET, |
| 35 | XML_SCHEMA_TYPE_SIMPLE, |
| 36 | XML_SCHEMA_TYPE_COMPLEX, |
| 37 | XML_SCHEMA_TYPE_SEQUENCE, |
| 38 | XML_SCHEMA_TYPE_CHOICE, |
| 39 | XML_SCHEMA_TYPE_ALL, |
| 40 | XML_SCHEMA_TYPE_SIMPLE_CONTENT, |
| 41 | XML_SCHEMA_TYPE_COMPLEX_CONTENT, |
| 42 | XML_SCHEMA_TYPE_UR, |
| 43 | XML_SCHEMA_TYPE_RESTRICTION, |
| 44 | XML_SCHEMA_TYPE_EXTENSION, |
| 45 | XML_SCHEMA_TYPE_ELEMENT, |
| 46 | XML_SCHEMA_TYPE_ATTRIBUTE, |
Daniel Veillard | 13e04c6 | 2002-04-23 17:51:29 +0000 | [diff] [blame] | 47 | XML_SCHEMA_TYPE_ATTRIBUTEGROUP, |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 48 | XML_SCHEMA_TYPE_GROUP, |
| 49 | XML_SCHEMA_TYPE_NOTATION, |
| 50 | XML_SCHEMA_TYPE_LIST, |
| 51 | XML_SCHEMA_TYPE_UNION, |
| 52 | XML_SCHEMA_FACET_MININCLUSIVE = 1000, |
| 53 | XML_SCHEMA_FACET_MINEXCLUSIVE, |
| 54 | XML_SCHEMA_FACET_MAXINCLUSIVE, |
| 55 | XML_SCHEMA_FACET_MAXEXCLUSIVE, |
| 56 | XML_SCHEMA_FACET_TOTALDIGITS, |
| 57 | XML_SCHEMA_FACET_FRACTIONDIGITS, |
| 58 | XML_SCHEMA_FACET_PATTERN, |
| 59 | XML_SCHEMA_FACET_ENUMERATION, |
| 60 | XML_SCHEMA_FACET_WHITESPACE, |
| 61 | XML_SCHEMA_FACET_LENGTH, |
| 62 | XML_SCHEMA_FACET_MAXLENGTH, |
| 63 | XML_SCHEMA_FACET_MINLENGTH |
| 64 | } xmlSchemaTypeType; |
| 65 | |
| 66 | typedef enum { |
| 67 | XML_SCHEMA_CONTENT_UNKNOWN = 0, |
| 68 | XML_SCHEMA_CONTENT_EMPTY = 1, |
| 69 | XML_SCHEMA_CONTENT_ELEMENTS, |
| 70 | XML_SCHEMA_CONTENT_MIXED, |
| 71 | XML_SCHEMA_CONTENT_SIMPLE, |
| 72 | XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, |
Daniel Veillard | 88c5891 | 2002-04-23 07:12:20 +0000 | [diff] [blame] | 73 | XML_SCHEMA_CONTENT_BASIC, |
| 74 | XML_SCHEMA_CONTENT_ANY |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 75 | } xmlSchemaContentType; |
| 76 | |
| 77 | typedef struct _xmlSchemaVal xmlSchemaVal; |
| 78 | typedef xmlSchemaVal *xmlSchemaValPtr; |
| 79 | |
| 80 | typedef struct _xmlSchemaType xmlSchemaType; |
| 81 | typedef xmlSchemaType *xmlSchemaTypePtr; |
| 82 | |
| 83 | typedef struct _xmlSchemaFacet xmlSchemaFacet; |
| 84 | typedef xmlSchemaFacet *xmlSchemaFacetPtr; |
| 85 | |
| 86 | /** |
| 87 | * Annotation |
| 88 | */ |
| 89 | typedef struct _xmlSchemaAnnot xmlSchemaAnnot; |
| 90 | typedef xmlSchemaAnnot *xmlSchemaAnnotPtr; |
| 91 | struct _xmlSchemaAnnot { |
| 92 | struct _xmlSchemaAnnot *next; |
| 93 | xmlNodePtr content; /* the annotation */ |
| 94 | }; |
| 95 | |
| 96 | /** |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame^] | 97 | * XML_SCHEMAS_ANYATTR_SKIP: |
| 98 | * |
| 99 | * Skip unknown attribute from validation |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 100 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 101 | #define XML_SCHEMAS_ANYATTR_SKIP 1 |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame^] | 102 | /** |
| 103 | * XML_SCHEMAS_ANYATTR_LAX: |
| 104 | * |
| 105 | * Ignore validation non definition on attributes |
| 106 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 107 | #define XML_SCHEMAS_ANYATTR_LAX 2 |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame^] | 108 | /** |
| 109 | * XML_SCHEMAS_ANYATTR_STRICT: |
| 110 | * |
| 111 | * Apply strict validation rules on attributes |
| 112 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 113 | #define XML_SCHEMAS_ANYATTR_STRICT 3 |
| 114 | |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 115 | /** |
| 116 | * XML_SCHEMAS_ATTR_NSDEFAULT: |
| 117 | * |
| 118 | * allow elements in no namespace |
| 119 | */ |
| 120 | #define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7 |
| 121 | |
Daniel Veillard | 1e90661 | 2003-12-05 14:57:46 +0000 | [diff] [blame^] | 122 | /** |
| 123 | * xmlSchemaAttribute: |
| 124 | * An attribute definition. |
| 125 | */ |
| 126 | |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 127 | typedef struct _xmlSchemaAttribute xmlSchemaAttribute; |
| 128 | typedef xmlSchemaAttribute *xmlSchemaAttributePtr; |
| 129 | struct _xmlSchemaAttribute { |
| 130 | xmlSchemaTypeType type; /* The kind of type */ |
| 131 | struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 132 | const xmlChar *name; |
| 133 | const xmlChar *id; |
| 134 | const xmlChar *ref; |
| 135 | const xmlChar *refNs; |
| 136 | const xmlChar *typeName; |
| 137 | const xmlChar *typeNs; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 138 | xmlSchemaAnnotPtr annot; |
| 139 | |
| 140 | xmlSchemaTypePtr base; |
| 141 | int occurs; |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 142 | const xmlChar *defValue; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 143 | xmlSchemaTypePtr subtypes; |
Daniel Veillard | 75bb3bb | 2003-05-12 15:25:56 +0000 | [diff] [blame] | 144 | xmlNodePtr node; |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 145 | const xmlChar *targetNamespace; |
| 146 | int flags; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 147 | }; |
| 148 | |
| 149 | /** |
| 150 | * An attribute group definition. |
| 151 | * |
| 152 | * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures |
| 153 | * must be kept similar |
| 154 | */ |
| 155 | typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup; |
| 156 | typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr; |
| 157 | struct _xmlSchemaAttributeGroup { |
| 158 | xmlSchemaTypeType type; /* The kind of type */ |
| 159 | struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 160 | const xmlChar *name; |
| 161 | const xmlChar *id; |
| 162 | const xmlChar *ref; |
| 163 | const xmlChar *refNs; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 164 | xmlSchemaAnnotPtr annot; |
| 165 | |
| 166 | xmlSchemaAttributePtr attributes; |
Daniel Veillard | 75bb3bb | 2003-05-12 15:25:56 +0000 | [diff] [blame] | 167 | xmlNodePtr node; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 168 | }; |
| 169 | |
| 170 | |
| 171 | /** |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 172 | * XML_SCHEMAS_TYPE_MIXED: |
| 173 | * |
| 174 | * the element content type is mixed |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 175 | */ |
| 176 | #define XML_SCHEMAS_TYPE_MIXED 1 << 0 |
| 177 | |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 178 | /** |
| 179 | * _xmlSchemaType: |
| 180 | * |
| 181 | * Schemas type definition. |
| 182 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 183 | struct _xmlSchemaType { |
| 184 | xmlSchemaTypeType type; /* The kind of type */ |
| 185 | struct _xmlSchemaType *next;/* the next type if in a sequence ... */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 186 | const xmlChar *name; |
| 187 | const xmlChar *id; |
| 188 | const xmlChar *ref; |
| 189 | const xmlChar *refNs; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 190 | xmlSchemaAnnotPtr annot; |
| 191 | xmlSchemaTypePtr subtypes; |
| 192 | xmlSchemaAttributePtr attributes; |
| 193 | xmlNodePtr node; |
| 194 | int minOccurs; |
| 195 | int maxOccurs; |
| 196 | |
| 197 | int flags; |
| 198 | xmlSchemaContentType contentType; |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 199 | const xmlChar *base; |
| 200 | const xmlChar *baseNs; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 201 | xmlSchemaTypePtr baseType; |
| 202 | xmlSchemaFacetPtr facets; |
| 203 | }; |
| 204 | |
William M. Brack | 60f394e | 2003-11-16 06:25:42 +0000 | [diff] [blame] | 205 | /* |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 206 | * xmlSchemaElement: |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 207 | * An element definition. |
| 208 | * |
| 209 | * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of |
| 210 | * structures must be kept similar |
| 211 | */ |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 212 | /** |
| 213 | * XML_SCHEMAS_ELEM_NILLABLE: |
| 214 | * |
| 215 | * the element is nillable |
| 216 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 217 | #define XML_SCHEMAS_ELEM_NILLABLE 1 << 0 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 218 | /** |
| 219 | * XML_SCHEMAS_ELEM_GLOBAL: |
| 220 | * |
| 221 | * the element is global |
| 222 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 223 | #define XML_SCHEMAS_ELEM_GLOBAL 1 << 1 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 224 | /** |
| 225 | * XML_SCHEMAS_ELEM_DEFAULT: |
| 226 | * |
| 227 | * the element has a default value |
| 228 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 229 | #define XML_SCHEMAS_ELEM_DEFAULT 1 << 2 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 230 | /** |
| 231 | * XML_SCHEMAS_ELEM_FIXED: |
| 232 | * |
| 233 | * the element has a fixed value |
| 234 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 235 | #define XML_SCHEMAS_ELEM_FIXED 1 << 3 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 236 | /** |
| 237 | * XML_SCHEMAS_ELEM_ABSTRACT: |
| 238 | * |
| 239 | * the element is abstract |
| 240 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 241 | #define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 242 | /** |
| 243 | * XML_SCHEMAS_ELEM_TOPLEVEL: |
| 244 | * |
| 245 | * the element is top level |
| 246 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 247 | #define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 248 | /** |
| 249 | * XML_SCHEMAS_ELEM_REF: |
| 250 | * |
| 251 | * the element is a reference to a type |
| 252 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 253 | #define XML_SCHEMAS_ELEM_REF 1 << 6 |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 254 | /** |
| 255 | * XML_SCHEMAS_ELEM_NSDEFAULT: |
| 256 | * |
| 257 | * allow elements in no namespace |
| 258 | */ |
| 259 | #define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7 |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 260 | |
| 261 | typedef struct _xmlSchemaElement xmlSchemaElement; |
| 262 | typedef xmlSchemaElement *xmlSchemaElementPtr; |
| 263 | struct _xmlSchemaElement { |
| 264 | xmlSchemaTypeType type; /* The kind of type */ |
| 265 | struct _xmlSchemaType *next;/* the next type if in a sequence ... */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 266 | const xmlChar *name; |
| 267 | const xmlChar *id; |
| 268 | const xmlChar *ref; |
| 269 | const xmlChar *refNs; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 270 | xmlSchemaAnnotPtr annot; |
| 271 | xmlSchemaTypePtr subtypes; |
| 272 | xmlSchemaAttributePtr attributes; |
| 273 | xmlNodePtr node; |
| 274 | int minOccurs; |
| 275 | int maxOccurs; |
| 276 | |
| 277 | int flags; |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 278 | const xmlChar *targetNamespace; |
| 279 | const xmlChar *namedType; |
| 280 | const xmlChar *namedTypeNs; |
| 281 | const xmlChar *substGroup; |
| 282 | const xmlChar *substGroupNs; |
| 283 | const xmlChar *scope; |
| 284 | const xmlChar *value; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 285 | struct _xmlSchemaElement *refDecl; |
| 286 | xmlRegexpPtr contModel; |
Daniel Veillard | 88c5891 | 2002-04-23 07:12:20 +0000 | [diff] [blame] | 287 | xmlSchemaContentType contentType; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 288 | }; |
| 289 | |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 290 | /* |
| 291 | * XML_SCHEMAS_FACET_UNKNOWN: |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 292 | * |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 293 | * unknown facet handling |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 294 | */ |
| 295 | #define XML_SCHEMAS_FACET_UNKNOWN 0 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 296 | /* |
| 297 | * XML_SCHEMAS_FACET_PRESERVE: |
| 298 | * |
| 299 | * preserve the type of the facet |
| 300 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 301 | #define XML_SCHEMAS_FACET_PRESERVE 1 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 302 | /* |
| 303 | * XML_SCHEMAS_FACET_REPLACE: |
| 304 | * |
| 305 | * replace the type of the facet |
| 306 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 307 | #define XML_SCHEMAS_FACET_REPLACE 2 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 308 | /* |
| 309 | * XML_SCHEMAS_FACET_COLLAPSE: |
| 310 | * |
| 311 | * collapse the types of the facet |
| 312 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 313 | #define XML_SCHEMAS_FACET_COLLAPSE 3 |
| 314 | |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 315 | /** |
| 316 | * A facet definition. |
| 317 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 318 | struct _xmlSchemaFacet { |
| 319 | xmlSchemaTypeType type; /* The kind of type */ |
| 320 | struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 321 | const xmlChar *value; |
| 322 | const xmlChar *id; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 323 | xmlSchemaAnnotPtr annot; |
| 324 | xmlNodePtr node; |
| 325 | int fixed; |
| 326 | int whitespace; |
| 327 | xmlSchemaValPtr val; |
| 328 | xmlRegexpPtr regexp; |
| 329 | }; |
| 330 | |
| 331 | /** |
| 332 | * A notation definition. |
| 333 | */ |
| 334 | typedef struct _xmlSchemaNotation xmlSchemaNotation; |
| 335 | typedef xmlSchemaNotation *xmlSchemaNotationPtr; |
| 336 | struct _xmlSchemaNotation { |
| 337 | xmlSchemaTypeType type; /* The kind of type */ |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 338 | const xmlChar *name; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 339 | xmlSchemaAnnotPtr annot; |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 340 | const xmlChar *identifier; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 341 | }; |
| 342 | |
| 343 | /** |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 344 | * XML_SCHEMAS_QUALIF_ELEM: |
| 345 | * |
| 346 | * the shemas requires qualified elements |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 347 | */ |
| 348 | #define XML_SCHEMAS_QUALIF_ELEM 1 << 0 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 349 | /** |
| 350 | * XML_SCHEMAS_QUALIF_ATTR: |
| 351 | * |
| 352 | * the shemas requires qualified attributes |
| 353 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 354 | #define XML_SCHEMAS_QUALIF_ATTR 1 << 1 |
Daniel Veillard | a9b66d0 | 2002-12-11 14:23:49 +0000 | [diff] [blame] | 355 | /** |
| 356 | * _xmlSchema: |
| 357 | * |
| 358 | * A Schemas definition |
| 359 | */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 360 | struct _xmlSchema { |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 361 | const xmlChar *name; /* schema name */ |
| 362 | const xmlChar *targetNamespace; /* the target namespace */ |
| 363 | const xmlChar *version; |
| 364 | const xmlChar *id; |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 365 | xmlDocPtr doc; |
| 366 | xmlSchemaAnnotPtr annot; |
| 367 | int flags; |
| 368 | |
| 369 | xmlHashTablePtr typeDecl; |
| 370 | xmlHashTablePtr attrDecl; |
| 371 | xmlHashTablePtr attrgrpDecl; |
| 372 | xmlHashTablePtr elemDecl; |
| 373 | xmlHashTablePtr notaDecl; |
Daniel Veillard | 10b6da4 | 2002-05-18 07:55:20 +0000 | [diff] [blame] | 374 | |
| 375 | xmlHashTablePtr schemasImports; |
Daniel Veillard | 5f7f991 | 2002-06-17 17:03:00 +0000 | [diff] [blame] | 376 | |
| 377 | void *_private; /* unused by the library for users or bindings */ |
Daniel Veillard | a84c0b3 | 2003-06-02 16:58:46 +0000 | [diff] [blame] | 378 | xmlHashTablePtr groupDecl; |
Daniel Veillard | be9c632 | 2003-11-22 20:37:51 +0000 | [diff] [blame] | 379 | xmlDictPtr dict; |
Daniel Veillard | bd2904b | 2003-11-25 15:38:59 +0000 | [diff] [blame] | 380 | void *includes; /* the includes, this is opaque for now */ |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 381 | }; |
| 382 | |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 383 | XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type); |
Daniel Veillard | 4255d50 | 2002-04-16 15:50:10 +0000 | [diff] [blame] | 384 | |
| 385 | #ifdef __cplusplus |
| 386 | } |
| 387 | #endif |
| 388 | |
| 389 | #endif /* LIBXML_SCHEMAS_ENABLED */ |
| 390 | #endif /* __XML_SCHEMA_INTERNALS_H__ */ |
| 391 | |
| 392 | |