Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » URI of HibernateResource leads to errors in XMLResource
URI of HibernateResource leads to errors in XMLResource [message #52913] Tue, 26 September 2006 09:58 Go to next message
Hans Mueller-Dieckert is currently offline Hans Mueller-DieckertFriend
Messages: 32
Registered: July 2009
Member
This is a multi-part message in MIME format.
--------------040706090207000609000602
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

setting a reference between two objects, one object being stored in a
HibernateResource (form TENEO, EMFT) and the other object being stored
in a XMLResource, leads to a SAXParseException when trying to reload the
XMLResource.

As far as I can see, the problem is the ampersand in the URI of the
HibernateResource, which looks like this:

"hibernate://?dsname=myDataStoreName&query1=text of my query"

This is directly stored in the XMLResource wihtout the ampersand being
escaped (&).

I hope you can follow my explanations, I've also attached a sample
xml-file which (hopefully) points out the problem.

I'm not quite sure if this is an EMF-Bug or a TENEO-Bug.


greetings,
Hans

--------------040706090207000609000602
Content-Type: text/xml;
name="test.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="test.xml"

<?xml version="1.0" encoding="utf-8"?>
<remarc:CSMXML xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:remarc="http://www.arcsolutions.de/remarc/" xmlns:remarcdefault="http://www.arcsolutions.de/remarc/default">
<elements xsi:type="remarcdefault:CSMDefaultClass" ID="EXXX" description="Welt">
<referencedElements xsi:type="remarcdefault:CSMDefaultClass" href="hibernate://?dsname=remarctest&query1=FROM CSMXML as csm WHERE csm.e_id = (SELECT csmClass.csmXML FROM CSMClass as csmClass WHERE csmClass.ID ='E04014')#//@elements.0"/>
</elements>
</remarc:CSMXML>

--------------040706090207000609000602--
Re: URI of HibernateResource leads to errors in XMLResource [message #52940 is a reply to message #52913] Tue, 26 September 2006 11:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------030204060206050201030706
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hans,

It sounds like you want to be using this save option set to
Boolean.FALSE in this case:

/**
* Skip escaping special characters, such as '&' char, in URIs
during XML serialization.
* The default is <code>Boolean.TRUE</code>. To enforce escaping
special characters, set this
* option to <code>Boolean.FALSE</code>.
*/
String OPTION_SKIP_ESCAPE_URI = "SKIP_ESCAPE_URI";


Hans Mueller-Dieckert wrote:
> Hi,
>
> setting a reference between two objects, one object being stored in a
> HibernateResource (form TENEO, EMFT) and the other object being stored
> in a XMLResource, leads to a SAXParseException when trying to reload
> the XMLResource.
>
> As far as I can see, the problem is the ampersand in the URI of the
> HibernateResource, which looks like this:
>
> "hibernate://?dsname=myDataStoreName&query1=text of my query"
>
> This is directly stored in the XMLResource wihtout the ampersand being
> escaped (&amp;).
>
> I hope you can follow my explanations, I've also attached a sample
> xml-file which (hopefully) points out the problem.
>
> I'm not quite sure if this is an EMF-Bug or a TENEO-Bug.
>
>
> greetings,
> Hans
> ------------------------------------------------------------ ------------
>
> <?xml version="1.0" encoding="utf-8"?>
> <remarc:CSMXML xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:remarc="http://www.arcsolutions.de/remarc/" xmlns:remarcdefault="http://www.arcsolutions.de/remarc/default">
> <elements xsi:type="remarcdefault:CSMDefaultClass" ID="EXXX" description="Welt">
> <referencedElements xsi:type="remarcdefault:CSMDefaultClass" href="hibernate://?dsname=remarctest&query1=FROM CSMXML as csm WHERE csm.e_id = (SELECT csmClass.csmXML FROM CSMClass as csmClass WHERE csmClass.ID ='E04014')#//@elements.0"/>
> </elements>
> </remarc:CSMXML>
>


--------------030204060206050201030706
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hans,<br>
<br>
It sounds like you want to be using this save option set to
Boolean.FALSE in this case:<br>
<blockquote>
Re: URI of HibernateResource leads to errors in XMLResource [message #52965 is a reply to message #52940] Tue, 26 September 2006 11:46 Go to previous message
Hans Mueller-Dieckert is currently offline Hans Mueller-DieckertFriend
Messages: 32
Registered: July 2009
Member
Hi Ed,

thanks a lot. Now everything works fine.

greetings,
Hans


Ed Merks schrieb:
> Hans,
>
> It sounds like you want to be using this save option set to
> Boolean.FALSE in this case:
>
> /**
> * Skip escaping special characters, such as '&' char, in URIs
> during XML serialization.
> * The default is <code>Boolean.TRUE</code>. To enforce escaping
> special characters, set this
> * option to <code>Boolean.FALSE</code>.
> */
> String OPTION_SKIP_ESCAPE_URI = "SKIP_ESCAPE_URI";
>
>
Re: URI of HibernateResource leads to errors in XMLResource [message #592066 is a reply to message #52913] Tue, 26 September 2006 11:04 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030204060206050201030706
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hans,

It sounds like you want to be using this save option set to
Boolean.FALSE in this case:

/**
* Skip escaping special characters, such as '&' char, in URIs
during XML serialization.
* The default is <code>Boolean.TRUE</code>. To enforce escaping
special characters, set this
* option to <code>Boolean.FALSE</code>.
*/
String OPTION_SKIP_ESCAPE_URI = "SKIP_ESCAPE_URI";


Hans Mueller-Dieckert wrote:
> Hi,
>
> setting a reference between two objects, one object being stored in a
> HibernateResource (form TENEO, EMFT) and the other object being stored
> in a XMLResource, leads to a SAXParseException when trying to reload
> the XMLResource.
>
> As far as I can see, the problem is the ampersand in the URI of the
> HibernateResource, which looks like this:
>
> "hibernate://?dsname=myDataStoreName&query1=text of my query"
>
> This is directly stored in the XMLResource wihtout the ampersand being
> escaped (&amp;).
>
> I hope you can follow my explanations, I've also attached a sample
> xml-file which (hopefully) points out the problem.
>
> I'm not quite sure if this is an EMF-Bug or a TENEO-Bug.
>
>
> greetings,
> Hans
> ------------------------------------------------------------ ------------
>
> <?xml version="1.0" encoding="utf-8"?>
> <remarc:CSMXML xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:remarc="http://www.arcsolutions.de/remarc/" xmlns:remarcdefault="http://www.arcsolutions.de/remarc/default">
> <elements xsi:type="remarcdefault:CSMDefaultClass" ID="EXXX" description="Welt">
> <referencedElements xsi:type="remarcdefault:CSMDefaultClass" href="hibernate://?dsname=remarctest&query1=FROM CSMXML as csm WHERE csm.e_id = (SELECT csmClass.csmXML FROM CSMClass as csmClass WHERE csmClass.ID ='E04014')#//@elements.0"/>
> </elements>
> </remarc:CSMXML>
>


--------------030204060206050201030706
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hans,<br>
<br>
It sounds like you want to be using this save option set to
Boolean.FALSE in this case:<br>
<blockquote>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: URI of HibernateResource leads to errors in XMLResource [message #592074 is a reply to message #52940] Tue, 26 September 2006 11:46 Go to previous message
Hans Mueller-Dieckert is currently offline Hans Mueller-DieckertFriend
Messages: 32
Registered: July 2009
Member
Hi Ed,

thanks a lot. Now everything works fine.

greetings,
Hans


Ed Merks schrieb:
> Hans,
>
> It sounds like you want to be using this save option set to
> Boolean.FALSE in this case:
>
> /**
> * Skip escaping special characters, such as '&' char, in URIs
> during XML serialization.
> * The default is <code>Boolean.TRUE</code>. To enforce escaping
> special characters, set this
> * option to <code>Boolean.FALSE</code>.
> */
> String OPTION_SKIP_ESCAPE_URI = "SKIP_ESCAPE_URI";
>
>
Previous Topic:URI of HibernateResource leads to errors in XMLResource
Next Topic:Markers and JET Trenasformation
Goto Forum:
  


Current Time: Fri Apr 26 14:10:58 GMT 2024

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

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

Back to the top