cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: [C1][Bug] esql taglib bug in get-xml tag
Date Mon, 29 Jan 2001 05:14:40 GMT
On Sun, 28 Jan 2001, SÚrgio Carvalho wrote:

>
> The esql taglib generates invalid Java source code when using the
> get-xml tag with no parent XML element: (...)
>      <esql:row-results>
>        <esql:get-xml column="nitf"/>
>      </esql:row-results>
> (...)
> The generated code is:
>    while (_esql_query.resultset.next()) {
> // ********** Error in the line below
>       this.xspParser.parse(new InputSource(new StringReader(_esql_query.resultse    ))).getDocumentElement()
>       if (_esql_query.max_rows != -1 && _esql_query.position - _esql_query.skip_
       break;
>       }
>       _esql_query.position++;
>     }

looks like valid java source code to me. it might throw some sort of
exception when executed, but it should certainly compile. what exception
do you get?

> It works correctly if the get-xml tag is used like this:
> (...)
>      <esql:row-results>
>       <nitf:nitf>
>        <esql:get-xml column="nitf"/>
>       </nitf:nitf>
>      </esql:row-results>
> (...)

> But I can't use it like this, as the <nitf:nitf> is the root element
> of the document and then the nitf column would have several root
> elements (not allowed).

so do it like this:

<esql:results>
  <nitf:nitf>
    <esql:row-results>
      <esql:get-xml column="nitf"/>
    </esql:row-results>
  </nitf:nitf>
</esql:results>

that's one variation. i think think of several others you might try as
well.

- donald


Mime
View raw message