cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Askild Aaberg Olsen <ask...@xangeli.com>
Subject Re: Named queries in SQLTransformer
Date Thu, 10 Nov 2005 15:43:10 GMT
Oleg Konovalov wrote:

>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'/> ?
>  
>
It adds an attribute named "name" to the rowset, like:

<xsl:value-of select="/sqlpart/sql:rowset[@name='query1']/sql:row/sql:thisfield"/>

I'm not 100% sure this is the right output (just looked in 
SQLTransformer.java) , but why don't you just look at the pipeline output?

Askild
-

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message