if not multiple : self.texteSimple += debutSimpleType.format(self.nomDuTypePyxb)
else : self.texteSimple += debutSimpleTypeSsNom
+
+ # gestion des elements constants
+ if self.homo == "constant" :
+ if type(self.defaut) in ( 'tuple', 'list'):
+ self.intoConstant = self.defaut
+ else :
+ self.intoConstant = [self.defaut,]
+ else :
+ self.intoConstant = None
+
+
# On est dans une liste
if self.max > 1 or self.max == '**' or self.max == float('inf') or hasattr(self.type[0], 'ntuple') :
self.texteSimple += debutTypeSimpleListe
self.texteSimple += "\t\t\t\t"+debutRestrictionBase.format(self.nomDuTypeDeBase)
if self.val_min != float('-inf') : self.texteSimple += "\t\t\t\t"+minInclusiveBorne.format(self.val_min)
if self.val_max != float('inf') and self.val_max != '**' : self.texteSimple +="\t\t\t\t"+ maxInclusiveBorne.format(self.val_max)
- if self.into != None:
+ if self.into != None or self.intoConstant != None:
# PN --> traduction des into
into=self.into
+ if self.intoConstant != None : into = self.intoConstant
if self.intoXML != None : into = self.intoXML
for val in into : self.texteSimple += "\t\t\t\t"+enumeration.format(val)
if PourTraduction :
self.texteSimple += debutRestrictionBase.format(self.nomDuTypeDeBase)
if self.val_min != float('-inf') : self.texteSimple += minInclusiveBorne.format(self.val_min)
if self.val_max != float('inf') and self.val_max != '**' : self.texteSimple += maxInclusiveBorne.format(self.val_max)
- if self.into != None:
+ if self.into != None or self.intoConstant != None:
into=self.into
+ if self.intoConstant != None : into = self.intoConstant
if self.intoXML != None : into = self.intoXML
for val in into : self.texteSimple += enumeration.format(val)
if PourTraduction :