Skip to main content



      Home
Home » Modeling » EMF » XML/XMI Resource
XML/XMI Resource [message #403363] Mon, 04 September 2006 06:30 Go to next message
Eclipse UserFriend
Hi,

how do I need to configure the XMLResource to use PlatformResource URI's
as reference instead of relative URI's?

I have a project containing the referenced elements at
<workspace>/project1/folder/model1.xml#item1ID.

Now I'm creating another ecore model <workspace>/project2/xyz/model2.xml.

The elements from model2 references elements from model1 by instance.
The resource for model1 has been loaded by platform resource URI using
the same ResourceSet the save process for model2 is using. But I'm
getting still the model2 content as:
href="../../project1/folder/model2.xml#item1ID" instead of
href="platform:resource/project1/folder/model1#item1ID"

What do I need to do?

Sven
Re: XML/XMI Resource [message #403364 is a reply to message #403363] Mon, 04 September 2006 08:30 Go to previous messageGo to next message
Eclipse UserFriend
Sven,

The work of creating a relative reference whenever possible is done by
XMLHelperImpl.deresolve(URI), so you'd need to specialize that to change
the behavior.


sven krause wrote:
> Hi,
>
> how do I need to configure the XMLResource to use PlatformResource
> URI's as reference instead of relative URI's?
>
> I have a project containing the referenced elements at
> <workspace>/project1/folder/model1.xml#item1ID.
>
> Now I'm creating another ecore model <workspace>/project2/xyz/model2.xml.
>
> The elements from model2 references elements from model1 by instance.
> The resource for model1 has been loaded by platform resource URI using
> the same ResourceSet the save process for model2 is using. But I'm
> getting still the model2 content as:
> href="../../project1/folder/model2.xml#item1ID" instead of
> href="platform:resource/project1/folder/model1#item1ID"
>
> What do I need to do?
>
> Sven
Re: XML/XMI Resource [message #403376 is a reply to message #403364] Tue, 05 September 2006 03:19 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Ed.

One more Question: does the platform:resource protocol support relative
paths too ? Where can I find more information ?

Sven

Ed Merks schrieb:
> Sven,
>
> The work of creating a relative reference whenever possible is done by
> XMLHelperImpl.deresolve(URI), so you'd need to specialize that to change
> the behavior.
>
>
> sven krause wrote:
>> Hi,
>>
>> how do I need to configure the XMLResource to use PlatformResource
>> URI's as reference instead of relative URI's?
>>
>> I have a project containing the referenced elements at
>> <workspace>/project1/folder/model1.xml#item1ID.
>>
>> Now I'm creating another ecore model <workspace>/project2/xyz/model2.xml.
>>
>> The elements from model2 references elements from model1 by instance.
>> The resource for model1 has been loaded by platform resource URI using
>> the same ResourceSet the save process for model2 is using. But I'm
>> getting still the model2 content as:
>> href="../../project1/folder/model2.xml#item1ID" instead of
>> href="platform:resource/project1/folder/model1#item1ID"
>>
>> What do I need to do?
>>
>> Sven
Re: XML/XMI Resource [message #403382 is a reply to message #403376] Tue, 05 September 2006 08:23 Go to previous message
Eclipse UserFriend
Sven,

The Eclipse runtime supports this protocol directly. I'm quite sure it
does not support relative paths. I'm not sure where the documentation is
for this. You'll need to search or ask on the platform newsgroup.


sven krause wrote:
> Thanks Ed.
>
> One more Question: does the platform:resource protocol support
> relative paths too ? Where can I find more information ?
>
> Sven
>
> Ed Merks schrieb:
>> Sven,
>>
>> The work of creating a relative reference whenever possible is done
>> by XMLHelperImpl.deresolve(URI), so you'd need to specialize that to
>> change the behavior.
>>
>>
>> sven krause wrote:
>>> Hi,
>>>
>>> how do I need to configure the XMLResource to use PlatformResource
>>> URI's as reference instead of relative URI's?
>>>
>>> I have a project containing the referenced elements at
>>> <workspace>/project1/folder/model1.xml#item1ID.
>>>
>>> Now I'm creating another ecore model
>>> <workspace>/project2/xyz/model2.xml.
>>>
>>> The elements from model2 references elements from model1 by
>>> instance. The resource for model1 has been loaded by platform
>>> resource URI using the same ResourceSet the save process for model2
>>> is using. But I'm getting still the model2 content as:
>>> href="../../project1/folder/model2.xml#item1ID" instead of
>>> href="platform:resource/project1/folder/model1#item1ID"
>>>
>>> What do I need to do?
>>>
>>> Sven
Previous Topic:Suppressing model object in XSD based models
Next Topic:hippie completion for properties?
Goto Forum:
  


Current Time: Wed Nov 05 10:57:21 EST 2025

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

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

Back to the top