commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Libbrecht <p...@activemath.org>
Subject Re: jelly-tag util:loadText
Date Tue, 23 Dec 2003 14:22:10 GMT
Michael,

This looks like a bug into the sql:query tag. Have you looked around it?
(what I understand from that is that it's taking an XML-output whereas 
it should accept only the  concatenation of a bunch of text-nodes 
(CDATA and entity refs included).

Paul


On 22-Dec-03, at 17:13 Uhr, Michael L. Conneen wrote:

> Folks,
>
> I'm using a snap-shot of the commons-jelly library from week of 12/15..
>
> I have the following jelly script
> ...
>  <util:file name="${sqlScript}" var="fp"/>
>   <util:loadText file="${fp}" var="sqlText"/>
>
>   <sql:setDataSource
>     url="${databaseURL}"
>     driver="${databaseDriver}"
>     user="${databaseUser}"
>     password="${databasePassword}"
>     />
>   <sql:query var="results">
> <![CDATA[
> ${sqlText}
> ]]>
>   </sql:query>
> ..
>
> Within the sql file is..
> select * from table where foo > "bar"
>
> what is happening is that when the file is loaded.. ">" is translated 
> to &lt;
>
> This even occurs if I change the jelly script to..
>   <sql:query var="results">
> <![CDATA[
> select * from table where foo > "bar"
> ]]>
>   </sql:query>
>
> And.. if I change my input file text to be..
> <![CDATA[
> select * from table where foo > "bar"
> ]]>
>
> Then the sqlText is
> &lt;![CDATA[
> select *
> from SCARAB_ATTRIBUTE
> where created_date &lt; CURRENT_DATE
> ]]&gt;
>
> I poked around the LoadTextTag.java file.. and it appears the file IS 
> being read and put into the context..  Just when it comes out of the 
> context.. it is being treated as HTML and translated..
>
> Ideas?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message