There is a new version of generateDS.py -- version 2.33.14
This release contains quite a few changes. There are more notes in the README file. And see below. You can find it here: - Python Package Index -- http://pypi.python.org/pypi/generateDS/ - Bitbucket -- For those of you who prefer using Mercurial, there is also a Mercurial repository at Bitbucket: https://bitbucket.org/dkuhlman/generateds - Source Forge -- http://sourceforge.net/projects/generateds/ If you have comments, suggestions, or problems, please send them along. The email list is here: https://lists.sourceforge.net/lists/listinfo/generateds-users Dave From the README: # ========================================================= Version 2.33.14 (10/21/2019) - Fix to generation of ``validate_`` method so that children defined as simple types with ``maxOccurs="unbounded"`` will iterate over those children and call the relevant validate method on each one (i.e. in a ``for`` loop). - Fix to function ``makeFile`` in ``generateDS.py`` so that, for Python 3 only, it opens/creates the file object with ``encoding="utf-8"``. - Function to generate the ``validate_`` method in each complex type class was not being called when command line option "--disable-xml" was used. Moved call to ``generateValidatorMethods`` outside the ``if not XmlDisabled:`` statement. - Modified the ``__eq__`` method that is included in the common superclass (``GeneratedsSuper``) so as to prevent a possible endless recursion through parent. Also modified the ``__eq__`` method so that the ``gds_collector_`` member is excluded from the test for equality. Version 2.33.13 (10/14/2019) - Add IDREF to list of string types so as to prevent it from being handled as a complex child. Note, however that it may be that using IDREF to define a child is not even correct usage in a schema. But, when it is used that way, this fix will prevent generation of code with undefined references (classes). Version 2.33.12 (10/09/2019) - Added ability to generate code so that, during the build phase, each instance of classes that represent ``xs:complexType`` objects will be given an instance variable ``self.gds_elementtree_node_`` that is the ``ElementTree`` node. Users can then add code that, e.g., prints ``self.gds_elementtree_node_.sourceline``. - Added ability to generate code in which the simple type validation methods include the source line number of the containing node in validation warning messages. - Fixed bug that occurs when an element as both a child and an attribute that have the same name. We were creating a new ``XschemaAttribute`` object with a new name, but were not copying the other values in that old object. So, for example, the data type of the attribute was forgotten. Now, we copy the internal values into the new ``XschemaAttribute``. # ========================================================= -- Dave Kuhlman http://www.davekuhlman.org _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users