You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Tokajac <im...@hotmail.com> on 2009/03/16 01:38:44 UTC

Parsing Error for "<="

Hello!


I have a tricky error: in the query last row is AND ACTUAL_DAYS <=
EXPECTED_DAY. For some reason iBatis doesn't want to parse "<=" (??).
Exception: "only well-formed..."

How to solve/work-around this?


Regards

-- 
View this message in context: http://www.nabble.com/Parsing-Error-for-%22%3C%3D%22-tp22530234p22530234.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: Parsing Error for "<="

Posted by Kengkaj Sathianpantarit <ke...@gmail.com>.
All right, my mistake, > will not cause error.
http://www.w3schools.com/XML/xml_cdata.asp

Kengkaj

On Mon, Mar 16, 2009 at 4:17 PM, Ingmar Lötzsch <
iloetzsch@asci-systemhaus.de> wrote:

> Kengkaj Sathianpantarit schrieb:
>
>> Hm, you still need to use CDATA anyway.
>> AND EXPECTED_DAY  <![CDATA[ >= ]]> ACTUAL_DAYS
>>
>
> I don't believe. The following example works in our application:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "
> http://ibatis.apache.org/dtd/sql-map-2.dtd">
> <sqlMap namespace="auftrag">
>
>        <select id="selectByZeitraum" parameterClass="map"
> resultMap="result">
>                SELECT
>                <include refid="auftrag.selectFragment"/>
>                FROM auftrag AS au
>                WHERE #bis:DATE# >= au.beginn
>                        AND au.ende >= #von:DATE#
>                ORDER BY au.beginn, au.ende, au.bezeichnung
>        </select>
> </sqlMap>
>
> Maybe that depends on the version of iBATIS or another component. We are
> using
>
> - PostgreSQL 8.1.3
> - postgresql-8.1-404.jdbc3.jar
> - ibatis-2.3.4.726.jar
> - Java 1.5.0_11
>
> Ingmar
>
>  Kengkaj
>>
>> On Mon, Mar 16, 2009 at 3:56 PM, Ingmar Lötzsch <
>> iloetzsch@asci-systemhaus.de <ma...@asci-systemhaus.de>>
>> wrote:
>>
>>    I prefere to change the order of the operands, because then is no
>>    need to use CDATA sections or XML entities.
>>
>>    AND EXPECTED_DAY >= ACTUAL_DAYS
>>
>>    Kengkaj Sathianpantarit schrieb:
>>
>>        Don't forget that you are using XML, use CDATA as follows.
>>        <![CDATA[ <= ]]>
>>
>>        Kengkaj
>>
>>        On Mon, Mar 16, 2009 at 7:38 AM, Tokajac <imre_tokai@hotmail.com
>>        <ma...@hotmail.com> <mailto:imre_tokai@hotmail.com
>>        <ma...@hotmail.com>>> wrote:
>>
>>
>>           Hello!
>>
>>
>>           I have a tricky error: in the query last row is AND
>>        ACTUAL_DAYS <=
>>           EXPECTED_DAY. For some reason iBatis doesn't want to parse
>>        "<=" (??).
>>           Exception: "only well-formed..."
>>
>>           How to solve/work-around this?
>>
>
>

Re: Parsing Error for "<="

Posted by Ingmar Lötzsch <il...@asci-systemhaus.de>.
Kengkaj Sathianpantarit schrieb:
> Hm, you still need to use CDATA anyway.
> AND EXPECTED_DAY  <![CDATA[ >= ]]> ACTUAL_DAYS

I don't believe. The following example works in our application:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" 
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="auftrag">

	<select id="selectByZeitraum" parameterClass="map" resultMap="result">
		SELECT
		<include refid="auftrag.selectFragment"/>
		FROM auftrag AS au
		WHERE #bis:DATE# >= au.beginn
			AND au.ende >= #von:DATE#
		ORDER BY au.beginn, au.ende, au.bezeichnung
	</select>
</sqlMap>

Maybe that depends on the version of iBATIS or another component. We are 
using

