cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "NUGENT ROBERT (APP3RJN)" <APP3...@ups.com>
Subject A couple of ESQL Q's
Date Mon, 21 Jan 2002 23:45:18 GMT
Hi,

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:execute-query>
		<esql:query>select id, theclob from	tclob where id =
5</esql:query>
		<esql:results>
			<esql:row-results>
				<esql:get-xml column="theclob"/>
			</esql:row-results>
		</esql:results>
	</esql:execute-query>

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

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

Thanks,

Bob Nugent

---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message