Rob,

I might have a fix for our namespace prefix problem.  Referencing
your earlier message:

> The PayloadFloat class exports tags in the “oadr” namespace; it
> should export tags in the “ei” namespace.  The PowerReal class
> exports tags in the “oadr” namespace; it should export tags in the
> “power” namespace.
> The intervals class lacks a “strm” namespacedef.

This fix results in lots of differences (between the old and new
versions) when I run oadr_20b.xsd through it.  So, if it seems to be
doing the right thing, we'll still have to do some serious checking
to make sure that it has not introduced undesired behavior.

Here are a few comments:

1. There was actually some support for manually controlling the
   namespace prefix for exported content.  In the case of the Open
   ADR schema, this would involve so much work that it would not be
   very helpful.  Still, you may want to be aware of it.  See this:
   
http://www.davekuhlman.org/generateDS.html#adding-custom-exported-attributes-and-namespace-prefix-definitions.
   And, also search for "GenerateDSNamespaceDefs_" in one of your
   generated files.

2. I do not have an XML document that is an instance of the Open ADR
   schema.  So, I am not able to actually test this change.
   However, it does *seem* to produce the difference in the
   generated PayloadFloatType class that we want to see.

3. FYI, here is how this change works: process_includes.py has been
   modified so that it collects a dictionary that associates
   xs:element and xs:complexType names that are at at the top level
   and associates those names with the target namespace in which
   they are defined.  Since process_includes.py mashes everything in
   all the documents in a schema into a single document, that
   information was formerly being lost.

I've attached the two files that have changed to a separate message.
If and when you have time, please give it a try, and let me know
about whether it fixes the problem we are focused on and whether it
introduces any new problems etc.

I need to do additional testing before I push these changes to the
Bitbucket repository.

Dave


-- 

Dave Kuhlman
http://www.davekuhlman.org

------------------------------------------------------------------------------
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