From: <zw...@us...> - 2004-02-27 14:22:01
|
Update of /cvsroot/archetypes/ArchGenXML In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23233 Modified Files: ArchGenXML.py XMIParser.py version.txt Log Message: compatibility to XMI 1.2: look for all elementnodes inside typeinfo (XMIParser.py:391) Index: ArchGenXML.py =================================================================== RCS file: /cvsroot/archetypes/ArchGenXML/ArchGenXML.py,v retrieving revision 1.104 retrieving revision 1.105 diff -u -d -r1.104 -r1.105 --- ArchGenXML.py 27 Feb 2004 12:45:27 -0000 1.104 +++ ArchGenXML.py 27 Feb 2004 14:13:16 -0000 1.105 @@ -431,11 +431,13 @@ def getFieldStringFromAttribute(self, attr): ''' gets the schema field code ''' + #print 'typename:%s:'%attr.getName(),attr.type, if not hasattr(attr,'type') or attr.type=='NoneType': ctype='string' else: ctype=self.coerceType(str(attr.type)) + #print ctype templ=self.typeMap[ctype] defexp='' if attr.hasDefault(): Index: XMIParser.py =================================================================== RCS file: /cvsroot/archetypes/ArchGenXML/XMIParser.py,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- XMIParser.py 27 Feb 2004 12:45:27 -0000 1.39 +++ XMIParser.py 27 Feb 2004 14:13:16 -0000 1.40 @@ -388,7 +388,8 @@ global datatypes typeinfos=att.domElement.getElementsByTagName(XMI.TYPE) if len(typeinfos): - classifiers=typeinfos[0].getElementsByTagName(XMI.CLASS) + classifiers=[cn for cn in typeinfos[0].childNodes if cn.nodeType==cn.ELEMENT_NODE] #getElementsByTagName(XMI.CLASS) + #assert len(classifiers)==1 if len(classifiers): print 'classifier found for 1.2' typeid=str(classifiers[0].getAttribute('xmi.idref')) @@ -399,6 +400,7 @@ datatypenames.append(att.type) #print 'attribute:'+self.getName(),typeid,self.type + XMI=XMI1_0() _marker=[] Index: version.txt =================================================================== RCS file: /cvsroot/archetypes/ArchGenXML/version.txt,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- version.txt 27 Feb 2004 10:10:42 -0000 1.29 +++ version.txt 27 Feb 2004 14:13:16 -0000 1.30 @@ -1 +1 @@ -1.0 beta1.4 +1.0 beta1.5 |