On 21.Jan.2002 -- 06:45 PM, NUGENT ROBERT (APP3RJN) wrote:
> First, I am trying retrieve an XML fragment stored as a CLOB in Oracle 8i.
> No problem using <esql:get-ascii> to retrieve the contents of the CLOB.
> Also no problem using <esql:get-xml> to retrieve an XML fragment stored as
> character data (ie, VARCHAR2 but not a CLOB)... But I am having problems
> using <esql:get-xml> to retrieve the same data stored as a CLOB...
> The column theclob is a CLOB containing xml fragment... Seems simple
> enough... what am I missing?
esql:get-xml uses esql:get-string internally which has no support for
clobs. wonder if we could change that...
> Second question: I am studying ways to generate nested XML from ESQL query
> results... have played with nesting an <esql:execute-query> (combined with
> <esql:parameter> and <esql:get-string ancestor="1"> to generate nested/
> correlated content) within a parent <esql:results> tag. This works like a
> charm. But I was wondering if ESQL supports nested Oracle CURSOR
> expressions... whereby the "nested" content just appears within the select
> list of the parent query...
>
> <esql:query>
> select 'hi' as "greeting1",
> cursor(select 'there' as "greeting2" from dual) as
> "cursor1"
> from dual
> </esql:query>
>
> The above query seems to be handled OK, but at first blush I can't seem to
> get at the nested content... I can retrieve the first item using
> <esql:get-string> no problem but have tried various ways to manipulate the
> contents of the nested CURSOR, to no avail. Do I have to somehow name and
> explicitly retrieve the nested resultset separately from the parent
> resultset prior to generating the result tree?
If this results in the second returned value being a ResultSet you
should wait a little. I'm currently working on SP support for esql and
will try to add a way to use a ResultSet obtained from a query for
further processing. I'm thinking along the lines of
<esql:results from-column="cursor1">
<esql:row-results>
[...]
</esql:row-results>
</esql:results>
Chris.
--
C h r i s t i a n H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>