Home | History | Annotate | Download | only in libxmlrpg
      1       * Summary: internal interfaces for XML Schemas
      2       * Description: internal interfaces for the XML Schemas handling
      3       *              and schema validity checking
      4       *              The Schemas development is a Work In Progress.
      5       *              Some of those interfaces are not garanteed to be API or
      6       *                ABI stable !
      7       *
      8       * Copy: See Copyright for the status of this software.
      9       *
     10       * Author: Patrick Monnerat <pm (a] datasphere.ch>, DATASPHERE S.A.
     11 
     12       /if not defined(XML_SCHEMA_INTERNALS_H__)
     13       /define XML_SCHEMA_INTERNALS_H__
     14 
     15       /include "libxmlrpg/xmlversion"
     16 
     17       /if defined(LIBXML_SCHEMAS_ENABLED)
     18 
     19       /include "libxmlrpg/xmlTypesC"
     20       /include "libxmlrpg/xmlregexp"
     21       /include "libxmlrpg/hash"
     22       /include "libxmlrpg/dict"
     23 
     24      d xmlSchemaValType...
     25      d                 s                   based(######typedef######)
     26      d                                     like(xmlCenum)
     27      d  XML_SCHEMAS_UNKNOWN...
     28      d                 c                   0
     29      d  XML_SCHEMAS_STRING...
     30      d                 c                   1
     31      d  XML_SCHEMAS_NORMSTRING...
     32      d                 c                   2
     33      d  XML_SCHEMAS_DECIMAL...
     34      d                 c                   3
     35      d  XML_SCHEMAS_TIME...
     36      d                 c                   4
     37      d  XML_SCHEMAS_GDAY...
     38      d                 c                   5
     39      d  XML_SCHEMAS_GMONTH...
     40      d                 c                   6
     41      d  XML_SCHEMAS_GMONTHDAY...
     42      d                 c                   7
     43      d  XML_SCHEMAS_GYEAR...
     44      d                 c                   8
     45      d  XML_SCHEMAS_GYEARMONTH...
     46      d                 c                   9
     47      d  XML_SCHEMAS_DATE...
     48      d                 c                   10
     49      d  XML_SCHEMAS_DATETIME...
     50      d                 c                   11
     51      d  XML_SCHEMAS_DURATION...
     52      d                 c                   12
     53      d  XML_SCHEMAS_FLOAT...
     54      d                 c                   13
     55      d  XML_SCHEMAS_DOUBLE...
     56      d                 c                   14
     57      d  XML_SCHEMAS_BOOLEAN...
     58      d                 c                   15
     59      d  XML_SCHEMAS_TOKEN...
     60      d                 c                   16
     61      d  XML_SCHEMAS_LANGUAGE...
     62      d                 c                   17
     63      d  XML_SCHEMAS_NMTOKEN...
     64      d                 c                   18
     65      d  XML_SCHEMAS_NMTOKENS...
     66      d                 c                   19
     67      d  XML_SCHEMAS_NAME...
     68      d                 c                   20
     69      d  XML_SCHEMAS_QNAME...
     70      d                 c                   21
     71      d  XML_SCHEMAS_NCNAME...
     72      d                 c                   22
     73      d  XML_SCHEMAS_ID...
     74      d                 c                   23
     75      d  XML_SCHEMAS_IDREF...
     76      d                 c                   24
     77      d  XML_SCHEMAS_IDREFS...
     78      d                 c                   25
     79      d  XML_SCHEMAS_ENTITY...
     80      d                 c                   26
     81      d  XML_SCHEMAS_ENTITIES...
     82      d                 c                   27
     83      d  XML_SCHEMAS_NOTATION...
     84      d                 c                   28
     85      d  XML_SCHEMAS_ANYURI...
     86      d                 c                   29
     87      d  XML_SCHEMAS_INTEGER...
     88      d                 c                   30
     89      d  XML_SCHEMAS_NPINTEGER...
     90      d                 c                   31
     91      d  XML_SCHEMAS_NINTEGER...
     92      d                 c                   32
     93      d  XML_SCHEMAS_NNINTEGER...
     94      d                 c                   33
     95      d  XML_SCHEMAS_PINTEGER...
     96      d                 c                   34
     97      d  XML_SCHEMAS_INT...
     98      d                 c                   35
     99      d  XML_SCHEMAS_UINT...
    100      d                 c                   36
    101      d  XML_SCHEMAS_LONG...
    102      d                 c                   37
    103      d  XML_SCHEMAS_ULONG...
    104      d                 c                   38
    105      d  XML_SCHEMAS_SHORT...
    106      d                 c                   39
    107      d  XML_SCHEMAS_USHORT...
    108      d                 c                   40
    109      d  XML_SCHEMAS_BYTE...
    110      d                 c                   41
    111      d  XML_SCHEMAS_UBYTE...
    112      d                 c                   42
    113      d  XML_SCHEMAS_HEXBINARY...
    114      d                 c                   43
    115      d  XML_SCHEMAS_BASE64BINARY...
    116      d                 c                   44
    117      d  XML_SCHEMAS_ANYTYPE...
    118      d                 c                   45
    119      d  XML_SCHEMAS_ANYSIMPLETYPE...
    120      d                 c                   46
    121 
    122       * XML Schemas defines multiple type of types.
    123 
    124      d xmlSchemaTypeType...
    125      d                 s                   based(######typedef######)
    126      d                                     like(xmlCenum)
    127      d  XML_SCHEMA_TYPE_BASIC...                                                A builtin datatype
    128      d                 c                   1
    129      d  XML_SCHEMA_TYPE_ANY...
    130      d                 c                   2
    131      d  XML_SCHEMA_TYPE_FACET...
    132      d                 c                   3
    133      d  XML_SCHEMA_TYPE_SIMPLE...
    134      d                 c                   4
    135      d  XML_SCHEMA_TYPE_COMPLEX...
    136      d                 c                   5
    137      d  XML_SCHEMA_TYPE_SEQUENCE...
    138      d                 c                   6
    139      d  XML_SCHEMA_TYPE_CHOICE...
    140      d                 c                   7
    141      d  XML_SCHEMA_TYPE_ALL...
    142      d                 c                   8
    143      d  XML_SCHEMA_TYPE_SIMPLE_CONTENT...
    144      d                 c                   9
    145      d  XML_SCHEMA_TYPE_COMPLEX_CONTENT...
    146      d                 c                   10
    147      d  XML_SCHEMA_TYPE_UR...
    148      d                 c                   11
    149      d  XML_SCHEMA_TYPE_RESTRICTION...
    150      d                 c                   12
    151      d  XML_SCHEMA_TYPE_EXTENSION...
    152      d                 c                   13
    153      d  XML_SCHEMA_TYPE_ELEMENT...
    154      d                 c                   14
    155      d  XML_SCHEMA_TYPE_ATTRIBUTE...
    156      d                 c                   15
    157      d  XML_SCHEMA_TYPE_ATTRIBUTEGROUP...
    158      d                 c                   16
    159      d  XML_SCHEMA_TYPE_GROUP...
    160      d                 c                   17
    161      d  XML_SCHEMA_TYPE_NOTATION...
    162      d                 c                   18
    163      d  XML_SCHEMA_TYPE_LIST...
    164      d                 c                   19
    165      d  XML_SCHEMA_TYPE_UNION...
    166      d                 c                   20
    167      d  XML_SCHEMA_TYPE_ANY_ATTRIBUTE...
    168      d                 c                   21
    169      d  XML_SCHEMA_TYPE_IDC_UNIQUE...
    170      d                 c                   22
    171      d  XML_SCHEMA_TYPE_IDC_KEY...
    172      d                 c                   23
    173      d  XML_SCHEMA_TYPE_IDC_KEYREF...
    174      d                 c                   24
    175      d  XML_SCHEMA_TYPE_PARTICLE...
    176      d                 c                   25
    177      d  XML_SCHEMA_TYPE_ATTRIBUTE_USE...
    178      d                 c                   26
    179      d  XML_SCHEMA_FACET_MININCLUSIVE...
    180      d                 c                   1000
    181      d  XML_SCHEMA_FACET_MINEXCLUSIVE...
    182      d                 c                   1001
    183      d  XML_SCHEMA_FACET_MAXINCLUSIVE...
    184      d                 c                   1002
    185      d  XML_SCHEMA_FACET_MAXEXCLUSIVE...
    186      d                 c                   1003
    187      d  XML_SCHEMA_FACET_TOTALDIGITS...
    188      d                 c                   1004
    189      d  XML_SCHEMA_FACET_FRACTIONDIGITS...
    190      d                 c                   1005
    191      d  XML_SCHEMA_FACET_PATTERN...
    192      d                 c                   1006
    193      d  XML_SCHEMA_FACET_ENUMERATION...
    194      d                 c                   1007
    195      d  XML_SCHEMA_FACET_WHITESPACE...
    196      d                 c                   1008
    197      d  XML_SCHEMA_FACET_LENGTH...
    198      d                 c                   1009
    199      d  XML_SCHEMA_FACET_MAXLENGTH...
    200      d                 c                   1010
    201      d  XML_SCHEMA_FACET_MINLENGTH...
    202      d                 c                   1011
    203      d  XML_SCHEMA_EXTRA_QNAMEREF...
    204      d                 c                   2000
    205      d  XML_SCHEMA_EXTRA_ATTR_USE_PROHIB...
    206      d                 c                   2001
    207 
    208      d xmlSchemaContentType...
    209      d                 s                   based(######typedef######)
    210      d                                     like(xmlCenum)
    211      d  XML_SCHEMA_CONTENT_UNKNOWN...
    212      d                 c                   0
    213      d  XML_SCHEMA_CONTENT_EMPTY...
    214      d                 c                   1
    215      d  XML_SCHEMA_CONTENT_ELEMENTS...
    216      d                 c                   2
    217      d  XML_SCHEMA_CONTENT_MIXED...
    218      d                 c                   3
    219      d  XML_SCHEMA_CONTENT_SIMPLE...
    220      d                 c                   4
    221      d  XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS...                                 Obsolete
    222      d                 c                   5
    223      d  XML_SCHEMA_CONTENT_BASIC...
    224      d                 c                   6
    225      d  XML_SCHEMA_CONTENT_ANY...
    226      d                 c                   7
    227 
    228      d xmlSchemaValPtr...
    229      d                 s               *   based(######typedef######)
    230 
    231      d xmlSchemaTypePtr...
    232      d                 s               *   based(######typedef######)
    233 
    234      d xmlSchemaFacetPtr...
    235      d                 s               *   based(######typedef######)
    236 
    237       * Annotation
    238 
    239      d xmlSchemaAnnotPtr...
    240      d                 s               *   based(######typedef######)
    241 
    242      d xmlSchemaAnnot  ds                  based(xmlSchemaAnnotPtr)
    243      d                                     align qualified
    244      d  next                               like(xmlSchemaAnnotPtr)
    245      d  content                            like(xmlNodePtr)                     The annotation
    246 
    247       * XML_SCHEMAS_ANYATTR_SKIP:
    248       *
    249       * Skip unknown attribute from validation
    250       * Obsolete, not used anymore.
    251 
    252      d XML_SCHEMAS_ANYATTR_SKIP...
    253      d                 c                   1
    254 
    255       * XML_SCHEMAS_ANYATTR_LAX:
    256       *
    257       * Ignore validation non definition on attributes
    258       * Obsolete, not used anymore.
    259 
    260      d XML_SCHEMAS_ANYATTR_LAX...
    261      d                 c                   2
    262 
    263       * XML_SCHEMAS_ANYATTR_STRICT:
    264       *
    265       * Apply strict validation rules on attributes
    266       * Obsolete, not used anymore.
    267 
    268      d XML_SCHEMAS_ANYATTR_STRICT...
    269      d                 c                   3
    270 
    271       * XML_SCHEMAS_ANY_SKIP:
    272       *
    273       * Skip unknown attribute from validation
    274 
    275      d XML_SCHEMAS_ANY_SKIP...
    276      d                 c                   1
    277 
    278       * XML_SCHEMAS_ANY_LAX:
    279       *
    280       * Used by wildcards.
    281       * Validate if type found, don't worry if not found
    282 
    283      d XML_SCHEMAS_ANY_LAX...
    284      d                 c                   2
    285 
    286       * XML_SCHEMAS_ANY_STRICT:
    287       *
    288       * Used by wildcards.
    289       * Apply strict validation rules
    290 
    291      d XML_SCHEMAS_ANY_STRICT...
    292      d                 c                   3
    293 
    294       * XML_SCHEMAS_ATTR_USE_PROHIBITED:
    295       *
    296       * Used by wildcards.
    297       * The attribute is prohibited.
    298 
    299      d XML_SCHEMAS_ATTR_USE_PROHIBITED...
    300      d                 c                   0
    301 
    302       * XML_SCHEMAS_ATTR_USE_REQUIRED:
    303       *
    304       * The attribute is required.
    305 
    306      d XML_SCHEMAS_ATTR_USE_REQUIRED...
    307      d                 c                   1
    308 
    309       * XML_SCHEMAS_ATTR_USE_OPTIONAL:
    310       *
    311       * The attribute is optional.
    312 
    313      d XML_SCHEMAS_ATTR_USE_OPTIONAL...
    314      d                 c                   2
    315 
    316       * XML_SCHEMAS_ATTR_GLOBAL:
    317       *
    318       * allow elements in no namespace
    319 
    320      d XML_SCHEMAS_ATTR_GLOBAL...
    321      d                 c                   X'0001'
    322 
    323       * XML_SCHEMAS_ATTR_NSDEFAULT:
    324       *
    325       * allow elements in no namespace
    326 
    327      d XML_SCHEMAS_ATTR_NSDEFAULT...
    328      d                 c                   X'0080'
    329 
    330       * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
    331       *
    332       * this is set when the "type" and "ref" references
    333       * have been resolved.
    334 
    335      d XML_SCHEMAS_ATTR_INTERNAL_RESOLVED...
    336      d                 c                   X'0100'
    337 
    338       * XML_SCHEMAS_ATTR_FIXED:
    339       *
    340       * the attribute has a fixed value
    341 
    342      d XML_SCHEMAS_ATTR_FIXED...
    343      d                 c                   X'0200'
    344 
    345       * xmlSchemaAttribute:
    346       * An attribute definition.
    347 
    348      d xmlSchemaAttributePtr...
    349      d                 s               *   based(######typedef######)
    350 
    351      d xmlSchemaAttribute...
    352      d                 ds                  based(xmlSchemaAttributePtr)
    353      d                                     align qualified
    354      d  type                               like(xmlSchemaTypeType)
    355      d  next                               like(xmlSchemaAttributePtr)          Next attribute
    356      d  name                           *                                        const xmlChar *
    357      d  id                             *                                        const xmlChar *
    358      d  ref                            *                                        const xmlChar *
    359      d  refNs                          *                                        const xmlChar *
    360      d  typeName                       *                                        const xmlChar *
    361      d  typeNs                         *                                        const xmlChar *
    362      d  annot                              like(xmlSchemaAnnotPtr)
    363       *
    364      d  base                               like(xmlSchemaTypePtr)               Deprecated
    365      d  occurs                             like(xmlCint)                        Deprecated
    366      d  defValue                       *                                        const xmlChar *
    367      d  subtypes                           like(xmlSchemaTypePtr)               The type definition
    368      d  node                               like(xmlNodePtr)
    369      d  targetNamespace...                                                      const xmlChar *
    370      d                                 *
    371      d  flags                              like(xmlCint)
    372      d  refPrefix                      *                                        const xmlChar *
    373      d  defVal                             like(xmlSchemaValPtr)                Compiled constraint
    374      d  refDecl                            like(xmlSchemaAttributePtr)          Deprecated
    375 
    376       * xmlSchemaAttributeLink:
    377       * Used to build a list of attribute uses on complexType definitions.
    378       * WARNING: Deprecated; not used.
    379 
    380      d xmlSchemaAttributeLinkPtr...
    381      d                 s               *   based(######typedef######)
    382 
    383      d xmlSchemaAttributeLink...
    384      d                 ds                  based(xmlSchemaAttributeLinkPtr)
    385      d                                     align qualified
    386      d  next                               like(xmlSchemaAttributeLinkPtr)      The next link
    387      d  attr                               like(xmlSchemaAttributePtr)          The linked attribute
    388 
    389       * XML_SCHEMAS_WILDCARD_COMPLETE:
    390       *
    391       * If the wildcard is complete.
    392 
    393      d XML_SCHEMAS_WILDCARD_COMPLETE...
    394      d                 c                   X'0001'
    395 
    396       * xmlSchemaCharValueLink:
    397       * Used to build a list of namespaces on wildcards.
    398 
    399      d xmlSchemaWildcardNsPtr...
    400      d                 s               *   based(######typedef######)
    401 
    402      d xmlSchemaWildcardNs...
    403      d                 ds                  based(xmlSchemaWildcardNsPtr)
    404      d                                     align qualified
    405      d  next                               like(xmlSchemaWildcardNsPtr)         The next link
    406      d  value                          *                                        const xmlChar *
    407 
    408       * xmlSchemaWildcard.
    409       * A wildcard.
    410 
    411      d xmlSchemaWildcardPtr...
    412      d                 s               *   based(######typedef######)
    413 
    414      d xmlSchemaWildcard...
    415      d                 ds                  based(xmlSchemaWildcardPtr)
    416      d                                     align qualified
    417      d  type                               like(xmlSchemaTypeType)              Kind of type
    418      d  id                             *                                        const xmlChar *
    419      d  annot                              like(xmlSchemaAnnotPtr)
    420      d  node                               like(xmlNodePtr)
    421      d  minOccurs                          like(xmlCint)                        Deprecated; not used
    422      d  maxOccurs                          like(xmlCint)                        Deprecated; not used
    423      d  processContents...
    424      d                                     like(xmlCint)
    425      d  any                                like(xmlCint)                        Ns constraint ##any?
    426      d  nsSet                              like(xmlSchemaWildcardNsPtr)         Allowed namspce list
    427      d  negNsSet                           like(xmlSchemaWildcardNsPtr)         Negated namespace
    428      d  flags                              like(xmlCint)                        Deprecated; not used
    429 
    430       * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
    431       *
    432       * The attribute wildcard has been already builded.
    433 
    434      d XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED...
    435      d                 c                   X'0001'
    436 
    437       * XML_SCHEMAS_ATTRGROUP_GLOBAL:
    438       *
    439       * The attribute wildcard has been already builded.
    440 
    441      d XML_SCHEMAS_ATTRGROUP_GLOBAL...
    442      d                 c                   X'0002'
    443 
    444       * XML_SCHEMAS_ATTRGROUP_MARKED:
    445       *
    446       * Marks the attr group as marked; used for circular checks.
    447 
    448      d XML_SCHEMAS_ATTRGROUP_MARKED...
    449      d                 c                   X'0004'
    450 
    451       * XML_SCHEMAS_ATTRGROUP_REDEFINED:
    452       *
    453       * The attr group was redefined.
    454 
    455      d XML_SCHEMAS_ATTRGROUP_REDEFINED...
    456      d                 c                   X'0008'
    457 
    458       * XML_SCHEMAS_ATTRGROUP_HAS_REFS:
    459       *
    460       * Whether this attr. group contains attr. group references.
    461 
    462      d XML_SCHEMAS_ATTRGROUP_HAS_REFS...
    463      d                 c                   X'0010'
    464 
    465       * An attribute group definition.
    466       *
    467       * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
    468       * must be kept similar
    469 
    470      d xmlSchemaAttributeGroupPtr...
    471      d                 s               *   based(######typedef######)
    472 
    473      d xmlSchemaAttributeGroup...
    474      d                 ds                  based(xmlSchemaAttributeGroupPtr)
    475      d                                     align qualified
    476      d  type                               like(xmlSchemaTypeType)              Kind of type
    477      d  next                               like(xmlSchemaAttributePtr)          Next attribute
    478      d  name                           *                                        const xmlChar *
    479      d  id                             *                                        const xmlChar *
    480      d  ref                            *                                        const xmlChar *
    481      d  refNs                          *                                        const xmlChar *
    482      d  annot                              like(xmlSchemaAnnotPtr)
    483       *
    484      d  attributes                         like(xmlSchemaAttributePtr)          Deprecated; not used
    485      d  node                               like(xmlNodePtr)
    486      d  flags                              like(xmlCint)
    487      d  attributeWildcard...
    488      d                                     like(xmlSchemaWildcardPtr)
    489      d  refPrefix                      *                                        const xmlChar *
    490      d  refItem                            like(xmlSchemaAttributeGroupPtr)     Deprecated; not used
    491      d  targetNamespace...
    492      d                                 *                                        const xmlChar *
    493      d  attrUses                       *                                        void *
    494 
    495       * xmlSchemaTypeLink:
    496       * Used to build a list of types (e.g. member types of
    497       * simpleType with variety "union").
    498 
    499      d xmlSchemaTypeLinkPtr...
    500      d                 s               *   based(######typedef######)
    501 
    502      d xmlSchemaTypeLink...
    503      d                 ds                  based(xmlSchemaTypeLinkPtr)
    504      d                                     align qualified
    505      d  next                               like(xmlSchemaTypeLinkPtr)           Next type link
    506      d  type                               like(xmlSchemaTypePtr)               Linked type
    507 
    508       * xmlSchemaFacetLink:
    509       * Used to build a list of facets.
    510 
    511      d xmlSchemaFacetLinkPtr...
    512      d                 s               *   based(######typedef######)
    513 
    514      d xmlSchemaFacetLink...
    515      d                 ds                  based(xmlSchemaFacetLinkPtr)
    516      d                                     align qualified
    517      d  next                               like(xmlSchemaFacetLinkPtr)          Next facet link
    518      d  facet                              like(xmlSchemaFacetPtr)              Linked facet
    519 
    520       * XML_SCHEMAS_TYPE_MIXED:
    521       *
    522       * the element content type is mixed
    523 
    524      d XML_SCHEMAS_TYPE_MIXED...
    525      d                 c                   X'00000001'
    526 
    527       * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
    528       *
    529       * the simple or complex type has a derivation method of "extension".
    530 
    531      d XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION...
    532      d                 c                   X'00000002'
    533 
    534       * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
    535       *
    536       * the simple or complex type has a derivation method of "restriction".
    537 
    538      d XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION...
    539      d                 c                   X'00000004'
    540 
    541       * XML_SCHEMAS_TYPE_GLOBAL:
    542       *
    543       * the type is global
    544 
    545      d XML_SCHEMAS_TYPE_GLOBAL...
    546      d                 c                   X'00000008'
    547 
    548       * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
    549       *
    550       * the complexType owns an attribute wildcard, i.e.
    551       * it can be freed by the complexType
    552 
    553      d XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD...                                  Obsolete.
    554      d                 c                   X'00000010'
    555 
    556       * XML_SCHEMAS_TYPE_VARIETY_ABSENT:
    557       *
    558       * the simpleType has a variety of "absent".
    559       * TODO: Actually not necessary :-/, since if
    560       * none of the variety flags occur then it's
    561       * automatically absent.
    562 
    563      d XML_SCHEMAS_TYPE_VARIETY_ABSENT...
    564      d                 c                   X'00000020'
    565 
    566       * XML_SCHEMAS_TYPE_VARIETY_LIST:
    567       *
    568       * the simpleType has a variety of "list".
    569 
    570      d XML_SCHEMAS_TYPE_VARIETY_LIST...
    571      d                 c                   X'00000040'
    572 
    573       * XML_SCHEMAS_TYPE_VARIETY_UNION:
    574       *
    575       * the simpleType has a variety of "union".
    576 
    577      d XML_SCHEMAS_TYPE_VARIETY_UNION...
    578      d                 c                   X'00000080'
    579 
    580       * XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
    581       *
    582       * the simpleType has a variety of "union".
    583 
    584      d XML_SCHEMAS_TYPE_VARIETY_ATOMIC...
    585      d                 c                   X'00000100'
    586 
    587       * XML_SCHEMAS_TYPE_FINAL_EXTENSION:
    588       *
    589       * the complexType has a final of "extension".
    590 
    591      d XML_SCHEMAS_TYPE_FINAL_EXTENSION...
    592      d                 c                   X'00000200'
    593 
    594       * XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
    595       *
    596       * the simpleType/complexType has a final of "restriction".
    597 
    598      d XML_SCHEMAS_TYPE_FINAL_RESTRICTION...
    599      d                 c                   X'00000400'
    600 
    601       * XML_SCHEMAS_TYPE_FINAL_LIST:
    602       *
    603       * the simpleType has a final of "list".
    604 
    605      d XML_SCHEMAS_TYPE_FINAL_LIST...
    606      d                 c                   X'00000800'
    607 
    608       * XML_SCHEMAS_TYPE_FINAL_UNION:
    609       *
    610       * the simpleType has a final of "union".
    611 
    612      d XML_SCHEMAS_TYPE_FINAL_UNION...
    613      d                 c                   X'00001000'
    614 
    615       * XML_SCHEMAS_TYPE_FINAL_DEFAULT:
    616       *
    617       * the simpleType has a final of "default".
    618 
    619      d XML_SCHEMAS_TYPE_FINAL_DEFAULT...
    620      d                 c                   X'00002000'
    621 
    622       * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
    623       *
    624       * Marks the item as a builtin primitive.
    625 
    626      d XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE...
    627      d                 c                   X'00004000'
    628 
    629       * XML_SCHEMAS_TYPE_MARKED:
    630       *
    631       * Marks the item as marked; used for circular checks.
    632 
    633      d XML_SCHEMAS_TYPE_MARKED...
    634      d                 c                   X'00010000'
    635 
    636       * XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
    637       *
    638       * the complexType did not specify 'block' so use the default of the
    639       * <schema> item.
    640 
    641      d XML_SCHEMAS_TYPE_BLOCK_DEFAULT...
    642      d                 c                   X'00020000'
    643 
    644       * XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
    645       *
    646       * the complexType has a 'block' of "extension".
    647 
    648      d XML_SCHEMAS_TYPE_BLOCK_EXTENSION...
    649      d                 c                   X'00040000'
    650 
    651       * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
    652       *
    653       * the complexType has a 'block' of "restriction".
    654 
    655      d XML_SCHEMAS_TYPE_BLOCK_RESTRICTION...
    656      d                 c                   X'00080000'
    657 
    658       * XML_SCHEMAS_TYPE_ABSTRACT:
    659       *
    660       * the simple/complexType is abstract.
    661 
    662      d XML_SCHEMAS_TYPE_ABSTRACT...
    663      d                 c                   X'00100000'
    664 
    665       * XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
    666       *
    667       * indicates if the facets need a computed value
    668 
    669      d XML_SCHEMAS_TYPE_FACETSNEEDVALUE...
    670      d                 c                   X'00200000'
    671 
    672       * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
    673       *
    674       * indicates that the type was typefixed
    675 
    676      d XML_SCHEMAS_TYPE_INTERNAL_RESOLVED...
    677      d                 c                   X'00400000'
    678 
    679       * XML_SCHEMAS_TYPE_INTERNAL_INVALID:
    680       *
    681       * indicates that the type is invalid
    682 
    683      d XML_SCHEMAS_TYPE_INTERNAL_INVALID...
    684      d                 c                   X'00800000'
    685 
    686       * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
    687       *
    688       * a whitespace-facet value of "preserve"
    689 
    690      d XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE...
    691      d                 c                   X'01000000'
    692 
    693       * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
    694       *
    695       * a whitespace-facet value of "replace"
    696 
    697      d XML_SCHEMAS_TYPE_WHITESPACE_REPLACE...
    698      d                 c                   X'02000000'
    699 
    700       * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
    701       *
    702       * a whitespace-facet value of "collapse"
    703 
    704      d XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE...
    705      d                 c                   X'04000000'
    706 
    707       * XML_SCHEMAS_TYPE_HAS_FACETS:
    708       *
    709       * has facets
    710 
    711      d XML_SCHEMAS_TYPE_HAS_FACETS...
    712      d                 c                   X'08000000'
    713 
    714       * XML_SCHEMAS_TYPE_NORMVALUENEEDED:
    715       *
    716       * indicates if the facets (pattern) need a normalized value
    717 
    718      d XML_SCHEMAS_TYPE_NORMVALUENEEDED...
    719      d                 c                   X'10000000'
    720 
    721       * XML_SCHEMAS_TYPE_FIXUP_1:
    722       *
    723       * First stage of fixup was done.
    724 
    725      d XML_SCHEMAS_TYPE_FIXUP_1...
    726      d                 c                   X'20000000'
    727 
    728       * XML_SCHEMAS_TYPE_REDEFINED:
    729       *
    730       * The type was redefined.
    731 
    732      d XML_SCHEMAS_TYPE_REDEFINED...
    733      d                 c                   X'40000000'
    734 
    735       /if defined(DISABLED)
    736       * XML_SCHEMAS_TYPE_REDEFINING:
    737       *
    738       * The type redefines an other type.
    739 
    740      d XML_SCHEMAS_TYPE_REDEFINING...
    741      d                 c                   X'80000000'
    742       /endif
    743 
    744       * _xmlSchemaType:
    745       *
    746       * Schemas type definition.
    747 
    748      d xmlSchemaType...
    749      d                 ds                  based(xmlSchemaTypePtr)
    750      d                                     align qualified
    751      d  type                               like(xmlSchemaTypeType)              Kind of type
    752      d  next                               like(xmlSchemaTypePtr)               Next type
    753      d  name                           *                                        const xmlChar *
    754      d  id                             *                                        const xmlChar *
    755      d  ref                            *                                        const xmlChar *
    756      d  refNs                          *                                        const xmlChar *
    757      d  annot                              like(xmlSchemaAnnotPtr)
    758      d  subtypes                           like(xmlSchemaTypePtr)
    759      d  attributes                         like(xmlSchemaAttributePtr)          Deprecated; not used
    760      d  node                               like(xmlNodePtr)
    761      d  minOccurs                          like(xmlCint)                        Deprecated; not used
    762      d  maxOccurs                          like(xmlCint)                        Deprecated; not used
    763       *
    764      d  flags                              like(xmlCint)
    765      d  contentType                        like(xmlSchemaContentType)
    766      d  base                           *                                        const xmlChar *
    767      d  baseNs                         *                                        const xmlChar *
    768      d  baseType                           like(xmlSchemaTypePtr)               Base type component
    769      d  facets                             like(xmlSchemaFacetPtr)              Local facets
    770      d  redef                              like(xmlSchemaTypePtr)               Deprecated; not used
    771      d  recurse                            like(xmlCint)                        Obsolete
    772      d  attributeUses                      like(xmlSchemaAttributeLinkPtr)      Deprecated; not used
    773      d  attributeWildcard...
    774      d                                     like(xmlSchemaWildcardPtr)
    775      d  builtInType                        like(xmlCint)                        Built-in types type
    776      d  memberTypes                        like(xmlSchemaTypeLinkPtr)           Union member-types
    777      d  facetSet                           like(xmlSchemaFacetLinkPtr)          All facets
    778      d  refPrefix                      *                                        const xmlChar *
    779      d  contentTypeDef...
    780      d                                     like(xmlSchemaTypePtr)
    781      d  contModel                          like(xmlRegexpPtr)                   Content model autom.
    782      d  targetNamespace...
    783      d                                 *                                        const xmlChar *
    784      d  attrUses                       *                                        void *
    785 
    786       * xmlSchemaElement:
    787       * An element definition.
    788       *
    789       * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
    790       * structures must be kept similar
    791 
    792       * XML_SCHEMAS_ELEM_NILLABLE:
    793       *
    794       * the element is nillable
    795 
    796      d XML_SCHEMAS_ELEM_NILLABLE...
    797      d                 c                   X'00000001'
    798 
    799       * XML_SCHEMAS_ELEM_GLOBAL:
    800       *
    801       * the element is global
    802 
    803      d XML_SCHEMAS_ELEM_GLOBAL...
    804      d                 c                   X'00000002'
    805 
    806       * XML_SCHEMAS_ELEM_DEFAULT:
    807       *
    808       * the element has a default value
    809 
    810      d XML_SCHEMAS_ELEM_DEFAULT...
    811      d                 c                   X'00000004'
    812 
    813       * XML_SCHEMAS_ELEM_FIXED:
    814       *
    815       * the element has a fixed value
    816 
    817      d XML_SCHEMAS_ELEM_FIXED...
    818      d                 c                   X'00000008'
    819 
    820       * XML_SCHEMAS_ELEM_ABSTRACT:
    821       *
    822       * the element is abstract
    823 
    824      d XML_SCHEMAS_ELEM_ABSTRACT...
    825      d                 c                   X'00000010'
    826 
    827       * XML_SCHEMAS_ELEM_TOPLEVEL:
    828       *
    829       * the element is top level
    830       * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
    831 
    832      d XML_SCHEMAS_ELEM_TOPLEVEL...
    833      d                 c                   X'00000020'
    834 
    835       * XML_SCHEMAS_ELEM_REF:
    836       *
    837       * the element is a reference to a type
    838 
    839      d XML_SCHEMAS_ELEM_REF...
    840      d                 c                   X'00000040'
    841 
    842       * XML_SCHEMAS_ELEM_NSDEFAULT:
    843       *
    844       * allow elements in no namespace
    845       * Obsolete, not used anymore.
    846 
    847      d XML_SCHEMAS_ELEM_NSDEFAULT...
    848      d                 c                   X'00000080'
    849 
    850       * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
    851       *
    852       * this is set when "type", "ref", "substitutionGroup"
    853       * references have been resolved.
    854 
    855      d XML_SCHEMAS_ELEM_INTERNAL_RESOLVED...
    856      d                 c                   X'00000100'
    857 
    858       * XML_SCHEMAS_ELEM_CIRCULAR:
    859       *
    860       * a helper flag for the search of circular references.
    861 
    862      d XML_SCHEMAS_ELEM_CIRCULAR...
    863      d                 c                   X'00000200'
    864 
    865       * XML_SCHEMAS_ELEM_BLOCK_ABSENT:
    866       *
    867       * the "block" attribute is absent
    868 
    869      d XML_SCHEMAS_ELEM_BLOCK_ABSENT...
    870      d                 c                   X'00000400'
    871 
    872       * XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
    873       *
    874       * disallowed substitutions are absent
    875 
    876      d XML_SCHEMAS_ELEM_BLOCK_EXTENSION...
    877      d                 c                   X'00000800'
    878 
    879       * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
    880       *
    881       * disallowed substitutions: "restriction"
    882 
    883      d XML_SCHEMAS_ELEM_BLOCK_RESTRICTION...
    884      d                 c                   X'00001000'
    885 
    886       * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
    887       *
    888       * disallowed substitutions: "substituion"
    889 
    890      d XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION...
    891      d                 c                   X'00002000'
    892 
    893       * XML_SCHEMAS_ELEM_FINAL_ABSENT:
    894       *
    895       * substitution group exclusions are absent
    896 
    897      d XML_SCHEMAS_ELEM_FINAL_ABSENT...
    898      d                 c                   X'00004000'
    899 
    900       * XML_SCHEMAS_ELEM_FINAL_EXTENSION:
    901       *
    902       * substitution group exclusions: "extension"
    903 
    904      d XML_SCHEMAS_ELEM_FINAL_EXTENSION...
    905      d                 c                   X'00008000'
    906 
    907       * XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
    908       *
    909       * substitution group exclusions: "restriction"
    910 
    911      d XML_SCHEMAS_ELEM_FINAL_RESTRICTION...
    912      d                 c                   X'00010000'
    913 
    914       * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
    915       *
    916       * the declaration is a substitution group head
    917 
    918      d XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD...
    919      d                 c                   X'00020000'
    920 
    921       * XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
    922       *
    923       * this is set when the elem decl has been checked against
    924       * all constraints
    925 
    926      d XML_SCHEMAS_ELEM_INTERNAL_CHECKED...
    927      d                 c                   X'00040000'
    928 
    929      d xmlSchemaElementPtr...
    930      d                 s               *   based(######typedef######)
    931 
    932      d xmlSchemaElement...
    933      d                 ds                  based(xmlSchemaElementPtr)
    934      d                                     align qualified
    935      d  type                               like(xmlSchemaTypeType)              Kind of type
    936      d  next                               like(xmlSchemaElementPtr)            Not used ?
    937      d  name                           *                                        const xmlChar *
    938      d  id                             *                                        const xmlChar *
    939      d  ref                            *                                        const xmlChar *
    940      d  refNs                          *                                        const xmlChar *
    941      d  annot                              like(xmlSchemaAnnotPtr)
    942      d  subtypes                           like(xmlSchemaTypePtr)
    943      d  attributes                         like(xmlSchemaAttributePtr)          Deprecated; not used
    944      d  node                               like(xmlNodePtr)
    945      d  minOccurs                          like(xmlCint)                        Deprecated; not used
    946      d  maxOccurs                          like(xmlCint)                        Deprecated; not used
    947       *
    948      d  flags                              like(xmlCint)
    949      d  targetNamespace...
    950      d                                 *                                        const xmlChar *
    951      d  namedType                      *                                        const xmlChar *
    952      d  namedTypeNs                    *                                        const xmlChar *
    953      d  substGroup                     *                                        const xmlChar *
    954      d  substGroupNs                   *                                        const xmlChar *
    955      d  scope                          *                                        const xmlChar *
    956      d  value                          *                                        const xmlChar *
    957      d  refDecl                            like(xmlSchemaElementPtr)
    958      d  contModel                          like(xmlRegexpPtr)
    959      d  contentType                        like(xmlSchemaContentType)
    960      d  refPrefix                      *                                        const xmlChar *
    961      d  devVal                             like(xmlSchemaValPtr)                Comp val constraint
    962      d  idcs                           *                                        void *
    963 
    964       * XML_SCHEMAS_FACET_UNKNOWN:
    965       *
    966       * unknown facet handling
    967 
    968      d XML_SCHEMAS_FACET_UNKNOWN...
    969      d                 c                   0
    970 
    971       * XML_SCHEMAS_FACET_PRESERVE:
    972       *
    973       * preserve the type of the facet
    974 
    975      d XML_SCHEMAS_FACET_PRESERVE...
    976      d                 c                   1
    977 
    978       * XML_SCHEMAS_FACET_REPLACE:
    979       *
    980       * replace the type of the facet
    981 
    982      d XML_SCHEMAS_FACET_REPLACE...
    983      d                 c                   2
    984 
    985       * XML_SCHEMAS_FACET_COLLAPSE:
    986       *
    987       * collapse the types of the facet
    988 
    989      d XML_SCHEMAS_FACET_COLLAPSE...
    990      d                 c                   3
    991 
    992       * A facet definition.
    993 
    994      d xmlSchemaFacet...
    995      d                 ds                  based(xmlSchemaFacetPtr)
    996      d                                     align qualified
    997      d  type                               like(xmlSchemaTypeType)              Kind of type
    998      d  next                               like(xmlSchemaFacetPtr)              Next type in seq.
    999      d  value                          *                                        const xmlChar *
   1000      d  id                             *                                        const xmlChar *
   1001      d  annot                              like(xmlSchemaAnnotPtr)
   1002      d  node                               like(xmlNodePtr)
   1003      d  fixed                              like(xmlCint)                        _FACET_PRESERVE, etc
   1004      d  whitespace                         like(xmlCint)
   1005      d  val                                like(xmlSchemaValPtr)                Compiled value
   1006      d  regexp                             like(xmlRegexpPtr)                   Regexp for patterns
   1007 
   1008       * A notation definition.
   1009 
   1010      d xmlSchemaNotationPtr...
   1011      d                 s               *   based(######typedef######)
   1012 
   1013      d xmlSchemaNotation...
   1014      d                 ds                  based(xmlSchemaNotationPtr)
   1015      d                                     align qualified
   1016      d  type                               like(xmlSchemaTypeType)              Kind of type
   1017      d  name                           *                                        const xmlChar *
   1018      d  annot                              like(xmlSchemaAnnotPtr)
   1019      d  identifier                     *                                        const xmlChar *
   1020      d  targetNamespace...
   1021      d                                 *                                        const xmlChar *
   1022 
   1023       * TODO: Actually all those flags used for the schema should sit
   1024       * on the schema parser context, since they are used only
   1025       * during parsing an XML schema document, and not available
   1026       * on the component level as per spec.
   1027 
   1028       * XML_SCHEMAS_QUALIF_ELEM:
   1029       *
   1030       * Reflects elementFormDefault == qualified in
   1031       * an XML schema document.
   1032 
   1033      d XML_SCHEMAS_QUALIF_ELEM...
   1034      d                 c                   X'00000001'
   1035 
   1036       * XML_SCHEMAS_QUALIF_ATTR:
   1037       *
   1038       * Reflects attributeFormDefault == qualified in
   1039       * an XML schema document.
   1040 
   1041      d XML_SCHEMAS_QUALIF_ATTR...
   1042      d                 c                   X'00000002'
   1043 
   1044       * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
   1045       *
   1046       * the schema has "extension" in the set of finalDefault.
   1047 
   1048      d XML_SCHEMAS_FINAL_DEFAULT_EXTENSION...
   1049      d                 c                   X'00000004'
   1050 
   1051       * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
   1052       *
   1053       * the schema has "restriction" in the set of finalDefault.
   1054 
   1055      d XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION...
   1056      d                 c                   X'00000008'
   1057 
   1058       * XML_SCHEMAS_FINAL_DEFAULT_LIST:
   1059       *
   1060       * the cshema has "list" in the set of finalDefault.
   1061 
   1062      d XML_SCHEMAS_FINAL_DEFAULT_LIST...
   1063      d                 c                   X'00000010'
   1064 
   1065       * XML_SCHEMAS_FINAL_DEFAULT_UNION:
   1066       *
   1067       * the schema has "union" in the set of finalDefault.
   1068 
   1069      d XML_SCHEMAS_FINAL_DEFAULT_UNION...
   1070      d                 c                   X'00000020'
   1071 
   1072       * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
   1073       *
   1074       * the schema has "extension" in the set of blockDefault.
   1075 
   1076      d XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION...
   1077      d                 c                   X'00000040'
   1078 
   1079       * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
   1080       *
   1081       * the schema has "restriction" in the set of blockDefault.
   1082 
   1083      d XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION...
   1084      d                 c                   X'00000080'
   1085 
   1086       * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
   1087       *
   1088       * the schema has "substitution" in the set of blockDefault.
   1089 
   1090      d XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION...
   1091      d                 c                   X'00000100'
   1092 
   1093       * XML_SCHEMAS_INCLUDING_CONVERT_NS:
   1094       *
   1095       * the schema is currently including an other schema with
   1096       * no target namespace.
   1097 
   1098      d XML_SCHEMAS_INCLUDING_CONVERT_NS...
   1099      d                 c                   X'00000200'
   1100 
   1101       * _xmlSchema:
   1102       *
   1103       * A Schemas definition
   1104 
   1105      d xmlSchema       ds                  based(xmlSchemaPtr)
   1106      d                                     align qualified
   1107      d  name                           *                                        const xmlChar *
   1108      d  targetNamespace...
   1109      d                                 *                                        const xmlChar *
   1110      d  version                        *                                        const xmlChar *
   1111      d  id                             *                                        const xmlChar *
   1112      d  doc                                like(xmlDocPtr)
   1113      d  annot                              like(xmlSchemaAnnotPtr)
   1114      d  flags                              like(xmlCint)
   1115       *
   1116      d  typeDecl                           like(xmlHashTablePtr)
   1117      d  attrDecl                           like(xmlHashTablePtr)
   1118      d  attrGrpDecl                        like(xmlHashTablePtr)
   1119      d  elemDecl                           like(xmlHashTablePtr)
   1120      d  notaDecl                           like(xmlHashTablePtr)
   1121      d  schemasImports...
   1122      d                                     like(xmlHashTablePtr)
   1123       *
   1124      d  #private                       *                                        void *
   1125      d  groupDecl                          like(xmlHashTablePtr)
   1126      d  dict                               like(xmlDictPtr)
   1127      d  includes                       *                                        void *
   1128      d  preserve                           like(xmlCint)                        Do not free doc ?
   1129      d  counter                            like(xmlCint)                        For name uniqueness
   1130      d  idcDef                             like(xmlHashTablePtr)                All id-constr. defs
   1131      d  volatiles                      *                                        void *
   1132 
   1133      d xmlSchemaFreeType...
   1134      d                 pr                  extproc('xmlSchemaFreeType')
   1135      d type                                value like(xmlSchemaTypePtr)
   1136 
   1137      d xmlSchemaFreeWildcard...
   1138      d                 pr                  extproc('xmlSchemaFreeWildcard')
   1139      d wildcard                            value like(xmlSchemaWildcardPtr)
   1140 
   1141       /endif                                                                    LIBXML_SCHEMAS_ENBLD
   1142       /endif                                                                    SCHEMA_INTERNALS_H__
   1143