Eneboo - Documentación para desarrolladores
|
00001 /* 00002 * Summary: internal interfaces for XML Schemas 00003 * Description: internal interfaces for the XML Schemas handling 00004 * and schema validity checking 00005 * The Schemas development is a Work In Progress. 00006 * Some of those interfaces are not garanteed to be API or ABI stable ! 00007 * 00008 * Copy: See Copyright for the status of this software. 00009 * 00010 * Author: Daniel Veillard 00011 */ 00012 00013 00014 #ifndef __XML_SCHEMA_INTERNALS_H__ 00015 #define __XML_SCHEMA_INTERNALS_H__ 00016 00017 #include <libxml/xmlversion.h> 00018 00019 #ifdef LIBXML_SCHEMAS_ENABLED 00020 00021 #include <libxml/xmlregexp.h> 00022 #include <libxml/hash.h> 00023 #include <libxml/dict.h> 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 typedef enum { 00030 XML_SCHEMAS_UNKNOWN = 0, 00031 XML_SCHEMAS_STRING, 00032 XML_SCHEMAS_NORMSTRING, 00033 XML_SCHEMAS_DECIMAL, 00034 XML_SCHEMAS_TIME, 00035 XML_SCHEMAS_GDAY, 00036 XML_SCHEMAS_GMONTH, 00037 XML_SCHEMAS_GMONTHDAY, 00038 XML_SCHEMAS_GYEAR, 00039 XML_SCHEMAS_GYEARMONTH, 00040 XML_SCHEMAS_DATE, 00041 XML_SCHEMAS_DATETIME, 00042 XML_SCHEMAS_DURATION, 00043 XML_SCHEMAS_FLOAT, 00044 XML_SCHEMAS_DOUBLE, 00045 XML_SCHEMAS_BOOLEAN, 00046 XML_SCHEMAS_TOKEN, 00047 XML_SCHEMAS_LANGUAGE, 00048 XML_SCHEMAS_NMTOKEN, 00049 XML_SCHEMAS_NMTOKENS, 00050 XML_SCHEMAS_NAME, 00051 XML_SCHEMAS_QNAME, 00052 XML_SCHEMAS_NCNAME, 00053 XML_SCHEMAS_ID, 00054 XML_SCHEMAS_IDREF, 00055 XML_SCHEMAS_IDREFS, 00056 XML_SCHEMAS_ENTITY, 00057 XML_SCHEMAS_ENTITIES, 00058 XML_SCHEMAS_NOTATION, 00059 XML_SCHEMAS_ANYURI, 00060 XML_SCHEMAS_INTEGER, 00061 XML_SCHEMAS_NPINTEGER, 00062 XML_SCHEMAS_NINTEGER, 00063 XML_SCHEMAS_NNINTEGER, 00064 XML_SCHEMAS_PINTEGER, 00065 XML_SCHEMAS_INT, 00066 XML_SCHEMAS_UINT, 00067 XML_SCHEMAS_LONG, 00068 XML_SCHEMAS_ULONG, 00069 XML_SCHEMAS_SHORT, 00070 XML_SCHEMAS_USHORT, 00071 XML_SCHEMAS_BYTE, 00072 XML_SCHEMAS_UBYTE, 00073 XML_SCHEMAS_HEXBINARY, 00074 XML_SCHEMAS_BASE64BINARY, 00075 XML_SCHEMAS_ANYTYPE, 00076 XML_SCHEMAS_ANYSIMPLETYPE 00077 } xmlSchemaValType; 00078 00079 /* 00080 * XML Schemas defines multiple type of types. 00081 */ 00082 typedef enum { 00083 XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */ 00084 XML_SCHEMA_TYPE_ANY, 00085 XML_SCHEMA_TYPE_FACET, 00086 XML_SCHEMA_TYPE_SIMPLE, 00087 XML_SCHEMA_TYPE_COMPLEX, 00088 XML_SCHEMA_TYPE_SEQUENCE = 6, 00089 XML_SCHEMA_TYPE_CHOICE, 00090 XML_SCHEMA_TYPE_ALL, 00091 XML_SCHEMA_TYPE_SIMPLE_CONTENT, 00092 XML_SCHEMA_TYPE_COMPLEX_CONTENT, 00093 XML_SCHEMA_TYPE_UR, 00094 XML_SCHEMA_TYPE_RESTRICTION, 00095 XML_SCHEMA_TYPE_EXTENSION, 00096 XML_SCHEMA_TYPE_ELEMENT, 00097 XML_SCHEMA_TYPE_ATTRIBUTE, 00098 XML_SCHEMA_TYPE_ATTRIBUTEGROUP, 00099 XML_SCHEMA_TYPE_GROUP, 00100 XML_SCHEMA_TYPE_NOTATION, 00101 XML_SCHEMA_TYPE_LIST, 00102 XML_SCHEMA_TYPE_UNION, 00103 XML_SCHEMA_TYPE_ANY_ATTRIBUTE, 00104 XML_SCHEMA_TYPE_IDC_UNIQUE, 00105 XML_SCHEMA_TYPE_IDC_KEY, 00106 XML_SCHEMA_TYPE_IDC_KEYREF, 00107 XML_SCHEMA_TYPE_PARTICLE = 25, 00108 XML_SCHEMA_TYPE_ATTRIBUTE_USE, 00109 XML_SCHEMA_FACET_MININCLUSIVE = 1000, 00110 XML_SCHEMA_FACET_MINEXCLUSIVE, 00111 XML_SCHEMA_FACET_MAXINCLUSIVE, 00112 XML_SCHEMA_FACET_MAXEXCLUSIVE, 00113 XML_SCHEMA_FACET_TOTALDIGITS, 00114 XML_SCHEMA_FACET_FRACTIONDIGITS, 00115 XML_SCHEMA_FACET_PATTERN, 00116 XML_SCHEMA_FACET_ENUMERATION, 00117 XML_SCHEMA_FACET_WHITESPACE, 00118 XML_SCHEMA_FACET_LENGTH, 00119 XML_SCHEMA_FACET_MAXLENGTH, 00120 XML_SCHEMA_FACET_MINLENGTH, 00121 XML_SCHEMA_EXTRA_QNAMEREF = 2000, 00122 XML_SCHEMA_EXTRA_ATTR_USE_PROHIB 00123 } xmlSchemaTypeType; 00124 00125 typedef enum { 00126 XML_SCHEMA_CONTENT_UNKNOWN = 0, 00127 XML_SCHEMA_CONTENT_EMPTY = 1, 00128 XML_SCHEMA_CONTENT_ELEMENTS, 00129 XML_SCHEMA_CONTENT_MIXED, 00130 XML_SCHEMA_CONTENT_SIMPLE, 00131 XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */ 00132 XML_SCHEMA_CONTENT_BASIC, 00133 XML_SCHEMA_CONTENT_ANY 00134 } xmlSchemaContentType; 00135 00136 typedef struct _xmlSchemaVal xmlSchemaVal; 00137 typedef xmlSchemaVal *xmlSchemaValPtr; 00138 00139 typedef struct _xmlSchemaType xmlSchemaType; 00140 typedef xmlSchemaType *xmlSchemaTypePtr; 00141 00142 typedef struct _xmlSchemaFacet xmlSchemaFacet; 00143 typedef xmlSchemaFacet *xmlSchemaFacetPtr; 00144 00148 typedef struct _xmlSchemaAnnot xmlSchemaAnnot; 00149 typedef xmlSchemaAnnot *xmlSchemaAnnotPtr; 00150 struct _xmlSchemaAnnot { 00151 struct _xmlSchemaAnnot *next; 00152 xmlNodePtr content; /* the annotation */ 00153 }; 00154 00161 #define XML_SCHEMAS_ANYATTR_SKIP 1 00162 00168 #define XML_SCHEMAS_ANYATTR_LAX 2 00169 00175 #define XML_SCHEMAS_ANYATTR_STRICT 3 00176 00181 #define XML_SCHEMAS_ANY_SKIP 1 00182 00188 #define XML_SCHEMAS_ANY_LAX 2 00189 00195 #define XML_SCHEMAS_ANY_STRICT 3 00196 00202 #define XML_SCHEMAS_ATTR_USE_PROHIBITED 0 00203 00208 #define XML_SCHEMAS_ATTR_USE_REQUIRED 1 00209 00214 #define XML_SCHEMAS_ATTR_USE_OPTIONAL 2 00215 00220 #define XML_SCHEMAS_ATTR_GLOBAL 1 << 0 00221 00226 #define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7 00227 00233 #define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8 00234 00239 #define XML_SCHEMAS_ATTR_FIXED 1 << 9 00240 00246 typedef struct _xmlSchemaAttribute xmlSchemaAttribute; 00247 typedef xmlSchemaAttribute *xmlSchemaAttributePtr; 00248 struct _xmlSchemaAttribute { 00249 xmlSchemaTypeType type; 00250 struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */ 00251 const xmlChar *name; /* the name of the declaration */ 00252 const xmlChar *id; /* Deprecated; not used */ 00253 const xmlChar *ref; /* Deprecated; not used */ 00254 const xmlChar *refNs; /* Deprecated; not used */ 00255 const xmlChar *typeName; /* the local name of the type definition */ 00256 const xmlChar *typeNs; /* the ns URI of the type definition */ 00257 xmlSchemaAnnotPtr annot; 00258 00259 xmlSchemaTypePtr base; /* Deprecated; not used */ 00260 int occurs; /* Deprecated; not used */ 00261 const xmlChar *defValue; /* The initial value of the value constraint */ 00262 xmlSchemaTypePtr subtypes; /* the type definition */ 00263 xmlNodePtr node; 00264 const xmlChar *targetNamespace; 00265 int flags; 00266 const xmlChar *refPrefix; /* Deprecated; not used */ 00267 xmlSchemaValPtr defVal; /* The compiled value constraint */ 00268 xmlSchemaAttributePtr refDecl; /* Deprecated; not used */ 00269 }; 00270 00276 typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink; 00277 typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr; 00278 struct _xmlSchemaAttributeLink { 00279 struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */ 00280 struct _xmlSchemaAttribute *attr;/* the linked attribute */ 00281 }; 00282 00288 #define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0 00289 00294 typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs; 00295 typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr; 00296 struct _xmlSchemaWildcardNs { 00297 struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */ 00298 const xmlChar *value;/* the value */ 00299 }; 00300 00305 typedef struct _xmlSchemaWildcard xmlSchemaWildcard; 00306 typedef xmlSchemaWildcard *xmlSchemaWildcardPtr; 00307 struct _xmlSchemaWildcard { 00308 xmlSchemaTypeType type; /* The kind of type */ 00309 const xmlChar *id; /* Deprecated; not used */ 00310 xmlSchemaAnnotPtr annot; 00311 xmlNodePtr node; 00312 int minOccurs; /* Deprecated; not used */ 00313 int maxOccurs; /* Deprecated; not used */ 00314 int processContents; 00315 int any; /* Indicates if the ns constraint is of ##any */ 00316 xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */ 00317 xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */ 00318 int flags; 00319 }; 00320 00326 #define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0 00327 00332 #define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1 00333 00338 #define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2 00339 00345 #define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3 00346 00351 #define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4 00352 00359 typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup; 00360 typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr; 00361 struct _xmlSchemaAttributeGroup { 00362 xmlSchemaTypeType type; /* The kind of type */ 00363 struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ 00364 const xmlChar *name; 00365 const xmlChar *id; 00366 const xmlChar *ref; /* Deprecated; not used */ 00367 const xmlChar *refNs; /* Deprecated; not used */ 00368 xmlSchemaAnnotPtr annot; 00369 00370 xmlSchemaAttributePtr attributes; /* Deprecated; not used */ 00371 xmlNodePtr node; 00372 int flags; 00373 xmlSchemaWildcardPtr attributeWildcard; 00374 const xmlChar *refPrefix; /* Deprecated; not used */ 00375 xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */ 00376 const xmlChar *targetNamespace; 00377 void *attrUses; 00378 }; 00379 00385 typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink; 00386 typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr; 00387 struct _xmlSchemaTypeLink { 00388 struct _xmlSchemaTypeLink *next;/* the next type link ... */ 00389 xmlSchemaTypePtr type;/* the linked type */ 00390 }; 00391 00396 typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink; 00397 typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr; 00398 struct _xmlSchemaFacetLink { 00399 struct _xmlSchemaFacetLink *next;/* the next facet link ... */ 00400 xmlSchemaFacetPtr facet;/* the linked facet */ 00401 }; 00402 00408 #define XML_SCHEMAS_TYPE_MIXED 1 << 0 00409 00414 #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1 00415 00420 #define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2 00421 00426 #define XML_SCHEMAS_TYPE_GLOBAL 1 << 3 00427 00433 #define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */ 00434 00442 #define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5 00443 00448 #define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6 00449 00454 #define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7 00455 00460 #define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8 00461 00466 #define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9 00467 00472 #define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10 00473 00478 #define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11 00479 00484 #define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12 00485 00490 #define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13 00491 00496 #define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14 00497 00502 #define XML_SCHEMAS_TYPE_MARKED 1 << 16 00503 00509 #define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17 00510 00515 #define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18 00516 00521 #define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19 00522 00527 #define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20 00528 00533 #define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21 00534 00539 #define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22 00540 00545 #define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23 00546 00551 #define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24 00552 00557 #define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25 00558 00563 #define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26 00564 00569 #define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27 00570 00575 #define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28 00576 00582 #define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29 00583 00589 #define XML_SCHEMAS_TYPE_REDEFINED 1 << 30 00590 00595 /* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */ 00596 00602 struct _xmlSchemaType { 00603 xmlSchemaTypeType type; /* The kind of type */ 00604 struct _xmlSchemaType *next; /* the next type if in a sequence ... */ 00605 const xmlChar *name; 00606 const xmlChar *id ; /* Deprecated; not used */ 00607 const xmlChar *ref; /* Deprecated; not used */ 00608 const xmlChar *refNs; /* Deprecated; not used */ 00609 xmlSchemaAnnotPtr annot; 00610 xmlSchemaTypePtr subtypes; 00611 xmlSchemaAttributePtr attributes; /* Deprecated; not used */ 00612 xmlNodePtr node; 00613 int minOccurs; /* Deprecated; not used */ 00614 int maxOccurs; /* Deprecated; not used */ 00615 00616 int flags; 00617 xmlSchemaContentType contentType; 00618 const xmlChar *base; /* Base type's local name */ 00619 const xmlChar *baseNs; /* Base type's target namespace */ 00620 xmlSchemaTypePtr baseType; /* The base type component */ 00621 xmlSchemaFacetPtr facets; /* Local facets */ 00622 struct _xmlSchemaType *redef; /* Deprecated; not used */ 00623 int recurse; /* Obsolete */ 00624 xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */ 00625 xmlSchemaWildcardPtr attributeWildcard; 00626 int builtInType; /* Type of built-in types. */ 00627 xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */ 00628 xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */ 00629 const xmlChar *refPrefix; /* Deprecated; not used */ 00630 xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types. 00631 Could we use @subtypes for this? */ 00632 xmlRegexpPtr contModel; /* Holds the automaton of the content model */ 00633 const xmlChar *targetNamespace; 00634 void *attrUses; 00635 }; 00636 00637 /* 00638 * xmlSchemaElement: 00639 * An element definition. 00640 * 00641 * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of 00642 * structures must be kept similar 00643 */ 00649 #define XML_SCHEMAS_ELEM_NILLABLE 1 << 0 00650 00655 #define XML_SCHEMAS_ELEM_GLOBAL 1 << 1 00656 00661 #define XML_SCHEMAS_ELEM_DEFAULT 1 << 2 00662 00667 #define XML_SCHEMAS_ELEM_FIXED 1 << 3 00668 00673 #define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4 00674 00680 #define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5 00681 00686 #define XML_SCHEMAS_ELEM_REF 1 << 6 00687 00693 #define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7 00694 00700 #define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8 00701 00706 #define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9 00707 00712 #define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10 00713 00718 #define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11 00719 00724 #define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12 00725 00730 #define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13 00731 00736 #define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14 00737 00742 #define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15 00743 00748 #define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16 00749 00754 #define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17 00755 00761 #define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18 00762 00763 typedef struct _xmlSchemaElement xmlSchemaElement; 00764 typedef xmlSchemaElement *xmlSchemaElementPtr; 00765 struct _xmlSchemaElement { 00766 xmlSchemaTypeType type; /* The kind of type */ 00767 struct _xmlSchemaType *next; /* Not used? */ 00768 const xmlChar *name; 00769 const xmlChar *id; /* Deprecated; not used */ 00770 const xmlChar *ref; /* Deprecated; not used */ 00771 const xmlChar *refNs; /* Deprecated; not used */ 00772 xmlSchemaAnnotPtr annot; 00773 xmlSchemaTypePtr subtypes; /* the type definition */ 00774 xmlSchemaAttributePtr attributes; 00775 xmlNodePtr node; 00776 int minOccurs; /* Deprecated; not used */ 00777 int maxOccurs; /* Deprecated; not used */ 00778 00779 int flags; 00780 const xmlChar *targetNamespace; 00781 const xmlChar *namedType; 00782 const xmlChar *namedTypeNs; 00783 const xmlChar *substGroup; 00784 const xmlChar *substGroupNs; 00785 const xmlChar *scope; 00786 const xmlChar *value; /* The original value of the value constraint. */ 00787 struct _xmlSchemaElement *refDecl; /* This will now be used for the 00788 substitution group affiliation */ 00789 xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */ 00790 xmlSchemaContentType contentType; 00791 const xmlChar *refPrefix; /* Deprecated; not used */ 00792 xmlSchemaValPtr defVal; /* The compiled value contraint. */ 00793 void *idcs; /* The identity-constraint defs */ 00794 }; 00795 00796 /* 00797 * XML_SCHEMAS_FACET_UNKNOWN: 00798 * 00799 * unknown facet handling 00800 */ 00801 #define XML_SCHEMAS_FACET_UNKNOWN 0 00802 /* 00803 * XML_SCHEMAS_FACET_PRESERVE: 00804 * 00805 * preserve the type of the facet 00806 */ 00807 #define XML_SCHEMAS_FACET_PRESERVE 1 00808 /* 00809 * XML_SCHEMAS_FACET_REPLACE: 00810 * 00811 * replace the type of the facet 00812 */ 00813 #define XML_SCHEMAS_FACET_REPLACE 2 00814 /* 00815 * XML_SCHEMAS_FACET_COLLAPSE: 00816 * 00817 * collapse the types of the facet 00818 */ 00819 #define XML_SCHEMAS_FACET_COLLAPSE 3 00820 00823 struct _xmlSchemaFacet { 00824 xmlSchemaTypeType type; /* The kind of type */ 00825 struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */ 00826 const xmlChar *value; /* The original value */ 00827 const xmlChar *id; /* Obsolete */ 00828 xmlSchemaAnnotPtr annot; 00829 xmlNodePtr node; 00830 int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */ 00831 int whitespace; 00832 xmlSchemaValPtr val; /* The compiled value */ 00833 xmlRegexpPtr regexp; /* The regex for patterns */ 00834 }; 00835 00839 typedef struct _xmlSchemaNotation xmlSchemaNotation; 00840 typedef xmlSchemaNotation *xmlSchemaNotationPtr; 00841 struct _xmlSchemaNotation { 00842 xmlSchemaTypeType type; /* The kind of type */ 00843 const xmlChar *name; 00844 xmlSchemaAnnotPtr annot; 00845 const xmlChar *identifier; 00846 const xmlChar *targetNamespace; 00847 }; 00848 00849 /* 00850 * TODO: Actually all those flags used for the schema should sit 00851 * on the schema parser context, since they are used only 00852 * during parsing an XML schema document, and not available 00853 * on the component level as per spec. 00854 */ 00861 #define XML_SCHEMAS_QUALIF_ELEM 1 << 0 00862 00868 #define XML_SCHEMAS_QUALIF_ATTR 1 << 1 00869 00874 #define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2 00875 00880 #define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3 00881 00886 #define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4 00887 00892 #define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5 00893 00898 #define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6 00899 00904 #define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7 00905 00910 #define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8 00911 00917 #define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9 00918 00923 struct _xmlSchema { 00924 const xmlChar *name; /* schema name */ 00925 const xmlChar *targetNamespace; /* the target namespace */ 00926 const xmlChar *version; 00927 const xmlChar *id; /* Obsolete */ 00928 xmlDocPtr doc; 00929 xmlSchemaAnnotPtr annot; 00930 int flags; 00931 00932 xmlHashTablePtr typeDecl; 00933 xmlHashTablePtr attrDecl; 00934 xmlHashTablePtr attrgrpDecl; 00935 xmlHashTablePtr elemDecl; 00936 xmlHashTablePtr notaDecl; 00937 00938 xmlHashTablePtr schemasImports; 00939 00940 void *_private; /* unused by the library for users or bindings */ 00941 xmlHashTablePtr groupDecl; 00942 xmlDictPtr dict; 00943 void *includes; /* the includes, this is opaque for now */ 00944 int preserve; /* whether to free the document */ 00945 int counter; /* used to give ononymous components unique names */ 00946 xmlHashTablePtr idcDef; /* All identity-constraint defs. */ 00947 void *volatiles; /* Obsolete */ 00948 }; 00949 00950 XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type); 00951 XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard); 00952 00953 #ifdef __cplusplus 00954 } 00955 #endif 00956 00957 #endif /* LIBXML_SCHEMAS_ENABLED */ 00958 #endif /* __XML_SCHEMA_INTERNALS_H__ */