I've had this issue for a long time so I thought it's about time to raise it.
I have quite a large class model which is a platform-independent model used as a canonic model, which I then export to an XSD for implementation into our middleware platform. The model has many packages, general only with one sub-package per main domain area.
Example of package structure:
ConsumerApplication
Party
PartyRelationship
PartyRelationship_BU
CRM
CRM_BU
Document
DocumentTemplate
FinancialAccount
FinancialAccount_BU
FinancialTransaction
FinancialTransaction_BU
Order
OrderEvent
SuccessError
The sub-packages are simply specialised area per business unit, and I don't think particularly important.
When one package references another, say a PartyRelationship object is used in the Party model, the following happens in the Party model XSD export
<include schemaLocation="../CRM/CRM.xsd">
<include schemaLocation="../SuccessError/SuccessError.xsd">
<include schemaLocation="elationship/PartyRelationship.xsd">
When it should be:
<include schemaLocation="../CRM/CRM.xsd">
<include schemaLocation="../SuccessError/SuccessError.xsd">
<include schemaLocation="../PartyRelationship/PartyRelationship.xsd">
Similarly, if Order references OrderEvent:
<include schemaLocation="vent/OrderEvent.xsd">
Instead of:
<include schemaLocation="../OrderEvent/OrderEvent.xsd">
This only seems to happen where there are packages that are similarly named, and have a reference to each other. It doesn't happen to the Financial* starting ones, but that may be because there isn't a stand alone package, e.g. Party and PartyRelationship, where Party is stand alone.
I've tried doing a transform to an XSD stereotyped model first before then exporting this. And direct to XSD.
I believe it's some sort of but with the XSD export script but I cannot be sure. If anybody has any ideas it would be very much appreciated.
Thanks in advance.