You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jos Snellings <jo...@upperware.biz> on 2012/05/10 09:54:52 UTC

COCOON3-99: cross-cultural issue

Dear cocooners,

COCOON3-99 is about applying a user configuration to FopFactory in
FopSerializer.
To pass the location of the configuration file in a nice and portable way,
it is addressed in the jar:
configurationUrl = this.getClass().getResource("/COB-INF/" +
userConfigurationPath);

Fine, but I am still not satisfied. I would like to locate the font file as
well in the block.
FOP however, expects <font-base>, the path relative to the configuration
file to be a real directory.

As we can see from an example fragment from FOURIResolver.java:

     baseURI = new URI(base);
     String scheme = baseURI.getScheme();
     boolean directoryExists = true;
     if ("file".equals(scheme)) {
                    dir = FileUtils.toFile(baseURI.toURL());
                    directoryExists = dir.isDirectory();
                }
     if (scheme == null || !directoryExists) {
                    String message = "base " + base + " is not a valid
directory";
                    if (throwExceptions) {
                        throw new MalformedURLException(message);
                    }

(this is just an example, FO is coded to read resources from expanded
archives).

What do we do?
- live in an imperfect world?
- submit patch to FOP, but to be consistent, maintenance in more places is
necessary
- cross-post this mail to FO?

I should deliver a war to a party without me having server access. I can
hear them complain when I tell that there is some maintenance necessary.

Kind regards,
Jos

-- 
The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
        -- Gilbert K. Chesterson