-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add variable support for configurations(?) #19
Comments
A further question is where does this apply? Inside of strings? Should not have it inside of tags since that makes invalid XML and we would end up writing an XML pre-processor (which is another option, but quite different). |
A really simple-minded approach is to allow for a properties file and use the standard replacement template mechanism, so ${OA4MP_HOME} could be inserted, the XML file pre-processed and then handed to the XML parser. That, however, is not self-contained at all. Might do a partial solution too: Require an initial vars block, read only that (easy to read a single element), set up templates from it, then preprocess the rest of the file. This requires multiple loads and a few other things, but since parsing a configuration file is a one-time operation, that might be ok. |
Some ability to set variables in the XML configuration would be nice. Say allow a section like
<vars><key>value</key></vars>
and use them like templates:
${key}
replaces it with the value. E.g.
This would be particularly useful in places where there are, e.g., paths or other things. One question is scope. Do we allow for these globally in the entire configuration or just per section?
The text was updated successfully, but these errors were encountered: