Christin,

OK.  So I think I know why it is doing this.  gDS builds a
dictionary of types and then uses that to generate the
GDSClassesMapping.  But, gDS is not distinguishing between top level
xs:element and those xs:element objects that are members of a
xs:complexType.  So when it finds the xs:element used to define the
Data element in CategoryOne, it overwrites the correct member of
that dictionary.

I can think of another way to do this.  But, I have to think about
it a bit.

In the meantime, here is a question that would help me understand
this.  Isn't it the case, that what really should be generated is
this:

    GDSClassesMapping = {
        'Data': DataMessage,
        'Measurement': CategoryOne,
    }

That is, it should only contain the names and types of the top-level
element declarations, which, in this schema are "Data" and
"Measurement".  "Details" should not be in there at all.  Do you
agree?  Or, am I confused about what we are trying to do.

Give me a couple of days.  I'm going to be away from my computer
tomorrow.

Dave

On Mon, Oct 09, 2017 at 04:51:31PM -0400, Christin Gunning wrote:
> Dave,
> 
> I have a question about generateDS’s “GDSClassMapping”:
> 
> The "error" that we are seeing occurs when:
> (a) a simple element is initially used to associate a tag name (Data) with
> a complex type (DataMessage) in an XSD schema,
> (b) in the same schema, another complex type (Measurement) contains a
> sequence that happens to be named (Data) as well and maps to a different
> complex type (DataMessageDetails).
> 
> The class mapping we are expecting is:
> 
> GDSClassesMapping = {
> 'Data': DataMessage,
> 'Details': DataMessageDetails,
> 'Measurement': CategoryOne,
> }
> 
> --but-- the ACTUAL result is:
> 
> GDSClassesMapping = {
> 'Data': DataMessageDetails,
> 'Details': DataMessageDetails,
> 'Measurement': CategoryOne,
> }
> 
> We are seeing many more erroneous mappings. The XSD and generated bindings
> are attached. Please advise if this a bug or if a usage flag can be easily
> used to resolve.
> 
> Thanks!
> Christin Gunning

-- 

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