You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Barbara Post <ba...@ifrance.com> on 2002/09/04 18:15:42 UTC
problem with pdf and SourceWritingTransformer
Hi again,
here is my sitemap piece :
<map:match pattern="writelicense">
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:generate
src="cocoon://getlicense?serialNumber={../serialNumber}"/>
<map:transform src="xsl/writeandkeep.xsl"/>
<map:transform type="write-source">
<map:parameter name="serializer" value="xml"/>
</map:transform>
<map:transform src="xsl/writeandpdfcard.xsl"/>
<map:transform type="write-source">
<map:parameter name="serializer" value="fo2pdf"/>
</map:transform>
<map:serialize type="xml"/>
</map:act>
</map:match>
Explaination : I get an xml file, by writeandkeep.xsl add the relevant
<source:... /> tags to be able to apply the transformer, and I keep the
licence content because I want to do a pdf with it. It works ok.
writeandpdfcard.xsl is supposed to do the pdf and write to the disk.
My problem : there is an exception because I want to write so in this last
stylesheet :
<xsl:template match="/page/license">
<source:write>licensekeys/blah.pdf</source:write>
<source:fragment>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master ...
...
</fo:root>
</source:fragment>
Fop 0.20.4 says :
[Fatal Error] pro1FF.xml:2:1: Content is not allowed in prolog.
[ERROR] Content is not allowed in prolog.
...post processing finished
Any idea how I can correctly use this transformer with pdf format ? Many
thanks !
Barbara
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>