XEP working in ported ACH project
Posted by mholmes on 09 Feb 2010 in Servers, R & D, Activity log, Activity log
Took Greg's new build of XEP and integrated it into the ACH project, as ported to the new Cocoon/eXist build by MJ. It works as expected. This is what I had to do:
- Take the XEP configuration data, which includes the docs, examples, fonts, hyphenation data, images, lib and crucially the
xep.xml
file which configures usage of fonts etc., and put that in the[cocoon]/resources
directory. Much of this (docs, examples, etc.) could be discarded, but it's not a bad thing to have the docs and examples available for anyone who needs to maintain the project in the future. - Put the three XEP jars that form the Cocoon connector into
[cocoon]/WEB-INF/lib
(xep.jar
,XEPSerializer.jar
, andxt.jar
). - Added the serializer data to the sitemap:
<map:serializer mime-type="application/pdf" name="fo2pdf" src="com.renderx.xepx.cocoon.Serializer"> <parameter name="com.renderx.xep.CONFIG" type="string" value="/home/mholmes/apps/apache-tomcat-6.0.20/webapps/ach/resources/xep/xep.xml" /> </map:serializer> <map:serializer mime-type="application/postscript" name="fo2ps" src="com.renderx.xepx.cocoon.Serializer"> <parameter name="com.renderx.xep.CONFIG" type="string" value="/home/mholmes/apps/apache-tomcat-6.0.20/webapps/ach/resources/xep/xep.xml" /> </map:serializer>
This obviously uses full paths on the local drive, which would need to be updated when moving the project; I'm now going to see if I can figure out how to make these paths relative, using Cocoon protocols.
Update: no way to avoid literal paths
It seems that there is no way to get around the requirement for literal paths in the sitemap. In view of that, I've relocated the xep folder so that it's a child of /site/. This reduces the changes we need to make to the root Cocoon to a minimum; now all that needs to happen is that the jars get dropped into the WEB-INF/lib directory. That's perhaps the best we can do for the moment. Eventually we hope to move to FOP, which is intelligent enough to read its configuration from a relative path.