From: PASCALE NOYRET Date: Mon, 30 May 2022 12:30:38 +0000 (+0200) Subject: chgt pour liste de Tuple vide -- a tester X-Git-Tag: merge_uncertainty_odysee_1210~70 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e573e180a0d0f55f4999a0cdcc7e35539f57f849;p=tools%2Feficas.git chgt pour liste de Tuple vide -- a tester --- diff --git a/Efi2Xsd/AccasXsd.py b/Efi2Xsd/AccasXsd.py index cb073c85..55cff097 100755 --- a/Efi2Xsd/AccasXsd.py +++ b/Efi2Xsd/AccasXsd.py @@ -1202,6 +1202,8 @@ class X_SIMP (X_definition): if self.defaut : print ('il faut tester le defaut') if self.max == '**' or self.max == float('inf') : max='unbounded' else : max = self.max + # dans ce cas, le max est porte par la sequence + if self.min==0 : max = 1 self.texteElt = tupleNonHomogeneElt.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,max) leType=self.nomDuTypeDeBase[0] for leTypeComp in self.nomDuTypeDeBase[1:] : @@ -1227,14 +1229,19 @@ class X_SIMP (X_definition): # self.texteSimple += fermeSimpleType # return + #else : self.texteSimple = '' self.texteSimple = '' - complexeTypeTuple = tupleDebutComplexeType.format(self.nomDuTypePyxb) + if self.max == '**' or self.max == float('inf') : max='unbounded' + else : max = self.max + if self.min==0 : complexeTypeTuple = tupleDebutComplexeTypeMinZero.format(self.nomDuTypePyxb,max) + else : complexeTypeTuple = tupleDebutComplexeType.format(self.nomDuTypePyxb) num = 1 for leType in self.nomDuTypeDeBase : self.texteSimple += tupleNonHomogeneSimpleType.format(self.nomDuTypePyxb,str(num),leType) complexeTypeTuple += tupleMilieuComplexeType.format(str(num),self.nomDuTypePyxb,str(num)) num = num + 1 - complexeTypeTuple += tupleFinComplexeType + if self.min == 0 : complexeTypeTuple += tupleFinComplexeTypeMinZero + else : complexeTypeTuple += tupleFinComplexeType self.texteSimple += complexeTypeTuple