Nillable Elements

Elements within a sequence definition may be declared to be nillable by using the nillable="true" facets. When an element is declared to be nillable, a pointer type is used in the structure. In the following example, elem1 is declared to be nillable:

Generated C code:

   typedef struct TypeName {
      Type1* elem1;
      Type2 elem2;
      ...
      TypeN elemN;
   } TypeName;

Generated C++ code:

   class TypeName : public OSXSDComplexType {
   public:
      Type1* elem1;
      Type2 elem2;
      ...
      TypeN elemN;
   } ;

If a repeating element is declared to be nillable, a pointer type is used within the container structure:

   struct {
      OSUINT32 n;
      ElemType* elem[maxOccurs];
   }

The presence or absence of a pointer to a value would indicate the nil case.