diff --git a/README b/README
index 4c6ac245d9667e4a7cadb2837716b250c4f4d53d..d96cb40196db05c5bbaeff2fa614dd78715f80f1 100644
--- a/README
+++ b/README
@@ -141,7 +141,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 Change history
 --------------
 
-Version 2.11b (08/19/2013)
+Version 2.12a (10/29/2013)
 - A name conflict issue caused by naming anonymous types.  An
   anonymous type is a complexType that does not have a name
   attribute and that is nested inside an element that does not have
@@ -159,6 +159,11 @@ Version 2.11b (08/19/2013)
   --one-file-per-xsd, --output-directory=, and --module--suffix= in
   support of this.  Thanks much to George David for implementing
   this new feature.
+- This change provided by Logan Owen. -- Return self from build
+  function of generated classes, to allow easy chaining.  The main
+  use case for this change is if you have a list of xml documents,
+  and you want to change them into generateDS class instances.
+  Thank you Logan.
 
 Version 2.11a (08/16/2013)
 - Added ability to use XML catalog to find included/imported
diff --git a/generateDS.html b/generateDS.html
index e586149493be575402bc7df3be9aa1437e4fbc7c..7d57a02103c317eacd9b987241e951c1d76c1e7b 100644
--- a/generateDS.html
+++ b/generateDS.html
@@ -217,7 +217,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.11b</td>
+<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.12a</td>
 </tr>
 </tbody>
 </table>
@@ -226,7 +226,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 26, 2013</td>
+<tr class="field"><th class="field-name">date:</th><td class="field-body">October 29, 2013</td>
 </tr>
 </tbody>
 </table>
diff --git a/generateDS.py b/generateDS.py
index c304549abbc6a42c6e963682ff3d2bc0b251105d..44752d67d9cb1510f45eb19a9326bbfa1810d9f4 100755
--- a/generateDS.py
+++ b/generateDS.py
@@ -177,7 +177,7 @@ logging.disable(logging.INFO)
 # Do not modify the following VERSION comments.
 # Used by updateversion.py.
 ##VERSION##
-VERSION = '2.11b'
+VERSION = '2.12a'
 ##VERSION##
 
 GenerateProperties = 0
@@ -2260,55 +2260,55 @@ def generateToEtreeChildren(wrt, element, Targetnamespace):
                             wrt("            etree_.SubElement(element, "
                                 "'{%s}%s').text = self.gds_format_integer_list"
                                 "(%s_)\n" % (
-                                Targetnamespace, unmappedName, name))
+                                    Targetnamespace, unmappedName, name))
                         else:
                             wrt("            etree_.SubElement(element, "
                                 "'{%s}%s').text = self.gds_format_integer"
                                 "(%s_)\n" % (
-                                Targetnamespace, unmappedName, name))
+                                    Targetnamespace, unmappedName, name))
                     elif child_type == BooleanType:
                         if child.isListType():
                             wrt("            etree_.SubElement(element, "
                                 "'{%s}%s').text = self.gds_format_boolean_list"
                                 "(%s_)\n" % (
-                                Targetnamespace, unmappedName, name))
+                                    Targetnamespace, unmappedName, name))
                         else:
                             wrt("            etree_.SubElement(element, "
                                 "'{%s}%s').text = self.gds_format_boolean"
                                 "(%s_)\n" % (
-                                Targetnamespace, unmappedName, name))
+                                    Targetnamespace, unmappedName, name))
                     elif child_type == FloatType or \
                             child_type == DecimalType:
                         if child.isListType():
                             wrt("            etree_.SubElement(element, "
                                 "'{%s}%s').text = self.gds_format_float_list"
                                 "(%s_)\n" % (
-                                Targetnamespace, unmappedName, name))
+                                    Targetnamespace, unmappedName, name))
                         else:
                             wrt("            etree_.SubElement(element, "
                                 "'{%s}%s').text = self.gds_format_float"
                                 "(%s_)\n" % (
-                                Targetnamespace, unmappedName, name))
+                                    Targetnamespace, unmappedName, name))
                     elif child_type == DoubleType:
                         if child.isListType():
                             wrt("            etree_.SubElement(element, "
                                 "'{%s}%s').text = self.gds_format_double_list"
                                 "(%s_)\n" % (
-                                Targetnamespace, unmappedName, name))
+                                    Targetnamespace, unmappedName, name))
                         else:
                             wrt("            etree_.SubElement(element, "
                                 "'{%s}%s').text = self.gds_format_double"
                                 "(%s_)\n" % (
-                                Targetnamespace, unmappedName, name))
+                                    Targetnamespace, unmappedName, name))
                     elif child_type == Base64Type:
                         wrt("            etree_.SubElement(element, "
                             "'{%s}%s').text = self.gds_format_base64"
                             "(%s_)\n" % (
-                            Targetnamespace, unmappedName, name))
+                                Targetnamespace, unmappedName, name))
                     else:
                         wrt("            %s_.to_etree(element, name_='%s', "
                             "mapping_=mapping_)\n" % (
-                            name, unmappedName,))
+                                name, unmappedName,))
 #end generateToEtreeChildren
 
 
@@ -2374,7 +2374,7 @@ def generateExportAttributes(wrt, element, hasAttributes):
             if True:            # attrDef.getUse() == 'optional':
                 wrt("        if self.%s is not None and '%s' not in "
                     "already_processed:\n" % (
-                    cleanName, cleanName, ))
+                        cleanName, cleanName, ))
                 wrt("            already_processed.add('%s')\n" % (
                     cleanName, ))
                 indent = "    "
