From 2236417c2318ceb28b5d457186537bf58d8a7815 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Wed, 7 Apr 2021 09:14:33 +0200 Subject: [PATCH] =?utf8?q?au=20milieu=20du=20gu=C3=A9=20pour=20chgt=20de?= =?utf8?q?=20machine=20PN?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Efi2Xsd/AccasXsd.py | 19 ++++++++++++++----- Efi2Xsd/balisesXSD.py | 4 ++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Efi2Xsd/AccasXsd.py b/Efi2Xsd/AccasXsd.py index d356ae02..371b10a4 100755 --- a/Efi2Xsd/AccasXsd.py +++ b/Efi2Xsd/AccasXsd.py @@ -830,18 +830,27 @@ class X_SIMP (X_definition): 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 diff --git a/Efi2Xsd/balisesXSD.py b/Efi2Xsd/balisesXSD.py index 12387b09..3b3aeaea 100644 --- a/Efi2Xsd/balisesXSD.py +++ b/Efi2Xsd/balisesXSD.py @@ -22,6 +22,8 @@ fermeBalisesMileu = '\t\t\t\t\t\t\n\t\t\t\t\t maxLengthTypeSimple = '\t\t\t\n' minLengthTypeSimple = '\t\t\t\n' eltDsSequence = '\t\t\t\n' +eltWithHelpDsSequence = '\t\t\t\n\t\t\t\t\n\t\t\t\t\t{}\n\t\t\t\t\n\t\t\t\n' +eltWithDefautAndHelpDsSequence = '\t\t\t\n\t\t\t\t\n\t\t\t\t\t{}\n\t\t\t\t\n\t\t\t\n' eltWithDefautDsSequence = '\t\t\t\n' UsingASSDkeyRefDeclaration = '\n\t \n\t\t\n\t\t\n\t\n' # @@ -43,6 +45,8 @@ debutTypeCompoSeq = '\t\t\n' finTypeCompoSeq = '\t\t\n' finTypeCompo = '\t\n' eltCompoDsSequence = '\t\t\t\n' +eltCompoWithHelpDsSequence = '\t\t\t\n' +#name="{}" type="{}:{}" minOccurs="{}" maxOccurs="{}">\n\t\t\t\t\n\t\t\t\t\t{}\n\t\t\t\t\n\t\t\t\n' #eltCompoDsSequenceInExtension = '\t\t\t\n' # ETAPE -- 2.39.2