Weird issue with replacements

Apr 15, 2013 at 2:25 PM
We are using xmlpreprocess to have different configuration elements as well as to do some replacements using ${_environment_name}. Everything regarding replacements works fine when using /n, but then the #if branches does not work.
I changed the code for the component to fix it at least for me in XmlPreprocessor.cs
  if (context.NoDirectives)
           {
               result.Append(ResolveProperties(content, context));
            }
            else
            {
to
 content = ResolveProperties(content, context);
and it works now. If anyone can help me figure out why it wasnt working please let me know, at least for now my quickfix works.
Coordinator
Apr 16, 2013 at 12:52 PM
Can you give me a scaled down sample of what you are trying to do? I don't fully understand your scenario. The /n (no directives) mode is mutually exclusive to the preprocessing markup (#if / #else) mode, and you have to choose to use one or the other. But maybe you've got a unique requirement that wasn't accounted for.
Apr 16, 2013 at 1:33 PM
i have a biztalk binding file where the production binding use FTP and the QA, Test use File.

So different segments in use in the xml so i get
 <!-- #if  GetProperty("_environment_name") =="prod"  -->
<prod binding user="test" pass="${passfromxsl}"/>
 <!-- #else -->
<QA path="\\server\EAI\${_environment_name}\"/>
 <!-- #endif -->
I just fixed it by allways running substitutions and that seems to work, but it seems a bit weird to me that i either get substitutions or "format".

I would like to get preprocessing markup as the same time as substitutions from the xsl file withouth having to do two passes..
Coordinator
Apr 17, 2013 at 1:31 PM
Would it be possible to give me a little more context, or perhaps a scaled-down end-to-end sample? I'm not quite following yet. I never have to use the /n (no directives) mode on XML, and do some pretty complex things. The no directives mode is really just for unstructured flat files like INI files. I'm pulling together a new release with some minor features I've been needing and if you have a new requirement I can slip in I'd be happy to take a look at it.