Hi Thorsten,
If I understand your suggestion correctly, ALL files in my site will use
the fo.xsl in the
{properties:skins-dir}{forrest:forrest.skin}/xslt/fo/{1}-to-fo.xsl
directory. Is that correct? If so, that's not quite what I wanted. I
would like just a few specified files to use the new fo.xsl.
>> Hmm, not sure there is a space! {1} aNewFile.pdf That could cause the
>>error.
The space was a typo in the email, and not present in the source file.
Sorry for the confusion.
>> We would need some more information (stack trace) to see where the
NPE
>>is coming from.
Please find the stack trace attached.
Thanks,
Steve
-----Original Message-----
From: Thorsten Scherler
[mailto:[EMAIL PROTECTED]
Sent: 15 January 2007 16:01
To: [email protected]
Subject: Re: How do I add a custom fo.xsl
On Mon, 2007-01-15 at 15:45 +0000, Steve Odlind wrote:
> Hi all,
>
>
>
> How do I go about adding a custom fo.xsl in version 0.7? If I want a
> particular PDF to have a different look-and-feel to the other files in
> my site, how do I specify that this file should use a different fo.xsl
> to the other files?
>
The locationmap is letting you override the default one with your own
implementation:
from main/webapp/locationmap-transform.xml
<match pattern="transform.*.fo">
<select>
<location
src="{properties:skins-dir}{forrest:forrest.skin}/xslt/fo/{1}-to-fo.xsl"
/>
<location
src="{forrest:forrest.context}/skins/{forrest:forrest.skin}/xslt/fo/{1}-
to-fo.xsl"/>
<location
src="{forrest:forrest.context}/skins/common/xslt/fo/{1}-to-fo.xsl"/>
</select>
</match>
Meaning if you place your xsl in
{properties:skins-dir}{forrest:forrest.skin}/xslt/fo/{1}-to-fo.xsl
then it get preference over the default ones.
>
> Having created the new fo.xsl, I have tried adding variants of the
> following to my project sitemap.xmap:
>
>
>
> ""
>
> <map:components>
>
> ...
>
> <map:serializers>
>
> <map:serializer name="fo2pdf"
> src="org.apache.cocoon.serialization.FOPSerializer"
> mime-type="application/pdf" />
>
> </map:serializers>
>
> </map:components>
>
> ...
>
> <map:match pattern="**aNewFile.xml">
>
> <map:generate src="{project:content.xdocs}{1} aNewFile.pdf" />
Hmm, not sure there is a space! {1} aNewFile.pdf
That could cause the error.
>
> <map:transform src="{project:resources}/myNewFile2fo.xsl" />
>
> <map:serialize type="fo2pdf" />
>
> </map:match>
>
> ""
>
>
>
> ... all to no avail, as I get a java.lang.NullPointerException when I
> execute the 'forrest' command.
We would need some more information (stack trace) to see where the NPE
is coming from.
HTH
>
>
>
> Could someone point me in the right direction, please?
>
>
>
> Many thanks,
>
>
>
> Steve
>
>
error.log
Description: error.log
