exist icon indicating copy to clipboard operation
exist copied to clipboard

xslfo:render() not working with FOP config document

Open xatapult opened this issue 7 years ago • 4 comments

Problem: The xslfo:render#4 function does not seem to work. The 4th parameter is the FOP config document. However when I supply a valid document to this parameter the answer is "URI is not absolute" It ried several variations but I cant get it working.

We have code that uses this parameter that runs on older (at least 2.1) versions of eXist that now breaks.

Reproduce: eXist-backup-fo-rendertest.zip Restore this eXist backup file. It creates a collection /db/fo-rendertest. Run the fo-test.xq. On my system this causes the "URI not absolute" error. Replacing the FOP config reference with () works.

Context:

  • eXist-db version: 3.4.1 (cant find the GIT hash, sorry)
  • Java version: 1.8.0_152
  • Operating system: Windows 10 64 bits
  • Any custom changes: None

xatapult avatar Nov 14 '17 12:11 xatapult

is there a clue in exist.log ?

dizzzz avatar Nov 14 '17 20:11 dizzzz

The same message but then as a Java error. See attachment line 10483

Van: Dannes Wessels [mailto:[email protected]] Verzonden: dinsdag 14 november 2017 21:03 Aan: eXist-db/exist [email protected] CC: eriksiegel [email protected]; Author [email protected] Onderwerp: Re: [eXist-db/exist] xslfo:render() not working with FOP config document (#1616)

is there a clue in exist.log ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eXist-db/exist/issues/1616#issuecomment-344380601 , or mute the thread https://github.com/notifications/unsubscribe-auth/AFjRZbfQcx9lnc-fE7ZtzLAk4Oz0EPahks5s2fHogaJpZM4QdQo0 . https://github.com/notifications/beacon/AFjRZcpOanqZg4VFO2uAUJAPoiaSQuIAks5s2fHogaJpZM4QdQo0.gif

xatapult avatar Nov 15 '17 07:11 xatapult

@eriksiegel This seems to be another bug in FOP around URI resolution. I have just sent them a patch to fix this: https://issues.apache.org/jira/browse/FOP-2758

In the meantime you have two options:

  1. Don't use font auto-detection. I think removing <auto-detect/> from your FOP config file should be enough.
  2. Use a patched version of FOP. You can replace the versions of the Jar files in your $EXIST_HOME/extensions/modules/libs with the ones in the attached Zip file.

In addition I also needed to make a small fix to base URI resolution for our FOP integration, which is here - https://github.com/eXist-db/exist/pull/1617

fop-2.2-patched.zip

adamretter avatar Nov 15 '17 17:11 adamretter

Regression, code doesn't work in 4.10.0 windows server, and 6.1.0 docker

duncdrum avatar Feb 18 '22 10:02 duncdrum