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 05:58  |
Eclipse User |
|
|
|
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 07:04   |
Eclipse User |
|
|
|
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 (&).
>
> 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 07:46  |
Eclipse User |
|
|
|
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 07:04  |
Eclipse User |
|
|
|
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 (&).
>
> 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 #592074 is a reply to message #52940] |
Tue, 26 September 2006 07:46  |
Eclipse User |
|
|
|
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";
>
>
|
|
|
Goto Forum:
Current Time: Sat May 10 23:17:30 EDT 2025
Powered by FUDForum. Page generated in 0.04226 seconds
|