Hi, I have created a JSP which displays some graphics. These graphics depends on user selections. According to selected values, an XPath expression is created.
As soon as the selected values are strings, all is working fine. As soon as the user select a range of dates, for exemple from 01/11/2005 to 30/11/2005, the results are wrong. Note that dates are expressed in milliseconds. Here is an exemple : - queried XML document <LIST_OF_DOCS> <DOC><NUMBER>1</NUMBER><TYPE>xml</TYPE><DATE>123456789000</DATE></DOC> <DOC><NUMBER>2</NUMBER><TYPE>xml</TYPE><DATE>134567892000</DATE></DOC> <DOC><NUMBER>3</NUMBER><TYPE>xsl</TYPE><DATE>145678923000</DATE></DOC> </LIST_OF_DOCS> - JSP sample : <% int firstDate = ....; // = 130000000000, for example int lastDate = ....; // = 150000000000, for example String query = "count(/LIST_OF_DOCS/DOC[TYPE='xml' and DATE >= " + firstDate + " and DATE <= " + lastDate + "])"; %> <xtags:valueOf select="<%=query%>"/> The result of this query (<xtags:valueOf select="<%=query%>">) is 2. In fact, whatever the values of firstDate and lastDate, the result is always 2. I tried using the number() function but I get the same results. Note that if the query is equals to "count(/LIST_OF_DOCS/DOC[DATE >= " + firstDate + " and DATE <= " + lastDate + " and TYPE='xml'])", the result is equal to 3 !!!!! Any idea ? Regards, Franck --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]