@@ -2385,15 +2385,15 @@ def generateExportAttributes(wrt, element, hasAttributes):
                 s1 = '''%s        outfile.write(' %s="%%s"' %% ''' \
                     '''self.gds_format_datetime(self.%s, ''' \
                     '''input_name='%s'))\n''' % (
-                    indent, orig_name, cleanName, name)
+                        indent, orig_name, cleanName, name)
             elif attrDef.getType() == DateType:
                 s1 = '''%s        outfile.write(' %s="%%s"' %% ''' \
                     '''self.gds_format_date(self.%s, input_name='%s'))\n''' % (
-                    indent, orig_name, cleanName, name)
+                        indent, orig_name, cleanName, name)
             elif attrDef.getType() == TimeType:
                 s1 = '''%s        outfile.write(' %s="%%s"' %% ''' \
                     '''self.gds_format_time(self.%s, input_name='%s'))\n''' % (
-                    indent, orig_name, cleanName, name)
+                        indent, orig_name, cleanName, name)
             elif (attrDefType in StringType or
                     attrDefType in IDTypes or
                     attrDefType == TokenType or
@@ -2411,7 +2411,7 @@ def generateExportAttributes(wrt, element, hasAttributes):
                 s1 = '''%s        outfile.write(' %s="%%s"' %% ''' \
                     '''self.gds_format_integer(self.%s, ''' \
                     '''input_name='%s'))\n''' % (
-                    indent, orig_name, cleanName, name, )
+                        indent, orig_name, cleanName, name, )
             elif attrDefType == BooleanType:
                 s1 = '''%s        outfile.write(' %s="%%s"' %% ''' \
                     '''self.gds_format_boolean(''' \
@@ -2425,11 +2425,11 @@ def generateExportAttributes(wrt, element, hasAttributes):
                 s1 = '''%s        outfile.write(' %s="%%s"' %% ''' \
                     '''self.gds_format_double(self.%s, ''' \
                     '''input_name='%s'))\n''' % (
-                    indent, orig_name, cleanName, name)
+                        indent, orig_name, cleanName, name)
             else:
                 s1 = '''%s        outfile.write(' %s=%%s' %% ''' \
                     '''(quote_attrib(self.%s), ))\n''' % (
-                    indent, orig_name, cleanName, )
+                        indent, orig_name, cleanName, )
             wrt(s1)
     if element.getExtended():
         wrt("        if self.extensiontype_ is not None and 'xsi:type' "
@@ -2477,13 +2477,13 @@ def generateExportChildren(wrt, element, hasChildren, namespace):
                             fill, name, name,))
                         wrt("%s    %s_.export(outfile, level, namespace_, "
                             "name_='%s', pretty_print=pretty_print)\n" % (
-                            fill, name, name, ))
+                                fill, name, name, ))
                     elif abstract_child:
                         wrt("%sif self.%s is not None:\n" % (fill, name, ))
                         wrt("%s    self.%s.export(outfile, level, "
                             "namespace_, name_='%s', "
                             "pretty_print=pretty_print)\n" % (
-                            fill, name, name, ))
+                                fill, name, name, ))
                     elif child.getMaxOccurs() > 1:
                         generateExportFn_2(
                             wrt, child, unmappedName, namespace, '    ')
@@ -2828,7 +2828,7 @@ def generateExportLiteralFn(wrt, prefix, element):
             attrType = SimpleTypeDict[attrType].getBase()
         wrt("        if self.%s is not None and '%s' not in "
             "already_processed:\n" % (
-            mappedName, mappedName, ))
+                mappedName, mappedName, ))
         wrt("            already_processed.add('%s')\n" % (
             mappedName, ))
         if attrType == DateTimeType:
