diff --git a/README.rst b/README.rst index c9004316fe791162356fe3edc2547817b2888998..4f1142660732a5b80b2f1a24097275f005a7285f 100644 --- a/README.rst +++ b/README.rst @@ -141,6 +141,14 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Change history -------------- +Version 2.29.5 (01/17/2017) + +- Fix to prevent infinite recursion that happens when a simple type + is defined whose name is the same as it's restriction base type + except for the namespace prefix. Thanks to Nicolas de Saint Jorre + for reporting this problem and for providing a schema that + reproduces it. + Version 2.29.4 (12/14/2017) - Fix for exporting the child of an element, when that child is diff --git a/generateDS.py b/generateDS.py index bfe6ae7da92c07d9a948c80f5287e0e36ced437a..a0edc781e596df5042005ccbb3ee8734a04ea12d 100755 --- a/generateDS.py +++ b/generateDS.py @@ -229,7 +229,7 @@ logging.disable(logging.INFO) # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.29.4' +VERSION = '2.29.5' ##VERSION## BaseStrTypes = six.string_types @@ -4541,16 +4541,17 @@ def processValidatorBodyRestrictions( if base1 is not None: if ":" in base1: base1 = base1.split(":")[1] - st1 = find_simple_type_def(tree, base1, None, None, ns, base) - if st1 is not None: - restrictions1 = st1.xpath( - "./xs:restriction", - namespaces=ns, n=stName, b=base) - if restrictions1: - s2 = processValidatorBodyRestrictions( - tree, '', restrictions1, st1, ns, stName, - base1, patterns1) - s1 += s2 + if st.get('name') != base1: + st1 = find_simple_type_def(tree, base1, None, None, ns, base) + if st1 is not None: + restrictions1 = st1.xpath( + "./xs:restriction", + namespaces=ns, n=stName, b=base) + if restrictions1: + s2 = processValidatorBodyRestrictions( + tree, '', restrictions1, st1, ns, stName, + base1, patterns1) + s1 += s2 return s1 # end processValidatorBodyRestrictions diff --git a/generateDS.txt b/generateDS.txt index 608888fa407f30f005a6eaf2dcac5d58fcf78309..785b1a65947f0d510e3e65db038c6aaca81ce817 100644 --- a/generateDS.txt +++ b/generateDS.txt @@ -12,7 +12,7 @@ generateDS -- Generate Data Structures from XML Schema .. version -:revision: 2.29.4 +:revision: 2.29.5 .. version diff --git a/generateds_gui_notes.txt b/generateds_gui_notes.txt index 59a6d69929b7e2d94a16fcfebe3acfa403bb6eb9..1f0b27ca8c5c7e977ada9b74312487b4c4ae741a 100644 --- a/generateds_gui_notes.txt +++ b/generateds_gui_notes.txt @@ -12,7 +12,7 @@ GenerateDS GUI Notes .. version -:revision: 2.29.4 +:revision: 2.29.5 .. version diff --git a/gui/generateds_gui.py b/gui/generateds_gui.py index 4e13f9014b955ae5e2764adc18f6d5af7df9e1bb..06a648377ee0c8de48079f57f6e071f420aefd81 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.4' +VERSION = '2.29.5' ##VERSION## diff --git a/librarytemplate_howto.txt b/librarytemplate_howto.txt index 702e57190902bc0b975802f2d3cf5bd4376f78d1..a03d078fa40c4212b8ead177c40246bed94c2645 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.4 +:revision: 2.29.5 .. version diff --git a/process_includes.py b/process_includes.py index 723639a1b42cb1469423a51b7a341eef80036311..fffc0467812219fcb7d5c497bede4e744cb00bf5 100644 --- 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.4' +VERSION = '2.29.5' ##VERSION## CatalogDict = {} diff --git a/setup.py b/setup.py index 93eeec3cd2ecd5f131b6121fdb7cffbc67caf0ef..a37f5de2843da43e38b55896eda92f18aaf35b7d 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.29.4", + version="2.29.5", ##VERSION## author="Dave Kuhlman", author_email="dkuhlman@davekuhlman.org", diff --git a/tutorial/generateds_tutorial.txt b/tutorial/generateds_tutorial.txt index ec4b328ac12c7bf91332506a580f60053e9e0223..f2aa24f604bb596daf038115d151af1497e0eb80 100644 --- a/tutorial/generateds_tutorial.txt +++ b/tutorial/generateds_tutorial.txt @@ -11,7 +11,7 @@ generateDS -- Introduction and Tutorial .. version -:revision: 2.29.4 +:revision: 2.29.5 .. version diff --git a/tutorial/generateds_tutorial.zip b/tutorial/generateds_tutorial.zip index 2df8e3b9633f8cec64f6150fb17446a73cb67f39..9e996e740b4f0d52d4c85bdb54bd683193861181 100644 Binary files a/tutorial/generateds_tutorial.zip and b/tutorial/generateds_tutorial.zip differ