I've been meaning to add optional newline preservation. Kit, could you add a JIRA ticket (Wish or New Feature, not bug).
Cheers, clinton On Tue, 1 Feb 2005 10:56:25 -0600, Kit Cragin <[EMAIL PROTECTED]> wrote: > Haven't tried it, but that would probably work. Been staring at it too > long... > > -----Original Message----- > From: Larry Meadors [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 01, 2005 10:48 AM > To: ibatis-user-cs@incubator.apache.org > Subject: Re: Some info on comments embedded in statements > > can you use ";" chars to seperate the statements in the second case? > > On Tue, 1 Feb 2005 10:42:56 -0600, Kit Cragin > <[EMAIL PROTECTED]> wrote: > > I wanted to share some info with the group regarding comments embedded in > > statements in the XML files. I found the following does not work: > > > > 1. SQL Server comments (e.g. "--") interleaved with SQL text. This one > > should have been obvious to me in retrospect <sigh>. > > > > <delete id="deletesomething"> > > -- Delete children > > delete from thattable where thisid = #value# > > -- Delete parent > > delete from thistable where thisid = #value# > > </delete> > > > > The reason is that new lines are removed so you end up with this SQL > > command: "-- Delete children delete from thattable where thisid = @value > -- > > Delete parent delete from thistable where thisid = @value" which is > > obviously just one long comment. > > > > 2. Interleaved XML comments: > > > > <delete id="deletesomething"> > > <!-- Delete children --> > > delete from thattable where thisid = #value# > > <!-- Delete parent --> > > delete from thistable where thisid = #value# > > </delete> > > > > This doesn't work because newlines are removed and the statements are > > concatenated without any whitespace in between: "delete from thattable > where > > thisid = @valuedelete from thistable where thisid = @value" > > > > The first one is not an ibatis bug. The second one might be, but I am not > > sure. > > > > - Kit > > > > > >