Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » (no subject)
(no subject) [message #716458] Wed, 17 August 2011 13:13 Go to next message
Goetz Botterweck is currently offline Goetz BotterweckFriend
Messages: 71
Registered: July 2009
Member
Hi,

I just did an "Export Resource" and "Import Resource" in the from the
CDO Sessions view.

The import fails with

'Import Resource...' has encountered a problem.

or.xml.sax.SAXParseException: The reference to entity
"Y" must end with the ';' delimiter.

I assume these are the two lines that cause this (taken from the
exported file):

<components id="X&amp;Y" applications="Z"/>
<applications id="Z" components="X&Y anotherId1 anotherId2
anotherId3 anotherId4"/>

So in the first one the ampersand was translated as an XML entity, but
in the second line not.

The association between Components and Applications is many-to-one, one
Application has many Components.

Any hints -- besides avoiding ampersand in ids :) ?

Thanks,
Goetz
(no subject) [message #716512 is a reply to message #716458] Wed, 17 August 2011 15:13 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 17.08.2011 15:13, schrieb Goetz Botterweck:
> Hi,
>
> I just did an "Export Resource" and "Import Resource" in the from the
> CDO Sessions view.
>
> The import fails with
>
> 'Import Resource...' has encountered a problem.
>
> or.xml.sax.SAXParseException: The reference to entity
> "Y" must end with the ';' delimiter.
>
> I assume these are the two lines that cause this (taken from the
> exported file):
>
> <components id="X&amp;Y" applications="Z"/>
> <applications id="Z" components="X&Y anotherId1 anotherId2
> anotherId3 anotherId4"/>
>
> So in the first one the ampersand was translated as an XML entity, but
> in the second line not.
>
> The association between Components and Applications is many-to-one, one
> Application has many Components.
>
> Any hints -- besides avoiding ampersand in ids :) ?
I'm not an XML/XMI expert but I think it's not just a good idea to use well-formed identifiers but rather required by
the spec. Maybe Ed has more details.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


(no subject) [message #716521 is a reply to message #716512] Wed, 17 August 2011 15:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Of course it's best to avoid this issue. I'm not sure if
XMLResource.OPTION_SKIP_ESCAPE_URI set to false during save will help
avoid this issue...


On 17/08/2011 8:13 AM, Eike Stepper wrote:
> Am 17.08.2011 15:13, schrieb Goetz Botterweck:
>> Hi,
>>
>> I just did an "Export Resource" and "Import Resource" in the from the
>> CDO Sessions view.
>>
>> The import fails with
>>
>> 'Import Resource...' has encountered a problem.
>>
>> or.xml.sax.SAXParseException: The reference to entity
>> "Y" must end with the ';' delimiter.
>>
>> I assume these are the two lines that cause this (taken from the
>> exported file):
>>
>> <components id="X&amp;Y" applications="Z"/>
>> <applications id="Z" components="X&Y anotherId1 anotherId2
>> anotherId3 anotherId4"/>
>>
>> So in the first one the ampersand was translated as an XML entity, but
>> in the second line not.
>>
>> The association between Components and Applications is many-to-one, one
>> Application has many Components.
>>
>> Any hints -- besides avoiding ampersand in ids :) ?
> I'm not an XML/XMI expert but I think it's not just a good idea to use
> well-formed identifiers but rather required by the spec. Maybe Ed has
> more details.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Re: Cannot resolve MinimalEObjectImpl$Container
Next Topic:[CDO] ObejctNotFoundException leads to processStaleReference exception of same type.
Goto Forum:
  


Current Time: Tue Apr 16 12:38:09 GMT 2024

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

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

Back to the top