Skip to main content



      Home
Home » Modeling » EMF » model with 'href' attribute
model with 'href' attribute [message #1444737] Tue, 14 October 2014 09:35 Go to next message
Eclipse UserFriend
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 09:53 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: model with 'href' attribute [message #1444790 is a reply to message #1444750] Tue, 14 October 2014 10:57 Go to previous message
Eclipse UserFriend
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: Sun Aug 31 09:56:01 EDT 2025

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

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

Back to the top