summaryrefslogtreecommitdiff
path: root/xsd/processing/inheritance
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-07-27 11:57:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-07-27 11:57:42 +0200
commitaa6aee72b74f6d1f0eece7d2f57ca7d71173214e (patch)
tree23b1f50b385b71fdbc92fdd0be8fb3fd359bbf15 /xsd/processing/inheritance
parentcebf166c64154eab222d39830289890bb070e6c1 (diff)
Don't assume source and destination scopes are the same
This is not the case for chameleon-style inclusions.
Diffstat (limited to 'xsd/processing/inheritance')
-rw-r--r--xsd/processing/inheritance/processor.cxx6
1 files changed, 5 insertions, 1 deletions
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> () ? "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 ()));