def dumpXsd(self, dansFactorisation=False, multiple = False, first=False):
X_definitionComposee.dumpXsd(self,dansFactorisation)
self.texteComplexe += finTypeCompoSeq
- self.texteComplexe += operAttributeName
+ self.texteComplexe += attributeNameName
self.texteComplexe += attributeTypeForASSD
self.texteComplexe += attributeTypeUtilisateurName.format(self.sd_prod.__name__)
self.texteComplexe += finTypeCompoEtape
else : self.texteElt = eltDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,minOccurs,1)
elif first:
self.texteElt = eltDsSequence.format(self.nom,self.code,self.nomDuTypePyxb,1,1)
+
+ typeATraduire=self.type[0]
+ if (isinstance(typeATraduire, Accas.UserASSD) or issubclass(typeATraduire, Accas.UserASSD)) :
+ nomType = self.type[0].__name__
+ self.texteElt = self.texteElt[:-3]+">\n"
+ self.texteElt += "\t"+attributeNameName
+ if len(self.type) == 2 and self.type[1]=='createObject' : self.texteElt += attributeTypeForUserASSDCreation
+ else : self.texteElt += attributeTypeForUserASSDConsommation
+ self.texteElt += "\t"+attributeTypeUtilisateurName.format(nomType)
+ self.texteElt += finTexteElt
+
# self.aCreer est mis a jour ds definitNomDuTypePyxb
# ou si elt est le 1er d une liste identique
# User OR ASSD
-operAttributeName = '\t\t<xs:attribute name="name" type="xs:string"/>\n'
+attributeNameName = '\t\t<xs:attribute name="name" type="xs:string"/>\n'
attributeTypeForASSD = '\t\t<xs:attribute name="accasType" type="xs:string" fixed="ASSD"/>\n'
+attributeTypeForUserASSDCreation = '\t\t\t<xs:attribute name="accasType" type="xs:string" fixed="UserASSDCreation"/>\n'
+attributeTypeForUserASSDConsommation = '\t\t\t<xs:attribute name="accasType" type="xs:string" fixed="UserASSDConsommation"/>\n'
attributeTypeUtilisateurName = '\t\t<xs:attribute name="typeUtilisateur" type="xs:string" fixed="{}"/>\n'
producingASSDkeyRefDeclaration='\t<xs:key name="Key_Name_For_{}">\n\t\t<xs:selector xpath="."/>\n\t\t<xs:field xpath="{}"/>\n\t</xs:key>\n'
+finTexteElt = '\t\t\t</xs:element>\n'
texteFieldUnitaire="./{}:{}/@name |"
# CATA