W3C home > Mailing lists > Public > xproc-dev@w3.org > February 2010

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

From: Alex Muir <alex.g.muir@gmail.com>
Date: Fri, 19 Feb 2010 12:37:43 +0000
Message-ID: <88b533b91002190437t4ff336b5tc682a79409e30152@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>

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
      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

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
      - I think that will work, no?

Thanks Much


Some Good Music -- mix of western and African relaxing acoustic styles
Received on Friday, 19 February 2010 12:38:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:06 UTC