22.4.2.1 array
The array element defines the array variant type. Array contents shall be of uniform type as specified by the
variant type.
Multi-dimensional arrays can be defined by specifying the length of each dimension in the lBound and uBound
attributes through the use of the “,” delimiter. Child elements of multi-dimensional arrays are indexed along
each dimension in the order the dimensions are declared.
In other words, the array shall be filled as follows:
-
The first index shall be incremented to its maximum value [Example: [0,0,0] to [max,0,0] end example]
-
The second index shall be incremented to its maximum value [Example: [0,1,0] to [0,max,0] end
-
example]
-
Subsequent indices shall be filled until all provided values have been added
-
All other values shall have null values within the array (i.e. no default value shall be assumed).
[Example: A 2x3 variant type array of type
“i4” is specified as follows:
<vt:array lBounds="0,0" uBounds="1,2" baseType="i4">
<vt:i4>0</vt:i4>
<vt:i4>1</vt:i4>
<vt:i4>2</vt:i4>
<vt:i4>3</vt:i4>
<vt:i4>4</vt:i4>
</vt:array>
The resulting array: [0,0] = 0, [1,0] = 1, [0,1] = 2, [1,1] = 3, [0,2] = 4. end example]
Attributes
uBounds (Array Upper Bounds Attribute)
The lBounds attribute specifies the lower bound of an array in the format: #, #, # … # where each # represents an integer.
The uBounds attribute specifies the upper bound of an array in the format: #, #, # … # where each # represents an integer.
The possible values for this attribute are defined by the W3C XML Schema int datatype.
lBounds (Array Lower Bounds Attribute)
The possible values for this attribute are defined by the W3C XML Schema int datatype.
baseType (Array Base Type)
The baseType attribute specifies the base variant type of an array.
The allowed values are: variant, i1, i2, i4, int, ui1, ui2, ui4, uint, r4, r8, decimal, bstr, date, bool, cy, and error.
The possible values for this attribute are defined by the ST_ArrayBaseType simple type (22.4.3.1).
[Note: The W3C XML Schema definition of this element’s content model (CT_Array) is located in A.6.4. end note]