diff options
Diffstat (limited to 'xsd')
-rw-r--r-- | xsd/cxx/tree/elements.cxx | 18 | ||||
-rw-r--r-- | xsd/processing/inheritance/processor.cxx | 6 |
2 files changed, 14 insertions, 10 deletions
diff --git a/xsd/cxx/tree/elements.cxx b/xsd/cxx/tree/elements.cxx index 233063a..63f31a7 100644 --- a/xsd/cxx/tree/elements.cxx +++ b/xsd/cxx/tree/elements.cxx @@ -604,11 +604,11 @@ namespace CXX Boolean Context:: polymorphic_p (SemanticGraph::Type& t) { - // ID/IDREF templates cannot be polymorphic. + // IDREF templates cannot be polymorphic. // if (!t.named_p () && - (t.is_a<SemanticGraph::Fundamental::Id> () || - t.is_a<SemanticGraph::Fundamental::IdRef> ())) + (t.is_a<SemanticGraph::Fundamental::IdRef> () || + t.is_a<SemanticGraph::Fundamental::IdRefs> ())) return false; if (polymorphic_all) @@ -625,11 +625,11 @@ namespace CXX Boolean Context:: anonymous_substitutes_p (SemanticGraph::Type& t) { - // ID/IDREF templates cannot match. + // IDREF templates cannot match. // if (!t.named_p () && - (t.is_a<SemanticGraph::Fundamental::Id> () || - t.is_a<SemanticGraph::Fundamental::IdRef> ())) + (t.is_a<SemanticGraph::Fundamental::IdRef> () || + t.is_a<SemanticGraph::Fundamental::IdRefs> ())) return false; // See which elements this type classifies. @@ -962,7 +962,11 @@ namespace CXX if (base_arg_ != 0) { - *base_arg_ = L"_xsd_" + ename (t) + L"_base"; + // IDREF templates don't have a name. + // + *base_arg_ = t.named_p () + ? (L"_xsd_" + ename (t) + L"_base") + : L"_xsd_base"; os << " " << *base_arg_; } diff --git a/xsd/processing/inheritance/processor.cxx b/xsd/processing/inheritance/processor.cxx index 6bf307e..7d103db 100644 --- a/xsd/processing/inheritance/processor.cxx +++ b/xsd/processing/inheritance/processor.cxx @@ -242,11 +242,11 @@ namespace Processing Dep const& dep (*i); Type& t (dep.type); - // Ignore ID/IDREF templates. + // Ignore IDREF templates. // if (!t.named_p () && - (t.is_a<SemanticGraph::Fundamental::Id> () || - t.is_a<SemanticGraph::Fundamental::IdRef> ())) + (t.is_a<SemanticGraph::Fundamental::IdRef> () || + t.is_a<SemanticGraph::Fundamental::IdRefs> ())) continue; // We won't be able to generate compilable code in case of a |