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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to