@@ -3233,7 +3233,7 @@ def generateBuildMixed_1(wrt, prefix, child, headChild, keyword, delayed):
             if type_obj is not None and type_obj.getExtended():
                 wrt("            class_obj_ = self.get_class_obj_("
                     "child_, %s%s)\n" % (
-                    prefix, cleanupName(mapName(childType)), ))
+                        prefix, cleanupName(mapName(childType)), ))
                 wrt("            class_obj_ = %s%s.factory()\n")
             else:
                 wrt("            obj_ = %s%s.factory()\n" % (
@@ -4872,7 +4872,6 @@ def _cast(typ, value):
 # Data representation classes.
 #
 
-
 """
 
 # Fool (and straighten out) the syntax highlighting.
@@ -5598,7 +5597,6 @@ def generateSubclasses(root, subclassFilename, behaviorFilename,
 
 
 def getUsedNamespacesDefs(element):
-    global prefixToNamespaceMap
     processedPrefixes = []
     nameSpacesDef = getNamespace(element)
     for child in element.getChildren():
@@ -5606,9 +5604,9 @@ def getUsedNamespacesDefs(element):
            child.prefix in prefixToNamespaceMap:
             spaceDef = 'xmlns:%s="%s" ' % (
                 child.prefix, prefixToNamespaceMap[child.prefix])
-            nameSpacesDef += ' ' + spaceDef
+            if spaceDef.strip() not in nameSpacesDef:
+                nameSpacesDef += ' ' + spaceDef
             processedPrefixes.append(child.prefix)
-
     return nameSpacesDef
 
 
diff --git a/generateDS.txt b/generateDS.txt
index f65263d9ffd772749df5d317cce538bdfe392fcc..061762cafbf45650eb398c55747f2d1e0c1aea30 100644
--- a/generateDS.txt
+++ b/generateDS.txt
@@ -12,7 +12,7 @@ generateDS -- Generate Data Structures from XML Schema
 
 .. version
 
-:revision: 2.11b
+:revision: 2.12a
 
 .. version
 
diff --git a/gui/generateds_gui.py b/gui/generateds_gui.py
index 272b6e72303e0abf1f5777c198a37e96a1c083f1..ed5c2a91697ab46331a580a482ca576ccbb365df 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.11b'
+VERSION = '2.12a'
 ##VERSION##
 
 
diff --git a/libgenerateDS/gui/generateds_gui.py b/libgenerateDS/gui/generateds_gui.py
index 272b6e72303e0abf1f5777c198a37e96a1c083f1..ed5c2a91697ab46331a580a482ca576ccbb365df 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.11b'
+VERSION = '2.12a'
 ##VERSION##
 
 
diff --git a/librarytemplate_howto.html b/librarytemplate_howto.html
index ca714f828f963714e879eb97b0db9c3dcc7ef340..de459c9d90b6df81035a98f8b8f2a583ef07a99f 100644
--- a/librarytemplate_howto.html
+++ b/librarytemplate_howto.html
@@ -214,7 +214,7 @@ tt.docutils {
 <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.11a</td>
+<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.12a</td>
 </tr>
 </tbody>
 </table>
@@ -223,7 +223,7 @@ tt.docutils {
 <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 16, 2013</td>
+<tr class="field"><th class="field-name">date:</th><td class="field-body">October 29, 2013</td>
 </tr>
 </tbody>
 </table>
diff --git a/librarytemplate_howto.txt b/librarytemplate_howto.txt
index 9948374dab450dfbc2468774c1975a4a6750641a..e6b73b7fb2849361b73d24cbc2dff880b080f07e 100644
--- a/librarytemplate_howto.txt
+++ b/librarytemplate_howto.txt
@@ -8,7 +8,7 @@ How to package a generateDS.py generated library
 
 .. version
 
-:revision: 2.11b
+:revision: 2.12a
 
 .. version
 
diff --git a/process_includes.py b/process_includes.py
index b5bf48cf6557639316dc161f579f77d73d8a5163..7f074af2dfdc749fe741900451608262823bcade 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.11b'
+VERSION = '2.12a'
 ##VERSION##
 
 Namespaces = {'xs': 'http://www.w3.org/2001/XMLSchema'}
diff --git a/setup.py b/setup.py
index 19d94e8c563ba8760925b0e5c5f8639751c5a28b..b897a3a9843248b5c23068a596cddb361cfe1b8a 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.11b",
+    version="2.12a",
 ##VERSION##
     author="Dave Kuhlman",
     author_email="dkuhlman@rexx.com",
diff --git a/tests/abstract_type1_sup.py b/tests/abstract_type1_sup.py
index 996d83fbd6d05595127afb98d9246e9942f680ca..6bddfc9a8f13798d8c1f2758d19b396d2158b1ef 100644
--- a/tests/abstract_type1_sup.py
+++ b/tests/abstract_type1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class carrierType(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('fleet', 'Vehicle', 1),
@@ -692,6 +691,7 @@ class carrierType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -777,6 +777,7 @@ class Vehicle(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('xsi:type', node)
         if value is not None and 'xsi:type' not in already_processed:
@@ -845,6 +846,7 @@ class Car(Vehicle):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(Car, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -911,6 +913,7 @@ class Plane(Vehicle):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(Plane, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/abstract_type2_sup.py b/tests/abstract_type2_sup.py
index 996d83fbd6d05595127afb98d9246e9942f680ca..6bddfc9a8f13798d8c1f2758d19b396d2158b1ef 100644
--- a/tests/abstract_type2_sup.py
+++ b/tests/abstract_type2_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class carrierType(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('fleet', 'Vehicle', 1),
@@ -692,6 +691,7 @@ class carrierType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -777,6 +777,7 @@ class Vehicle(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('xsi:type', node)
         if value is not None and 'xsi:type' not in already_processed:
@@ -845,6 +846,7 @@ class Car(Vehicle):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(Car, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -911,6 +913,7 @@ class Plane(Vehicle):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(Plane, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/annotations1_sup.py b/tests/annotations1_sup.py
index 5415aced7bad58ba19305026a0a56f3a858d9d59..58129f4a6dbcfbf2a9cd74b47b8e4afb66a47abc 100644
--- a/tests/annotations1_sup.py
+++ b/tests/annotations1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class document1Type(GeneratedsSuper):
     """This is a element of Type 1. It has some very nice documentation for
     test purposes. It should make a somewhat uninteresting
@@ -695,6 +694,7 @@ class document1Type(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -803,6 +803,7 @@ class document2Type(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -904,6 +905,7 @@ class document3Type(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/annotations2_sup.py b/tests/annotations2_sup.py
index 5415aced7bad58ba19305026a0a56f3a858d9d59..58129f4a6dbcfbf2a9cd74b47b8e4afb66a47abc 100644
--- a/tests/annotations2_sup.py
+++ b/tests/annotations2_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class document1Type(GeneratedsSuper):
     """This is a element of Type 1. It has some very nice documentation for
     test purposes. It should make a somewhat uninteresting
@@ -695,6 +694,7 @@ class document1Type(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -803,6 +803,7 @@ class document2Type(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -904,6 +905,7 @@ class document3Type(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/anonymous_type1_sup.py b/tests/anonymous_type1_sup.py
index 9748fed3599965469798a94a51497b0f40491144..101021aa5548356468dfd1dbeb8fff4742f9c15d 100644
--- a/tests/anonymous_type1_sup.py
+++ b/tests/anonymous_type1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class FooList(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('Foo', 'FooType1', 0),
@@ -707,6 +706,7 @@ class FooList(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -795,6 +795,7 @@ class FooType1(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -876,6 +877,7 @@ class BarType2(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -957,6 +959,7 @@ class BazType3(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/anysimpletype1_sup.py b/tests/anysimpletype1_sup.py
index 74cbb2e82c6f8fc279edf539160b4670e33b43b6..58b9e4dbc735660bd7df579711fd64264926eb51 100644
--- a/tests/anysimpletype1_sup.py
+++ b/tests/anysimpletype1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class test1element(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('test1attribute', 'cimAnySimpleType', 0),
@@ -690,6 +689,7 @@ class test1element(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('test1attribute', node)
         if value is not None and 'test1attribute' not in already_processed:
@@ -801,6 +801,7 @@ class cimAnySimpleType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         self.anyAttributes_ = {}
         for name, value in attrs.items():
diff --git a/tests/anywildcard1_sup.py b/tests/anywildcard1_sup.py
index 864b2327d846046a243f314a729dace107744980..8d4b7fa055b9cf09cbbb4b2f552887bbe3c57c7d 100644
--- a/tests/anywildcard1_sup.py
+++ b/tests/anywildcard1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class PlantType_single(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('name', 'xs:string', 0),
@@ -705,6 +704,7 @@ class PlantType_single(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -823,6 +823,7 @@ class PlantType_multiple(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -920,6 +921,7 @@ class DescriptionType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1013,6 +1015,7 @@ class CatalogType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1100,6 +1103,7 @@ class PlantType_single_nochild(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1185,6 +1189,7 @@ class PlantType_multiple_nochild(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/anywildcard2_sup.py b/tests/anywildcard2_sup.py
index 864b2327d846046a243f314a729dace107744980..8d4b7fa055b9cf09cbbb4b2f552887bbe3c57c7d 100644
--- a/tests/anywildcard2_sup.py
+++ b/tests/anywildcard2_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class PlantType_single(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('name', 'xs:string', 0),
@@ -705,6 +704,7 @@ class PlantType_single(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -823,6 +823,7 @@ class PlantType_multiple(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -920,6 +921,7 @@ class DescriptionType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1013,6 +1015,7 @@ class CatalogType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1100,6 +1103,7 @@ class PlantType_single_nochild(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1185,6 +1189,7 @@ class PlantType_multiple_nochild(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/attr_groups1_sup.py b/tests/attr_groups1_sup.py
index bc27f92a3c261d46a31642a4e5a0d4295dd81cc6..d1db370b43c50ac8ffefef3fbdfa95bba6dd0c52 100644
--- a/tests/attr_groups1_sup.py
+++ b/tests/attr_groups1_sup.py
@@ -608,7 +608,6 @@ def _cast(typ, value):
 #
 
 
-
 class GetUserReq(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('value04', 'xsd:integer', 0),
diff --git a/tests/attr_groups2_sup.py b/tests/attr_groups2_sup.py
index bc27f92a3c261d46a31642a4e5a0d4295dd81cc6..d1db370b43c50ac8ffefef3fbdfa95bba6dd0c52 100644
--- a/tests/attr_groups2_sup.py
+++ b/tests/attr_groups2_sup.py
@@ -608,7 +608,6 @@ def _cast(typ, value):
 #
 
 
-
 class GetUserReq(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('value04', 'xsd:integer', 0),
diff --git a/tests/extensions1_sup.py b/tests/extensions1_sup.py
index c7f886f4a0bf6c63c56fad777df44d1877262b58..4f44607c72ea9f9b9413277a6d800394bb32c4a0 100644
--- a/tests/extensions1_sup.py
+++ b/tests/extensions1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class SpecialDate(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('SpecialProperty', 'xs:string', 0),
@@ -683,6 +682,7 @@ class SpecialDate(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('SpecialProperty', node)
         if value is not None and 'SpecialProperty' not in already_processed:
@@ -764,6 +764,7 @@ class ExtremeDate(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('ExtremeProperty', node)
         if value is not None and 'ExtremeProperty' not in already_processed:
@@ -845,6 +846,7 @@ class singleExtremeDate(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('ExtremeProperty', node)
         if value is not None and 'ExtremeProperty' not in already_processed:
@@ -948,6 +950,7 @@ class containerType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1032,6 +1035,7 @@ class simpleFactoidType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1134,6 +1138,7 @@ class mixedFactoidType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1238,6 +1243,7 @@ class BaseType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('BaseProperty1', node)
         if value is not None and 'BaseProperty1' not in already_processed:
@@ -1344,6 +1350,7 @@ class DerivedType(BaseType):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('DerivedProperty1', node)
         if value is not None and 'DerivedProperty1' not in already_processed:
@@ -1430,6 +1437,7 @@ class MyInteger(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('MyAttr', node)
         if value is not None and 'MyAttr' not in already_processed:
@@ -1511,6 +1519,7 @@ class MyBoolean(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('MyAttr', node)
         if value is not None and 'MyAttr' not in already_processed:
@@ -1592,6 +1601,7 @@ class MyFloat(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('MyAttr', node)
         if value is not None and 'MyAttr' not in already_processed:
@@ -1673,6 +1683,7 @@ class MyDouble(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('MyAttr', node)
         if value is not None and 'MyAttr' not in already_processed:
diff --git a/tests/ipo1_out.xml b/tests/ipo1_out.xml
index 3456bedbc3f94380a0abd30b6965ea82d8c85713..c6da399281a0ff8d96ad0c4617acfaf78c72922b 100644
--- a/tests/ipo1_out.xml
+++ b/tests/ipo1_out.xml
@@ -1,21 +1,21 @@
 <?xml version="1.0" ?>
 <ipo:purchaseOrder xmlns:ipo="http://www.example.com/IPO" orderDate="1999-12-01">
-    <ipo:shipTo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ipo:UKAddress" category="1-a" exportCode="1">
+    <ipo:shipTo xmlns:ipo="http://www.example.com/IPO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ipo:UKAddress" category="1-a" exportCode="1">
         <ipo:name>Helen Zoe</ipo:name>
         <ipo:street>47 Eden Street</ipo:street>
         <ipo:city>Cambridge</ipo:city>
         <ipo:postcode>CB1 1JR</ipo:postcode>
         <ipo:category>oneA</ipo:category>
     </ipo:shipTo>
-    <ipo:billTo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ipo:USAddress">
+    <ipo:billTo xmlns:ipo="http://www.example.com/IPO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ipo:USAddress">
         <ipo:name>Robert Smith</ipo:name>
         <ipo:street>8 Oak Avenue</ipo:street>
         <ipo:city>Old Town</ipo:city>
         <ipo:state>PA</ipo:state>
         <ipo:zip>95819</ipo:zip>
     </ipo:billTo>
-    <ipo:items>
-        <ipo:item partNum="833-AA">
+    <ipo:items xmlns:ipo="http://www.example.com/IPO">
+        <ipo:item xmlns:ipo="http://www.example.com/IPO" partNum="833-AA">
             <ipo:productName>Lapis necklace</ipo:productName>
             <ipo:quantity>1</ipo:quantity>
             <ipo:USPrice>99.950000000000003</ipo:USPrice>
diff --git a/tests/ipo1_sup.py b/tests/ipo1_sup.py
index d3b19b58b932050050234c4a4dbbefeb7ebe00c5..3a4b7d95d957da9f3ca6c66152e26e4e0b3285a3 100644
--- a/tests/ipo1_sup.py
+++ b/tests/ipo1_sup.py
@@ -92,7 +92,10 @@ except ImportError, exp:
         def gds_format_string(self, input_data, input_name=''):
             return input_data
         def gds_validate_string(self, input_data, node, input_name=''):
-            return input_data
+            if not input_data:
+                return ''
+            else:
+                return input_data
         def gds_format_base64(self, input_data, input_name=''):
             return base64.b64encode(input_data)
         def gds_validate_base64(self, input_data, node, input_name=''):
@@ -654,7 +657,7 @@ class PurchaseOrderType(GeneratedsSuper):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='PurchaseOrderType', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='PurchaseOrderType', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -727,6 +730,7 @@ class PurchaseOrderType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('orderDate', node)
         if value is not None and 'orderDate' not in already_processed:
@@ -785,7 +789,7 @@ class Items(GeneratedsSuper):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='Items', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='Items', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -837,6 +841,7 @@ class Items(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -898,7 +903,7 @@ class item(GeneratedsSuper):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='item', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='item', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -971,6 +976,7 @@ class item(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('partNum', node)
         if value is not None and 'partNum' not in already_processed:
@@ -1030,7 +1036,7 @@ class quantity(GeneratedsSuper):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='quantity', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='quantity', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -1065,6 +1071,7 @@ class quantity(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1108,7 +1115,7 @@ class Address(GeneratedsSuper):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='Address', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='Address', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -1168,6 +1175,7 @@ class Address(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('xsi:type', node)
         if value is not None and 'xsi:type' not in already_processed:
@@ -1222,7 +1230,7 @@ class USAddress(Address):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='USAddress', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='USAddress', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -1274,6 +1282,7 @@ class USAddress(Address):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(USAddress, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1337,7 +1346,7 @@ class UKAddress(Address):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='UKAddress', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='UKAddress', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -1403,6 +1412,7 @@ class UKAddress(Address):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('category', node)
         if value is not None and 'category_attr' not in already_processed:
diff --git a/tests/ipo2_out.xml b/tests/ipo2_out.xml
index 3456bedbc3f94380a0abd30b6965ea82d8c85713..c6da399281a0ff8d96ad0c4617acfaf78c72922b 100644
--- a/tests/ipo2_out.xml
+++ b/tests/ipo2_out.xml
@@ -1,21 +1,21 @@
 <?xml version="1.0" ?>
 <ipo:purchaseOrder xmlns:ipo="http://www.example.com/IPO" orderDate="1999-12-01">
-    <ipo:shipTo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ipo:UKAddress" category="1-a" exportCode="1">
+    <ipo:shipTo xmlns:ipo="http://www.example.com/IPO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ipo:UKAddress" category="1-a" exportCode="1">
         <ipo:name>Helen Zoe</ipo:name>
         <ipo:street>47 Eden Street</ipo:street>
         <ipo:city>Cambridge</ipo:city>
         <ipo:postcode>CB1 1JR</ipo:postcode>
         <ipo:category>oneA</ipo:category>
     </ipo:shipTo>
-    <ipo:billTo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ipo:USAddress">
+    <ipo:billTo xmlns:ipo="http://www.example.com/IPO" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ipo:USAddress">
         <ipo:name>Robert Smith</ipo:name>
         <ipo:street>8 Oak Avenue</ipo:street>
         <ipo:city>Old Town</ipo:city>
         <ipo:state>PA</ipo:state>
         <ipo:zip>95819</ipo:zip>
     </ipo:billTo>
-    <ipo:items>
-        <ipo:item partNum="833-AA">
+    <ipo:items xmlns:ipo="http://www.example.com/IPO">
+        <ipo:item xmlns:ipo="http://www.example.com/IPO" partNum="833-AA">
             <ipo:productName>Lapis necklace</ipo:productName>
             <ipo:quantity>1</ipo:quantity>
             <ipo:USPrice>99.950000000000003</ipo:USPrice>
diff --git a/tests/ipo2_sup.py b/tests/ipo2_sup.py
index d3b19b58b932050050234c4a4dbbefeb7ebe00c5..3a4b7d95d957da9f3ca6c66152e26e4e0b3285a3 100644
--- a/tests/ipo2_sup.py
+++ b/tests/ipo2_sup.py
@@ -92,7 +92,10 @@ except ImportError, exp:
         def gds_format_string(self, input_data, input_name=''):
             return input_data
         def gds_validate_string(self, input_data, node, input_name=''):
-            return input_data
+            if not input_data:
+                return ''
+            else:
+                return input_data
         def gds_format_base64(self, input_data, input_name=''):
             return base64.b64encode(input_data)
         def gds_validate_base64(self, input_data, node, input_name=''):
@@ -654,7 +657,7 @@ class PurchaseOrderType(GeneratedsSuper):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='PurchaseOrderType', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='PurchaseOrderType', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -727,6 +730,7 @@ class PurchaseOrderType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('orderDate', node)
         if value is not None and 'orderDate' not in already_processed:
@@ -785,7 +789,7 @@ class Items(GeneratedsSuper):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='Items', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='Items', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -837,6 +841,7 @@ class Items(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -898,7 +903,7 @@ class item(GeneratedsSuper):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='item', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='item', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -971,6 +976,7 @@ class item(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('partNum', node)
         if value is not None and 'partNum' not in already_processed:
@@ -1030,7 +1036,7 @@ class quantity(GeneratedsSuper):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='quantity', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='quantity', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -1065,6 +1071,7 @@ class quantity(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1108,7 +1115,7 @@ class Address(GeneratedsSuper):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='Address', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='Address', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -1168,6 +1175,7 @@ class Address(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('xsi:type', node)
         if value is not None and 'xsi:type' not in already_processed:
@@ -1222,7 +1230,7 @@ class USAddress(Address):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='USAddress', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='USAddress', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -1274,6 +1282,7 @@ class USAddress(Address):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(USAddress, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1337,7 +1346,7 @@ class UKAddress(Address):
             return True
         else:
             return False
-    def export(self, outfile, level, namespace_='ipo:', name_='UKAddress', namespacedef_='', pretty_print=True):
+    def export(self, outfile, level, namespace_='ipo:', name_='UKAddress', namespacedef_='xmlns:ipo="http://www.example.com/IPO"', pretty_print=True):
         if pretty_print:
             eol_ = '\n'
         else:
@@ -1403,6 +1412,7 @@ class UKAddress(Address):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('category', node)
         if value is not None and 'category_attr' not in already_processed:
diff --git a/tests/out1_sup.py b/tests/out1_sup.py
index fed416039c13ee2f4abd113cf57fc30214230f93..ba18397a01f6f654a7d0270ea13efa06dec5b5c7 100644
--- a/tests/out1_sup.py
+++ b/tests/out1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class people(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('comments', 'comments', 1),
@@ -788,6 +787,7 @@ class people(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -960,6 +960,7 @@ class comments(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1240,6 +1241,7 @@ class person(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('vegetable', node)
         if value is not None and 'vegetable' not in already_processed:
@@ -1627,6 +1629,7 @@ class programmer(person):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('language', node)
         if value is not None and 'language' not in already_processed:
@@ -1938,6 +1941,7 @@ class param(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('semantic', node)
         if value is not None and 'semantic' not in already_processed:
@@ -2097,6 +2101,7 @@ class python_programmer(programmer):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('nick-name', node)
         if value is not None and 'nick-name' not in already_processed:
@@ -2251,6 +2256,7 @@ class java_programmer(programmer):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('status', node)
         if value is not None and 'status' not in already_processed:
@@ -2418,6 +2424,7 @@ class agent(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2592,6 +2599,7 @@ class special_agent(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2832,6 +2840,7 @@ class booster(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -3014,6 +3023,7 @@ class info(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('rating', node)
         if value is not None and 'rating' not in already_processed:
@@ -3162,6 +3172,7 @@ class client_handlerType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/out2_sup.py b/tests/out2_sup.py
index fed416039c13ee2f4abd113cf57fc30214230f93..ba18397a01f6f654a7d0270ea13efa06dec5b5c7 100644
--- a/tests/out2_sup.py
+++ b/tests/out2_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class people(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('comments', 'comments', 1),
@@ -788,6 +787,7 @@ class people(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -960,6 +960,7 @@ class comments(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1240,6 +1241,7 @@ class person(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('vegetable', node)
         if value is not None and 'vegetable' not in already_processed:
@@ -1627,6 +1629,7 @@ class programmer(person):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('language', node)
         if value is not None and 'language' not in already_processed:
@@ -1938,6 +1941,7 @@ class param(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('semantic', node)
         if value is not None and 'semantic' not in already_processed:
@@ -2097,6 +2101,7 @@ class python_programmer(programmer):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('nick-name', node)
         if value is not None and 'nick-name' not in already_processed:
@@ -2251,6 +2256,7 @@ class java_programmer(programmer):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('status', node)
         if value is not None and 'status' not in already_processed:
@@ -2418,6 +2424,7 @@ class agent(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2592,6 +2599,7 @@ class special_agent(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2832,6 +2840,7 @@ class booster(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -3014,6 +3023,7 @@ class info(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('rating', node)
         if value is not None and 'rating' not in already_processed:
@@ -3162,6 +3172,7 @@ class client_handlerType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/people_procincl1_sup.py b/tests/people_procincl1_sup.py
index efdd4f31837ffbb0c72c878c940b3543a9eef7ef..20d2f6b071a1d5bd272b67f52667b67f44c54841 100644
--- a/tests/people_procincl1_sup.py
+++ b/tests/people_procincl1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class people(GeneratedsSuper):
     """A list of people."""
     member_data_items_ = [
@@ -813,6 +812,7 @@ class people(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -954,6 +954,7 @@ class comments(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1196,6 +1197,7 @@ class person(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('vegetable', node)
         if value is not None and 'vegetable' not in already_processed:
@@ -1316,6 +1318,7 @@ class specialperson(person):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(specialperson, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1452,6 +1455,7 @@ class param(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('semantic', node)
         if value is not None and 'semantic' not in already_processed:
@@ -1609,6 +1613,7 @@ class agent(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1757,6 +1762,7 @@ class special_agent(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1960,6 +1966,7 @@ class booster(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('member-id', node)
         if value is not None and 'member-id' not in already_processed:
@@ -2099,6 +2106,7 @@ class info(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('rating', node)
         if value is not None and 'rating' not in already_processed:
@@ -2197,6 +2205,7 @@ class vehicle(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('xsi:type', node)
         if value is not None and 'xsi:type' not in already_processed:
@@ -2285,6 +2294,7 @@ class automobile(vehicle):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(automobile, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2367,6 +2377,7 @@ class airplane(vehicle):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(airplane, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2643,6 +2654,7 @@ class programmer(person):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('language', node)
         if value is not None and 'language' not in already_processed:
@@ -2854,6 +2866,7 @@ class client_handlerType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2968,6 +2981,7 @@ class java_programmer(programmer):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('status', node)
         if value is not None and 'status' not in already_processed:
@@ -3071,6 +3085,7 @@ class python_programmer(programmer):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('nick-name', node)
         if value is not None and 'nick-name' not in already_processed:
diff --git a/tests/people_procincl2_sup.py b/tests/people_procincl2_sup.py
index efdd4f31837ffbb0c72c878c940b3543a9eef7ef..20d2f6b071a1d5bd272b67f52667b67f44c54841 100644
--- a/tests/people_procincl2_sup.py
+++ b/tests/people_procincl2_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class people(GeneratedsSuper):
     """A list of people."""
     member_data_items_ = [
@@ -813,6 +812,7 @@ class people(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -954,6 +954,7 @@ class comments(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1196,6 +1197,7 @@ class person(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('vegetable', node)
         if value is not None and 'vegetable' not in already_processed:
@@ -1316,6 +1318,7 @@ class specialperson(person):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(specialperson, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1452,6 +1455,7 @@ class param(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('semantic', node)
         if value is not None and 'semantic' not in already_processed:
@@ -1609,6 +1613,7 @@ class agent(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1757,6 +1762,7 @@ class special_agent(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1960,6 +1966,7 @@ class booster(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('member-id', node)
         if value is not None and 'member-id' not in already_processed:
@@ -2099,6 +2106,7 @@ class info(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('rating', node)
         if value is not None and 'rating' not in already_processed:
@@ -2197,6 +2205,7 @@ class vehicle(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('xsi:type', node)
         if value is not None and 'xsi:type' not in already_processed:
@@ -2285,6 +2294,7 @@ class automobile(vehicle):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(automobile, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2367,6 +2377,7 @@ class airplane(vehicle):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(airplane, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2643,6 +2654,7 @@ class programmer(person):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('language', node)
         if value is not None and 'language' not in already_processed:
@@ -2854,6 +2866,7 @@ class client_handlerType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2968,6 +2981,7 @@ class java_programmer(programmer):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('status', node)
         if value is not None and 'status' not in already_processed:
@@ -3071,6 +3085,7 @@ class python_programmer(programmer):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('nick-name', node)
         if value is not None and 'nick-name' not in already_processed:
diff --git a/tests/recursive_simpletype1_sup.py b/tests/recursive_simpletype1_sup.py
index ef1cc638d3b45d11c2dfd8ec1b5bd19a268d1169..df257e0f7cb06d5bbb0a09004ab25eb0be540f84 100644
--- a/tests/recursive_simpletype1_sup.py
+++ b/tests/recursive_simpletype1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class PersonType(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('personId', 'xs:integer', 0),
@@ -701,6 +700,7 @@ class PersonType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/recursive_simpletype2_sup.py b/tests/recursive_simpletype2_sup.py
index ef1cc638d3b45d11c2dfd8ec1b5bd19a268d1169..df257e0f7cb06d5bbb0a09004ab25eb0be540f84 100644
--- a/tests/recursive_simpletype2_sup.py
+++ b/tests/recursive_simpletype2_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class PersonType(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('personId', 'xs:integer', 0),
@@ -701,6 +700,7 @@ class PersonType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/simpletype_memberspecs1_sup.py b/tests/simpletype_memberspecs1_sup.py
index e7481410b07c273a35d17eba23f4e45e0cee7246..46c058213cc0a304dcc9df66e10b99f9bfec2919 100644
--- a/tests/simpletype_memberspecs1_sup.py
+++ b/tests/simpletype_memberspecs1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class SpecialDate(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('SpecialProperty', 'xs:string', 0),
@@ -683,6 +682,7 @@ class SpecialDate(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('SpecialProperty', node)
         if value is not None and 'SpecialProperty' not in already_processed:
@@ -764,6 +764,7 @@ class ExtremeDate(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('ExtremeProperty', node)
         if value is not None and 'ExtremeProperty' not in already_processed:
diff --git a/tests/simpletypes_other1_sup.py b/tests/simpletypes_other1_sup.py
index fe61087f9d34510fe127ea06737723374c177974..605f9e04712e219e32c258fc07d1798ca55d5aa1 100644
--- a/tests/simpletypes_other1_sup.py
+++ b/tests/simpletypes_other1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class simpleTypeTestsType(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('simpleTypeTest', 'simpleTypeTest', 1),
@@ -690,6 +689,7 @@ class simpleTypeTestsType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1083,6 +1083,7 @@ class simpleTypeTest(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/simpletypes_other2_sup.py b/tests/simpletypes_other2_sup.py
index fe61087f9d34510fe127ea06737723374c177974..605f9e04712e219e32c258fc07d1798ca55d5aa1 100644
--- a/tests/simpletypes_other2_sup.py
+++ b/tests/simpletypes_other2_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class simpleTypeTestsType(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('simpleTypeTest', 'simpleTypeTest', 1),
@@ -690,6 +689,7 @@ class simpleTypeTestsType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1083,6 +1083,7 @@ class simpleTypeTest(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tests/test.py b/tests/test.py
index 28aae8f02e652c1255b5f395352b71929248e151..4186fe0a42ab1d2a5f9aa7d22cd547971c936bbb 100755
--- a/tests/test.py
+++ b/tests/test.py
@@ -480,7 +480,7 @@ class GenTest(unittest.TestCase):
 
     def check_result(self, result, err, ignore_strings):
         self.failUnlessEqual(len(result), 0)
-        self.failUnlessEqual(len(err), 0, err)
+        self.failUnlessEqual(len(err), 0)
         return True
 ##         if len(err) > 0:
 ##             return False
diff --git a/tests/to_etree1_sup.py b/tests/to_etree1_sup.py
index bdb8b62d6282408b409e928e8b439ba41aba3138..9f729d22aa5fd10eacec0dfe51cfd7010a324fc9 100644
--- a/tests/to_etree1_sup.py
+++ b/tests/to_etree1_sup.py
@@ -611,7 +611,6 @@ def _cast(typ, value):
 #
 
 
-
 class peopleType(GeneratedsSuper):
     member_data_items_ = [
         MemberSpec_('comments', 'commentsType', 1),
@@ -716,6 +715,7 @@ class peopleType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -821,6 +821,7 @@ class commentsType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -987,6 +988,7 @@ class personType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('vegetable', node)
         if value is not None and 'vegetable' not in already_processed:
@@ -1096,6 +1098,7 @@ class specialperson(personType):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(specialperson, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -1295,6 +1298,7 @@ class programmerType(personType):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('language', node)
         if value is not None and 'language' not in already_processed:
@@ -1513,6 +1517,7 @@ class paramType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('semantic', node)
         if value is not None and 'semantic' not in already_processed:
@@ -1624,6 +1629,7 @@ class python_programmerType(programmerType):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('drcs', node)
         if value is not None and 'drcs_attr' not in already_processed:
@@ -1756,6 +1762,7 @@ class java_programmerType(programmerType):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('status', node)
         if value is not None and 'status' not in already_processed:
@@ -1876,6 +1883,7 @@ class agentType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('xsi:type', node)
         if value is not None and 'xsi:type' not in already_processed:
@@ -1975,6 +1983,7 @@ class special_agentType(agentType):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(special_agentType, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2067,6 +2076,7 @@ class weird_agentType(agentType):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(weird_agentType, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2200,6 +2210,7 @@ class boosterType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('member-id', node)
         if value is not None and 'member-id' not in already_processed:
@@ -2305,6 +2316,7 @@ class infoType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('rating', node)
         if value is not None and 'rating' not in already_processed:
@@ -2374,6 +2386,7 @@ class vehicleType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         value = find_attr_value_('xsi:type', node)
         if value is not None and 'xsi:type' not in already_processed:
@@ -2430,6 +2443,7 @@ class automobile(vehicleType):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(automobile, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2480,6 +2494,7 @@ class airplane(vehicleType):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         super(airplane, self).buildAttributes(node, attrs, already_processed)
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
@@ -2562,6 +2577,7 @@ class hot_agent(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         self.anyAttributes_ = {}
         for name, value in attrs.items():
@@ -2639,6 +2655,7 @@ class client_handlerType(GeneratedsSuper):
         for child in node:
             nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
             self.buildChildren(child, node, nodeName_)
+        return self
     def buildAttributes(self, node, attrs, already_processed):
         pass
     def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
diff --git a/tutorial/generateds_tutorial.html b/tutorial/generateds_tutorial.html
index e2ffb83f9b3c1056e6e8a001a80790389412da4b..023f480f75094e578b8d40844412e80a81409bd4 100644
--- a/tutorial/generateds_tutorial.html
+++ b/tutorial/generateds_tutorial.html
@@ -216,7 +216,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.11a</td>
+<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.12a</td>
 </tr>
 </tbody>
 </table>
@@ -225,7 +225,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 16, 2013</td>
+<tr class="field"><th class="field-name">date:</th><td class="field-body">October 29, 2013</td>
 </tr>
 </tbody>
 </table>
diff --git a/tutorial/generateds_tutorial.txt b/tutorial/generateds_tutorial.txt
index 0ad7680f6df176396b16d11bdff05aa00e5d0596..b9e9f1bcda988dc6580b4f7abff2731861619fa1 100644
--- a/tutorial/generateds_tutorial.txt
+++ b/tutorial/generateds_tutorial.txt
@@ -11,7 +11,7 @@ generateDS -- Introduction and Tutorial
 
 .. version
 
-:revision: 2.11b
+:revision: 2.12a
 
 .. version