TOC PREV NEXT INDEX


Static Case (length restricted to 32K or less):


XSD type:
<xsd:simpleType name="TypeName">
 
   <xsd:restriction base="xsd:hexBinary">
 
      <xsd:length value="length"/>
 
   </xsd:restriction>
 
</xsd:simpleType>
 
 
Generated C code:
typedef struct TypeName {
 
   OSUINT32		 numocts;
 
   OSOCTET		data[length];
 
} TypeName;
 

 
Generated C++ code:
class TypeName : public OSBaseType {
 
   OSUINT32		 numocts;
 
   OSOCTET		data[length];
 
   ...
 
} ;
 


Note: in the static case, the maxLength facet will cause the same code to be generated with maxLength used for the size of the array.
In the case of the xsd:any type, it is interesting to note that a binary string is used instead of a text string (the XML encoding for any is simply the fully formed XML text string). The reason for doing it this way is in anticipation of future support for binary encoding rules. The use of a binary field would allow the data to be maintained in its native form whether text or binary encoding was used.

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