You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@infoplanning.com> on 2000/12/20 19:58:52 UTC
C2: errors
The semantics of <esql:get-int column="maxid"/> or any of the
other typed responses. The problem is when we use one of these
types of calls, we are expecting an int, long, double, etc.
I am working through some practical things with the taglib, so it
should be working soon. I am going to change those semantics so
that they are correct--and they don't all act like <esql:get-string/>
like now.
---------------------------------------
If you lust for Ham and Eggs, you have
committed breakfast in your heart
already. -- C. S. Lewis
Re: errors
Posted by Berin Loritsch <bl...@infoplanning.com>.
----- Original Message -----
From: "Donald Ball" <ba...@webslingerZ.com>
To: <co...@xml.apache.org>
Sent: Wednesday, December 20, 2000 4:45 PM
Subject: Re: <esql:get-*> errors
> On Wed, 20 Dec 2000, Berin Loritsch wrote:
>
> > I made it so that you can use the attribute string="true" to retrieve
> > a string value.
> >
> > Example:
> >
> > <esql:get-int column="maxid"/>
> >
> > returns an int value, but
> >
> > <esql:get-int column="maxid" string="true"/>
> >
> > allows you to use it in the former manner.
> >
> > The format attributes still function, and automatically act
> > as if string="true" was set.
>
> er, why don't you just use get-string to cast the result as a string?
Because I was maintaining what the esql stylesheet allowed you to do.
All int, long, and boolean were returned as String:
"" + .....getInt(...)
(....getBoolean(...)) ? "true" : "false"
I maintained this functionality with the string="true" and format="..."
attributes specified. Otherwise, it returns what is expected.
We are talking Cocoon 2--where esql hasn't been thoroughly tested
beyond the simple example yet....
>
> - donald
Re: errors
Posted by Donald Ball <ba...@webslingerZ.com>.
On Wed, 20 Dec 2000, Berin Loritsch wrote:
> I made it so that you can use the attribute string="true" to retrieve
> a string value.
>
> Example:
>
> <esql:get-int column="maxid"/>
>
> returns an int value, but
>
> <esql:get-int column="maxid" string="true"/>
>
> allows you to use it in the former manner.
>
> The format attributes still function, and automatically act
> as if string="true" was set.
er, why don't you just use get-string to cast the result as a string?
- donald
Re: errors
Posted by Berin Loritsch <bl...@infoplanning.com>.
----- Original Message -----
From: "Berin Loritsch" <bl...@infoplanning.com>
To: <co...@xml.apache.org>
Sent: Wednesday, December 20, 2000 1:58 PM
Subject: C2: <esql:get-*> errors
> The semantics of <esql:get-int column="maxid"/> or any of the
> other typed responses. The problem is when we use one of these
> types of calls, we are expecting an int, long, double, etc.
>
> I am working through some practical things with the taglib, so it
> should be working soon. I am going to change those semantics so
> that they are correct--and they don't all act like <esql:get-string/>
> like now.
I made it so that you can use the attribute string="true" to retrieve
a string value.
Example:
<esql:get-int column="maxid"/>
returns an int value, but
<esql:get-int column="maxid" string="true"/>
allows you to use it in the former manner.
The format attributes still function, and automatically act
as if string="true" was set.
>
> ---------------------------------------
> If you lust for Ham and Eggs, you have
> committed breakfast in your heart
> already. -- C. S. Lewis
Re: C2: errors
Posted by Donald Ball <ba...@webslingerZ.com>.
On Wed, 20 Dec 2000, Berin Loritsch wrote:
> The semantics of <esql:get-int column="maxid"/> or any of the
> other typed responses. The problem is when we use one of these
> types of calls, we are expecting an int, long, double, etc.
and that's what you get...!
<xspdoc:desc>returns the value of the given column as a long</xspdoc:desc>
<xsl:template match="esql:row-results//esql:get-long">
<xsp:expr><xsl:call-template
name="get-resultset"/>.getLong(<xsl:call-template
name="get-column"/>)</xsp:expr>
</xsl:template>
- donald