summaryrefslogtreecommitdiff
path: root/xsd/cxx/parser/elements.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-02-19 10:31:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-02-19 10:31:47 +0200
commit5ec1c8ff21b5c19e39d5bd12aa3a017a78b56b98 (patch)
treea137f9321fcdeaf838cbf3cb8a286d5f09fc3955 /xsd/cxx/parser/elements.cxx
parente571ff926d9736f48bb37948e29db90e7c6e68d5 (diff)
Add support for translating schema paths in fpt mode
New options: --schema-file-regex, --schema-file-regex-trace.
Diffstat (limited to 'xsd/cxx/parser/elements.cxx')
-rw-r--r--xsd/cxx/parser/elements.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/xsd/cxx/parser/elements.cxx b/xsd/cxx/parser/elements.cxx
index 392bf16..140f041 100644
--- a/xsd/cxx/parser/elements.cxx
+++ b/xsd/cxx/parser/elements.cxx
@@ -212,6 +212,7 @@ namespace CXX
// Support for weak (forward) inclusion used in the file-per-type
// compilation model.
//
+ SemanticGraph::Schema& s (u.schema ());
Boolean weak (u.context ().count ("weak"));
if (weak && (type_ == header || type_ == impl_header))
@@ -220,7 +221,7 @@ namespace CXX
// in the impl files.
//
if (type_ == header)
- schema_.dispatch (u.schema ());
+ schema_.dispatch (s);
return;
}
@@ -228,7 +229,10 @@ namespace CXX
if (type_ == source && !weak)
return;
- SemanticGraph::Path path (u.path ());
+ SemanticGraph::Path path (
+ s.context ().count ("renamed")
+ ? s.context ().get<SemanticGraph::Path> ("renamed")
+ : u.path ());
// Try to use the portable representation of the path. If that
// fails, fall back to the native representation.