Book a Demo

Author Topic: When is xmi.idref generated in XMI export?  (Read 3047 times)

Michael_Giroux

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
When is xmi.idref generated in XMI export?
« on: February 27, 2007, 09:41:40 am »
I'm using EA 6.5 b 804.

I am developing a tool that processes exported xmi XMI.  The tool failed when it encountered a UML:Stereotype that did not have a name attribute.  Instead, the element had an xmi.idref that referred to the element that contained the name.

So now I'm trying to generate an EAP file that will cause the situation to occur in an exmported XMI file, but I'm not able to define any class or package that gets exported as it was in the failing case.

Can someone tell me in what conditions EA would generate a <UML:Stereotype xmi.idref=... >  instead of <UML:Stereotype name="sname">


«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: When is xmi.idref generated in XMI export?
« Reply #1 on: February 27, 2007, 11:26:31 am »
Just a guess...

Could the stereotype have come from a metamodel defined in EA? Perhaps the stereotype was imported into a model, and afterwards used there.
No, you can't have it!

Michael_Giroux

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: When is xmi.idref generated in XMI export?
« Reply #2 on: February 27, 2007, 11:33:36 am »
Thanks for the suggestion.

Quote
Just a guess...

Could the stereotype have come from a metamodel defined in EA? Perhaps the stereotype was imported into a model, and afterwards used there.


Since posting the question, I discovered the condition that causes this export.  If I export to XMI starting at a package node that has a stereotype, then the xmi is generated with an xmi.idref for the stereotype of the package.  If I select the immediate ancestor in the project as the root of the export, then I get an export that that has the name directly in the UML:Stereotype element.

Now that I know how to force the condition I can proced to improve the tools I'm developing.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: When is xmi.idref generated in XMI export?
« Reply #3 on: February 27, 2007, 11:47:15 am »
Thanks for the details Michael. It is worth knowing, since parsing XMI is likely to get more common in add-ins and such.

David
No, you can't have it!