diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-23 15:39:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-23 15:39:26 +0200 |
commit | b535f3bbfbe1835925515abb454232bc4fca1ce1 (patch) | |
tree | ff0ecdf31bd3a4544edd9135439b0474c2743995 /xsd/cxx/tree/tree-source.cxx | |
parent | 0e5fab0664fb36c6253dfd7bb86d8985d1b349ef (diff) |
Handle abstract elements in more places
Diffstat (limited to 'xsd/cxx/tree/tree-source.cxx')
-rw-r--r-- | xsd/cxx/tree/tree-source.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/xsd/cxx/tree/tree-source.cxx b/xsd/cxx/tree/tree-source.cxx index 0a936bc..fbbd1b4 100644 --- a/xsd/cxx/tree/tree-source.cxx +++ b/xsd/cxx/tree/tree-source.cxx @@ -3532,10 +3532,19 @@ namespace CXX virtual void traverse (Type& e) { - if (element_type_ && doc_root_p (e)) + SemanticGraph::Type& t (e.type ()); + + // Check if this element is abstract. + // + bool abst; { - SemanticGraph::Type& t (e.type ()); + SemanticGraph::Complex* tc; + abst = (tc = dynamic_cast<SemanticGraph::Complex*> (&t)) != 0 && + tc->abstract_p (); + } + if (!abst && element_type_ && doc_root_p (e)) + { bool fund (false); { IsFundamentalType test (fund); @@ -3719,7 +3728,7 @@ namespace CXX } } - if (polymorphic && e.substitutes_p () && + if (!abst && polymorphic && e.substitutes_p () && !options.suppress_parsing ()) { String const& name (ename (e)); |