I'm using generateDS to process a large XSD file which does not have any
includes or imports in it. It does have what I understand to be anonymous
complex types (no "name" attribute). When I process the file normally I get
the following error:
# generateDS.py -o output.py -s outputsubs.py input.xsd
Traceback (most recent call last):
File "/usr/local/bin/generateDS.py", line 5, in <module>
pkg_resources.run_script('generateDS==2.7c', 'generateDS.py')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in
run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in
run_script
execfile(script_filename, namespace, namespace)
File
"/usr/local/lib/python2.7/dist-packages/generateDS-2.7c-py2.7.egg/EGG-INFO/scripts/generateDS.py",
line 4721, in <module>
main()
File
"/usr/local/lib/python2.7/dist-packages/generateDS-2.7c-py2.7.egg/EGG-INFO/scripts/generateDS.py",
line 4715, in main
processIncludes, superModule=superModule)
File
"/usr/local/lib/python2.7/dist-packages/generateDS-2.7c-py2.7.egg/EGG-INFO/scripts/generateDS.py",
line 4445, in parseAndGenerate
inpath=xschemaFileName)
File
"/usr/local/lib/python2.7/dist-packages/generateDS-2.7c-py2.7.egg/EGG-INFO/scripts/process_includes.py",
line 49, in process_include_files
prep_schema_doc(infile, outfile, inpath, options)
File
"/usr/local/lib/python2.7/dist-packages/generateDS-2.7c-py2.7.egg/EGG-INFO/scripts/process_includes.py",
line 203, in prep_schema_doc
raise_anon_complextypes(root2)
File
"/usr/local/lib/python2.7/dist-packages/generateDS-2.7c-py2.7.egg/EGG-INFO/scripts/process_includes.py",
line 301, in raise_anon_complextypes
type_name = unique_name(type_name, def_names)
File
"/usr/local/lib/python2.7/dist-packages/generateDS-2.7c-py2.7.egg/EGG-INFO/scripts/process_includes.py",
line 316, in unique_name
raise RaiseComplexTypesError('duplicate name count max (100) exceeded')
I see that the code in process_includes attempts to raise the anonymous
complex types to the top level and make their elements reference them. It
fails after 100 instances (hard coded).
If I process the file with the --no-process-includes parameter, output is
successfully generated.
What I don't understand is why the same error is not generated in the
successful case? The elements causing the issue are not imported or
included, they are in the main file. Why is process_includes processing the
main file in a different way to generateDS?
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>
------------------------------------------------------------------------------
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