int scope = GeneralAttrCheck.ELE_CONTEXT_GLOBAL;
Hashtable attrValues = generalCheck(redefineDecl, scope);
// initialize storage areas...
fRedefineAttributeGroupMap = new Hashtable();
NamespacesScope saveNSScope = (NamespacesScope)fNamespacesScope.clone();
// only case in which need to save contents is when fSchemaInfoListRoot is null; otherwise we'll have
// done this already one way or another.
if (fSchemaInfoListRoot == null) {
fSchemaInfoListRoot = new SchemaInfo(fElementDefaultQualified, fAttributeDefaultQualified,
fBlockDefault, fFinalDefault,
fCurrentSchemaURL, fSchemaRootElement,
fNamespacesScope, null, null);
openRedefinedSchema(redefineDecl, fSchemaInfoListRoot);
if(!fRedefineSucceeded)
return;
fCurrentSchemaInfo = fSchemaInfoListRoot.getNext();
fNamespacesScope = (NamespacesScope)saveNSScope.clone();
renameRedefinedComponents(redefineDecl,fSchemaInfoListRoot.getNext().getRoot(), fSchemaInfoListRoot.getNext());
} else {
// may have a chain here; need to be wary!
SchemaInfo curr = fSchemaInfoListRoot;
for(; curr.getNext() != null; curr = curr.getNext());
fCurrentSchemaInfo = curr;
fCurrentSchemaInfo.restore();
openRedefinedSchema(redefineDecl, fCurrentSchemaInfo);
if(!fRedefineSucceeded)
return;
fNamespacesScope = (NamespacesScope)saveNSScope.clone();
renameRedefinedComponents(redefineDecl,fCurrentSchemaInfo.getRoot(), fCurrentSchemaInfo);
}
// Now we have to march through our nicely-renamed schemas from the
// bottom up. When we do these traversals other <redefine>'s may
// perhaps be encountered; we leave recursion to sort this out.
fCurrentSchemaInfo.restore();
traverseIncludedSchema(fSchemaRootElement);
fNamespacesScope = (NamespacesScope)saveNSScope.clone();
// and last but not least: traverse our own <redefine>--the one all
// this labour has been expended upon.
for (Element child = XUtil.getFirstChildElement(redefineDecl); child != null;
child = XUtil.getNextSiblingElement(child)) {
String name = child.getLocalName();