Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » model with 'href' attribute
model with 'href' attribute [message #1444737] Tue, 14 October 2014 13:35 Go to next message
Daniele Pala is currently offline Daniele PalaFriend
Messages: 9
Registered: September 2011
Junior Member
Hello, I'm trying to load in EMF an XML representation of an object which contains an attribute named 'href' (using XMLResourceFactoryImpl). However, since this is a 'special' name, I'm not able to actually load it, instead it is assigned to the 'eProxyURI' property...is there any way to tell EMF that it should not assign any special meaning to that 'href' attribute?

Thanks a lot,
Daniele Pala
Re: model with 'href' attribute [message #1444750 is a reply to message #1444737] Tue, 14 October 2014 13:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Daniele,

This should only be special for the XMI serialization. You're sure your
not loading with an XMIResourceImpl? Is this an XML Schema-based
model? In that case, there should be a generated XyzResourceFactoryImpl
that you should be using to load the resources...

On 14/10/2014 3:35 PM, Daniele Pala wrote:
> Hello, I'm trying to load in EMF an XML representation of an object
> which contains an attribute named 'href' (using
> XMLResourceFactoryImpl). However, since this is a 'special' name, I'm
> not able to actually load it, instead it is assigned to the
> 'eProxyURI' property...is there any way to tell EMF that it should not
> assign any special meaning to that 'href' attribute?
>
> Thanks a lot,
> Daniele Pala


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: model with 'href' attribute [message #1444790 is a reply to message #1444750] Tue, 14 October 2014 14:57 Go to previous message
Daniele Pala is currently offline Daniele PalaFriend
Messages: 9
Registered: September 2011
Junior Member
Yes it is an XML Schema-based model, in fact I'm generating Ecore from XSD at runtime, so I don't have generated code, like XyzResourceFactoryImpl.

However, following your response I tried to generate it, and I saw that the generated XyzResourceFactoryImpl uses the additional load option XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, and with that my code actually works fine Smile

Best regards,
Daniele Pala
Previous Topic:Solved: [EMF] [XCore] Generating HTML JavaDoc from generator output
Next Topic:[CDO] gastro example problem
Goto Forum:
  


Current Time: Tue Apr 23 12:24:03 GMT 2024

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

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

Back to the top