|Re: ecore package with multiple namespaces [message #760126 is a reply to message #760113]
||Thu, 01 December 2011 12:02
| Ed Merks
Registered: July 2009
On 01/12/2011 12:02 PM, Markus Stier wrote:
> this was the missing link. Thank you very much.
> I've changed the following methods in the generated editor according
> and now my XML contains my namespaces. Abbreviated description of
> in method createModel():
> resource = editingDomain.getResourceSet().getResource(resourceURI, true);
> resource = editingDomain.getResourceSet().createResource(resourceURI);
> Map loadOptions = new HashMap();
> loadOptions.put(XMLResource.OPTION_EXTENDED_META_DATA, true);
> in method doSave(IProgressMonitor progressMonitor):
> add saveOptions.put(XMLResource.OPTION_EXTENDED_META_DATA, true);
Better would be to specialize the resource factory and add these options
to the implementation...
> One thing remains:
> If I export my ecore model with the _XML Schema_ exporter, my
> namespaces are used as expected. The _XML Schema for XMI_ exporter
> ignores the additional namespaces.
XMI schemas are essentially useless noise in my opinion. That exporter
was written long ago and doesn't take extended meta data into account...
> Best Markus
Professional Support: https://www.macromodeling.com/
Powered by FUDForum
. Page generated in 0.01666 seconds