forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sjur Moshagen <>
Subject Re: FOPNGSerializer, user-config and locationmaps
Date Fri, 22 Aug 2008 08:29:25 GMT
Den 22. aug. 2008 kl. 09.54 skrev Thorsten Scherler:

> Actually a similar problem that you are trying to solve has been  
> solved
> by David a while back. I remember because while updating I stumble  
> over
> the solution again.
> Have a look in the main sitemap or the internal.xmap of the  
> dispatcher.
> There we use entities to make the serializer configurable. First we
> define the entities file:
> <!DOCTYPE map:sitemap [
> <!ENTITY % symbols-project
>  PUBLIC "-//Apache Forrest//ENTITIES Symbols Project v1.0//EN"
>  "symbols-project-v10.ent">
>  %symbols-project;
> <!ENTITY % symbols-core
>  PUBLIC "-//Apache Forrest//ENTITIES Symbols Core v1.0//EN"
>  "symbols-core-v10.ent">
>  %symbols-core;
> ]>
> and later on we use it:
> <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/ 
> html"
>        name="xhtml" pool-grow="2" pool-max="64" pool-min="2"
>        src="org.apache.cocoon.serialization.XMLSerializer">
> <doctype-public>&serializer-xhtml-doctype-public;</doctype-public>
> <doctype-system>&serializer-xhtml-doctype-system;</doctype-system>
>        <encoding>&serializer-xhtml-encoding;</encoding>
>        <indent>yes</indent>
>        <omit-xml-declaration>yes</omit-xml-declaration>
>      </map:serializer>
> As you can see each project can provide a symbols-project-v10.ent  
> which
> can override the configuration.
> By default we have e.g. for the dispatcher:
> <!ENTITY serializer-xhtml-encoding "UTF-8">

I have now added the following to o.a.f.o.pdf/output.xmap:

<!DOCTYPE map:sitemap [
<!ENTITY % symbols-project
   PUBLIC "-//Apache Forrest//ENTITIES Symbols Project v1.0//EN"
     <map:serializers default="fo2pdf">
       <map:serializer name="fo2pdf"  
src="org.apache.cocoon.blocks.fop.FOPNGSerializer" mime- 

and in the file


I added the following:

<!ENTITY pdf-config-file "">

(That is, the entity should resolve to the empty string by default).

But when I start up Forrest again, I get the following error:

	The entity "pdf-config-file" was referenced, but not declared.

I then tried to copy the dummy symbols-project-v10.ent found in main/ 
webapp/ into the root of the pdf plugin, but that did not help.

I then tried to copy the real entity file into the root of the plugin,  
but I still got the same error.

Any ideas?

Best regards,

View raw message