summaryrefslogtreecommitdiff
path: root/xsd/cxx/tree/tree-source.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/cxx/tree/tree-source.cxx')
-rw-r--r--xsd/cxx/tree/tree-source.cxx15
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));