Hi Dave, Yep, your solution worked just fine. :) Thanks! -T Dave Kuhlman wrote: From: Tennis Smith <ten...@tripit.com> To: generateds-users@lists.sourceforge.net Sent: Thursday, March 19, 2009 1:22:26 PM Subject: [Generateds-users] root.annotate() Error?Hi, I'm trying to use 'generateDS' on a known-to-be-good schema, and I'm getting this error:./generateDS.py -o ./EMSFlightMonitorService.py./EMSFlightMonitorService.xsd Traceback (most recent call last): File "./generateDS.py", line 4356, in main() File "./generateDS.py", line 4352, in main processIncludes, superModule=superModule) File "./generateDS.py", line 4242, in parseAndGenerate root.annotate() AttributeError: 'NoneType' object has no attribute 'annotate' This is with the latest version of generateDS.Hello. That's a somewhat generic (and not very informative) error message that generateDS.py gives when it fails to build the data structures it needs to enable it to generate Python code. One common problem is the namespace prefix used in the schema file. If it is other than "xs:", you will need to use the -a command line option. An example: generateDS.py -a "xsd:" -o mylib.py -s myapp.py --super=mylib myschema.xsd If you could send me your schema (or let me know where I can go to download it), I'll take a look. Wait. I found EMSFlightMonitorService.xsd with a Web search. And, yes, the namespace prefix was causing this problem. (I really need to document that better, or something. Or, is this just a good way for me to get an email once in awhile from a user.) Anyway, I was able to generate files with the following command line: generateDS.py -a xsd: --super=tmp1sup -o tmp1sup.py -s tmp1sub.py EMSFlightMonitorService.xsd I also was able to import that file in Python. So, that tells us that the code is legal Python code. But, I do not have any instance documents, so I can't really do any further testing. So, please let me know what happens when you try it on an XML instance document that obeys that schema. - Dave -- Dave Kuhlman http://www.rexx.com/~dkuhlman |
------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users