Each instance of the expression editor in the ATG user interface is configured at runtime by an XCL template, which exposes the grammar as a graph of Java objects implementing the atg.ui.expreditor.Construct interface. In this graph, each Construct represents one of the following fundamental types of grammatical constructs:

As XCL templates, expression grammars are defined by XML data files in the CLASSPATH, which in turn can be compiled into .ser files by the XCL toolkit for greater efficiency and speed. The XCL stylesheet used by expression grammar templates provides XML elements that can be used to define grammatical concepts, including the basic construct types given above.

For example, the following XML file would serve to define the sequence mentioned above. It includes a number of details that will be explained later in this section.

<?xcl-stylesheet resource="atg/ui/expreditor/xcl/grammar.xsl"?>
<sequence id="example-sequence">
  <token><description>People whose</description></token>
    <token value="name"/>
    <token value="email"/>
    <token value="gender"/>
    <token value="eq"><description>is</description></token>
    <token value="neq"><description>is not</description></token>