I found something that works, albeit not that flexible. By just using an association between class A and the enumeration class for B, the schema generated uses the ref attribute to refer to the root element definition for B's type.
The limitation is that you can't re-use the type for other elements with different names. And the enumeration itself must be the name of the element. I assume this is the way it is designed to work? On Thursday 17 February 2005 11:37 am, David R. Allen wrote: > I added the two stereotypes, XmlSchemaType and Enumeration, to some classes > which are enumerations for fields in other XmlSchemaType element > definitions. > > Instead of getting nested elements which use the enumeration, I am getting > root level element definitions for each enumeration. How are these to be > useful? The enumerated elements generated inside other elements just have > "xsd:com...XXXEnum" as the type with no reference to the actual schema type > for the XXXEnum enumeration definition. > > So if I have an element called A which contains an element called B, whose > values are restricted to an enumeration, what is the correct mechanism for > identifying element B, the field in class A, as an enumeration? > > For other cartridges, field B in class A would just be of type XXXEnum, > which restricts the values for B to only those available as an instance of > XXXEnum. > > I need the same thing in XML Schema as well, where element B should be > declared of type XXXEnum(Type) so that its values are restricted. > > Thanks. -- David Allen [EMAIL PROTECTED] ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user
