зеркало из https://github.com/mozilla/gecko-dev.git
bug 284351 - nsSchemaLoader doesn't handle xsd:complexType correctly. r/sr=peterv
This commit is contained in:
Родитель
b21ae8f2b4
Коммит
5938f059e5
|
@ -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;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче