Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Relative references to XMLTypePackage types in ecore
Relative references to XMLTypePackage types in ecore [message #418681] Wed, 23 April 2008 21:03 Go to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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 22:10 Go to previous message
Ed Merks is currently offline Ed MerksFriend
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/
Previous Topic:What is the workflow to update a model generated from xsd schema
Next Topic:Serialization of EObject into an XML String and vice versa (without Persistence to disk)
Goto Forum:
  


Current Time: Tue Apr 23 06:42:47 GMT 2024

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

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

Back to the top