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 22:54:11 UTC

esql logicsheet errors (C2)

Perhaps someone can help.

The problem I am experiencing has to do with using the
<xsp:attribute> tag inside the <esql:results> tag.

When I do something like this:

<esql:results>
  <option>
    <xsp:attribute><esql:get-int column="id"/></xsp:attribute>
    <esql:get-string column="name"/>
  </option>
</esql:results>

The generated code has this snippet:

--------------------------------------------------------

this.contentHandler.startElement("", "option", "option",
                                 xspAttr);

xspAttr.clear();

xspAttr.addAttribute("", "value", "value", "CDATA",
                     String.valueOf(
                     _esql_session.resultset.getInt("id")) + "");

--------------------------------------------------------

Which means that the attribute is set _AFTER_ the startElement()
call.  This is clearly wrong.  This may be something that we have
to fix in every logicsheet.

Because this is effectively in a loop, the value is set for the
following value, and this is a serious logic bomb!


---------------------------------------
If you lust for Ham and Eggs, you have
committed breakfast in your heart
already.   -- C. S. Lewis