protected virtual void AnalyzeChoice(QilChoice ndChoice, XmlILConstructInfo info) {
PossibleXmlStates xstatesChoice;
int idx;
// Visit default branch; save resulting states
idx = ndChoice.Branches.Count - 1;
ndChoice.Branches[idx] = AnalyzeContent(ndChoice.Branches[idx]);
xstatesChoice = this.xstates;
// Visit all other branches
while (--idx >= 0) {
// Restore starting states and visit the next branch
this.xstates = info.InitialStates;
ndChoice.Branches[idx] = AnalyzeContent(ndChoice.Branches[idx]);
// Choice ending states consist of combination of all branch states
if (xstatesChoice != this.xstates)
xstatesChoice = PossibleXmlStates.Any;
}
this.xstates = xstatesChoice;
}