Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » [ATL] serialise xmi to specific format(is it possible to change xml encoding and xmi version?)
[ATL] serialise xmi to specific format [message #1232728] Fri, 17 January 2014 15:25 Go to next message
Chris BaileyFriend
Messages: 11
Registered: January 2014
Junior Member
Hi all,

Been trying to figure this out for some time now. I have the following output from a ATL transformation:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
	xmlns:rbacDSML="http:///schemas/rbacDSML/_tLnNML04EeKvy_h4x72Tkw/47"
	xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML"
	xsi:schemaLocation="http:///schemas/rbacDSML/_tLnNML04EeKvy_h4x72Tkw/47 ../models/RbacDSML.profile.uml#_jFOcNmQUEeOBqdRHllEqmw">


Whereby I have my own self made ecore model as a metamodel for the input, and I am outputting a UML model based on the: uri:http://www.eclipse.org/uml2/3.0.0/UML referenced metamodel. The UML also has an input of a UML profile (rbacDSML).

Somethings I need to do but unsure if this is possible:

* Is it possible to change the XML encoding to UTF-8?
* Is it possible to change the xmi:version to '2.0' and its corresponding xmlns
* Why does the output uml metamodel refer to 4.0.0 and not 3.0.0 (the one specified as the UML metamodel) and is it possible to force the reference to become 3.0.0.
* Is it possible to have the xsi:schemaLocation make reference to a pathmap://RBACDSML/RbacDSML.profile.uml instead of the relative file path?

Many thanks,
Chris
Re: [ATL] serialise xmi to specific format [message #1250808 is a reply to message #1232728] Wed, 19 February 2014 16:22 Go to previous message
Ronan B is currently offline Ronan BFriend
Messages: 273
Registered: July 2009
Senior Member
Hi,
You can alter the xsi:schemaLocation by having your profile in a plugin. Then a pathmap will be the URI. The XML encoding comes from your JVM and/or your Eclipse setting in preferences/workspace/file encoding.

I assume the xmi:version is based on whatever plugins you have installed and what version of XMI they serialise to. I normally see 2.0

Regards,
Ronan
Previous Topic:Navigation between the elements of a MetaModel With ATL
Next Topic:how to match "packageImport" element in class diagram
Goto Forum:
  


Current Time: Fri Apr 19 23:07:50 GMT 2024

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

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

Back to the top