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 удалений

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

@ -1301,31 +1301,41 @@ nsSchemaLoader::ProcessComplexType(nsIWebServiceErrorHandler* aErrorHandler,
PRUint16 derivation = nsISchemaComplexType::DERIVATION_SELF_CONTAINED;
nsCOMPtr<nsISchemaType> baseType;
nsCOMPtr<nsISchemaModelGroup> modelGroup;
while (NS_SUCCEEDED(iterator.GetNextChild(getter_AddRefs(childElement),
getter_AddRefs(tagName))) &&
childElement) {
if (tagName == nsSchemaAtoms::sSimpleContent_atom) {
contentModel = nsISchemaComplexType::CONTENT_MODEL_SIMPLE;
rv = ProcessSimpleContent(aErrorHandler, aSchema,
childElement, typeInst,
rv = ProcessSimpleContent(aErrorHandler, aSchema, childElement, typeInst,
&derivation, getter_AddRefs(baseType));
break;
}
else if (tagName == nsSchemaAtoms::sComplexContent_atom) {
rv = ProcessComplexContent(aErrorHandler, aSchema,
childElement, typeInst,
if (tagName == nsSchemaAtoms::sComplexContent_atom) {
rv = ProcessComplexContent(aErrorHandler, aSchema, childElement, typeInst,
&contentModel, &derivation,
getter_AddRefs(baseType));
break;
break;
}
else if (tagName != nsSchemaAtoms::sAnnotation_atom) {
rv = ProcessComplexTypeBody(aErrorHandler, aSchema,
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,
aElement, typeInst, nsnull,
&contentModel);
break;
}
if (tagName == nsSchemaAtoms::sAnnotation_atom) {
// XXX: skipping for now
}
else {
// Unexpected schema element
nsAutoString elementName;