diff options
Diffstat (limited to 'cpp/src/slice2xsd/Gen.cpp')
-rw-r--r-- | cpp/src/slice2xsd/Gen.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/cpp/src/slice2xsd/Gen.cpp b/cpp/src/slice2xsd/Gen.cpp index 145672c1a1c..79161fa1d8b 100644 --- a/cpp/src/slice2xsd/Gen.cpp +++ b/cpp/src/slice2xsd/Gen.cpp @@ -450,7 +450,8 @@ Slice::Gen::visitDictionary(const DictionaryPtr& p) end(); // xs:appinfo - O << nl << "<xs:element name=\"e\" type=\"tns:" << internalId << scopeId << p->name() << "ContentType\"/>"; + O << nl << "<xs:element name=\"e\" type=\"tns:" << internalId << scopeId << p->name() << "ContentType\"" + << " minOccurs=\"0\" maxOccurs=\"unbounded\"/>"; end(); // xs:sequence end(); // xs:complexType @@ -609,5 +610,19 @@ Slice::Gen::toString(const SyntaxTreeBasePtr& p) s = "tns:" + internalId + scopeId + en->name() + "Type"; } + SequencePtr sq = SequencePtr::dynamicCast(p); + if (sq) + { + string scopeId = containedToId(sq); + s = "tns:" + internalId + scopeId + sq->name() + "Type"; + } + + DictionaryPtr di = DictionaryPtr::dynamicCast(p); + if (di) + { + string scopeId = containedToId(di); + s = "tns:" + internalId + scopeId + di->name() + "Type"; + } + return s; } |