2 * Summary: internal interfaces for XML Schemas
3 * Description: internal interfaces for the XML Schemas handling
4 * and schema validity checking
6 * Copy: See Copyright for the status of this software.
8 * Author: Daniel Veillard
12 #ifndef __XML_SCHEMA_INTERNALS_H__
13 #define __XML_SCHEMA_INTERNALS_H__
15 #include <libxml/xmlversion.h>
17 #ifdef LIBXML_SCHEMAS_ENABLED
19 #include <libxml/xmlregexp.h>
20 #include <libxml/hash.h>
21 #include <libxml/dict.h>
28 XML_SCHEMAS_UNKNOWN
= 0,
30 XML_SCHEMAS_NORMSTRING
,
35 XML_SCHEMAS_GMONTHDAY
,
37 XML_SCHEMAS_GYEARMONTH
,
59 XML_SCHEMAS_NPINTEGER
,
61 XML_SCHEMAS_NNINTEGER
,
71 XML_SCHEMAS_HEXBINARY
,
72 XML_SCHEMAS_BASE64BINARY
,
74 XML_SCHEMAS_ANYSIMPLETYPE
78 * XML Schemas defines multiple type of types.
81 XML_SCHEMA_TYPE_BASIC
= 1, /* A built-in datatype */
83 XML_SCHEMA_TYPE_FACET
,
84 XML_SCHEMA_TYPE_SIMPLE
,
85 XML_SCHEMA_TYPE_COMPLEX
,
86 XML_SCHEMA_TYPE_SEQUENCE
= 6,
87 XML_SCHEMA_TYPE_CHOICE
,
89 XML_SCHEMA_TYPE_SIMPLE_CONTENT
,
90 XML_SCHEMA_TYPE_COMPLEX_CONTENT
,
92 XML_SCHEMA_TYPE_RESTRICTION
,
93 XML_SCHEMA_TYPE_EXTENSION
,
94 XML_SCHEMA_TYPE_ELEMENT
,
95 XML_SCHEMA_TYPE_ATTRIBUTE
,
96 XML_SCHEMA_TYPE_ATTRIBUTEGROUP
,
97 XML_SCHEMA_TYPE_GROUP
,
98 XML_SCHEMA_TYPE_NOTATION
,
100 XML_SCHEMA_TYPE_UNION
,
101 XML_SCHEMA_TYPE_ANY_ATTRIBUTE
,
102 XML_SCHEMA_TYPE_IDC_UNIQUE
,
103 XML_SCHEMA_TYPE_IDC_KEY
,
104 XML_SCHEMA_TYPE_IDC_KEYREF
,
105 XML_SCHEMA_TYPE_PARTICLE
= 25,
106 XML_SCHEMA_FACET_MININCLUSIVE
= 1000,
107 XML_SCHEMA_FACET_MINEXCLUSIVE
,
108 XML_SCHEMA_FACET_MAXINCLUSIVE
,
109 XML_SCHEMA_FACET_MAXEXCLUSIVE
,
110 XML_SCHEMA_FACET_TOTALDIGITS
,
111 XML_SCHEMA_FACET_FRACTIONDIGITS
,
112 XML_SCHEMA_FACET_PATTERN
,
113 XML_SCHEMA_FACET_ENUMERATION
,
114 XML_SCHEMA_FACET_WHITESPACE
,
115 XML_SCHEMA_FACET_LENGTH
,
116 XML_SCHEMA_FACET_MAXLENGTH
,
117 XML_SCHEMA_FACET_MINLENGTH
,
118 XML_SCHEMA_EXTRA_QNAMEREF
= 2000
122 XML_SCHEMA_CONTENT_UNKNOWN
= 0,
123 XML_SCHEMA_CONTENT_EMPTY
= 1,
124 XML_SCHEMA_CONTENT_ELEMENTS
,
125 XML_SCHEMA_CONTENT_MIXED
,
126 XML_SCHEMA_CONTENT_SIMPLE
,
127 XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS
, /* obsolete, not used */
128 XML_SCHEMA_CONTENT_BASIC
,
129 XML_SCHEMA_CONTENT_ANY
130 } xmlSchemaContentType
;
132 typedef struct _xmlSchemaVal xmlSchemaVal
;
133 typedef xmlSchemaVal
*xmlSchemaValPtr
;
135 typedef struct _xmlSchemaType xmlSchemaType
;
136 typedef xmlSchemaType
*xmlSchemaTypePtr
;
138 typedef struct _xmlSchemaFacet xmlSchemaFacet
;
139 typedef xmlSchemaFacet
*xmlSchemaFacetPtr
;
144 typedef struct _xmlSchemaAnnot xmlSchemaAnnot
;
145 typedef xmlSchemaAnnot
*xmlSchemaAnnotPtr
;
146 struct _xmlSchemaAnnot
{
147 struct _xmlSchemaAnnot
*next
;
148 xmlNodePtr content
; /* the annotation */
152 * XML_SCHEMAS_ANYATTR_SKIP:
154 * Skip unknown attribute from validation
155 * Obsolete, not used anymore.
157 #define XML_SCHEMAS_ANYATTR_SKIP 1
159 * XML_SCHEMAS_ANYATTR_LAX:
161 * Ignore validation non definition on attributes
162 * Obsolete, not used anymore.
164 #define XML_SCHEMAS_ANYATTR_LAX 2
166 * XML_SCHEMAS_ANYATTR_STRICT:
168 * Apply strict validation rules on attributes
169 * Obsolete, not used anymore.
171 #define XML_SCHEMAS_ANYATTR_STRICT 3
173 * XML_SCHEMAS_ANY_SKIP:
175 * Skip unknown attribute from validation
177 #define XML_SCHEMAS_ANY_SKIP 1
179 * XML_SCHEMAS_ANY_LAX:
182 * Validate if type found, don't worry if not found
184 #define XML_SCHEMAS_ANY_LAX 2
186 * XML_SCHEMAS_ANY_STRICT:
189 * Apply strict validation rules
191 #define XML_SCHEMAS_ANY_STRICT 3
193 * XML_SCHEMAS_ATTR_USE_PROHIBITED:
196 * The attribute is prohibited.
198 #define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
200 * XML_SCHEMAS_ATTR_USE_REQUIRED:
202 * The attribute is required.
204 #define XML_SCHEMAS_ATTR_USE_REQUIRED 1
206 * XML_SCHEMAS_ATTR_USE_OPTIONAL:
208 * The attribute is optional.
210 #define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
212 * XML_SCHEMAS_ATTR_GLOBAL:
214 * allow elements in no namespace
216 #define XML_SCHEMAS_ATTR_GLOBAL 1 << 0
218 * XML_SCHEMAS_ATTR_NSDEFAULT:
220 * allow elements in no namespace
222 #define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7
224 * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
226 * this is set when the "type" and "ref" references
227 * have been resolved.
229 #define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8
231 * XML_SCHEMAS_ATTR_FIXED:
233 * the attribute has a fixed value
235 #define XML_SCHEMAS_ATTR_FIXED 1 << 9
238 * xmlSchemaAttribute:
239 * An attribute definition.
242 typedef struct _xmlSchemaAttribute xmlSchemaAttribute
;
243 typedef xmlSchemaAttribute
*xmlSchemaAttributePtr
;
244 struct _xmlSchemaAttribute
{
245 xmlSchemaTypeType type
; /* The kind of type */
246 struct _xmlSchemaAttribute
*next
;/* the next attribute if in a group ... */
247 const xmlChar
*name
; /* name of the declaration or empty if particle */
249 const xmlChar
*ref
; /* the local name of the attribute decl. if a particle */
250 const xmlChar
*refNs
; /* the ns URI of the attribute decl. if a particle */
251 const xmlChar
*typeName
; /* the local name of the type definition */
252 const xmlChar
*typeNs
; /* the ns URI of the type definition */
253 xmlSchemaAnnotPtr annot
;
255 xmlSchemaTypePtr base
; /* obsolete, not used */
257 const xmlChar
*defValue
;
258 xmlSchemaTypePtr subtypes
; /* the type definition */
260 const xmlChar
*targetNamespace
;
262 const xmlChar
*refPrefix
;
263 xmlSchemaValPtr defVal
;
264 xmlSchemaAttributePtr refDecl
;
268 * xmlSchemaAttributeLink:
269 * Used to build a list of attribute uses on complexType definitions.
271 typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink
;
272 typedef xmlSchemaAttributeLink
*xmlSchemaAttributeLinkPtr
;
273 struct _xmlSchemaAttributeLink
{
274 struct _xmlSchemaAttributeLink
*next
;/* the next attribute link ... */
275 struct _xmlSchemaAttribute
*attr
;/* the linked attribute */
279 * XML_SCHEMAS_WILDCARD_COMPLETE:
281 * If the wildcard is complete.
283 #define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
286 * xmlSchemaCharValueLink:
287 * Used to build a list of namespaces on wildcards.
289 typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs
;
290 typedef xmlSchemaWildcardNs
*xmlSchemaWildcardNsPtr
;
291 struct _xmlSchemaWildcardNs
{
292 struct _xmlSchemaWildcardNs
*next
;/* the next constraint link ... */
293 const xmlChar
*value
;/* the value */
300 typedef struct _xmlSchemaWildcard xmlSchemaWildcard
;
301 typedef xmlSchemaWildcard
*xmlSchemaWildcardPtr
;
302 struct _xmlSchemaWildcard
{
303 xmlSchemaTypeType type
; /* The kind of type */
305 xmlSchemaAnnotPtr annot
;
310 int any
; /* Indicates if the ns constraint is of ##any */
311 xmlSchemaWildcardNsPtr nsSet
; /* The list of allowed namespaces */
312 xmlSchemaWildcardNsPtr negNsSet
; /* The negated namespace */
317 * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
319 * The attribute wildcard has been already builded.
321 #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
323 * XML_SCHEMAS_ATTRGROUP_GLOBAL:
325 * The attribute wildcard has been already builded.
327 #define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
329 * XML_SCHEMAS_ATTRGROUP_MARKED:
331 * Marks the attr group as marked; used for circular checks.
333 #define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
336 * An attribute group definition.
338 * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
339 * must be kept similar
341 typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup
;
342 typedef xmlSchemaAttributeGroup
*xmlSchemaAttributeGroupPtr
;
343 struct _xmlSchemaAttributeGroup
{
344 xmlSchemaTypeType type
; /* The kind of type */
345 struct _xmlSchemaAttribute
*next
;/* the next attribute if in a group ... */
349 const xmlChar
*refNs
;
350 xmlSchemaAnnotPtr annot
;
352 xmlSchemaAttributePtr attributes
;
355 xmlSchemaWildcardPtr attributeWildcard
;
356 const xmlChar
*refPrefix
;
357 xmlSchemaAttributeGroupPtr refItem
; /* The referenced attribute group */
358 const xmlChar
*targetNamespace
;
363 * Used to build a list of types (e.g. member types of
364 * simpleType with variety "union").
366 typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink
;
367 typedef xmlSchemaTypeLink
*xmlSchemaTypeLinkPtr
;
368 struct _xmlSchemaTypeLink
{
369 struct _xmlSchemaTypeLink
*next
;/* the next type link ... */
370 xmlSchemaTypePtr type
;/* the linked type*/
374 * xmlSchemaFacetLink:
375 * Used to build a list of facets.
377 typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink
;
378 typedef xmlSchemaFacetLink
*xmlSchemaFacetLinkPtr
;
379 struct _xmlSchemaFacetLink
{
380 struct _xmlSchemaFacetLink
*next
;/* the next facet link ... */
381 xmlSchemaFacetPtr facet
;/* the linked facet */
385 * XML_SCHEMAS_TYPE_MIXED:
387 * the element content type is mixed
389 #define XML_SCHEMAS_TYPE_MIXED 1 << 0
391 * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
393 * the simple or complex type has a derivation method of "extension".
395 #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1
397 * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
399 * the simple or complex type has a derivation method of "restriction".
401 #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2
403 * XML_SCHEMAS_TYPE_GLOBAL:
407 #define XML_SCHEMAS_TYPE_GLOBAL 1 << 3
409 * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
411 * the complexType owns an attribute wildcard, i.e.
412 * it can be freed by the complexType
414 #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */
416 * XML_SCHEMAS_TYPE_VARIETY_ABSENT:
418 * the simpleType has a variety of "absent".
420 #define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
422 * XML_SCHEMAS_TYPE_VARIETY_LIST:
424 * the simpleType has a variety of "list".
426 #define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6
428 * XML_SCHEMAS_TYPE_VARIETY_UNION:
430 * the simpleType has a variety of "union".
432 #define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7
434 * XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
436 * the simpleType has a variety of "union".
438 #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8
440 * XML_SCHEMAS_TYPE_FINAL_EXTENSION:
442 * the complexType has a final of "extension".
444 #define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9
446 * XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
448 * the simpleType/complexType has a final of "restriction".
450 #define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10
452 * XML_SCHEMAS_TYPE_FINAL_LIST:
454 * the simpleType has a final of "list".
456 #define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11
458 * XML_SCHEMAS_TYPE_FINAL_UNION:
460 * the simpleType has a final of "union".
462 #define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12
464 * XML_SCHEMAS_TYPE_FINAL_DEFAULT:
466 * the simpleType has a final of "default".
468 #define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13
470 * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
472 * Marks the item as a builtin primitive.
474 #define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14
476 * XML_SCHEMAS_TYPE_MARKED:
478 * Marks the item as marked; used for circular checks.
480 #define XML_SCHEMAS_TYPE_MARKED 1 << 16
482 * XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
484 * the complexType did not specify 'block' so use the default of the
487 #define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17
489 * XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
491 * the complexType has a 'block' of "extension".
493 #define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18
495 * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
497 * the complexType has a 'block' of "restriction".
499 #define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19
501 * XML_SCHEMAS_TYPE_ABSTRACT:
503 * the simple/complexType is abstract.
505 #define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20
507 * XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
509 * indicates if the facets need a computed value
511 #define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21
513 * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
515 * indicates that the type was typefixed
517 #define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22
519 * XML_SCHEMAS_TYPE_INTERNAL_INVALID:
521 * indicates that the type is invalid
523 #define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
525 * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
527 * a whitespace-facet value of "preserve"
529 #define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24
531 * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
533 * a whitespace-facet value of "replace"
535 #define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25
537 * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
539 * a whitespace-facet value of "collapse"
541 #define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26
543 * XML_SCHEMAS_TYPE_HAS_FACETS:
547 #define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27
549 * XML_SCHEMAS_TYPE_NORMVALUENEEDED:
551 * indicates if the facets (pattern) need a normalized value
553 #define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28
558 * Schemas type definition.
560 struct _xmlSchemaType
{
561 xmlSchemaTypeType type
; /* The kind of type */
562 struct _xmlSchemaType
*next
;/* the next type if in a sequence ... */
566 const xmlChar
*refNs
;
567 xmlSchemaAnnotPtr annot
;
568 xmlSchemaTypePtr subtypes
;
569 xmlSchemaAttributePtr attributes
;
575 xmlSchemaContentType contentType
;
577 const xmlChar
*baseNs
;
578 xmlSchemaTypePtr baseType
;
579 xmlSchemaFacetPtr facets
;
580 struct _xmlSchemaType
*redef
;/* possible redefinitions for the type */
582 xmlSchemaAttributeLinkPtr attributeUses
;
583 xmlSchemaWildcardPtr attributeWildcard
;
585 xmlSchemaTypeLinkPtr memberTypes
;
586 xmlSchemaFacetLinkPtr facetSet
;
587 const xmlChar
*refPrefix
;
588 xmlSchemaTypePtr contentTypeDef
;
589 xmlRegexpPtr contModel
;
590 const xmlChar
*targetNamespace
;
595 * An element definition.
597 * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
598 * structures must be kept similar
601 * XML_SCHEMAS_ELEM_NILLABLE:
603 * the element is nillable
605 #define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
607 * XML_SCHEMAS_ELEM_GLOBAL:
609 * the element is global
611 #define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
613 * XML_SCHEMAS_ELEM_DEFAULT:
615 * the element has a default value
617 #define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
619 * XML_SCHEMAS_ELEM_FIXED:
621 * the element has a fixed value
623 #define XML_SCHEMAS_ELEM_FIXED 1 << 3
625 * XML_SCHEMAS_ELEM_ABSTRACT:
627 * the element is abstract
629 #define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
631 * XML_SCHEMAS_ELEM_TOPLEVEL:
633 * the element is top level
634 * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
636 #define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
638 * XML_SCHEMAS_ELEM_REF:
640 * the element is a reference to a type
642 #define XML_SCHEMAS_ELEM_REF 1 << 6
644 * XML_SCHEMAS_ELEM_NSDEFAULT:
646 * allow elements in no namespace
647 * Obsolete, not used anymore.
649 #define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7
651 * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
653 * this is set when "type", "ref", "substitutionGroup"
654 * references have been resolved.
656 #define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8
658 * XML_SCHEMAS_ELEM_CIRCULAR:
660 * a helper flag for the search of circular references.
662 #define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9
664 * XML_SCHEMAS_ELEM_BLOCK_ABSENT:
666 * the "block" attribute is absent
668 #define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10
670 * XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
672 * disallowed substitutions are absent
674 #define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11
676 * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
678 * disallowed substitutions: "restriction"
680 #define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12
682 * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
684 * disallowed substitutions: "substituion"
686 #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13
688 * XML_SCHEMAS_ELEM_FINAL_ABSENT:
690 * substitution group exclusions are absent
692 #define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14
694 * XML_SCHEMAS_ELEM_FINAL_EXTENSION:
696 * substitution group exclusions: "extension"
698 #define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15
700 * XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
702 * substitution group exclusions: "restriction"
704 #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
706 * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
708 * the declaration is a substitution group head
710 #define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17
712 * XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
714 * this is set when the elem decl has been checked against
717 #define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18
719 typedef struct _xmlSchemaElement xmlSchemaElement
;
720 typedef xmlSchemaElement
*xmlSchemaElementPtr
;
721 struct _xmlSchemaElement
{
722 xmlSchemaTypeType type
; /* The kind of type */
723 struct _xmlSchemaType
*next
;/* the next type if in a sequence ... */
726 const xmlChar
*ref
; /* the local name of the element declaration if a particle */
727 const xmlChar
*refNs
; /* the ns URI of the element declaration if a particle */
728 xmlSchemaAnnotPtr annot
;
729 xmlSchemaTypePtr subtypes
; /* the type definition */
730 xmlSchemaAttributePtr attributes
;
736 const xmlChar
*targetNamespace
;
737 const xmlChar
*namedType
;
738 const xmlChar
*namedTypeNs
;
739 const xmlChar
*substGroup
;
740 const xmlChar
*substGroupNs
;
741 const xmlChar
*scope
;
742 const xmlChar
*value
;
743 struct _xmlSchemaElement
*refDecl
; /* This will now be used for the substitution group affiliation */
744 xmlRegexpPtr contModel
;
745 xmlSchemaContentType contentType
;
746 const xmlChar
*refPrefix
;
747 xmlSchemaValPtr defVal
;
752 * XML_SCHEMAS_FACET_UNKNOWN:
754 * unknown facet handling
756 #define XML_SCHEMAS_FACET_UNKNOWN 0
758 * XML_SCHEMAS_FACET_PRESERVE:
760 * preserve the type of the facet
762 #define XML_SCHEMAS_FACET_PRESERVE 1
764 * XML_SCHEMAS_FACET_REPLACE:
766 * replace the type of the facet
768 #define XML_SCHEMAS_FACET_REPLACE 2
770 * XML_SCHEMAS_FACET_COLLAPSE:
772 * collapse the types of the facet
774 #define XML_SCHEMAS_FACET_COLLAPSE 3
776 * A facet definition.
778 struct _xmlSchemaFacet
{
779 xmlSchemaTypeType type
; /* The kind of type */
780 struct _xmlSchemaFacet
*next
;/* the next type if in a sequence ... */
781 const xmlChar
*value
;
783 xmlSchemaAnnotPtr annot
;
792 * A notation definition.
794 typedef struct _xmlSchemaNotation xmlSchemaNotation
;
795 typedef xmlSchemaNotation
*xmlSchemaNotationPtr
;
796 struct _xmlSchemaNotation
{
797 xmlSchemaTypeType type
; /* The kind of type */
799 xmlSchemaAnnotPtr annot
;
800 const xmlChar
*identifier
;
801 const xmlChar
*targetNamespace
;
805 * XML_SCHEMAS_QUALIF_ELEM:
807 * the schema requires qualified elements
809 #define XML_SCHEMAS_QUALIF_ELEM 1 << 0
811 * XML_SCHEMAS_QUALIF_ATTR:
813 * the schema requires qualified attributes
815 #define XML_SCHEMAS_QUALIF_ATTR 1 << 1
817 * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
819 * the schema has "extension" in the set of finalDefault.
821 #define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2
823 * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
825 * the schema has "restriction" in the set of finalDefault.
827 #define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3
829 * XML_SCHEMAS_FINAL_DEFAULT_LIST:
831 * the cshema has "list" in the set of finalDefault.
833 #define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4
835 * XML_SCHEMAS_FINAL_DEFAULT_UNION:
837 * the schema has "union" in the set of finalDefault.
839 #define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5
841 * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
843 * the schema has "extension" in the set of blockDefault.
845 #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6
847 * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
849 * the schema has "restriction" in the set of blockDefault.
851 #define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7
853 * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
855 * the schema has "substitution" in the set of blockDefault.
857 #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8
859 * XML_SCHEMAS_INCLUDING_CONVERT_NS:
861 * the schema is currently including an other schema with
862 * no target namespace.
864 #define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
868 * A Schemas definition
871 const xmlChar
*name
; /* schema name */
872 const xmlChar
*targetNamespace
; /* the target namespace */
873 const xmlChar
*version
;
876 xmlSchemaAnnotPtr annot
;
879 xmlHashTablePtr typeDecl
;
880 xmlHashTablePtr attrDecl
;
881 xmlHashTablePtr attrgrpDecl
;
882 xmlHashTablePtr elemDecl
;
883 xmlHashTablePtr notaDecl
;
885 xmlHashTablePtr schemasImports
;
887 void *_private
; /* unused by the library for users or bindings */
888 xmlHashTablePtr groupDecl
;
890 void *includes
; /* the includes, this is opaque for now */
891 int preserve
; /* whether to free the document */
892 int counter
; /* used to give ononymous components unique names */
893 xmlHashTablePtr idcDef
;
894 void *volatiles
; /* Misc. helper items (e.g. reference items) */
897 XMLPUBFUN
void XMLCALL
xmlSchemaFreeType (xmlSchemaTypePtr type
);
898 XMLPUBFUN
void XMLCALL
xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard
);
904 #endif /* LIBXML_SCHEMAS_ENABLED */
905 #endif /* __XML_SCHEMA_INTERNALS_H__ */