cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject A couple of ESQL Q's
Date Mon, 21 Jan 2002 23:45:18 GMT

I am a newcomer to Cocoon just getting comfortable with ESQL, which we are
using here with Oracle 8i.  A couple of questions:

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

		<esql:query>select id, theclob from	tclob where id =
				<esql:get-xml column="theclob"/>

The column theclob is a CLOB containing xml fragment... Seems simple
enough... what am I missing?

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

		select 'hi' as "greeting1",
			 cursor(select 'there' as "greeting2" from dual) as
		from dual

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? 


Bob Nugent

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message