fichierDejaDumpe = True
return texteComplexeVenantDesFils
- def dumpXsd(self, inExtension=False):
+ def dumpXsd(self):
#print ('------------------------------------------------')
if PourTraduction : print (self.nom)
#
if self.aCreer :
self.texteComplexe = debutTypeCompo.format(self.nomDuTypePyxb)
- if inExtension : self.texteComplexe += debutEtension.format(self.nomDuCodeDumpe)
self.texteComplexe += debutTypeCompoSeq
texteComplexeVenantDesFils=self.CreeTexteComplexeVenantDesFils()
self.texteComplexe = texteComplexeVenantDesFils + self.texteComplexe
if not isinstance(self,X_OPER ) :
self.texteComplexe += finTypeCompoSeq
- if inExtension : self.texteComplexe += finExtension
self.texteComplexe += finTypeCompo
else :
self.texteComplexe = ""
# ---------------------------------
class X_OPER (X_definitionComposee):
# ---------------------------------
- def dumpXsd(self,inExtension=False):
+ def dumpXsd(self):
X_definitionComposee.dumpXsd(self, inExtension)
self.texteComplexe += finTypeCompoSeq
self.texteComplexe += operAttributeName
self.texteComplexe += attributeTypeForASSD
self.texteComplexe += attributeTypeUtilisateurName.format(self.sd_prod.__name__)
- if inExtension : self.texteComplexe += finExtension
self.texteComplexe += finTypeCompo
def dumpXsd(self):
cata = CONTEXT.getCurrentCata()
- print ('self.implement -------------------', self.implement)
- print ('self.importedBy -------------------', self.importedBy)
+ #print ('self.implement -------------------', self.implement)
+ #print ('self.importedBy -------------------', self.importedBy)
+ #print ('self.code -------------------', self.code)
self.texteSimple = ""
self.texteComplexe = ""
- self.texteCata = ""
+ self.texteCata = ""
+ self.texteDeclaration = ""
+ self.texteInclusion = ""
+ self.texteElt = ""
- # a verifier
if self.implement == "" :
self.nomDuCodeDumpe=self.labelCode
+ self.texteCata += debutTypeCata.format(self.nomDuCodeDumpe)
else :
self.nomDuCodeDumpe = self.implement
+ self.texteCata += debutTypeCataExtension.format(self.nomDuCodeDumpe)
+ self.texteCata += debutExtension.format(self.code,self.nomDuCodeDumpe)
+ self.texteInclusion += includeCata.format(self.code)
- if self.implement == "" :
- self.texteCata = debutTypeCata.format(self.nomDuCodeDumpe)
- self.inExtension = False
- else :
- self.inExtension = True
- self.texteSimple += TypeEtEltAbstraitCodeSpec.format(self.nomDuCodeDumpe,self.nomDuCodeDumpe, self.nomDuCodeDumpe, self.nomDuCodeDumpe,)
- self.texteCata += includeCata.format(self.nomDuCodeDumpe)
- self.texteCata += EltCodeSpecDsCata.format(self.nomDuCodeDumpe)
-
- self.texteElt = ""
self.nomDuTypePyxb = 'T_'+self.nomDuCodeDumpe
-
self.dumpLesCommandes()
-
- #for commande in self.commandes :
- # commande.nomDuCodeDumpe=self.nomDuCodeDumpe
- # commande.dumpXsd()
- # self.texteSimple += commande.texteSimple
- # self.texteSimple += commande.texteComplexe
- # self.texteCata += commande.texteElt
#self.texteSimple += TypeEtEltAbstraitCodeSpec.format(self.nomDuCodeDumpe)
+
self.texteTypeAbstrait=''
for codeHeritant in self.importedBy:
- self.texteCata += EltCodeSpecDsCata.format(codeHeritant)
- self.texteTypeAbstrait += eltAbstrait.format(codeHeritant,codeHeritant,codeHeritant)
- self.texteCata += finTypeCata
+ self.texteCata += EltCodeSpecDsCata.format(codeHeritant)
+ self.texteTypeAbstrait += eltAbstrait.format(codeHeritant,codeHeritant,codeHeritant,codeHeritant)
+
+ if self.implement != "" : self.texteCata = self.texteCata + finExtension + finTypeCompo
+ else : self.texteCata += finTypeCata
+
self.texteElt = eltCata.format(self.nomDuCodeDumpe,self.nomDuCodeDumpe, self.nomDuTypePyxb)
- self.texteXSD = texteDebut.format(self.nomDuCodeDumpe,self.nomDuCodeDumpe,self.nomDuCodeDumpe,self.nomDuCodeDumpe)
- #self.texteXSD += textDeclaration
+ self.texteXSD = texteDebut.format(self.code,self.code,self.code,self.code)
+ if self.texteInclusion != "" : self.texteXSD += self.texteInclusion
self.texteXSD += self.texteSimple
- self.texteXSD += self.texteTypeAbstrait
+ self.texteXSD += self.texteComplexe
+ if self.texteTypeAbstrait != "" : self.texteXSD += self.texteTypeAbstrait
self.texteXSD += self.texteCata
self.texteXSD += self.texteElt
self.texteXSD += texteFin
+
#if not PourTraduction : print (self.texteXSD)
dico = {}
for k in list(cata.dictTypesXSD.keys()):
#import pprint
#if (not PourTraduction) and (dico != {}) : pprint.pprint(dico)
+ print (self.texteXSD)
return self.texteXSD
self.texteSimple = ''
- self.texteElt = ''
+ self.texteComplexe = ''
for c in allClassToDump :
if not(isinstance(c, Accas.OPER)) and not(isinstance(c, Accas.PROC)) : continue
c.nomDuCodeDumpe=self.nomDuCodeDumpe
- c.dumpXsd(self.inExtension)
- self.texteSimple += c.texteSimple
- self.texteSimple += c.texteComplexe
+ c.dumpXsd()
+ self.texteSimple += c.texteSimple
+ self.texteComplexe += c.texteComplexe
c.texteElt=eltCompoDsSequenceInExtension.format(c.nom,self.nomDuCodeDumpe,c.nomDuTypePyxb)
- self.texteCata += c.texteElt
+ self.texteCata += c.texteElt