protected XsTTopLevelElement createElement(XsESchema pSchema, String pName,
String pModel,
DTDAttribute[] pAttributes,
Locator pLocator)
throws SAXException {
XsTTopLevelElement result = pSchema.createElement();
result.setName(new XsNCName(getLocalPart(pName)));
final XsGAttrDecls attrDecls;
if ("EMPTY".equals(pModel)) {
attrDecls = result.createComplexType();
} else if ("ANY".equals(pModel)) {
XsQName qName = XSAnyType.getInstance().getName();
qName = new XsQName(qName.getNamespaceURI(), qName.getLocalName(), "xs");
if (pAttributes.length == 0) {
result.setType(qName);
attrDecls = null;
} else {
XsTComplexType complexType = result.createComplexType();
XsEComplexContent complexContent = complexType.createComplexContent();
XsTExtensionType extensionType = complexContent.createExtension();
extensionType.setBase(qName);
attrDecls = extensionType;
}