The customization values in the “<bindings>
” binding 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/C++ type and variables names. It should be a legal C/C++ identifier. |
schemaBindings | This is used to identify individual schemas for schema scope
binding declarations (see Section
“<schemaBindings> Declaration”). It can be
specified multiple times, but once per schema. |
nameXmlTransform | This is used to perform more accurate XML names transformation than prefix allows. See Section “Advanced XML Names Transformation” for further details. |
doubleFormat | This specifies a default (global) format for encoding of values of “double“ type. See Section “XML Numeric Values Format Specification”. |
decimalFormat | This specifies a default (global) format for encoding of values of “decimal“ type See Section “XML Numeric Values Format Specification”. |
floatFormat | This specifies a default (global) format for encoding of values of “float“ type. See Section “XML Numeric Values Format Specification”. |
typemap | This specifies a default (global) mapping of a specific XSD
type to a C type (see Section “<typemap>
Declaration”). It can be specified multiple times. In each
typemap declaration, a list of XSD types separated by space can
be mapped to one C 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 C++). XBinder will alter these words when they are defined in a schema file so their is not a name clash in the output file. By default, all reserved words documented in the C or C++ standard are included in this table, but it is sometimes necessary to add additonal words for language extensions used by specific compilers. For example, Visual C++ contains other keywords besides those defined in the ANSI standards. The reserved word list is specified as a space-separated list of words. |