aboutsummaryrefslogtreecommitdiff
path: root/xsd-frontend/transformations/anonymous.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-01-12 15:12:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-01-12 15:12:09 +0200
commit7f6c962faf8e67688065263291d16ae191c5b467 (patch)
tree2dcb17e9e36f5a450d24c2ad852069b02e1232a8 /xsd-frontend/transformations/anonymous.cxx
parent448760cbdb8f1ee1f3eb3559c7b05e7a61e37a88 (diff)
Pass the file path even for the schema being compiled
Diffstat (limited to 'xsd-frontend/transformations/anonymous.cxx')
-rw-r--r--xsd-frontend/transformations/anonymous.cxx63
1 files changed, 27 insertions, 36 deletions
diff --git a/xsd-frontend/transformations/anonymous.cxx b/xsd-frontend/transformations/anonymous.cxx
index 19ffb44..4663c1d 100644
--- a/xsd-frontend/transformations/anonymous.cxx
+++ b/xsd-frontend/transformations/anonymous.cxx
@@ -265,19 +265,16 @@ namespace XSDFrontend
SemanticGraph::Path file (path (l));
String file_str;
- if (file != schema_path)
+ // Try to use the portable representation of the path. If that
+ // fails, fall back to the native representation.
+ //
+ try
+ {
+ file_str = file.string ();
+ }
+ catch (SemanticGraph::InvalidPath const&)
{
- // Try to use the portable representation of the path. If that
- // fails, fall back to the native representation.
- //
- try
- {
- file_str = file.string ();
- }
- catch (SemanticGraph::InvalidPath const&)
- {
- file_str = file.native_file_string ();
- }
+ file_str = file.native_file_string ();
}
String name (
@@ -349,19 +346,16 @@ namespace XSDFrontend
SemanticGraph::Path file (path (c));
String file_str;
- if (file != schema_path)
+ // Try to use the portable representation of the path. If that
+ // fails, fall back to the native representation.
+ //
+ try
{
- // Try to use the portable representation of the path. If that
- // fails, fall back to the native representation.
- //
- try
- {
- file_str = file.string ();
- }
- catch (SemanticGraph::InvalidPath const&)
- {
- file_str = file.native_file_string ();
- }
+ file_str = file.string ();
+ }
+ catch (SemanticGraph::InvalidPath const&)
+ {
+ file_str = file.native_file_string ();
}
String name (
@@ -550,19 +544,16 @@ namespace XSDFrontend
SemanticGraph::Path file (path (m));
String file_str;
- if (file != schema_path)
+ // Try to use the portable representation of the path. If that
+ // fails, fall back to the native representation.
+ //
+ try
{
- // Try to use the portable representation of the path. If that
- // fails, fall back to the native representation.
- //
- try
- {
- file_str = file.string ();
- }
- catch (SemanticGraph::InvalidPath const&)
- {
- file_str = file.native_file_string ();
- }
+ file_str = file.string ();
+ }
+ catch (SemanticGraph::InvalidPath const&)
+ {
+ file_str = file.native_file_string ();
}
String name (