def dumpXsd(self):
cata = CONTEXT.getCurrentCata()
- self.nomDuCodeDumpe=self.labelCode
- print ('self.implementing -------------------', self.implementing)
+ print ('self.implement -------------------', self.implement)
+ print ('self.importedBy -------------------', self.importedBy)
self.texteSimple = ""
self.texteComplexe = ""
self.texteCata = ""
+ print ('todo --> quel est le nom a mettre')
+ self.texteCata = debutTypeCata.format('PNPNPNPN')
- if self.implementing == "" :
+ # a verifier
+ if self.implement == "" :
+ self.nomDuCodeDumpe=self.labelCode
+ else :
+ self.nomDuCodeDumpe = self.implement
+
+ if self.implement == "" :
self.texteCata = texteDebut.format(self.nomDuCodeDumpe,self.nomDuCodeDumpe,self.nomDuCodeDumpe)
- self.texteCata += includeCata.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.texteCata = debutTypeCata.format(self.nomDuTypePyxb)
self.dumpLesCommandes()
if self.nom == 'Consigne' : return None
trouve = False
- if debug : print self.perePyxb.objPyxb.orderedContent()
+ if debug : print (self.perePyxb.objPyxb.orderedContent())
if debug : print (map(lambda o:o.value, self.perePyxb.objPyxb.orderedContent()))
elt=pyxb.binding.basis.ElementContent(self.objPyxb, instance=self.perePyxb.objPyxb, tag=pyxb.namespace.ExpandedName(self.cata.modeleMetier.Namespace, self.nom))
finTypeCata = '\t\t</xs:choice>\n\t</xs:complexType>\n'
finSchema = '</xs:schema>'
eltCata = '\t<xs:element name="{}" type="{}:{}"/>\n'
-TypeEtEltAbstraitCodeSpec = '\t<xs:complexType name="T_Code_Specific" abstract="true"/>\n\t<xs:element name="Code_Specific" type="{}:T_Code_Specific"/>\n'
+TypeEtEltAbstraitCodeSpec = '\t<xs:complexType name="T_{}_Specific" abstract="true"/>\n\t<xs:element name="{}_Specific" type="{}:T_{}_Specific"/>\n'
EltCodeSpecDsCata='\t\t\t<xs:element ref="{}:Code_Specific" minOccurs="0" maxOccurs="1"/>\n'
includeCata = '\t<xs:include schemaLocation="cata_{}_genere.xsd" />\n\n'