Author Topic: Hopefully easy XSD question  (Read 1817 times)

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Hopefully easy XSD question
« on: September 25, 2006, 08:30:48 pm »
I want to be able to setup 3 schemas - called A, B, and C

B contains a complex type I want to re-use on A and C

When I generate A and C - B's complex type isn't included.

How do I do the above?
I have tried creating an import dependency from package A to B - but that doesn't work.  How do I "Link in" the complex type in the schema generation?

Must you put all complex types within the parent package for it to include them in the generation?

Sorry if this is a really simple / easy question - I'm trying to learn XSD structure / semantics at the same time I'm learning how EA applies them.

Thanks,
David.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: Hopefully easy XSD question
« Reply #1 on: September 25, 2006, 09:21:58 pm »
I think I've answered it.

My "Top level" XSD package was empty - so of course it won't generate anything.  You need to contain at least one complex type to "seed" it.  As long as associations exist to other complex types (no matter what packages they live in), they (or references to them) will be included in the XSD generated along with an element representing each.

So far so good.

One gotcha...
Your associations when set to the "unspecified" direction are actually set to non-navigable at the source end and navigable at the target end.  This is a little misleading in my book - surely it should be "unspecified" at both ends?  Maybe a bug??? (or is this a UML mandate?).

David.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"