From cc5cdb07e40f30e614bd15d81a5091faf717f4f4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 30 Jul 2014 10:19:30 +0200 Subject: Add support for abstract complex types in C++/Tree --- libxsd/xsd/cxx/tree/type-factory-map.txx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'libxsd/xsd/cxx/tree/type-factory-map.txx') diff --git a/libxsd/xsd/cxx/tree/type-factory-map.txx b/libxsd/xsd/cxx/tree/type-factory-map.txx index e1fe0cc..c8d2f18 100644 --- a/libxsd/xsd/cxx/tree/type-factory-map.txx +++ b/libxsd/xsd/cxx/tree/type-factory-map.txx @@ -290,23 +290,26 @@ namespace xsd if (qn.name () == name && (qualified ? qn.namespace_ () == ns : ns[0] == C ('\0'))) { - f = static_type; + f = static_type; // NULL for abstract types. } - else if (global) + else { // See if we have a substitution. // - typename element_map::const_iterator i ( - element_map_.find (qualified_name (name, ns))); - - if (i != element_map_.end ()) + if (global) { - f = find_substitution (i->second, qn); + typename element_map::const_iterator i ( + element_map_.find (qualified_name (name, ns))); + + if (i != element_map_.end ()) + { + f = find_substitution (i->second, qn); + } } - } - if (f == 0) - return XSD_AUTO_PTR (); // No match. + if (f == 0) + return XSD_AUTO_PTR (); // No match. + } // Check for xsi:type // -- cgit v1.1