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 16:39 Go to next message
Jose Texier is currently offline Jose Texier
Messages: 6
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 13:32 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4030
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 17:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26000
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
>
Re: No generate "xsi:schemaLocation" at target model [message #1276308 is a reply to message #1275810] Mon, 24 March 2014 07:22 Go to previous messageGo to next message
Jose Texier is currently offline Jose Texier
Messages: 6
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 07:23 Go to previous messageGo to next message
Jose Texier is currently offline Jose Texier
Messages: 6
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 11:15 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26000
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
Previous Topic:Model injection of a registered XML/XSD model
Next Topic:[EMFTVM] Profiling now available
Goto Forum:
  


Current Time: Sat Aug 23 07:44:34 EDT 2014

Powered by FUDForum. Page generated in 0.06238 seconds