5
« on: October 16, 2007, 06:40:11 am »
I'm currently using EA 6.5, build 806. I'm using EA to generate XML Schemas, and in particular there are multiple namespaces involved and multiple Schema files in each namespace (for modularity reasons).
The key problem that I am having is that, where my main Schema has namespace A, and needs to use definitions from two Schemas with namespace B, EA inserts two <xs:import> statements into Schema A. However, Schema validators typically don't accept this, they accept the first import for namespace B and ignore the rest, which makes the Schema invalid. A solution, in Schema terms, is for each namespace to have a separate Schema that just includes all of the Schemas for that namespace (without having any definitions of its own), and only do importing of those "includes only" Schemas.
That said, I can't find any way to get EA to do this, not when authoring the UML directly. For example, it isn't obvious how you can set up one Schema to just contain includes of other Schemas, without there being a direct dependency on those Schemas that you want to include.
However, this isn't just an "EA can't do it" issue. When I construct the Schemas by hand in the format I describe, with one Schema per namespace just for includes, and the imports only done via those "include only" Schemas, EA imports it perfectly well. More interestingly, if I then export those Schemas, *EA exports them the the same import/include structure as they had when imported*. So EA can do it, but what I want to know is whether or not the ability to set up the model for this is available directly at the level of the UML UI.
I exported the XMI for my model (after having imported the Schemas), and I see that for my "includes only" Schema, within the (package) <element> for that Schema, there is a <code> element with a "header2" attribute that the locations of the included Schemas. How can I create that same "header2" value from within the UML UI?
Thanks very much in advance,
Cheers, Tony.