This project is read-only.

Feature request - possibility to exclude sections when using the noDirectives argument

Jun 25, 2009 at 12:16 PM

Hi Loren,

This new noDirective option has really come in handy for us. We have been able to embrace the XmlPreprocess tool into a lot more of our subsystems.

We have however run into the need to exclude certain sections of the configurations for certain environments, and to include different sections for different environments.

Currently this is possible when substituting xml-files, but not for property-/ini-files, ie. when using the noDirectives argument.

Thanks

Jun 30, 2009 at 4:08 PM

Have you put any thought into how this problem could be solved?

Jul 1, 2009 at 12:26 PM

No not really, but since you ask, I ran some more tests.

It seems that this is allready supported. I am able to run XmlPreprocess on a property-file (a key=value file, like ini-files), without using the /noDirectives argument.

I have to wrap the entire file in

<!-- ifdef ${_xml_preprocess} -->
...
<!-- endif -->

If I want a substition to be excluded, I can do it like this:

<!-- endif -->
<!-- ifdef ${TestUser} -->
crb.TestUser=${crb.TestUser}
<!-- endif -->
<!-- ifdef ${_xml_preprocess} -->

If use the patch-2344 version, I can exclude a section like this:

<!-- ifdef ${TestUser} -->
crb.TestUser=${crb.TestUser}
<!-- endif -->

We will implement this where we need it, so you can close the discussion if you like.