Book a Demo

Author Topic: Element Type and Restriction  (Read 3679 times)

HerbertFalk

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Element Type and Restriction
« on: June 27, 2017, 05:33:26 am »
I am trying to, through the automation interface, to set a Type, Restriction, and Tagged Values. 

I can find EA.Element.Type.  If I want to restrict it to a "int" do I just: EA.Element El.Type = "int"?

However, there is no EA.Element.Restriction property, how do I set that?

Then how to create or access the Tagged Values for the Restriciton?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Element Type and Restriction
« Reply #1 on: June 27, 2017, 06:06:55 am »
What is a restriction? Do you mean a constraint?

q.

HerbertFalk

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Element Type and Restriction
« Reply #2 on: June 27, 2017, 10:19:06 pm »
Let me go back a bit.  I am trying to use the EA Schema Composer capability to create XSDs for messages.  Consider a class that represents a INT32 type (e.g. the name of the class).  Schema Composer requires that there be an xsd equivalent defined. 

To do this, the INT32 class is assigned a StereoType of "XSDSimpleType".  When this is applied, a Properties menu is presented.  This allows the assignment of a Type (e.g. int) and to apply a checkbox (Restriction).  If restriction is applied, a set of TaggedValues is presented that allow the xsd pattern or maximum length to be defined.