Brandon -

Thanks for you notes and fixes.  Give me a few
days to sort through them.

- Dave

 -- 


Dave Kuhlman
http://www.rexx.com/~dkuhlman




________________________________
From: Brandon Pedersen <bped...@gmail.com>
To: generateds-users@lists.sourceforge.net
Sent: Tuesday, June 2, 2009 11:23:54 AM
Subject: [Generateds-users] modifications I have made

So, I have been doing a bunch of tweaking to generateDS and just wanted to post 
the changes I made...the most major thing I changed is that rather than having 
like 1700 lines of duplicated code in every .py file generated from an XSD, I 
had it write out the base stuff to one file and then the output file imports 
everything from that file...

I had like 13 XSDs to generate code for and it was a hassle to clean up the 
code manually and remove all the duplicate stuff so thats why I changed this...

I also made it so that rather than inserting included XSDs into the current 
tree (which is technically proper) I take that file and call main in generateDS 
to generate a seperate file. Then I save the file name and add it to a list of 
imports at the top of the file

Another change I made is that rather than making every XSD contain main I 
create a seperate parser.py file which will parse in an XML file and then do 
the export. Also added a --python option to use exportLiteral instead of export

The last few changes I made aren't really done...I just added to the simpleType 
implementation a little bit. I added a restriction attribute to the simpletype 
class which is a constraint facet. This constraint facet can be used to 
generate validation code for value...not very clean and probably not proper but 
its a start...I started, then looked at the w3c documentation for constraints 
and simpletypes...then gave up, haha

Anyway, here are some patch files...I ignored whitespace, you may notice that I 
used tabs instead of spaces in some of the simpletype generated code...you can 
use it or not, just thought I would through it out there

-Brandon
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to