GDL Schema Construct Element

The XSD schema that is produced by the GDL parser defines a construct element as follows:

    <complexType name="GDL_ConstructType">
        <sequence>
            <any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
        <attribute name="Name" type="string" use="required"/>
        <attribute name="Instance" type="string" use="required"/>
        <attribute name="Constrained" type="boolean" use="optional"/>
    </complexType>

The preceding definition is similar to the definition of the <SnapshotRoot> element. And construct elements, like the root element, can hold construct (<CONSTRUCT>) and attribute (<GDL_ATTRIBUTE>) elements. However, <GDL_ConstructType> can have three additional XML attributes: Name, Instance, and Constrained. Name and Instance and required and hold the Name and Instance GDL constructs, respectively. Constrained is optional and holds a Boolean value that indicates if the option is constrained or not. This attribute appears only for <CONSTRUCT> elements that correspond to *Option constructs.

For example, consider the following GDL entry.

*Feature:  PaperSize
{
   *Option:  Letter
   {
   }
}

The preceding entry results in the following XML snapshot.

     <CONSTRUCT Name="*Feature" Instance="PaperSize">
        <CONSTRUCT Name="*Option" Instance="Letter" Constrained="FALSE" >
        </CONSTRUCT>
    </CONSTRUCT>

A particular option is marked constrained depending on the supplied configuration and the set of constraints that are defined in the GDL instance data.