> From: Rinat Yangurazov >To: "Dave Kuhlman (dkuhl...@rexx.com)" <dkuhl...@rexx.com> >Sent: Wednesday, March 6, 2013 8:52 AM > > > Hello Dave, > > I hope that all is going well with you. > > It looks like generateDS has been growing and the new version just > been released. > > Please accept my congratulation and big thanks for helping people, > like myself, to get our work done more efficiently.
Rinat - You are welcome. It is encouraging to hear that my work has been useful. So, thank you for telling me that. > > I wanted to ask you few questions about element class compliance > with schema definitions. > > When generateDS processes XSD file and generates libraries, do > attributes of those element classes are defined according to the > schema definitions? > > For example, If elements been defined as type=xs:string, will the > attempt to assign integer to such attribute fail? This one is a little bit of WYSIWTI (what you see is what there is). You can take a look at the generated code for the getter methods for any child element that is defined with type xs:string. You will see that there is no checking for types. You could, of course, modify the generated code so as to add custom type checking to the getter methods (usually "get_xxx()"). You may want to consider putting those customizations in a subclass file (generated with the -s command line flag. That might make it easier to preserve those changes when and if you need to regenerate your module. > > I believe that generateDS provide support to attributes defined as > xsi:type. Again, I'll let you discover this from the generated file. You can find an example in tests/ipo* in the distribution. Search for "get_class_obj_" and "xsi:" in tests/ipo1_sup.py. > > Situation I have is with 2 xsd files and it happens that both of > them have the same element name. I'm guessing that those two element names are in a different scope (nested inside two different complexType definitions). generateDS.py attempts to deal with nested anonymous complexTypes by raising them to top level and assigning unique names to them. But, if those types have explicit names then I'm not sure. I'd have to see an example. > > As the result existing tools/script is not able to derive one of the > abstract classes. > > I have not had a chance to try with generateDS yet and wanted to ask > how does it deal with xsi:type attributes? Again, I'll let you discover this from the generated file. You can find an example in tests/ipo* in the distribution. Search for "get_class_obj_" and "xsi:" in tests/ipo1_sup.py. Hope this is a little bit of help. - Dave -- Dave Kuhlman http://www.rexx.com/~dkuhlman ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users