DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=15316>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=15316 FOP does not resolve relative paths [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW ------- Additional Comments From [EMAIL PROTECTED] 2004-10-11 15:03 ------- The patch to FOPSerializer in the attachment allows relative filepaths (with sitemap location as base) and context:/ paths. To show new feature, patch in blocks/fop/samples: % diff -c sitemap.xmap.orig sitemap.xmap *** sitemap.xmap.orig Fri Jul 9 10:04:59 2004 --- sitemap.xmap Mon Oct 11 16:09:45 2004 *************** *** 66,78 **** <!-- xsl-fo document access --> <map:match pattern="**/*.fo.xml"> <map:generate src="{1}/{2}.fo.xml"/> - <!-- This stylesheet makes image URLs absolute, so that FOP can - display images. {realpath:/} returns the absolute path of the - context root. --> - <map:transform src="misc/fix-imagelinks.xsl" label="content"> - <map:parameter name="ctxroot" value="{realpath:/}"/> - <map:parameter name="dir" value="samples/fop/{1}/"/> - </map:transform> <map:serialize type="xml"/> </map:match> --- 66,71 ---- % diff -c misc/minimal.fo.xml.orig misc/minimal.fo.xml *** misc/minimal.fo.xml.orig Fri Jul 9 10:04:39 2004 --- misc/minimal.fo.xml Mon Oct 11 16:25:23 2004 *************** *** 30,37 **** <!-- content --> <fo:page-sequence master-reference="main"> <fo:flow flow-name="xsl-region-body"> ! <fo:block padding="24pt"> ! <fo:external-graphic src="/resources/images/cocoon.gif"/> </fo:block> <fo:block font-size="18pt"> Congratulations! --- 30,40 ---- <!-- content --> <fo:page-sequence master-reference="main"> <fo:flow flow-name="xsl-region-body"> ! <fo:block padding="12pt"> ! <fo:external-graphic src="context:/resources/images/cocoon.gif"/> ! </fo:block> ! <fo:block padding="12pt"> ! <fo:external-graphic src="misc/powered.gif"/> </fo:block> <fo:block font-size="18pt"> Congratulations! *************** *** 39,45 **** <fo:block font-size="12pt"> If you see this text in a PDF document, it means that Cocoon and FOP were able to generate it from the minimal.fo.xml example document. If ! you see additionally an image above, it means that even Batik and the resolving of the image path works! </fo:block> </fo:flow> --- 42,48 ---- <fo:block font-size="12pt"> If you see this text in a PDF document, it means that Cocoon and FOP were able to generate it from the minimal.fo.xml example document. If ! you see additionally two images above, it means that even Batik and the resolving of the image path works! </fo:block> </fo:flow> Copy $COCOON/src/webapp/resources/images/powered.gif to $COCOON/src/blocks/fop/samples/misc/powered.gif. Delete misc/fix-imagelinks.xsl.
