I am running Cocoon 2.1.5 and JDK 1.5.
I have a SQL Transformer that seems to be working just fine;
however, when I pass the results through the Filter Transformer
I seem to get garbage out:
Sitemap:
<map:match pattern="db/list-*">
<map:generate src="queries/list/{1}.xml" type="jx" label="debug">
<use-request-parameters>true</use-request-parameters>
</map:generate>
<map:transform type="sql" label="debug1">
<map:parameter name="use-connection" value="my_user"/>
<map:parameter name="show-nr-of-rows" value="true"/>
<map:parameter name="clob-encoding" value="UTF-8"/>
</map:transform>
<map:transform type="filter" label="debug2">
<map:parameter name="element-name" value="row"/>
<map:parameter name="count" value="50"/>
<map:parameter name="blocknr" value="1"/>
</map:transform>
<map:serialize type="html"/>
</map:match>
At "debug1" stage I have:
<page xmlns:sq2="http://apache.org/cocoon/SQL/2.0"
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
<rowset xmlns="http://apache.org/cocoon/SQL/2.0" nrofrows="3"
name="projectlist">
<row>
<projno>1</projno>
<title>Joint study</title>
<startdate>2001-04-01</startdate>
<enddate>2004-06-30</enddate>
<rowset nrofrows="3" name="clientlist">
<row>
<client>Company A</client>
</row>
<row>
<client>Company B</client>
</row>
<row>
<client>Company C</client>
</row>
</rowset>
</row>
<row>
<projno>2</projno>
<title>TESTing</title>
<startdate>2004-09-17</startdate>
<enddate>2007-05-19</enddate>
<rowset nrofrows="0" name="clientlist" />
</row>
<row>
<projno>3</projno>
<title>DUMMY</title>
<startdate>2006-05-20</startdate>
<enddate>2006-05-20</enddate>
<rowset nrofrows="0" name="clientlist" />
</row>
</rowset>
</page>
which is what is expected from the database.
And at "debug2" stage I have:
<page xmlns:sq2="http://apache.org/cocoon/SQL/2.0"
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
<rowset xmlns="http://apache.org/cocoon/SQL/2.0" nrofrows="3"
name="projectlist">
<block id="1"></block>
</rowset>
</row>
</block>
</rowset>
</row>
</block>
</rowset>
</row>
</rowset>
</page>
which as can be seen is not even gramatically correct XML?
Any ideas as to how to make this work properly?
Thanks
Derek
--
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
[EMAIL PROTECTED]
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]