addGlobalTypeDecls(srcGrammar, dstGrammar);
addGlobalNotationDecls(srcGrammar, dstGrammar);
}
private void addGlobalElementDecls(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) {
XSNamedMap components = srcGrammar.getComponents(XSConstants.ELEMENT_DECLARATION);
int len = components.getLength();
XSElementDecl srcDecl, dstDecl;
// add global components
for (int i=0; i<len; i++) {
srcDecl = (XSElementDecl) components.item(i);
dstDecl = dstGrammar.getGlobalElementDecl(srcDecl.getName());
if (dstDecl == null) {
dstGrammar.addGlobalElementDecl(srcDecl);
}
else if (dstDecl != srcDecl){