if not multiple :
#print ('je passe la pas multiple')
if self.defaut :
- if self.max > 1 or self.max == '**' or self.max == float('inf') :
+ if self.max > 1 or self.max == '**' or self.max == float('inf') :
# a revoir pour les tuples avec defaut
txtDefaut=""
- for val in self.defaut : txtDefaut+=str(val) +" "
+ for val in self.defaut :
+ #val2=val.replace(' ','\\u0020')
+ txtDefaut+=str(val) + " "
+ txtDefaut+=txtDefaut[0:-1]
self.texteElt = eltWithDefautDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1,txtDefaut)
- else :
+ else :
if str(self.defaut) == 'True' : txtDefaut = 'true'
elif str(self.defaut) == 'False' : txtDefaut = 'false'
else : txtDefaut = str(self.defaut)
- self.texteElt = eltWithDefautDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1,txtDefaut)
- else : self.texteElt = eltDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1)
+ if self.ang != '' : self.texteElt = eltWithDefautAndHelpDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1,txtDefaut,self.ang)
+ elif self.fr != '' : self.texteElt = eltWithDefautAndHelpDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1,txtDefaut,self.fr)
+ else : self.texteElt = eltWithDefautDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1,txtDefaut)
+ else :
+ if self.ang != '' : self.texteElt = eltWithHelpDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1,self.ang)
+ elif self.fr != '' : self.texteElt = eltWithHelpDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1,self.fr)
+ else : self.texteElt = eltDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1,self.ang)
elif first:
+ # PNPN --> Que faire de l'aide ?
self.texteElt = eltDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,1,1)
# self.aCreer est mis a jour ds definitNomDuTypePyxb
maxLengthTypeSimple = '\t\t\t<xs:maxLength value = "{}"/>\n'
minLengthTypeSimple = '\t\t\t<xs:minLength value = "{}"/>\n'
eltDsSequence = '\t\t\t<xs:element name="{}" type="{}:{}" minOccurs="{}" maxOccurs="{}"/>\n'
+eltWithHelpDsSequence = '\t\t\t<xs:element name="{}" type="{}:{}" minOccurs="{}" maxOccurs="{}">\n\t\t\t\t<xs:annotation>\n\t\t\t\t\t<xs:documentation>{}</xs:documentation>\n\t\t\t\t</xs:annotation>\n\t\t\t</xs:element>\n'
+eltWithDefautAndHelpDsSequence = '\t\t\t<xs:element name="{}" type="{}:{}" minOccurs="{}" maxOccurs="{}" default="{}">\n\t\t\t\t<xs:annotation>\n\t\t\t\t\t<xs:documentation>{}</xs:documentation>\n\t\t\t\t</xs:annotation>\n\t\t\t</xs:element>\n'
eltWithDefautDsSequence = '\t\t\t<xs:element name="{}" type="{}:{}" minOccurs="{}" maxOccurs="{}" default="{}"/>\n'
UsingASSDkeyRefDeclaration = '\n\t<xs:keyref name="{}_Name_ref_a{}" refer="{}:Key_Name_For_{}"> \n\t\t<xs:selector xpath="{}"/>\n\t\t<xs:field xpath="."/>\n\t</xs:keyref>\n'
# <xs:key name="Key_Name_For_ElementarySurface">
finTypeCompoSeq = '\t\t</xs:sequence>\n'
finTypeCompo = '\t</xs:complexType>\n'
eltCompoDsSequence = '\t\t\t<xs:element name="{}" type="{}:{}" minOccurs="{}" maxOccurs="{}"/>\n'
+eltCompoWithHelpDsSequence = '\t\t\t<xs:element name="{}" type="{}:{}" minOccurs="{}" maxOccurs="{}"/>\n'
+#name="{}" type="{}:{}" minOccurs="{}" maxOccurs="{}">\n\t\t\t\t<xs:annotation>\n\t\t\t\t\t<xs:documentation>{}</xs:documentation>\n\t\t\t\t</xs:annotation>\n\t\t\t</xs:element>\n'
#eltCompoDsSequenceInExtension = '\t\t\t<xs:element name="{}" type="{}:{}"/>\n'
# ETAPE