Le 1 août 05, à 15:05, Christoph Hermann a écrit :
...*BUT*, maybe you just need XMLFileModule[1]? ;-) Or at least you should implement your own input module to easy obtain your configuration.well, it looks very interesting. Is it documented somewhere in a more detailed way? i.e. how to access it from flowscript?
Here's an example which gets a value from an input module named "xyz"
function conf_get_nxms_value(path) {
var module = null;
var result = null;
try {
module = cocoon.getComponent(InputModule.ROLE +
"Selector").select("xyz");
result = module.getAttribute(path,null,null);
if(result==null) throw new java.lang.Exception("nxms
configuration value '" + path + "' not found");
} finally {
// selected components need not be released, right?
}
return result;
}
This is perfect for reading configs from an XML file, with automatic
reloading if the input module is configured for this.
-Bertrand
smime.p7s
Description: S/MIME cryptographic signature
