Initialization Functions

Initialization functions are for initializing a variable of a generated data type before use. This includes setting all fields that contain default or fixed values to the value specified in the schema. All other fields are set to zero. The format of an initialization function name is as follows:

   [<ns>]Init_<typeName>

where <typeName>is the name of the XSD type for which the function is being generated and <ns>is an optional namespace setting that can be used to disambiguate names from multiple sources (note: this should not be confused with XML namespaces which are different).

The calling sequence for each generated initialization function is as follows:

    <initFunc> (OSCTXT* pctxt, <typeName>* pvalue)

In this definition, <initFunc> denotes the formatted function name defined above.

The pctxtargument is used to hold a context pointer to keep track of global parameters. The pvalueargument is a pointer to a variable of the type to be initialized.