Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » URI of HibernateResource leads to errors in XMLResource
|
Re: URI of HibernateResource leads to errors in XMLResource [message #52940 is a reply to message #52913] |
Tue, 26 September 2006 11: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 #592066 is a reply to message #52913] |
Tue, 26 September 2006 11:04 |
Ed Merks 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 (&).
>
> 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/
|
|
| |
Goto Forum:
Current Time: Fri Apr 26 14:10:58 GMT 2024
Powered by FUDForum. Page generated in 0.03387 seconds
|