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 splitting a variable into array
Date Tue, 07 Sep 2004 19:02:56 GMT

Hi,

When working with tomcat 5.0.27, I am trying to parse an XML document
and split the value of an XPath statement into an array for further
usage throughout the document:

<c:import url="${requestURL}" varReader="xmlSource">
	<x:parse var="doc" xml="${xmlSource}" scope="application" />
</c:import>

<c:set var="xy" scope="session">
	<x:out
select="$doc/PostalCodeLookup/PostalCodeResultSet/PostalCode/*/*/*"/>
</c:set>

<% // this works %>

<c:out value="${xy}"/>

<c:set var="coords" scope="session" value="${fn:split($xy,',')}"/>

<% // this doesn't work %>

<c:out value="${coords[0]}"/>

Any idea what I may be missing here?

Thanks

..Tom

=========================
Tom Kralidis
Systems Scientist
Environment Canada
Tel: +01-905-336-4409
http://www.ec.gc.ca/


---------------------------------------------------------------------
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