ALL

The XSD ALL type <xsd:all> is a complex type consisting of a series of element definitions. These elements can reference other XSD types including other complex types. The main difference between this construct and a sequence is the elements can appear in any order (in a sequence, they must appear in the order they were declared).

The C type definition that is generated for an ALL is identical to that for a SEQUENCE above except for the addition of an order array. This array is added to control the order in which the elements are encoded. It appears as a special element within the generated C structure or C++ class as follows:

       typedef struct TypeName {
          elements ...

          /* encoding control */
          OSUINT8 _order[n];
       } TypeName;

The C initialization function for the type or C++ constructor will set this array to sequential order. A user can then alter this order if they would like to encode the elements in a different order. Also, on decode, the order the elements were received in is preserved in this array. That way, if the instance is reencoded, the elements will appear in the same order as in the original instance.