I've found another issue with the way that generateDS handles our XSD. We have many cases in the XSD where elements like "ListLineReq" and " ListSipProfileReq" below contain an element called "SearchCriteria". The "SearchCriteria" element looks different in many cases. When I generate code using "--no-process-includes", only one class called "SearchCriteria" is generated and it is used by all the other classes. This is clearly incorrect. If however I do not use "--no-process-includes", a class is generated for each different version of "SearchCriteria". This seems to be the correct behaviour. This behaviour does not seem to be related in any way to processing include or import directives. Is there a reason why this code is in the process_includes.py script instead of the main generateDS.py script?
In order to use "--no-process-includes" I have to raise the count in the check in the "unique_name" function which only allows 100 instances of the same class (with an appended number) to exist as there are about 300 occurrences in the XSD I am trying to generate code for (I posted about this previously). Attached is a patch which sets the maximum number of duplicate type names to the number of elements parsed from the XSD. If the patch is acceptable, how do I go about getting it into the next release of generateDS? <xsd:complexType name="ListLineReq"> <xsd:sequence> <xsd:element name="searchCriteria"> <xsd:annotation> <xsd:documentation> Atleast one element under searchCriteria has to be mentioned </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="pattern" type="xsd:string" minOccurs="0"/> <xsd:element name="description" type="xsd:string" minOccurs="0"/> <xsd:element name="routePartitionName" type="xsd:string" minOccurs="0"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="returnedTags" type="axlapi:LLine" minOccurs="1"/> <xsd:element name="skip" type="xsd:unsignedLong" minOccurs="0"> <xsd:annotation> <xsd:documentation>It will be used only when first tag is specified. </xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="first" type="xsd:unsignedLong" minOccurs="0"/> </xsd:sequence> <xsd:attribute use="optional" name="sequence" type="xsd:unsignedLong"/> </xsd:complexType> <xsd:complexType name="ListSipProfileReq"> <xsd:sequence> <xsd:element name="searchCriteria"> <xsd:annotation> <xsd:documentation> Atleast one element under searchCriteria has to be mentioned </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="name" type="xsd:string" minOccurs="0"/> <xsd:element name="description" type="xsd:string" minOccurs="0"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="returnedTags" type="axlapi:LSipProfile" minOccurs="1"/> <xsd:element name="skip" type="xsd:unsignedLong" minOccurs="0"> <xsd:annotation> <xsd:documentation>It will be used only when first tag is specified. </xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="first" type="xsd:unsignedLong" minOccurs="0"/> </xsd:sequence> <xsd:attribute use="optional" name="sequence" type="xsd:unsignedLong"/> </xsd:complexType> Thanks -- <http://www.voss-solutions.com/> * Daniel Browne * Developer / Design Lead VOSS Development Mobile: +27 (0) 79 293 2044 daniel.bro...@voss-solutions.com <https://twitter.com/voss_solutions> <http://www.linkedin.com/company/voss> <http://www.facebook.com/pages/VOSS-Solutions/254816747898652?sk=wall>
patch.diff
Description: Binary data
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users