- PostgreSQL 8.1.3
- postgresql-8.1-404.jdbc3.jar
- ibatis-2.3.4.726.jar
- Java 1.5.0_11

Ingmar

> Kengkaj
> 
> On Mon, Mar 16, 2009 at 3:56 PM, Ingmar Lötzsch 
> <iloetzsch@asci-systemhaus.de <ma...@asci-systemhaus.de>> wrote:
> 
>     I prefere to change the order of the operands, because then is no
>     need to use CDATA sections or XML entities.
> 
>     AND EXPECTED_DAY >= ACTUAL_DAYS
> 
>     Kengkaj Sathianpantarit schrieb:
> 
>         Don't forget that you are using XML, use CDATA as follows.
>         <![CDATA[ <= ]]>
> 
>         Kengkaj
> 
>         On Mon, Mar 16, 2009 at 7:38 AM, Tokajac <imre_tokai@hotmail.com
>         <ma...@hotmail.com> <mailto:imre_tokai@hotmail.com
>         <ma...@hotmail.com>>> wrote:
> 
> 
>            Hello!
> 
> 
>            I have a tricky error: in the query last row is AND
>         ACTUAL_DAYS <=
>            EXPECTED_DAY. For some reason iBatis doesn't want to parse
>         "<=" (??).
>            Exception: "only well-formed..."
> 
>            How to solve/work-around this?


Re: Parsing Error for "<="

Posted by Kengkaj Sathianpantarit <ke...@gmail.com>.
Hm, you still need to use CDATA anyway.
AND EXPECTED_DAY  <![CDATA[ >= ]]> ACTUAL_DAYS

Kengkaj

On Mon, Mar 16, 2009 at 3:56 PM, Ingmar Lötzsch <
iloetzsch@asci-systemhaus.de> wrote:

> I prefere to change the order of the operands, because then is no need to
> use CDATA sections or XML entities.
>
> AND EXPECTED_DAY >= ACTUAL_DAYS
>
> Kengkaj Sathianpantarit schrieb:
>
>> Don't forget that you are using XML, use CDATA as follows.
>> <![CDATA[ <= ]]>
>>
>> Kengkaj
>>
>> On Mon, Mar 16, 2009 at 7:38 AM, Tokajac <imre_tokai@hotmail.com <mailto:
>> imre_tokai@hotmail.com>> wrote:
>>
>>
>>    Hello!
>>
>>
>>    I have a tricky error: in the query last row is AND ACTUAL_DAYS <=
>>    EXPECTED_DAY. For some reason iBatis doesn't want to parse "<=" (??).
>>    Exception: "only well-formed..."
>>
>>    How to solve/work-around this?
>>
>
>

Re: Parsing Error for "<="

Posted by Ingmar Lötzsch <il...@asci-systemhaus.de>.
I prefere to change the order of the operands, because then is no need 
to use CDATA sections or XML entities.

AND EXPECTED_DAY >= ACTUAL_DAYS

Kengkaj Sathianpantarit schrieb:
> Don't forget that you are using XML, use CDATA as follows.
> <![CDATA[ <= ]]>
> 
> Kengkaj
> 
> On Mon, Mar 16, 2009 at 7:38 AM, Tokajac <imre_tokai@hotmail.com 
> <ma...@hotmail.com>> wrote:
> 
> 
>     Hello!
> 
> 
>     I have a tricky error: in the query last row is AND ACTUAL_DAYS <=
>     EXPECTED_DAY. For some reason iBatis doesn't want to parse "<=" (??).
>     Exception: "only well-formed..."
> 
>     How to solve/work-around this?


Re: Parsing Error for "<="

Posted by Kengkaj Sathianpantarit <ke...@gmail.com>.
Don't forget that you are using XML, use CDATA as follows.
<![CDATA[ <= ]]>

Kengkaj

On Mon, Mar 16, 2009 at 7:38 AM, Tokajac <im...@hotmail.com> wrote:

