TOC PREV NEXT INDEX


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.


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