Thanks..  I just wrapped the xpath in the string function

<x:set var="firstday" select="string($doc//day[1]/@date)" />

Which did the trick

----- Original Message -----
From: "James Smith" <[EMAIL PROTECTED]>
To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 29, 2003 7:12 AM
Subject: Re: attributes..


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to