Book a Demo

Author Topic: Generate only 1 toplevel element in XML Schema  (Read 5588 times)

Alinen

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Generate only 1 toplevel element in XML Schema
« on: October 14, 2015, 08:16:49 pm »
Hi,

I am using EA 10 to model my XML Schema.

As can be seen in the documentation [1], EA always generates an <xs:element ...> line for each complex type, for example
Code: [Select]
<xs:element name="ContactInfo" type="ContactInfo"/> in the above mentioned documentation.

How can I control this behaviour? I thought a single element of stereotype <<XSDtopLevelElement>> would be sufficient. That actually generates the <xs:element ...> line I am expecting. But still for all other elements such a line is generated.

How can I avoid this? I only want to allow 1 single rop level element.

[1] http://www.sparxsystems.com.au/resources/xml_schema_generation.html

Rodrigo Nascimento

  • EA User
  • **
  • Posts: 33
  • Karma: +3/-0
    • View Profile
Re: Generate only 1 toplevel element in XML Schema
« Reply #1 on: October 15, 2015, 09:34:23 pm »
Hi,

I believe that you want to produce a XML Schema using the 'Venetian Blind' style, instead of 'Garden of Eden'.

Take a look at this post from my blog, where I explain step-by-step how to do it:

http://connection.rnascimento.com/2015/03/27/deriving-xml-schemas-from-your-enterprise-information-model/

I would also consider upgrading to version 12. There is a new functionality called 'Schema Composer' that has been helping me to create better XSD schemas. I've also wrote an article about it:

http://connection.rnascimento.com/2015/06/24/sparx-ea-schema-composer-overview/

Hope it helps!

Regards,
Rod
Please check my blog for more EA related articles!

http://connection.rnascimento.com