Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Generated XSDs have XMI postfix
Generated XSDs have XMI postfix [message #1804077] Sun, 17 March 2019 17:00 Go to next message
Mohamed Ismail is currently offline Mohamed IsmailFriend
Messages: 9
Registered: March 2019
Junior Member
Hi,

I am generating XSDs from genmodel file created from a papyrus UML file. The option that I'm using is "Generate Schema true" however, it is generating XSDs with the a naming convention BaseTypesABEsXMI.xsd, LocationABEsXMI.xsd, ..etc. I don't know where the postfix XMI is coming from! How can I control the naming convention of the generated XSDs?

I am using Papyrus eclipse 2018-09 (4.8) and here are the details for the EMF:

Eclipse Modeling Framework Core Runtime
Version: 2.17.0.v20190116-0940
Build: 201902091045
Commit: 519db481886e3fbf9a6f58fff69fb211c4f76833

Regards,
Mohamed
Re: Generated XSDs have XMI postfix [message #1804084 is a reply to message #1804077] Mon, 18 March 2019 05:12 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
If you simply enable Generate Schema in the GenModel, you don't have any control over the names or location of the results. If, from the context menu of the GenModel, you use Export Model..., you can control what type of schema is exported as well as the name(s) and the location of the resource(s).

Note however, that an XMI Schema is effectively a completely useless artifact that serves no real-life, practical purpose whatsoever. That's because an XMI serialization cannot be adequately described by an XML Schema. E.g., Ecore supports multiple inheritance of EClasses but XML Schema does not support multiple inheritance of Complex types.

If an XML Schema that properly describes the serialization is important for some real-life practical purpose, you're better off not to use an XMI serialization but rather an XML serialization as determined by the GenPackage's Resource Type property and restrict your model to avoid multiple inheritances. You can use ExtendedMetadata annotations to tweak how instances are serialized and how the generated schema looks.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[XCore] XcoreLang.xcore content is not allowed in Prolog
Next Topic:Package.eINSTANCE.getElement not equals reference.etype - ResourceFactory or Registry Problem?
Goto Forum:
  


Current Time: Fri Apr 26 18:57:16 GMT 2024

Powered by FUDForum. Page generated in 0.02801 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top