diff --git a/README.rst b/README.rst index 011c8ca9e0448fee9923b03178baff086d283c2a..ea22cdcfddf032a17926d6cccc8560e36d7979ea 100644 --- a/README.rst +++ b/README.rst @@ -141,6 +141,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Change history -------------- +Version 2.29.22 (08/03/2018) + +- Fixed exception that occurs when (1) an xs:complexType is defined + with an attribute and a child that have the same name and (2) the + "-a" command line flag is used to specify a schema namespace + prefix other than the default (e.g. generateDS.py -a "xsd:" ...). + Thanks to Daniel Ramirez for tracking down and analyzing this + issue. + Version 2.29.21 (08/02/2018) - Fix to use of simpleType name. Needed to do cleanupName() on the diff --git a/generateDS.html b/generateDS.html index 10d897918830b89add9c8e99e0ea9b4f98f92505..ae3ed4795f72884b4c1574396ebfa15a7bf0ab26 100644 --- a/generateDS.html +++ b/generateDS.html @@ -220,7 +220,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.21</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.22</td> </tr> </tbody> </table> @@ -229,7 +229,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">August 02, 2018</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">August 03, 2018</td> </tr> </tbody> </table> @@ -3392,7 +3392,7 @@ following among others:</p> <div class="footer"> <hr class="footer" /> <a class="reference external" href="generateDS.txt">View document source</a>. -Generated on: 2018-08-02 19:16 UTC. +Generated on: 2018-08-03 21:41 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/generateDS.py b/generateDS.py index 82e17ba2d060375809b20f3d0fd8f1b39522ebef..b74ac86616de293714e0ca27524730c99925f410 100755 --- a/generateDS.py +++ b/generateDS.py @@ -227,7 +227,7 @@ _log = logging.getLogger(__name__) # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.29.21' +VERSION = '2.29.22' ##VERSION## BaseStrTypes = six.string_types @@ -442,6 +442,8 @@ def set_type_constants(nameSpace): IDTypes = (IDREFSType, IDREFType, IDType, ) SchemaType = nameSpace + 'schema' SequenceType = nameSpace + 'sequence' + # The firist item in this tuple is special. + # It's the primary string type and must stay in the first position. StringType = ( nameSpace + 'string', nameSpace + 'duration', @@ -1440,12 +1442,15 @@ class XschemaAttribute: def __init__( self, name, - data_type='xs:string', + data_type=None, use='optional', default=None, fixed=None): self.name = name - self.data_type = data_type + if data_type is None: + self.data_type = StringType[0] + else: + self.data_type = data_type self.use = use self.default = default # treat `fixed` the same as `default`. diff --git a/generateDS.txt b/generateDS.txt index 31b509b50de8ccc8608771ed520867a8478c7c4e..7df9aaf1e662c54e94e57e11d9800eab187fb913 100644 --- a/generateDS.txt +++ b/generateDS.txt @@ -12,7 +12,7 @@ generateDS -- Generate Data Structures from XML Schema .. version -:revision: 2.29.21 +:revision: 2.29.22 .. version diff --git a/generateds_gui_notes.html b/generateds_gui_notes.html index ca7a70ac5a3b136cbcc3b3c9e948cc6367e977b5..1ef344490b508caa495c23c857deb5e416a8b173 100644 --- a/generateds_gui_notes.html +++ b/generateds_gui_notes.html @@ -220,7 +220,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.21</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.22</td> </tr> </tbody> </table> @@ -229,7 +229,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">August 02, 2018</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">August 03, 2018</td> </tr> </tbody> </table> @@ -401,7 +401,7 @@ $ mv generateds_gui.mo locale/ru/LC_MESSAGES/ <div class="footer"> <hr class="footer" /> <a class="reference external" href="generateds_gui_notes.txt">View document source</a>. -Generated on: 2018-08-02 19:16 UTC. +Generated on: 2018-08-03 21:41 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/generateds_gui_notes.txt b/generateds_gui_notes.txt index bc75f7810e3219ccacc89cc4910e7fcfd0b42e07..5cf503ea9b8ecd5f2ec28fcfc82f5d4789004f6c 100644 --- a/generateds_gui_notes.txt +++ b/generateds_gui_notes.txt @@ -12,7 +12,7 @@ GenerateDS GUI Notes .. version -:revision: 2.29.21 +:revision: 2.29.22 .. version diff --git a/gui/generateds_gui.py b/gui/generateds_gui.py index 540354f026feba03a1553e03796922616a959404..2abb8e5ce40a93b5077d4d7a7fb1269be595b3cb 100644 --- a/gui/generateds_gui.py +++ b/gui/generateds_gui.py @@ -41,7 +41,7 @@ from libgenerateDS.gui import generateds_gui_session # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.29.21' +VERSION = '2.29.22' ##VERSION## diff --git a/librarytemplate_howto.html b/librarytemplate_howto.html index ce9fca7fe43b6b47f51c144597594e8f65d1e36d..6f7d1f0858b03aa5405de80a3d34a906f1c32734 100644 --- a/librarytemplate_howto.html +++ b/librarytemplate_howto.html @@ -217,7 +217,7 @@ dkuhlman (at) davekuhlman (dot) org <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.21</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.22</td> </tr> </tbody> </table> @@ -226,7 +226,7 @@ dkuhlman (at) davekuhlman (dot) org <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">August 02, 2018</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">August 03, 2018</td> </tr> </tbody> </table> @@ -380,7 +380,7 @@ this command for your needs. For example, you may need to use <div class="footer"> <hr class="footer" /> <a class="reference external" href="librarytemplate_howto.txt">View document source</a>. -Generated on: 2018-08-02 19:16 UTC. +Generated on: 2018-08-03 21:41 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/librarytemplate_howto.txt b/librarytemplate_howto.txt index 9dbd798a8399f497d60268e26757d79ec3a40d80..7b6984337e8a9c7cd443a9ed562fa1d94637e63d 100644 --- a/librarytemplate_howto.txt +++ b/librarytemplate_howto.txt @@ -8,7 +8,7 @@ How to package a generateDS.py generated library .. version -:revision: 2.29.21 +:revision: 2.29.22 .. version diff --git a/process_includes.py b/process_includes.py index 69553f2d9235a112f8341ef3379bf975c8ea53b7..1c451f1c5ab9b93b4605ed7d543cf95d8370194b 100755 --- a/process_includes.py +++ b/process_includes.py @@ -40,7 +40,7 @@ except ImportError: # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.29.21' +VERSION = '2.29.22' ##VERSION## CatalogDict = {} diff --git a/setup.py b/setup.py index b21d86c58b54b72f8f2220b7c614bf3a4371563c..3feac89da2b96a3676ac7f30acb8a16a295ba342 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## - version="2.29.21", + version="2.29.22", ##VERSION## author="Dave Kuhlman", author_email="dkuhlman@davekuhlman.org", diff --git a/tutorial/generateds_tutorial.html b/tutorial/generateds_tutorial.html index 764131b34e16844e344c4857c468cf2aba4b4944..3730ea9d5e7cb11c33252b744eacf1c1e830cea9 100644 --- a/tutorial/generateds_tutorial.html +++ b/tutorial/generateds_tutorial.html @@ -219,7 +219,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.21</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.22</td> </tr> </tbody> </table> @@ -228,7 +228,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">August 02, 2018</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">August 03, 2018</td> </tr> </tbody> </table> @@ -1210,7 +1210,7 @@ named <tt class="docutils literal">garden_api.py</tt>, you can create an instanc <div class="footer"> <hr class="footer" /> <a class="reference external" href="generateds_tutorial.txt">View document source</a>. -Generated on: 2018-08-02 19:16 UTC. +Generated on: 2018-08-03 21:41 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/tutorial/generateds_tutorial.txt b/tutorial/generateds_tutorial.txt index afcdc5850abe058628bb5a677c9479886b2acaa4..a85b9c3aa100780c6596d49ff04d1192fdbb77bf 100644 --- a/tutorial/generateds_tutorial.txt +++ b/tutorial/generateds_tutorial.txt @@ -11,7 +11,7 @@ generateDS -- Introduction and Tutorial .. version -:revision: 2.29.21 +:revision: 2.29.22 .. version diff --git a/tutorial/generateds_tutorial.zip b/tutorial/generateds_tutorial.zip index 09e63c6174e36f71d071efe8e4c174fb9cc5c5e1..49e34849c5ccb29209e2ae4cdd5357a819ce7325 100644 Binary files a/tutorial/generateds_tutorial.zip and b/tutorial/generateds_tutorial.zip differ