Handling Configuration File Parameters -- Historical Unrefined Approach Just for Discussion

Hi,

I was reading posts about configuration file parameters in the xproc list
archives and having my own issues using them that it led me to recall my
solution when creating a simple xslt pipe line as probably all on this list
have done.

Regarding handling the configuration file:

   - We started with name value pair configuration declarations in the top
   of the pipe which were referenced below using xpath which became cumbersome
   to use over time and at some point the idea came to use a simpler perhaps
   unrefined solution that worked well.
   - We had to externalize the name value pair configuration xml file to
   have multiple configuration files, some for end users, some for more
   technical people...
      - Given the need to have multiple configuration files we preprocessed
      to combine the configuration files to pass only one config file
through the
      pipe as passing more than one would have been more work.
      - PERHAPS THE KEY POINT: Rather than reference the configuration file
      using xpath and having the pipeline processor to pass the
configuration file
      as a DOM through the whole process to find config values
dynamically as they
      were needed using xpath, we replaced all the xpath with
'##VariableName##'
      referencing the same variable name from the config file as the xpath was.
      - Then preprocessing we complied the new pipeline xml document finding
      and replacing '##VariableName##' with the correct value for each
      configuration file as we no longer combined config files into
one as there
      was no need.

The simplification saved us development time in the future.

>From what I gather this type of script preprocessing is a fairly common
practice.


Questions for discussion:

   - Are others doing this with their xproc scripts? Why or why not?



   - I wonder would it be better that I use the parameters configuration
   file as it is currently  designed in xproc rather than I create a small
   script to implement the ## Configuration version?



   - Is it possible to have a small xproc pipe which executes this process
   and then executes the regular process without running the process twice from
   the command line? ( just thinking out loud here)
   - Would that just require I use the "exec" step for example if I wanted
      to launch 4 java process of the some pipe compiled with different
      configurations?
      - I think that will work, no?


Thanks Much

-- 
Alex
https://sites.google.com/a/utg.edu.gm/alex

Some Good Music -- mix of western and African relaxing acoustic styles
http://sites.google.com/site/greigconteh/

Received on Friday, 19 February 2010 12:38:18 UTC