The customization values in the <nodeBindings>
binding declaration
have node scope. These refer to individual type or element definitions within a
schema. It is also possible to reference local elements within complex types for
customization.
Usage
<nodeBindings name | node=”xs:string”> [<prefix>xs:token</prefix>] [<nameXmlTransform>. . .</nameXmlTransform>] [<array [maxSize=”xs:nonNegativeInteger”/>]] [<isBigInteger/>] [<isDynamic/>] [<ctype> string | numeric </ctype>] [<noPatternTest/>] [<noEncoder/>] [<noDecoder/>] [<numericFormat>. . .</numericFormat>] [<nodeBindings>. . .<nodeBindings>] ... </nodeBindings>
The following attributes are defined for <nodeBindings>
node:
name: | This attribute selects a node for configuration processing based on its QName. |
node: | An XPath 1.0 expression that identifies the schema node within the referenced schema with which to associate binding declarations |
The following customization values are defined in node scope:
nameXmlTransform: | This is used to perform more accurate XML names transformation than prefix allows. See Section “Advanced XML Names Transformation” for further details. |
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. |
array: | This specifies that an array should be used instead of a linked list for repeated elements. The maxSize attribute specifies the maximum size of the array. The default value if not specified is 100. |
isBigInteger: | This specifies that this type will be used to store an integer larger than the C or C++ int type on the given system (normally 32 bits) or even the 64-bit integer type if supported (long long, or __int64). A C UTF-8 string type (OSUTF8CHAR*) will be used to hold a textual representation of the value. This qualifier can be applied to either an integer or complex type. In the latter case, all integer elements within the complex type are flagged as big integers. |
isDynamic: | This indicates that dynamic storage (i.e., pointers) should be used everywhere within the generated types where use could result in lower memory consumption. |
ctype: | This is used to specify a specific C type be used in place of the default definition generated by the XBinder compiler. Currently, this can be used only for date and time types. XBinder currently generates string types for date, time and dateTime types. It is possible to use a built-in C structure for these types instead of strings. In this case ctype should contain the value numeric for the appropriate nodes. |
noPatternTest: | If type uses a pattern facet, this may be used to turn off the pattern match test. |
noEncoder: | This may be used to turn off generating encode functions. |
noDecoder: | This may be used to turn off generating decode functions. |
numericFormat: | This specifies a node-level format for encoding of numeric values. Affect on values of “double”, “decimal” and “float” types. See Section “XML Numeric Values Format Specification”. |
nodeBindings: | Nested nodeBindings declarations to allow more accurate references to enclosed elements such as local elements inside groups (sequence, all, choice, group, etc). |