Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » No generate "xsi:schemaLocation" at target model(Transformation ATL - Target Model)
No generate "xsi:schemaLocation" at target model [message #1275270] Sat, 22 March 2014 20:39 Go to next message
Jose Texier is currently offline Jose TexierFriend
Messages: 7
Registered: March 2014
Junior Member
Hello.

I have a problem when I generate a transformation M2M (Model2Model) with ATL.

My result is good, but, I have a problem in header XMI of my target model.

In the target model doesn't appear these lines: "xmlns:xsi..." and "xsi:schemaLocation...", so, I add these two lines in my target model, and my target model opens well with the option "Sample Reflective Ecore Model Editor" in Eclipse.

Any suggestions?

Thanks,
Jose
Re: No generate "xsi:schemaLocation" at target model [message #1275810 is a reply to message #1275270] Sun, 23 March 2014 17:32 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

xsi:schemaLocation is generated when XMLResource.OPTION_SCHEMA_LOCATION
is true in the save options when the Resource is saved.

You can make it part of your resource's default save options by
implementing XMLResource.getDefaultSaveOptions().

Or perhaps you can instruct ATL to do so for you. (I'm not an ATL user.)

Regards

Ed Willink




On 22/03/2014 20:39, Jose Texier wrote:
> Hello.
>
> I have a problem when I generate a transformation M2M (Model2Model)
> with ATL.
>
> My result is good, but, I have a problem in header XMI of my target
> model.
>
> In the target model doesn't appear these lines: "xmlns:xsi..." and
> "xsi:schemaLocation...", so, I add these two lines in my target model,
> and my target model opens well with the option "Sample Reflective
> Ecore Model Editor" in Eclipse.
>
> Any suggestions?
>
> Thanks,
> Jose
Re: No generate "xsi:schemaLocation" at target model [message #1275923 is a reply to message #1275810] Sun, 23 March 2014 21:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Consider this as well
http://wiki.eclipse.org/EMF/FAQ#How_can_I_ensure_that_an_xsi:schemaLocation_is_serialized_for_my_packages.3F

On 23/03/2014 10:32 AM, Ed Willink wrote:
> Hi
>
> xsi:schemaLocation is generated when
> XMLResource.OPTION_SCHEMA_LOCATION is true in the save options when
> the Resource is saved.
>
> You can make it part of your resource's default save options by
> implementing XMLResource.getDefaultSaveOptions().
>
> Or perhaps you can instruct ATL to do so for you. (I'm not an ATL user.)
>
> Regards
>
> Ed Willink
>
>
>
>
> On 22/03/2014 20:39, Jose Texier wrote:
>> Hello.
>>
>> I have a problem when I generate a transformation M2M (Model2Model)
>> with ATL.
>>
>> My result is good, but, I have a problem in header XMI of my target
>> model.
>>
>> In the target model doesn't appear these lines: "xmlns:xsi..." and
>> "xsi:schemaLocation...", so, I add these two lines in my target
>> model, and my target model opens well with the option "Sample
>> Reflective Ecore Model Editor" in Eclipse.
>>
>> Any suggestions?
>>
>> Thanks,
>> Jose
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: No generate "xsi:schemaLocation" at target model [message #1276308 is a reply to message #1275810] Mon, 24 March 2014 11:22 Go to previous messageGo to next message
Jose Texier is currently offline Jose TexierFriend
Messages: 7
Registered: March 2014
Junior Member
Hi Ed Willink

Thanks for responding.

Indeed, I have an ATL project, where there is no java code, therefore, I can not find where I can implement XMLResource.getDefaultSaveOptions ().

Regards,
Jose
Re: No generate "xsi:schemaLocation" at target model [message #1276309 is a reply to message #1275923] Mon, 24 March 2014 11:23 Go to previous messageGo to next message
Jose Texier is currently offline Jose TexierFriend
Messages: 7
Registered: March 2014
Junior Member
Hi Ed Merks

Thanks for responding.

I have an ATL project and wish to transform a source model to a target model, then, ATL allows me to place only code for the ATL transformation.

Therefore, where I could add that method in my project?

Thanks again,
Jose
Re: No generate "xsi:schemaLocation" at target model [message #1276444 is a reply to message #1276309] Mon, 24 March 2014 15:15 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Jose,

I can't comment on how ATL works. I can only point out how the
underlying frameworks support such things and someone with ATL skills
will need to consider whether ATL provides access to those mechanisms.

On 24/03/2014 4:23 AM, Jose Texier wrote:
> Hi Ed Merks
> Thanks for responding.
> I have an ATL project and wish to transform a source model to a target
> model, then, ATL allows me to place only code for the ATL
> transformation.
> Therefore, where I could add that method in my project?
> Thanks again, Jose


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: No generate "xsi:schemaLocation" at target model [message #1735267 is a reply to message #1276444] Thu, 16 June 2016 17:01 Go to previous messageGo to next message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

I know it is an old post, but it would be nice to hear Dennis comment on this.

I am generating a significant amount of models using ATL transformations and having to manually fix the models afterwars is a pain.


Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Re: No generate "xsi:schemaLocation" at target model [message #1735530 is a reply to message #1735267] Mon, 20 June 2016 19:41 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

You cannot set any EMF saving options from ATL, so it must be part of the default for your EMF metamodel. Given that you use a dynamic EMF metamodel, where there's only the .ecore file, you have to go with option #3 from http://eclipsedriven.blogspot.be/2010/12/saving-xsischemalocation-into-emf-xmi.html : "Change the package's nsURI so that it points to the real, absolute path of the Ecore file".

Example:
http://git.eclipse.org/c/mmt/org.eclipse.atl.git/tree/tests/org.eclipse.m2m.atl.emftvm.tests/test-data/Regression/Bug406100.ecore


Cheers,
Dennis
Re: No generate "xsi:schemaLocation" at target model [message #1739380 is a reply to message #1735530] Sun, 31 July 2016 09:54 Go to previous message
Horacio Hoyos is currently offline Horacio HoyosFriend
Messages: 242
Registered: October 2009
Location: Mexico
Senior Member

Thanks for the information.

Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
Previous Topic:containment references cannot span across models
Next Topic:Content-Assist for imported libraries not working
Goto Forum:
  


Current Time: Thu Apr 18 16:23:58 GMT 2024

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

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

Back to the top