From aa6aee72b74f6d1f0eece7d2f57ca7d71173214e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 27 Jul 2011 11:57:42 +0200 Subject: Don't assume source and destination scopes are the same This is not the case for chameleon-style inclusions. --- xsd/processing/inheritance/processor.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xsd/processing/inheritance') diff --git a/xsd/processing/inheritance/processor.cxx b/xsd/processing/inheritance/processor.cxx index 0150a4a..91ab627 100644 --- a/xsd/processing/inheritance/processor.cxx +++ b/xsd/processing/inheritance/processor.cxx @@ -318,7 +318,6 @@ namespace Processing continue; } - //wcerr << "type '" << t.name () << "' needs to be moved " << // "before " << (global.is_a () ? "type" : "element") << // " '" << global.name () << "'" << endl; @@ -335,6 +334,11 @@ namespace Processing // Insert a new Names edge before global. // { + // t.scope () and global.scope () can be different in + // case of the chameleon inclusion. + // + Scope& scope (global.scope ()); + // Convert to the insert-after call. // Scope::NamesIterator i (scope.find (global.named ())); -- cgit v1.1