François and Edwin, You both seem to be suggesting several improvements that would clean up the code generated to pass namespace prefixes and their definitions to `export` functions and to pass them down to children.
I'm only trying to share some information so that we do not produce conflicts and to possibly gain some synergy. François's comments were, by the way, attached to pull requests, and I don't know how to sync that with the generateds-users email list. François, a few comments: (1) I'll wait on your additional changes before I accept this pull request. (2) This morning I did a few trials to determine when we can leave off the explicit namespace prefix and (by omitting the prefix) use the default namespace. I've discovered that I do not understand this and do not know how to control it. So, when we do this, I'd recommend that we validate any exported output against its schema, for example with `xmllint`. Maybe, someday, I'll understand XML namespaces, but it's not likely to be soon. Sigh. Dave ---------- Message 1 from François Guimond I modified generateds.py so the export function would use the namespace_ parameter instead of pulling the namespace systematically from the original xsd file. As you will see, it imply a complete rewrite of generateExportFn_(). My intentions where not to change style, but to be able to minimize breaking functionality. (I probably broke the boolean generation in generateExportFn_3, but I could not figure how to use the worker function with it) That is why I made a worker function for each generateExportFn_(), and I unwrapped some output code. Now this branch might be in early stages, but it is currently working for what I wanted it to do. So really this pull request is to probe your feeling about it. (I didn't run your tests because I didn't look for instructions, my bad...) ---------- Message 2 from François Guimond Dave, I made the pull request at the end of march... Last weekend, when I realized it didn't merge any more so I removed it. Now the patch objective was to remove all namespaces from each nodes to make the xml more human readable. So the generated XML currently looks like that: <mstns:Top xmlns:mstns="http://www.mynamespace.org/MyApi/Version_1_1>; <mstns:Feature>Key</mstns:Feature> </mstns:Top> My objective was to have this output instead ( including all the child nodes ): <Top xmlns="http://www.mynamespace.org/MyApi/Version_1_1>; <Feature>Key</Feature> </Top> Are you interested in modifications to allow that? If yes, would it be ok to use the principle of worker functions for: generateExportFn_1(), generateExportFn_2, generateExportFn_3 a little like the initial patch? If yes, I can restore my patch to be mergable. I understand my initial merge request was big and my request comment not exactly confident... I apologize for that. Let me know if you are interested. François Guimond -- Dave Kuhlman http://www.davekuhlman.org _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users