ContentModel ParseContentModel(char ch) { ContentModel cm = new ContentModel(); if (ch == '(') { this.current.ReadChar(); ParseModel(')', cm); ch = this.current.ReadChar(); if (ch == '?' || ch == '+' || ch == '*') { cm.AddOccurrence(ch); this.current.ReadChar(); } } else if (ch == '%') { Entity e = ParseParameterEntity(dcterm); PushEntity(this.current.ResolvedUri, e); cm = ParseContentModel(this.current.Lastchar); PopEntity(); // bugbug should be at EOF. } else { string dc = ScanName(dcterm); cm.SetDeclaredContent(dc); } return cm; }