> From: Andrew Dorrycott > Sent: Friday, July 17, 2009 9:20:06 AM > Subject: Working with Jboss JPDL-3.2.xsd > > Howdy, > > I've run into a snag when attempting to create the super and sub class > modules > from the JBoss's jpdl-3.2.xsd file, which I will attached to ease the search > for > the file. :) > > The first problem I ran into was with the element "priorityType" on line 441, > the general problem I've noticed is that generateDS.py can not work with a > simpleType element with a union of other simpleType elements. The error > caused > by this is "SimpleTypeElement instance has no attribute 'addChild'". > > My quick fix was to convert the element into a complexType to solve the issue.
Andrew - I think I have a fix for the first problem. Here is a patch that you can apply to version 1.18a: # ================================================ --- generateDS-1.18a/generateDS.py 2009-07-10 10:41:18.000000000 -0700 +++ ../generateDS.py 2009-07-20 17:28:16.000000000 -0700 @@ -1119,7 +1119,7 @@ def endElement(self, name): logging.debug("End element: %s" % (name)) logging.debug("End element stack: %d" % (len(self.stack))) - if name == SimpleTypeType and self.inSimpleType: + if name == SimpleTypeType: # and self.inSimpleType: self.inSimpleType = 0 if self.inAttribute: pass # ================================================ This change enables me to generate code from jpdl-3.2.xsd. It passes my other tests. But, I do not have an instance doc for your schema, so you will have to tell me how well the generated code works. > > To complicate the matters I have also noticed that the element "assignment" > on > line 363 can not be generated, this error is returned instead, "Element > assignment extension chain contains mixed and non-mixed content. Not > generated" > > My quick fix was to remove the extension that wrapped the attributes. > I'm still looking into this one. > Because of the project I am working on, I need to try and avoid making these > kind of changes if at all possible. > "I feel your pain", as they say. I'll see what I can do. More later. - Dave -- Dave Kuhlman http://www.rexx.com/~dkuhlman ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users