I'm trying to use the value of an xml attribute in calculations later on in the page.
Perhaps I'm mistaken, but given the following xml:
<?xml version="1.0" encoding="UTF-8"?>
<days>
<day date="07-01-2003" />
</days>
and the following JSP:
<x:set var="firstday" select="$doc//day[1]/@date" />
<sql:query var="something">
SELECT * FROM orders WHERE date = ?
<sql:param value="${firstday}"/>
</sql:query>
I get no rows returned. I realize that the x:set is setting a node-set (or at least
that is my guess) but I dont see how to get that XPath to give me a string.
Can anyone help? Thanks.
Rick