diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | xsd-frontend/transformations/anonymous.cxx | 63 |
2 files changed, 31 insertions, 36 deletions
@@ -3,6 +3,10 @@ Version 1.17.0 * Add support for resolving default/fixed values of QName type. Now the qualified value is represented in the <namespace>#<qname> form. + * Anonymous transformation now passes the actual file path instead of + the empty string to the AnonymousNameTranslator::translate() function + for the translation unit. + Version 1.16.0 * New transformation: simplifier. It simplifies the schema graph 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 ( |