Peter

(comments inline)

> In config.xml:
> 
>   <entry>
>     <key>userConfigFileName</key>
>     <value>userconfig.xml</value>
>   </entry>

Ok, that means FOP looks in the current directory for userconfig.xml.
I can agree with that. I guess there are pros and cons: This mechanism
can reduce the work that needs to be done to get FOP running in embedded
mode. But on the other hand, I'm not sure if it cuts on flexibility when
you want to provide a special configuration.

>   <entry>
>     <key>languageConfigFileName</key>
>     <value>xml-lang.xml</value>
>   </entry>
> 
> (More on languageConfigFileName later.)
> 
> In userconfig.xml, allow things like
> 
>   <entry>
>     <key>foFileName</key>
>     <value>/home/pbw/public_html/xml/newtest3.fo</value>
>   </entry>
> 
>   <entry>
>     <key>inputMode</key>
>     <value>fo</value>
>   </entry>
> 
>   <entry>
>     <key>foFileName</key>
>     <value>/home/pbw/public_html/xml/newtest3.fo</value>
>   </entry>
> 
>   <entry>
>     <key>outputMode</key>
>     <value>pdf</value>
>   </entry>
> 
>   <entry>
>     <key>outputFileName</key>
>     <value>/home/pbw/public_html/xml/newtest3.pdf</value>
>   </entry>

Now, I think you're really start mixing things. I strongly recommend to
separate configuration (as the filename says) and processing
instructions. What you want to do means creating a new userconfig.xml
for each call to FOP. This is much easier using the command line (and
faster).

Any other opinions?

> User configuration is loaded as follows.  The basics of reading from 
> user space (untested by me) and system space are simply lifted from the 
> existing code and re-arranged.   So the answer to your question as to 
> where it used to look is, I assume, at the absolute or relative filename 
> location, and failing that, in a conf directory at a place detemined by 
> one of the class loaders.
> 
>     public static void loadUserConfiguration(String userConfigFileName)
>         throws FOPException {
>         // read user configuration file
>         boolean readOk = true;
>         userConfigFile = new File(userConfigFileName);
>         if (userConfigFile != null) {
>             ConfigurationReader reader = new ConfigurationReader(
>                                 
> InputHandler.fileInputSource(userConfigFile));
>             try {
>                 reader.start();
>             } catch (org.apache.fop.apps.FOPException error) {
>                 readOk = false;
>             }
>             if (! readOk) {  // same method also loads config.xml
>                 loadConfiguration(userConfigFileName);
>             }
>         }
>     }
> 
> The language file (see attached) is just a validation mechanism for 
> certain attribute/property values.  It (currently) requires the 
> org.apache.fop.configuration.LanguageFileReader class which reads the 
> xml-lang.xml file and builds three HashMaps, which are installed in 
> Configuration.

I don't get you here. What do you need the language validation for?

Cheers,
Jeremias Märki

mailto:[EMAIL PROTECTED]

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 41 317 20 20 - Fax +41 41 317 20 29
Internet http://www.outline.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to