On Sun, Nov 15, 2015 at 12:12:03PM -0500, Christian Rasmussen wrote: > Hi Dave, > > Thanks for a great tool. > > I encountered an issue in generating code while using generateDS. > > I am using version 2.17a (python version 2.7.10) > > While generating classes for a xsd model I found that the generated > code has a problem in the exportAttributes() > > method. It generated the following code. > > def exportAttributes(self, outfile, level, already_processed, > namespace_='', name_='NamedEntityDescription'): > super(NamedEntityDescription, self).exportAttributes(outfile, > level, already_processed, namespace_, name_='NamedEntityDescription') > if self.entryState != ACTIVE and 'entryState' not in > already_processed: > > Notice the ACTIVE without quotes. Which generates and error when trying > to use export ,as ACTIVE is not defined.
Christian, Thanks for reporting this and for providing an XML schema to test it with. I've been able to reproduce the error that you describe. Give me a couple of days to look into it, and then I'll report back. Dave > > The xsd I was using is > here [1]http://www.omg.org/spec/CTS2/201206/entity/Entity.xsd and the > command line > > I used with the code is > > # Command line: > # /usr/local/bin/generateDS.py -o "entity.py" -s "entity_subs.py" > Entity.xsd > > Thanks, > Christian > > References > > 1. http://www.omg.org/spec/CTS2/201206/entity/Entity.xsd -- Dave Kuhlman http://www.davekuhlman.org ------------------------------------------------------------------------------ Presto, an open source distributed SQL query engine for big data, initially developed by Facebook, enables you to easily query your data on Hadoop in a more interactive manner. Teradata is also now providing full enterprise support for Presto. Download a free open source copy now. http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140 _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users