Ard, I've read a lot of Cocoon documentation on the net and books, especially regarding SQL Transformer. It does mention that queries might be named. So if I have several SQL queries in SQLTransformer (e.g. query1, query2), what is a convention for the output ?
<page xmlns:sql="http://apache.org/cocoon/SQL/2.0"> <content> <sql:execute-query> <sql:query name="query1"> SELECT * FROM custtable WHERE cust_id=<sql:substitute-value sql:name="cust_id"/> </sql:query> </sql:execute-query> ... </content> </page> I need to pickup this SQLTransformer output (few rowsets) as an input into XSLT->HTML transformer/serializer, something like: <xsl:variable name='rowset1' select='/page/content/paging/data/query1'/> ? Probably the alternative is to put each query in its own XML file and create an aggregate generator, like: <map:aggregate element="root"> <map:part src="xml/query1.xml" element="rowset1"/> <map:part src="xml/query2.xml" element="rowset2"/> <map:part src="xml/query3.xml" element="rowset3"/> </map:aggregate> In this case I expect to pick the output in: select='/root/rowset1/page/content/paging/data/' Is that right ? But have all queries in one XML file would be cleaner. By the way, I haven't seen a single sample of how the output of SQLTransformer (rowset) is getting processed to be displayed (not to mention with multiple named queries). Cocoon newbie... TIA, Oleg. --- Ard Schrijvers <[EMAIL PROTECTED]> wrote: > I do not exactly know what you are asking here, shouldn't you > just read some documentation about cocoon stuff? > > Anyway, if you are familiar with xsl, and you try to transform > your results form the sqltransformer, do not forget the sql > namespace. > > For example : <xsl:value-of > select="/sqlpart/sql:rowset/sql:row/sql:thisfield"/> > > Probably you forgot the namespace > > AS > > > > > > > Hi, > > > > I am trying to create an XSL page > > showing rowsets from several queries from SQLTransformer > > (Cocoon 2.0.4 with sitemap actions), > > but so far can't see anything on the screen. > > > > 1) Could you please point me to some good example > > of such simple (select) DB report - especially XSL part ? > > > > > > 2) I think, I can't get anything from SQL transformer > > because I am trying to read its output from incorrect place: > > <xsl:variable name='thedata' > > select='/page/content/paging/data'/> > > > > Is there a standard place for the output of SQL Transformer? > > Or how and where is it specified (if you give query a name)? > > Maybe it should be: /page/content/paging/data/cust_data > > or /root/?/page/content/paging/data/cust_data ? > > (where cust_query is a query name). > > > > > > TIA, > > Oleg. > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
