At the end of the header file are the function prototypes corresponding to global elements that are not referenced by any other type definitions. These are global elements that are not used in any other type definitions via the refattribute (for example, <complexType name="SomeType" ref="SomeGlobalElement"/>). A sample global element section is as follows:
/** * Global element functions. These functions encode or * decode complete XML documents. They are generated for global * elements that are either: * * 1) not referenced by any other types, or * 2) explicitly declared to be a PDU using the -pdu command line * option, or * 3) explicitly declared to be a PDU using the <isPDU/> * configuration file element. */ EXTERN int XmlE_personnelRecord (OSCTXT* pctxt, PersonnelRecord* pvalue); EXTERN int XmlD_personnelRecord (OSCTXT* pctxt, PersonnelRecord* pvalue);
In this case, the global element function prototypes correspond to the following global element declaration in the XSD file:
<xsd:element name="personnelRecord" type="PersonnelRecord"/>
This element is not referenced by any other types in the specification. Encode and decode function prototypes are generated for the declaration. See the section on Calling Generated C Encode and Decode Functionsfor a step-by-step description on how to call these functions.