TOC PREV NEXT INDEX


SEQUENCE


The XSD SEQUENCE type <xsd:sequence> is a complex type consisting of a series of element definitions. These elements can reference other XSD types including other complex types. The elements must appear in the order they are declared in XML instances of this type.
In its simplest form, an XSD sequence consists of a series of element definitions that reference other types. The equivalent C type and C++ class mapping for this is a structure that contains the equivalent type mapping for each of the elements as follows:
XSD type:
<xsd:complexType name="TypeName">
 
   <xsd:sequence>
 
      <xsd:element name="elem1" type="Type1"/>
 
      <xsd:element name="elem2" type="Type2"/>
 
      ...
 
      <xsd:element name="elemN" type="TypeN"/>
 
   </xsd:sequence>
 
</xsd:complexType>
 

 
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;
 
} ;
 

 


Copyright © Objective Systems 2002-2008
This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety and that the copyright and this notice are included.

Objective Systems, Inc.

55 Dowlin Forge Road
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com

TOC PREV NEXT INDEX