Represent temp-tables in XML Schema
- Last Updated: June 7, 2019
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
Temp-tables are represented with an XML Schema element definition, followed by a complex type definition defining the fields. The XML Schema name attribute identifies the name of the temp-table. The following ABL-specific XML Schema attributes further describe the temp-table:
-
undo— Identifies the temp-table asUNDO -
beforeTable— Specifies the name of any before-image table for this temp-table -
bufferName— If the XML Schema is written for a non-default buffer of a temp-table, this attribute specifies the buffer name
Temp-table fields can be represented as elements, attributes,
or text in an XML Document. The XML-NODE-TYPE attribute
on the buffer-field object lets you control how fields are represented
in the XML document and the XML Schema.
XML-NODE-TYPE attribute
interacts with the SERIALIZE-HIDDEN attribute.
For more information, see XML-NODE-TYPE and SERIALIZE-HIDDEN.XML Schema provides the following built-in attributes for minimally describing
a temp-table field in an element definition (when the buffer-field
has an XML-NODE-TYPE of "ELEMENT"):
-
name— Name of the field. -
type— Data type of the field. -
minOccurs— If this is set to 0, then the field is optional and may not appear in the XML document. If theomit-initial-valuesargument on one of the write methods was used and the current value of an instance is the initial value, then the field is omitted. In this case, the initial value is stored in thexsd:defaultattribute. -
maxOccurs— Extent of array fields. -
nillable— Can be null or unknown (always has a value of"true"for temp-table fields). Unknown fields have thexsi:nilattribute set to"true"in the XML instance. -
default— The initial value for the field. If the field has the default initial value for it's data type (for example,0for integer), the attribute will not be present in the XML Schema.
XML Schema provides the following attributes for attribute definitions (when
the buffer-field has a XML-NODE-TYPE of "ATTRIBUTE"):
-
name— Name of the field. -
type— Data type of the field. -
default— The initial value for the field. If the field has the default initial value for it's data type (for example,0for integer), the attribute will not be present in the XML Schema.
XML Schema provides the following attribute for simple content
definitions (when the Buffer-field has a XML-NODE-TYPE of "TEXT"):
-
type— Data type of the field.
Unknown value (?) (xsi:nil="true"),
it must have XML-NODE-TYPE = "ELEMENT". Array fields must have XML-NODE-TYPE
= "ELEMENT" or "HIDDEN". Buffer fields with XML-NODE-TYPE="TEXT" cannot
be part of a nested DATA-RELATION.ABL provides the following XML Schema extensions for describing ABL-specific
attributes of a temp-table field. These attributes, with the exception
of dataType and initial, will
only appear in the XML Schema when the min-xmlschema option
for WRITE-XML( ) method or WRITE-XMLSCHEMA( ) method
is FALSE.
| XML Schema attribute | Description |
|---|---|
|
Case-sensitive for CHARACTER fields. |
|
Column-codepage for CLOB fields. |
|
Column-label for the field. |
|
The ABL data type for fields where the XML Schema type attribute maps
to multiple ABL data types (for example, string,
base64Binary, dateTime). See XML Schema and ABL Data Type Mappings. |
|
Number of decimal places for DECIMAL fields. |
|
Display format for the field. |
|
Name of the field. It is used for fields with XML-NODE-TYPE of "TEXT".
It also identifies the ABL temp-table field name when the corresponding
XML element name is different, as defined by the ABL XML-NODE-NAME or SERIALIZE-NAME attributes. |
|
Help text for the field. |
|
Initial value for the field. Used for fields
with XML-NODE-TYPE of "TEXT",
and for fields with initial value of TODAY, NOW or UNKNOWN. |
|
Label for the field. |
|
Read-only attribute for the field. |
|
Position of the field in the temp-table. This attribute is used only when there's a mix of fields with XML-NODE-TYPE of "ELEMENT" and "ATTRIBUTE" in the temp-table. |
WRITE-XML( ) method
and WRITE-XMLSCHEMA( ) method will omit
the attribute from the element or attribute definition when it writes
the XML Schema.