In generateBuildFn, the generated code will skip the children of a base
class in an extension class if the extension class has children of its
own. (The buildChildren call for the base class is inside a "if
hasChildren == 0" block.)
The attached patch fixes the problem.
--- generateDS-1.13a.py 2008-05-27 14:45:28.000000000 -0400
+++ generateDS.py 2008-05-27 14:46:32.000000000 -0400
@@ -2141,7 +2141,10 @@
else: # not element.isMixed()
hasChildren = generateBuildStandard(outfile, prefix, element, keyword,
delayed, hasChildren)
- if hasChildren == 0:
+ if base and base in ElementDict and base not in SimpleTypeDict:
+ s1 = " %s.buildChildren(self, child_, nodeName_)\n" % (base, )
+ outfile.write(s1)
+ elif hasChildren == 0:
## s1 = " self.valueOf_ = ''\n"
## outfile.write(s1)
## s1 = " for child in child_.childNodes:\n"
@@ -2154,10 +2157,6 @@
outfile.write(s1)
s1 = " self.valueOf_ += child_.nodeValue\n"
outfile.write(s1)
- if base and base in ElementDict and base not in SimpleTypeDict:
- parent = ElementDict[base]
- s1 = " %s.buildChildren(self, child_, nodeName_)\n" % (base, )
- outfile.write(s1)
# end generateBuildFn
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users