diff --git a/README b/README index 35bf8a0e19208971c83d9b34a17191abfd80ebf3..1bbe891bae9d1634ef9d00c87d967d3a542d59a1 100644 --- a/README +++ b/README @@ -141,13 +141,22 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Change history -------------- -Version 2.12e (05/12/2014) +Version 2.12e (05/29/2014) - Fix for formatting error. Thanks to Nikolay Lavrov for catching this and for providing a fix. - Fix to gds_parse_datetime(). The Python datetime module's datetime object uses microseconds, but xs:dateTime uses fractions of a second (e.g. 0.123). Converted from decimal fraction to microseconds. Thanks to Mikki Weesenaar for catching this. +- Modified behavior and names for generated method insert_xxx, so + that now we generate insert_xxx_at and replace_xxx_at. Thanks to + Bart Wagenaar for pointing out this deviation from Pythonic style. +- Function transitiveClosure in generateDS.py was susceptible to + infinite looping. This seemed to occur when a substitutionGroup + contains a member with the same name as the head of the + substitutionGroup (but in a different namespace?). Added a test + to stop the recursion when this occurs. Thanks to Stuart Chalk + for finding and reporting this. Version 2.12d (04/02/2014) - Fix for an infinite loop caused by inconsistent use of @@ -1507,6 +1516,5 @@ The following enhancements and fixes remain to be done: Dave Kuhlman -dkuhlman@pacbell.net +dkuhlman@davekuhlman.org http://www.davekuhlman.org - diff --git a/generateDS.html b/generateDS.html index b1e88d9389decadcd65d429f69f7c6f3667066d6..eb612288f01d225e084fffc46eaec1c845c7f43b 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.12d</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.12e</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">April 02, 2014</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">May 23, 2014</td> </tr> </tbody> </table> @@ -2872,7 +2872,7 @@ following among others:</p> <div class="footer"> <hr class="footer" /> <a class="reference external" href="generateDS.txt">View document source</a>. -Generated on: 2014-04-02 22:08 UTC. +Generated on: 2014-05-23 16:00 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 57c412a6a58b9c2605a0af0c79de34219af30f1b..1b8da06f48de567046acd2c5d512dc74fac7e730 100755 --- a/generateDS.py +++ b/generateDS.py @@ -179,7 +179,7 @@ logging.disable(logging.INFO) # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.12d' +VERSION = '2.12e' ##VERSION## GenerateProperties = 0 @@ -3527,12 +3527,15 @@ def generateBuildStandard_1( # end generateBuildStandard_1 -def transitiveClosure(m, e): +def transitiveClosure(m, e, seen): t = [] + if e in seen: + return t if e in m: t += m[e] + seen.add(e) for f in m[e]: - t += transitiveClosure(m, f) + t += transitiveClosure(m, f, seen) return t @@ -3552,8 +3555,9 @@ def generateBuildStandard(wrt, prefix, element, keyword, delayed, hasChildren): # substitutionGroup. childName = child.getName() if childName in SubstitutionGroups: + seen = set() for memberName in transitiveClosure( - SubstitutionGroups, childName): + SubstitutionGroups, childName, seen): memberName = cleanupName(memberName) if memberName in ElementDict: member = ElementDict[memberName] diff --git a/generateDS.txt b/generateDS.txt index 9cab68ce1d159ed644936fa3a2d3e07e0b797635..79797cf1fc02e16ea39ad683638cd402d3f5fdca 100644 --- a/generateDS.txt +++ b/generateDS.txt @@ -12,7 +12,7 @@ generateDS -- Generate Data Structures from XML Schema .. version -:revision: 2.12d +:revision: 2.12e .. version diff --git a/gui/generateds_gui.py b/gui/generateds_gui.py index 43bcb6d52b7cf0a1b870a92634faa7a3d088c041..93dfb521933f9a3d2f4844eb6b5b067806b61f31 100755 --- a/gui/generateds_gui.py +++ b/gui/generateds_gui.py @@ -31,7 +31,7 @@ from libgenerateDS.gui import generateds_gui_session # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.12d' +VERSION = '2.12e' ##VERSION## diff --git a/libgenerateDS/gui/generateds_gui.py b/libgenerateDS/gui/generateds_gui.py index 43bcb6d52b7cf0a1b870a92634faa7a3d088c041..93dfb521933f9a3d2f4844eb6b5b067806b61f31 100755 --- a/libgenerateDS/gui/generateds_gui.py +++ b/libgenerateDS/gui/generateds_gui.py @@ -31,7 +31,7 @@ from libgenerateDS.gui import generateds_gui_session # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.12d' +VERSION = '2.12e' ##VERSION## diff --git a/librarytemplate_howto.html b/librarytemplate_howto.html index 3d35551c9337b6a8e6cf94f5c8e4fcf4b5a348ca..1a2df9d8067d4076366ba4b37ca3e6b01f294829 100644 --- a/librarytemplate_howto.html +++ b/librarytemplate_howto.html @@ -217,7 +217,7 @@ ul.auto-toc { <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.12d</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.12e</td> </tr> </tbody> </table> @@ -226,7 +226,7 @@ ul.auto-toc { <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">April 02, 2014</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">May 23, 2014</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: 2014-04-02 22:08 UTC. +Generated on: 2014-05-23 16:00 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 aa8320eb2321e8ebfd26da4b0b1e20965f3c3736..5c10d2543226a014dfb25fbc16afc190ae203acb 100644 --- a/librarytemplate_howto.txt +++ b/librarytemplate_howto.txt @@ -8,7 +8,7 @@ How to package a generateDS.py generated library .. version -:revision: 2.12d +:revision: 2.12e .. version diff --git a/process_includes.py b/process_includes.py index 296e2929aa12213d537956faa8587371bb727589..2b6e816d18a4c11dbaf22a1accb9ebe369190694 100755 --- a/process_includes.py +++ b/process_includes.py @@ -30,7 +30,7 @@ from lxml import etree # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.12d' +VERSION = '2.12e' ##VERSION## CatalogDict = {} @@ -559,8 +559,4 @@ def main(): if __name__ == "__main__": #import pdb; pdb.set_trace() - #main() - try: - main() - except: - import pdb; pdb.post_mortem() + main() diff --git a/setup.py b/setup.py index acdd21f805a81ebee2f9dafffaab5e25a805680d..132ca3d069095e9c0ab221a6b58fa987276ab1c7 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup(name="generateDS", # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## - version="2.12d", + version="2.12e", ##VERSION## author="Dave Kuhlman", author_email="dkuhlman@davekuhlman.org", diff --git a/tutorial/generateds_tutorial.html b/tutorial/generateds_tutorial.html index 0a4c830a2a4c63a4500af089f71c911f67961e9d..ce709171a45627d78d4f6465d28e7939ebb4c5a2 100644 --- a/tutorial/generateds_tutorial.html +++ b/tutorial/generateds_tutorial.html @@ -206,8 +206,8 @@ ul.auto-toc { <td>Dave Kuhlman</td></tr> <tr><th class="docinfo-name">Address:</th> <td><pre class="address"> -<a class="first reference external" href="mailto:dkuhlman@rexx.com">dkuhlman@rexx.com</a> -<a class="last reference external" href="http://www.rexx.com/~dkuhlman">http://www.rexx.com/~dkuhlman</a> +<a class="first reference external" href="mailto:dkuhlman@davekuhlman.org">dkuhlman@davekuhlman.org</a> +<a class="last reference external" href="http://www.davekuhlman.org">http://www.davekuhlman.org</a> </pre> </td></tr> </tbody> @@ -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.12d</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.12e</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">April 02, 2014</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">May 22, 2014</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: 2014-04-02 22:08 UTC. +Generated on: 2014-05-22 16:15 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 37695598dcaa3a893f13d710c4603043034a2da3..f5e3e16df3d9a88451bacb539aa9a120b82bcb89 100644 --- a/tutorial/generateds_tutorial.txt +++ b/tutorial/generateds_tutorial.txt @@ -3,15 +3,15 @@ generateDS -- Introduction and Tutorial ====================================================== :author: Dave Kuhlman -:address: dkuhlman@rexx.com - http://www.rexx.com/~dkuhlman +:address: dkuhlman@davekuhlman.org + http://www.davekuhlman.org .. Do not modify the following version comments. They are used by updateversion.py. .. version -:revision: 2.12d +:revision: 2.12e .. version diff --git a/tutorial/generateds_tutorial.zip b/tutorial/generateds_tutorial.zip index 27248db2bc871061f8a52482dad9d2925992564e..0a67f630b3d3efdefc4e51b17fc154474101f81b 100644 Binary files a/tutorial/generateds_tutorial.zip and b/tutorial/generateds_tutorial.zip differ