<nodeBindings> Declaration

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 | int8 | uint8 | int16 | uint16 | int32 |
                   uint32 | int64 | uint64 | size | openType | 
                   QLinkedList | QList | QVector | QVarLengthArray </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.

For integer types, any of the uint* and int* values can be used to specify the corresonding C/C++ type. size can be used to specify OSSIZE, which is typedef'd as size_t.

For floating point types, string specifies the type should be represented as a string.

For date and time types, XBinder generates string 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.

For repeating elements, the Q* options can be used to specify the Qt collection class to use for that element. Besides allowing you to specify a particular Qt collection class to use for an element, this can also force the use of a Qt collection where an array would have otherwise been used.

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).