> From: Vincent van Beveren <v.vanbeve...@rijnhuizen.nl> > To: Dave Kuhlman <dkuhl...@pacbell.net> > Cc: "generateds-users@lists.sourceforge.net" > <generateds-users@lists.sourceforge.net> > Sent: Thursday, February 12, 2009 1:18:23 AM > Subject: RE: [Generateds-users] FW: Couple of issues writing XML > > Hi Dave, > > > Vincent - > > > > I've created a schema and an instance document that tries to test > > several of the problems you've identified. I've attached the > > following: > > I'm fraid I did not receive the attachment, but I will look at it as soon as > I > receive it.
You did not receive it because I forgot it. I apologize. Here is is for real this time. > > > > It seems to me that the omitted values are handled correctly. When > > a value is omitted, the generated code does not export the > > attribute. Am I right about this? Is the attached code doing what > > we want? Is it possible that you are using an older version of > > generateDS.py? > > Yes, I've downloaded and installed the latest version and it seems to be > fixed > already! > Good. > > Thanks for the suggestion about JAXB. I knew about XMLBeans, but > > not JAXB. I'll take a look. > > While XMLBeans define a strict mapping between XML and Java objects, JAXB > generates Java classes based on the XSD (or DTD) definition. So, its much > more > close to generateDS than XMLBeans. > > http://java.sun.com/developer/technicalArticles/WebServices/jaxb/index.html > I'll take a look. Perhaps it will give us a suggestion about the empty content (no children and no character content) problem. It looks to me like the empty character content will be easy to solve (generate a test for an empty string). But the check for zero children will be more problematic. > > > > > By the way, I don't know whether you have looked at Jython. The > > Java code generated by XMLBeans is usable by Jython. I suspect > > that Jython could also import and use the code generated by JAXB. > > Not trying to talk you out of using generateDS.py, but in a more > > Java oriented environment or shop, ... > > Well, I was a java developer in my previous job. Now I just use what suits > the > best for the task ahead. We mainly work with Python here, which works fine > for > most things. I took a quick look at your Web site (http://rijnhuizen.nl/). Whatever you use Python for, it sounds very advanced and very interesting. More later. - Dave -- Dave Kuhlman http://www.rexx.com/~dkuhlman ------------------------------------------------------------------------------ _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users