W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2005

uml to xml schemas

From: sreedevi crk <sreedevi_crk@yahoo.com>
Date: Mon, 5 Dec 2005 19:50:22 -0800 (PST)
Message-ID: <20051206035022.55667.qmail@web61121.mail.yahoo.com>
To: xmlschema-dev@w3.org
  We are working on a MDA architecture based project but new to xml and xmi and hypermodel etc. We are generating xml schemas from the uml models created in rational rose. 

I have two questions:

1) How are composition, associations and inheritance (class hierarchies) of uml models represented in xml schemas; When to use type substitution vs substitution groups in xml schemas to represent the above.
In a domain model, consider a class hierarchy with an abstract super class X, that has two or more concrete subclasses: 
a) A different class Y has an attribute whose type is X. 
b) A different class Z has association(s) with more than one concrete classes of X.
How the above cases are represented in xml schema; is it by type substitution or substitution groups?

2) Currently the auto generated xml schemas represent the class hierarchy of X as type substitution and at the same time has reference to substitution groups(as it is true by default in xml schemas) but expects the instance document to be user modified to enter type for xsi:type. But we thought that if substitution groups are used, manual changes to instance documents can be avoided and that the xml content is more readable. So is there a way to tweak the xml schema auto generators to produce substitution groups related code instead of type substitutions in xml schemas.

Note: I have read some articles, but got confused as there are different notions- Some say that substitution groups represent associations/inheritance/composition and type substitution represents polymorphism. But some contradict by using type substitution for every thing above???

Your input is highly appreciated as it is very crucial for my work progress.

Thanks in advance.

Yahoo! Shopping
 Find Great Deals on Gifts at Yahoo! Shopping 
Received on Tuesday, 6 December 2005 03:50:27 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:09 UTC