Hi Dave, Dave Kuhlman wrote: > Arne Grimstrup <[EMAIL PROTECTED]> writes: > >> I think this will be very useful; so much so that I'm going to give it a try >> right away. ;) There are a number of other developers in my project who are >> also interested in this work and would love to use this code. Personally, >> I'd like to see process_includes embedded in the generateDS script so that >> the imports/includes are processed automatically. > > I've taken your suggestion to embed process_includes.py into generateDS.py so > that processing will happen automatically when a "-i" flag is provided on the > command line.
That's great! I look forward to trying it. My attempt to co-mingle import and include within process_includes didn't really pan out. And after some further research, I realized that the two operations are fundamentally different and don't belong together. > Now, a question: Should that processing always take place? If so, we do not > need the new "-i" flag. I'm not sure. I could use your opinion. Here are a > few alternatives: > > 1. Only process includes when the "-i" flag is used. > > 2. Always process includes *unless* a flag is used (perhaps "--no-includes"). > > 3. Always process includes, and abort when an include document cannot be > found. > > 4. Always process includes, but fail gracefully when the XML Schema document > to > be included cannot be found (perhaps giving a warning message). The new > implementation of generateDS.py currently aborts with a traceback when it > cannot > find an include file. Without the includes, the resulting classes really aren't usable with any documents that are compliant with the original schema so we pretty much always have to process includes. (That's the problem I have with import as things are implemented at the moment.) If the included document can't be found, I think aborting with a informational message is the most reasonable course of action. I guess that puts me in the Option 3 camp. If it weren't much trouble I'd add the --no-includes flag, but I honestly can't think of a case where I'd need to use that option. > I'll add a bit of documentation and will post a new version in a day or two. > > - Dave I look forward to seeing it. Thanks! Hope this helps, Arne ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users