You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paul Tomsic <pt...@yahoo.com> on 2003/06/12 00:05:12 UTC

xml/xsl transform working, but fails thru cocoon?

Hi, we can't seem to make a transformation work when
retrieving the data from a SQL source.
We do get the XML back correctly, but when it's
displayed as PDF, everything is blank.
Perhaps there's something that we're missing w/r/t the
way the namespaces are followed inside cocoon, but
below is our sitemap.xmap, the xml before the
transform and the XSL.
Any help would be greatly appreciated.
Thanks.

we've got the following URL from our site:

http://whatever/reports/exhibitReport.pdf?id=45

in our sitemap.xmap file:
----------------
<map:match pattern="exhibitReport/*.pdf">
<map:generate type="request"/>
<map:transform type="xslt" src="render-logic.xsl">

<map:parameter name="label" value="{1}"/>
</map:transform>
<map:transform type="xinclude"/>
<map:transform type="xslt" src="render-logic.xsl"/>
				
<map:transform type="sql">
<map:parameter name="dburl"
value="jdbc:mysql://localhost/agilis?user=one&amp;password=123abc"
/>
</map:transform>
<map:transform src="exhibitSp.xsl"/>
<map:serialize type="fo2pdf"/>
</map:match>
--------------

and in the exhibitSp.xsl
(it's been trimmed down to only include relevant
stuff)
--------------
<?xml version="1.0"  encoding="iso-8859-1"?>
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:mops="http://mops.cappsdigital.com/Report"
	xmlns:sql="http://apache.org/cocoon/SQL/2.0"
>
    <!-- generate PDF page structure -->
	
	<xsl:template match="/">
		<fo:root
xmlns:fo="http://www.w3.org/1999/XSL/Format">
			<fo:page-sequence master-reference="all">
					<fo:flow flow-name="xsl-region-body">
						<fo:table width="9in" padding="5pt"
table-layout="fixed">
								<fo:table-row>
									<fo:table-cell padding-before="4pt"
padding-after="3pt" padding-right="5pt">
										<fo:block font-family="Helvetica,Arial"
font-size="8pt" text-align="left">
											RSID
										</fo:block>
									</fo:table-cell>
									<fo:table-cell padding-before="4pt"
padding-after="3pt" padding-right="5pt">
										<fo:block border-style="solid"
border-width="1pt">
											<xsl:value-of
select="/mops:report-sql/mops:data-blocks/mops:data-block/rowset/row/rsid"/>
										</fo:block>
									</fo:table-cell>
									....


thanks again....
Paul


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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


Re: xml/xsl transform working, but fails thru cocoon?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Paul Tomsic wrote:
> Hi, we can't seem to make a transformation work when
> retrieving the data from a SQL source.
> We do get the XML back correctly, but when it's
> displayed as PDF, everything is blank.

You don't have a layout master set, but this may be a result
of the snipping, and there is nothing else which is obviously
wrong.

Are there any interesting error messages in the Cocoon logs
or in the stdout/stderr of the servlet container?
You can also temporarily replace the pdf serializer with an
XML serializer, save the generated FO document to disk and
run it through a recent FOP command line.


> Perhaps there's something that we're missing w/r/t the
> way the namespaces are followed inside cocoon, but
> below is our sitemap.xmap, the xml before the
> transform and the XSL.

The XML before the transform is only of much interest if you
post the full XSL, otherwise nobody can actually try to
reproduce your problem.

J.Pietschmann


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