diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/slice2xsd/Gen.cpp | 17 | ||||
-rw-r--r-- | cpp/src/slice2xsd/ice.xsd | 8 |
2 files changed, 24 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; } diff --git a/cpp/src/slice2xsd/ice.xsd b/cpp/src/slice2xsd/ice.xsd index 382d2a2368c..4e4112cda06 100644 --- a/cpp/src/slice2xsd/ice.xsd +++ b/cpp/src/slice2xsd/ice.xsd @@ -58,4 +58,12 @@ All Rights Reserved <xs:element name="facet" type="tns:_internal.facetType"/> + <xs:complexType name="dataType"> + <xs:sequence> + <xs:any namespace="##any" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + + <xs:element name="data" type="tns:dataType"/> + </xs:schema> |