Transform XSD (via Ecore) to Capella Data Model

I’ve created transformation from Ecore model to Capella Data Model using Kitalpha Transposer.
I use the following launch configuration to run Transposer trandformation in Capella.

<?xml version="1.0" encoding="UTF-8" standalone="no"?> Can somebody help me with encoding of the result file? How the encoding (UTF-8) of Capella xml file can be specified in launch configuration? The default one is ASCII.

Was able to chenge encoding to UTF-8 but did not solve my problem.
In the package transformation rule added encoding for resource.
ResourceSet res = (ResourceSet) context_p.get(ResourceUtil.TRANSPOSER_RESOURCE_SET); //get the EMF ResourceSet
Resource resource = res.getResources().get(0); // get the first
org.eclipse.emf.ecore.xmi.XMLResource xml_resource;
xml_resource = (org.eclipse.emf.ecore.xmi.XMLResource) resource;
Annotation in my ecore model contains non-ASCII characters. When added to Capella model they are not present in result xml file.
There is no such problem with ASCCI annotations transformations.

IIRC the setEncoding() does nothing but actually set the value of the encoding attribute. You must still make sure that the streams that are used to read/write your files are using the proper encoding themselves.

In fact xml_resource.setEncoding(“UTF-8”); have solved my problem.

I understand you fullfilled the import of an XSD to Capella.
Was it to import to the DataModels as exposed in “Data” structures like added in the SA expension in the Capella Project Exposer … to build the CDB diagrams per example ?

If it is so, could you share some info to conduct this activity (tools, SW dev ?, addon needs to capella ?)


Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.