Hello,

Thank you for the GenerateDS library. I find it very useful. I have a couple of things to ask:

1) The webpage with example python code, mentioned in the documentation -- http://www.davekuhlman.org/gends_user_methods.py -- does not exist.

2) When I try to use --one-file-per-xsd argument, I get the following error:
*** maxLoops exceeded.  Something is wrong with --one-file-per-xsd.

3) Namespace definition behavior -- by default, generateDS puts namespace definition in every export method of generated classes. That is, every element in an exported xml that has children would have namespace definition. But what if I only want namespace definition in top-level element? For example, I want this:

<ns1:topLevel xmlns:ns1="http://somenamespace.org";>
  <ns1:secondLevel>
    <ns1:thirdLevel>
  </ns1:secondLevel>
</ns1:topLevel>

Instead of this:

<ns1:topLevel xmlns:ns1="http://somenamespace.org";>
  <ns1:secondLevel xmlns:ns1="http://somenamespace.org";>
    <ns1:thirdLevel xmlns:ns1="http://somenamespace.org";>
  </ns1:secondLevel>
</ns1:topLevel>

I know I can modify export methods and put namespacedef_='' in each of them except for the top-level. But is there any other way to optimize that? Do you think it makes sense to add such feature via a command-line option? I looked into code and it changed to this by modifying just one like, but didn't test it thoroughly.

4) Several namespaces do not work.

When there are several namespaces, only one is filled everywhere in generated classes. Therefore it builds the following xml

<ns1:topLevel xmlns:ns1="http://somenamespace.org"; xmlns:ns2="http://someothernamespace.org";>
  <ns1:secondLevel>
    <ns1:thirdLevel>
  </ns1:secondLevel>
</ns1:topLevel>

Instead of what it should be:

<ns1:topLevel xmlns:ns1="http://somenamespace.org"; xmlns:ns2="http://someothernamespace.org";>
  <ns2:secondLevel>
    <ns1:thirdLevel>
  </ns2:secondLevel>
</ns1:topLevel>

5) XML schema extension elements.

I'm not sure how it should be used, but it seems that extension does not work correctly. In types which are not leaves (that do are not extended/subclassed) I see the /extensiontype_ /field, though it is not initialized with a name of the subclass, and in leaves it is absent overall. Or should it be the desired behaviour? It seems logical to assign type name to the /extensiontype_/, then it produces correct xml, at least in my case.

6) A nice feature would be if we can parse xml from file-like object, not only filename (just like it is exported to the file-like object). Do you think the feature is worth adding?

In case it makes sense to work on these things, I'll be glad to contribute.

Best regards,
Eugene

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to