Global Bindings: <bindings>

The customization values in the <bindings> declaration have global scope. These affect all elements within all schemas defined in the compilation project.

Usage

   <bindings version=”1.0”>
          [<prefix>xs:token</prefix>]
          [<schemaBindings>. . .</schemaBindings>]
          [<nameXmlTransform>. . .</nameXmlTransform>]
          [<doubleFormat/>]
          [<decimalFormat/>]
          [<floatFormat/>]
          [<typemap>. . .</typemap>]
          [<reservedWords>. . .</reservedWords>]
          ...
   </bindings>

The following attributes are defined for the <bindings> node:

version See the section “Version Attribute” above for details.

The following customization elements may be defined within the global scope:

prefix This is used to specify a prefix that is prepended to all XML names including type names and global element names to form C#/Java type and variables names. It should be a legal C#/Java identifier.
schemaBindings This is used to identify individual schemas for schema scope binding declarations (see the section called “<schemaBindings> Declaration”). It can be specified multiple times, but only once per schema.
nameXmlTransform This is used to perform more accurate XML names transformation than prefix allows. See the section called “Advanced XML Names Transformation” for further details.
doubleFormat This specifies a default (global) format for encoding values of “double“ type. See the section called “XML Numeric Values Format Specification”.
decimalFormat This specifies a default (global) format for encoding of values of “decimal“ type. See the section called “XML Numeric Values Format Specification”.
floatFormat This specifies a default (global) format for encoding of values of “float“ type. See the section called “XML Numeric Values Format Specification”.
typemap This specifies a default (global) mapping of a specific XSD type to a C#/Java type (see the section called “ <typemap> Declaration). It can be specified multiple times. In each typemap declaration, a space-separated list of XSD types can be mapped to one C#/Java type.
reservedWords

This element is used to add additional reserved words to the reserved words list. These are words that are defined in the output target language (for example, C# or Java). XBinder will alter these words when they are defined in a schema file so there is not a name clash in the output file. By default, all reserved words defined by the target language are included in this table.

The reserved word list is specified as a space-separated list of words.