XML Structure of GDL Snapshots
The XML snapshot is a subset of the GDL data tree that contains those switch and case branches that satisfy the client-supplied configuration. The data tree is the tree that is formed by all of the GDL data entries, some of which might have configuration dependencies. For more information about configuration dependencies, see Creating GDL Configuration-Dependent Data.
In addition to emitting an XML snapshot, the GDL parser can also generate a separate XSD schema that describes the overall structure of the snapshot. This schema also contains the definition of enumeration data types that the GDL templates define. These definitions enable clients to perform schema validation of all primitive data types in the snapshot if desired. If the schema validation is not performed, enumerations will not be checked for validity when the DOM tree is loaded; this check is not necessary because the GDL parser performs its own enumeration validity checks.
To be a valid XML document, the snapshot contains a single root element: <SnapshotRoot>. This element represents the root context of the GDL tree. The <SnapshotRoot> element can contain child <CONSTRUCT> or <GDL_ATTRIBUTE> elements. The <CONSTRUCT> element is used to represent a GDL construct, and the <GDL_ATTRIBUTE> element is used to represent a GDL attribute.
Each <CONSTRUCT> element can contain other <CONSTRUCT> and <GDL_ATTRIBUTE> elements. The <GDL_ATTRIBUTE> element holds only the value that is associated with that attribute and does not contain any <CONSTRUCT> or <GDL_ATTRIBUTE> elements. The <GDL_ATTRIBUTE> value can appear directly as the character data content of the <GDL_ATTRIBUTE> element for non-compound data types or can be represented by one or more child elements if the value is defined as a GDL compound data type.
If the GDL parser cannot associate an attribute with a template that defines the data type of the attribute's value, or if the value that is found does not conform to the declared data type, the corresponding <GDL_ATTRIBUTE> element in the XML snapshot will contain a <CDATA> section that contains the original value as specified in the GDL file.
GDL supports the following types of schema elements for snapshots.
The following topics describe additional data types that are used in the XML snapshot schema:
Enumerations and XSD-Defined Data Types
For more information about namespaces in the XML snapshot schema, see XML Snapshot Namespaces.
For information about character data in XML snapshots, see the following topics:
XML Schema Linebreak Translations