<?xml version="1.0" encoding="UTF-8"?> <grammar root="mixed" xml:lang="en_US"> <rule id="mixed"> <item><ruleref special="GARBAGE"/> <ruleref uri="#kind"/> pizza <ruleref special="GARBAGE"/> <ruleref uri="#topping"/> and <ruleref uri="#drink"/> </item> <tag> { out.kind=rules.kind; out.topping=rules.topping; out.drink=rules.drink; } </tag> </rule> <rule id="kind"> <one-of> <item>salami</item> <item>mozzarela</item> <item>appolo</item> </one-of> </rule> ... </grammar>