>
> Hello!
>
>
> I have a tricky error: in the query last row is AND ACTUAL_DAYS <=
> EXPECTED_DAY. For some reason iBatis doesn't want to parse "<=" (??).
> Exception: "only well-formed..."
>
> How to solve/work-around this?
>
>
> Regards
>
> --
> View this message in context:
> http://www.nabble.com/Parsing-Error-for-%22%3C%3D%22-tp22530234p22530234.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Re: Parsing Error for "<="

Posted by Richard Yee <ry...@cruzio.com>.
You need to put it in a CDATA block

-R

Sent from my iPhone

On Mar 15, 2009, at 5:51 PM, Jean-Francois Poilpret  
<jf...@yahoo.fr> wrote:

> Tokajac wrote:
>> Hello!
>>
>>
>> I have a tricky error: in the query last row is AND ACTUAL_DAYS <=
>> EXPECTED_DAY. For some reason iBatis doesn't want to parse "<=" (??).
>> Exception: "only well-formed..."
>>
>> How to solve/work-around this?
>>
>>
> Replace "<" with "&lt;"
>
> Jean-Francois
>> Regards
>>
>>
>

Re: Parsing Error for "<="

Posted by Jean-Francois Poilpret <jf...@yahoo.fr>.
Tokajac wrote:
> Hello!
>
>
> I have a tricky error: in the query last row is AND ACTUAL_DAYS <=
> EXPECTED_DAY. For some reason iBatis doesn't want to parse "<=" (??).
> Exception: "only well-formed..."
>
> How to solve/work-around this?
>
>   
Replace "<" with "&lt;"

Jean-Francois
> Regards
>
>   



Re: Parsing Error for "<="

Posted by ilkayaktas <as...@gmail.com>.
ACTUAL_DAYS <![CDATA[ <= ]]> EXPECTED_DAY
or
ACTUAL_DAYS  "&lt;="  EXPECTED_DAY  

these two should work. (also "&gt;" for > ) 


Tokajac wrote:
> 
> Hello!
> 
> 
> I have a tricky error: in the query last row is AND ACTUAL_DAYS <=
> EXPECTED_DAY. For some reason iBatis doesn't want to parse "<=" (??).
> Exception: "only well-formed..."
> 
> How to solve/work-around this?
> 
> 
> Regards
> 
> 

-- 
View this message in context: http://www.nabble.com/Parsing-Error-for-%22%3C%3D%22-tp22530234p22554184.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: Parsing Error for "<="

Posted by ilkayaktas <as...@gmail.com>.
ACTUAL_DAYS <![CDATA[ <= ]]> EXPECTED_DAY
or
ACTUAL_DAYS  "&.l.t.;.="  EXPECTED_DAY  (remove points. i used them because
it 's automatically converted <=, so you can't see what i mean.)

these two should work. (also "&.g.t.;" for > ) 


Tokajac wrote:
> 
> Hello!
> 
> 
> I have a tricky error: in the query last row is AND ACTUAL_DAYS <=
> EXPECTED_DAY. For some reason iBatis doesn't want to parse "<=" (??).
> Exception: "only well-formed..."
> 
> How to solve/work-around this?
> 
> 
> Regards
> 
> 

-- 
View this message in context: http://www.nabble.com/Parsing-Error-for-%22%3C%3D%22-tp22530234p22554214.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: Parsing Error for "<="

Posted by ilkayaktas <as...@gmail.com>.
ACTUAL_DAYS <![CDATA[ <= ]]> EXPECTED_DAY
or
ACTUAL_DAYS  &lt;=  EXPECTED_DAY  

these two are should work. (also &gt; for > )keep.


Tokajac wrote:
> 
> Hello!
> 
> 
> I have a tricky error: in the query last row is AND ACTUAL_DAYS <=
> EXPECTED_DAY. For some reason iBatis doesn't want to parse "<=" (??).
> Exception: "only well-formed..."
> 
> How to solve/work-around this?
> 
> 
> Regards
> 
> 

-- 
View this message in context: http://www.nabble.com/Parsing-Error-for-%22%3C%3D%22-tp22530234p22554152.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.