]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
sauve du 26
authorpascale.noyret <pascale.noyret@edf.fr>
Tue, 26 Nov 2019 16:45:34 +0000 (17:45 +0100)
committerpascale.noyret <pascale.noyret@edf.fr>
Tue, 26 Nov 2019 16:45:34 +0000 (17:45 +0100)
Efi2Xsd/AccasXsd.py
Efi2Xsd/MCAccasXML.py
Efi2Xsd/balisesXSD.py

index 5277c8d592b81edaf26b2d347c979c8c86b01934..0a4161e5f1e21eeec232ef46feeef4c3ecb89177 100755 (executable)
@@ -327,24 +327,33 @@ class X_JDC_CATA :
 
     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()
 
index 84c334dd055d5bf53ef56ba48fd736831600b114..ea2fc7c00887abaffa7814efb4519bb5585b1764 100755 (executable)
@@ -28,7 +28,7 @@ class X_OBJECT:
       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))
index 1fd572f4f8c837a32398018c3c4adb2fa3b09cda..5e8545ca5d3aca62c77c9806a247999e87b1904b 100644 (file)
@@ -48,7 +48,7 @@ debutTypeCata = '\t<xs:complexType name="{}">\n\t\t<xs:choice minOccurs="0" maxO
 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'