aboutsummaryrefslogtreecommitdiff
path: root/libxsd
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-07-30 10:19:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-07-30 10:19:30 +0200
commitcc5cdb07e40f30e614bd15d81a5091faf717f4f4 (patch)
treeb717b3216c1730db484e7ebfb6dbe1281621ede9 /libxsd
parent94cba986108a0e0f42295572ca42c356d59328d7 (diff)
Add support for abstract complex types in C++/Tree
Diffstat (limited to 'libxsd')
-rw-r--r--libxsd/xsd/cxx/tree/type-factory-map.txx23
1 files changed, 13 insertions, 10 deletions
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<type> (); // No match.
+ if (f == 0)
+ return XSD_AUTO_PTR<type> (); // No match.
+ }
// Check for xsi:type
//