throw new SAXParseException("Mixed content must be either #PCDATA or have multiplicity '*'",
pLocator);
} else {
XsTLocalComplexType complexType = pElement.createComplexType();
complexType.setMixed(true);
XsEChoice choice = complexType.createChoice();
choice.setMinOccurs(0);
choice.setMaxOccurs("unbounded");
while (!"".equals(pModel)) {
if (pModel.startsWith("|")) {
pModel = pModel.substring(1).trim();
} else {
throw new SAXParseException("Expected '|' while parsing mixed content", pLocator);
}
int offset = pModel.indexOf('|');
String name;
if (offset == -1) {
name = pModel.trim();
pModel = "";
} else {
name = pModel.substring(0, offset).trim();
pModel = pModel.substring(offset);
}
if (elements.containsKey(name)) {
XsTLocalElement e = choice.createElement();
e.setRef(new XsQName(getTargetNamespace(), getLocalPart(name)));
} else {
throw new SAXParseException("Element " + pElement.getName()
+ " references element " + name
+ ", which is not declared",