Book a Demo

Author Topic: Creating an "XSDElement" attribute with a script: no tagged values  (Read 6876 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Creating an "XSDElement" attribute with a script: no tagged values
« on: September 02, 2021, 12:15:51 am »
Hello,

I'm working on a script to create XSDelement stereotyped attributes within an existing XSDcomplexType class.
Despite the fact that the attribute stereotype is set to XSDelement, it doesn't have any tagged value.

I attempted to run the SynchProfile from the script (see below) but it doesn't work. I noticed that Synchronize Stereotype is not available from the toolbox.
e.g.
Code: [Select]
Repository.CustomCommand("Repository", "SynchProfile", "Stereotype=XSDelement;");
Do you know if there's a way to sort this? The only workaround I identified is to manually create the tagged values but it's a bit cumbersome.

Thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating an "XSDElement" attribute with a script: no tagged values
« Reply #1 on: September 02, 2021, 01:41:35 am »
I guess it would belong to some profile. You have to endeavor which one. Just grep in the MDGTech folder inside EA program files.

q.

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Creating an "XSDElement" attribute with a script: no tagged values
« Reply #2 on: September 02, 2021, 04:45:01 pm »
XML Schema is part of the Core Extensions MDG so I understand the definition is built in EA.
I ended up manually creating the tagged values under the XSDelement attributes which worked ok.

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating an "XSDElement" attribute with a script: no tagged values
« Reply #3 on: September 02, 2021, 07:30:43 pm »
I'm a bit puzzled. Since XSD* is bound to no profile (but some wild EA-internal stuff) it does also have no stereotype properties since these are bound to/defined by profiles. So which "tagged values" are you expecting to see?

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Creating an "XSDElement" attribute with a script: no tagged values
« Reply #4 on: September 02, 2021, 09:00:14 pm »
That seems to be a bit of a weirdo

I did a little test and found that the XSDElement (of the out of the box stereotype) doesn't have a profile
t_xref says this: @STEREO;Name=XSDelement;GUID={7C6052D4-A37C-43d0-B763-3F1281A402DF};@ENDSTEREO;

However it automatically creates these tagged values
- anonymousRole
- anonymousType
- default
- fixed
- form
- nillable
- position

there is also a UML profile for XML schema available for download from the sparx website.
If you use that instead of the default XML schema element you might be able to get the correct tagged values by specifying the fully qualified stereotype.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Creating an "XSDElement" attribute with a script: no tagged values
« Reply #5 on: September 02, 2021, 09:21:13 pm »
Makes me wonder why they left over that internal mumbo jumbo if there's an official profile. Or rather it makes me wonder why it makes me wonder.

q.

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Creating an "XSDElement" attribute with a script: no tagged values
« Reply #6 on: September 06, 2021, 05:33:22 pm »
I got the same results as Geert and ended up creating the tagged values on the XSDelement stereotyped attributes, including the enum values + descriptions when applicable.

Thanks
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com