Author Topic: XML schema import frustration  (Read 3609 times)

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
XML schema import frustration
« on: July 19, 2007, 02:07:52 pm »
Can / does EA support mutliple XSD import in one operation - so that associations betwen elements and types when in multiple schemas are preserved?

Currently, I can only import one schema at a time.  EA won' then create an association between types in different schemas.

Any ideas? (or is this a feature request for Sparx?)

Below is a simple example to illustrate.

I have 2 schemas - Book.xsd and Author.xsd

Author.xsd has an Author type and global element called author
Book.xsd includes the Author.xsd schema.  Book.xsd has a book global element and Book complex type.  The Book complex type has an
<xs:element ref="author"/>

What I want to see is EA create an association between book and author.  Instead I get the Book type imported with a
"ext_ref1: Author" element, then Author imports and of course no association is created between the two.

What I would like is:
a) Ability to import multiple schema in the same operation and for EA to inteligently resolve references between schema and create associations required

b) Be able to merge in changes and not treat a schema import as a "fresh / new" schema. ie. select an existing folder and have an option to "merge in" changes to the XSD files into the existing elements in a model

Cheers,
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"

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: XML schema import frustration
« Reply #1 on: July 19, 2007, 03:33:02 pm »
Yes Dave, these limitations seem to apply.

Drives me absolutely snaky. I've been unable to find any easy (or even moderately hard) workaround.

I did make a report about this during the EA 7.0 beta, but have not heard anything back on this file.

David
No, you can't have it!

Stephanie

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: XML schema import frustration
« Reply #2 on: August 20, 2007, 09:04:10 am »
Is there any way at all to model an <<XSDimport>>?

I tried manually by nesting one schema package into the other and then drawing an "dependency" of stereotype <<xsdImport>> from one package to the other. But unfortunatly EA's XSD Schema Generator does not recognice this (according to David Carlson's suggestions for an XSD UML-Profile, which EA claims to be based on, it should work like this).

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: XML schema import frustration
« Reply #3 on: August 21, 2007, 02:13:49 am »
Stephanie,

AFAIK there is no (direct) way to do this. Sigh...

Regardless of the basis for the EA implementation, I agree that this would be a good - perhaps the phrase should read "is a necessary" - feature. IMHO adding this (and other related things) is simply making EA's XSD features complete, rather than an extension.

Are you going to make the request or shall I?

David
No, you can't have it!

Stephanie

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: XML schema import frustration
« Reply #4 on: August 21, 2007, 11:38:46 pm »
Please do it if you don't mind. I think you have a more complete insight in the topic.

DrJeff

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: XML schema import frustration
« Reply #5 on: October 15, 2007, 01:09:21 pm »
Import your schemas into hyperModel. The file that hyperModel creates (.uml extension by default) can be imported directly into EA if you just (1) make the extension .xmi and (2) change the 'XMLSchema:' namespace prefix to something reasonable like 'xsd:'. All the schemas will be there.
You may then want to strip off the Dave-Carlson-style stereotypes; I use a set of simple transformation templates to do that.