Relative references to XMLTypePackage types in ecore [message #418681] |
Wed, 23 April 2008 17:03  |
Eclipse User |
|
|
|
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?
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: Relative references to XMLTypePackage types in ecore [message #418684 is a reply to message #418681] |
Wed, 23 April 2008 18:10  |
Eclipse User |
|
|
|
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?
>
|
|
|
Powered by
FUDForum. Page generated in 0.19607 seconds