tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kralidis,Tom [Burlington]" <Tom.Krali...@ec.gc.ca>
Subject join and arrays
Date Thu, 26 May 2005 13:37:24 GMT

Hi,

I have a JSP which parses an XML document and inserts records into a DB.

For multiple XML elements, I do the following:

<sql:transaction dataSource="${ds_devgeodb}">
 <sql:update>
  insert into service_endpoints (keywords) values
 ('<x:forEach
select="$doc/WMT_MS_Capabilities/Service/KeywordList/Keyword"
var="kw"><x:out select="text()"/>,</x:forEach>')
 </sql:update>
</sql:transaction>

Which works okay, except that the values in the DB end up as:

keyword1,keyword2,keyword3,

..whereas I would prefer

keyword1,keyword2,keyword3

(i.e. without the trailing comma)

I checked the fn:join() function, which looks like it would do the
trick, but how does one set an array in JSTL?

Any advice would be appreciated.

Thanks

..Tom

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


Mime
View raw message