mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
bug 284351 - nsSchemaLoader doesn't handle xsd:complexType correctly. r/sr=peterv
This commit is contained in:
parent
b21ae8f2b4
commit
5938f059e5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user