# Summary of XML Serialization Patterns

Terminal or Rule: | XML Serialization Pattern:
--- | ---
> `IDENTIFIER`
> `<Id>` the identifier`</Id>`
> `STRING`
> `<Str>` the string`</Str>`
> `VARIABLE`
> `<Var>` the variable`</Var>`
> `Group` |  |
> `GROUP`
> `Meta_opt`
> `OPENPAR`
> `RuleSet_opt`
> `CLOSEPAR`
>     <Group>
>       <meta*>
> XML serialization of the 2nd RHS symbol (`Meta_opt`)
>       </meta*>
>       <rule*>
> XML serialization of the 4th RHS symbol (`RuleSet_opt`)
>       </rule*>
>     </Group>
> `Rule` |  |
> `FORALL`
> `Vars_opt`
> `OPENPAR`
> `Clause`
> `CLOSEPAR`
>     <Forall>
>       <declare*>
> XML serialization of the 2nd RHS symbol (`Vars_opt`)
>       </declare*>
>       <formula>
> XML serialization of the 4th RHS symbol (`Clause`)
>       </formula>
>     </Forall>
> `Implies` |  |
> `Atomic`
> `IF`
> `Formula`
>     <Implies>
>       <if>
> XML serialization of the 3rd RHS symbol (`Formula`)
>       </if>
>       <then>
> XML serialization of the 1st RHS symbol (`Atomic`)
>       </then>
>     </Implies>
> `Formula` |  |
> `AND`
> `OPENPAR`
> `Formulas_opt`
> `CLOSEPAR`
>     <And>
>       <formula*>
> XML serialization of the 3rd RHS symbol (`Formulas_opt`)
>       </formula*>
>     </And>
> `Formula` |  |
> `OR`
> `OPENPAR`
> `Formulas_opt`
> `CLOSEPAR`
>     <Or>
>       <formula*>
> XML serialization of the 3rd RHS symbol (`Formulas_opt`)
>       </formula*>
>     </Or>
> `Formula` |  |
> `EXISTS`
> `Vars`
> `OPENPAR`
> `Formula`
> `CLOSEPAR`
>     <Exists>
>       <declare*>
> XML serialization of the 2nd RHS symbol (`Vars`)
>       </declare*>
>       <formula>
> XML serialization of the 4th RHS symbol (`Formula`)
>       </formula>
>     </Exists>
> `Formula` |  |
> `EXTERNAL`
> `OPENPAR`
> `Atom`
> `CLOSEPAR`
>     <External>
>       <content>
> XML serialization of the 3rd RHS symbol (`Atom`)
>       </content>
>     </External>
> `Atom` |  |
> `Const`
> `OPENPAR`
> `UniTermBody`
> `CLOSEPAR`
>     <Atom>
>       <op>
> XML serialization of the 1st RHS symbol (`Const`)
>       </op>
>       <arg*>
> XML serialization of the 3rd RHS symbol (`UniTermBody`)
>       </arg*>
>     </Atom>
> `Equal` |  |
> `Term`
> `EQUAL`
> `Term`
>     <Equal>
>       <left>
> XML serialization of the 1st RHS symbol (`Term`)
>       </left>
>       <right>
> XML serialization of the 3rd RHS symbol (`Term`)
>       </right>
>     </Equal>
> `Member` |  |
> `Term`
> `MEMBER`
> `Term`
>     <Member>
>       <lower>
> XML serialization of the 1st RHS symbol (`Term`)
>       </lower>
>       <upper>
> XML serialization of the 3rd RHS symbol (`Term`)
>       </upper>
>     </Member>
> `Subclass` |  |
> `Term`
> `SUBCLASS`
> `Term`
>     <Subclass>
>       <lower>
> XML serialization of the 1st RHS symbol (`Term`)
>       </lower>
>       <upper>
> XML serialization of the 3rd RHS symbol (`Term`)
>       </upper>
>     </Subclass>
> `Frame` |  |
> `Term`
> `OPENBRA`
> `FrameAttributes_opt`
> `CLOSEBRA`
>     <Frame>
>       <object>
> XML serialization of the 1st RHS symbol (`Term`)
>       </object>
>       <slot*>
> XML serialization of the 3rd RHS symbol (`FrameAttributes_opt`)
>       </slot*>
>     </Frame>
> `Term` |  |
> `EXTERNAL`
> `OPENPAR`
> `Expr`
> `CLOSEPAR`
>     <External>
>       <content>
> XML serialization of the 3rd RHS symbol (`Expr`)
>       </content>
>     </External>
> `Expr` |  |
> `Const`
> `OPENPAR`
> `UniTermBody`
> `CLOSEPAR`
>     <Expr>
>       <op>
> XML serialization of the 1st RHS symbol (`Const`)
>       </op>
>       <arg*>
> XML serialization of the 3rd RHS symbol (`UniTermBody`)
>       </arg*>
>     </Expr>
> `Const` |  |
> `STRING`
> `LEXSPACE`
> `SymSpace`
>     <Const type = A0>
> XML serialization of the 1st XML component of the 1st RHS symbol (`STRING`)
>     </Const>
Legend of attribute values for `Const:` `A0` is the concatenation of the following pieces of text: the literal string: `"&"` the value of the attribute `typespace` of the 3rd RHS symbol (`SymSpace`) the literal string: `";"` the value of the attribute `typename` of the 3rd RHS symbol (`SymSpace`)
> `SymSpace` |  |
> `IDENTIFIER`
> `COLON`
> `IDENTIFIER`
> `<Symspace typespace = `A0` typename = `A1`/>`
Legend of attribute values for `Symspace:` `A0` is the XML node text content of the 1st RHS symbol (`IDENTIFIER`) `A1` is the XML node text content of the 3rd RHS symbol (`IDENTIFIER`)
> `FrameAttribute` |  |
> `Term`
> `ARROW`
> `Term`
>     <Prop>
>       <key>
> XML serialization of the 1st RHS symbol (`Term`)
>       </key>
>       <val>
> XML serialization of the 3rd RHS symbol (`Term`)
>       </val>
>     </Prop>
> `OuterDocument` |  |
> `Group`
>     <payload>
> XML serialization of the 1st RHS symbol (`Group`)
>     </payload>

Copyright © 2008 ILOG, Inc.; All Rights Reserved.