TOC PREV NEXT INDEX


Restrictions


Simple content restrictions are used to restrict the simple content and/or attributes of a complex type. As was the case for complexContent restrictions described above, this does not result in the generation of a new type. The generated type is a C struct containing a single element named base or a C++ class that extends the base type. All restriction processing to make sure the content and attributes are within the defined parameters is done in the generated initialization, encode, and decode functions.
The general mapping is as follows:
XSD type:
<xsd:complexType name="TypeName">
 
   <xsd:simpleContent>
 
      <xsd:restriction base="BaseType">
 
         ...
 
      </xsd:restriction>
 
   </xsd:simpleContent>
 
</xsd:complexType>
 

 
Generated C code:
typedef struct TypeName {
BaseType base;
} TypeName;
 
Generated C++ code:
class TypeName : public BaseType {
...
} ;
 


Objective Systems, Inc.

102 Pickering Way, Suite #506
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