|
Re: Relative references to XMLTypePackage types in ecore [message #418684 is a reply to message #418681] |
Wed, 23 April 2008 22:10 |
Ed Merks Messages: 33139 Registered: July 2009 |
Senior Member |
|
|
Martin,
My standard answer is always to ask, what is the URI of the resource
being saved? The reference will be made relative if it's possible to
create a relative URI between the URI of the resource being saved and
the URI of the resource being referenced. So even if the nsURI is being
used for the referenced resource and the referencing resource, you might
still end up with a relative URI between them (as looks to be the case
here). Using OPTION_URI_HANDLER will give you complete control over how
URIs are deresolved and resolved...
Martin Taal wrote:
> Hi Ed,
> I have asked this before but I am having the problem that the
> references to the XMLType edatatypes in an ecore file I create are all
> relative, for example:
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="preferred"
> defaultValueLiteral="true">
> <eType xsi:type="ecore:EDataType"
> href="../../../2002/Ecore#//EBoolean"/>
> </eStructuralFeatures>
>
> This results in that when I read the ecore back that the edatatype are
> just proxies and do not contain real data.
>
> However when I look at the uri of the ecorepackage.eresource and the
> xmltypeepackage then they are:http://www.eclipse.org/emf/2002/Ecore
> and http://www.eclipse.org/emf/2003/XMLType. So I would have expected
> that the nsuri's would be used in the href.
>
> Do you know how I can get the references to the ecore types to be
> based on the nsuri?
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03358 seconds