How about: <x:set var="firstday" select="$doc//day[1]/@date" /> <fmt:formatDate var="firstday" value="${firstday}" pattern="MM-dd-yyyy" /> <sql:query var="something"> SELECT * FROM orders WHERE date = ? <sql:dateParam value="${firstday}" /> </sql:query>
James Smith Application Systems Analyst, Treistman Center College of Fine Arts, University of Arizona ----- Original Message ----- From: "Rick Ross" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 28, 2003 8:31 PM Subject: X: attributes.. 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]