bug 284351 - nsSchemaLoader doesn't handle xsd:complexType correctly. r/sr=peterv

This commit is contained in:
doronr%us.ibm.com 2005-03-08 21:34:41 +00:00
Родитель b21ae8f2b4
Коммит 5938f059e5
1 изменённых файлов: 20 добавлений и 10 удалений

Просмотреть файл

@ -1308,24 +1308,34 @@ nsSchemaLoader::ProcessComplexType(nsIWebServiceErrorHandler* aErrorHandler,
if (tagName == nsSchemaAtoms::sSimpleContent_atom) { if (tagName == nsSchemaAtoms::sSimpleContent_atom) {
contentModel = nsISchemaComplexType::CONTENT_MODEL_SIMPLE; contentModel = nsISchemaComplexType::CONTENT_MODEL_SIMPLE;
rv = ProcessSimpleContent(aErrorHandler, aSchema, rv = ProcessSimpleContent(aErrorHandler, aSchema, childElement, typeInst,
childElement, typeInst,
&derivation, getter_AddRefs(baseType)); &derivation, getter_AddRefs(baseType));
break; break;
} }
else if (tagName == nsSchemaAtoms::sComplexContent_atom) {
rv = ProcessComplexContent(aErrorHandler, aSchema, if (tagName == nsSchemaAtoms::sComplexContent_atom) {
childElement, typeInst, rv = ProcessComplexContent(aErrorHandler, aSchema, childElement, typeInst,
&contentModel, &derivation, &contentModel, &derivation,
getter_AddRefs(baseType)); getter_AddRefs(baseType));
break; break;
} }
else if (tagName != nsSchemaAtoms::sAnnotation_atom) {
if (tagName == nsSchemaAtoms::sModelGroup_atom ||
tagName == nsSchemaAtoms::sAll_atom ||
tagName == nsSchemaAtoms::sChoice_atom ||
tagName == nsSchemaAtoms::sSequence_atom ||
tagName == nsSchemaAtoms::sAttribute_atom ||
tagName == nsSchemaAtoms::sAttributeGroup_atom ||
tagName == nsSchemaAtoms::sAnyAttribute_atom) {
rv = ProcessComplexTypeBody(aErrorHandler, aSchema, rv = ProcessComplexTypeBody(aErrorHandler, aSchema,
aElement, typeInst, nsnull, aElement, typeInst, nsnull,
&contentModel); &contentModel);
break; break;
} }
if (tagName == nsSchemaAtoms::sAnnotation_atom) {
// XXX: skipping for now
}
else { else {
// Unexpected schema element // Unexpected schema element
nsAutoString elementName; nsAutoString elementName;