title: Help with Castle Windsor XML configuration
body: <p>I have the following three components defined in the Caste-Windsor XML configuration for my application:</p>
  
  <pre><code>&lt;component id="StringFactory"
             service="IStringFactory, MyApp"
             type="DefaultStringFactory, MyApp"
             lifestyle="singleton"
             /&gt;
  
  &lt;component id="TheString"
             type="System.String"
             factoryId="StringFactory"
             factoryCreate="CreateString"
             &gt;
    &lt;parameters&gt;
      &lt;name&gt;SomeString&lt;/name&gt;
    &lt;/parameters&gt;
  &lt;/component&gt;
  
  &lt;component id="TheTarget"
             service="ITarget, MyApp"
             type="TheTarget, MyApp"
             lifestyle="transient"
             &gt;
    &lt;parameters&gt;
      &lt;aString&gt;${TheString}&lt;/aString&gt;
    &lt;/parameters&gt;
  &lt;/component&gt;
  </code></pre>
  
  <p>And the following facility defined:</p>
  
  <pre><code>&lt;facility id="factory.support"
            type="Castle.Facilities.FactorySupport.FactorySupportFacility, Castle.MicroKernel"
            /&gt;
  </code></pre>
  
  <p>When I run the application and set a breakpoint in the constructor of the TheObject class, the value passed in as the aString parameter is "${TheString}" when I expect it to resolve to the value of the component with that name.</p>
  
  <p>Also, I have a breakpoint in the StringFactory constructor and CreateString method, neither of which are hit.  I know the configuration is being used as other components are resolving correctly.</p>
  
  <p>What am I missing or doing wrong here?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>In light of the huge tangient this topic has taken, I've refactored the code above to remove anything to do with connection strings.  The original intent of this post was about injecting a property with the value returned from a method on another object.  Somehow that point was lost in a discussion about why I'm using XML versus code-based configuration and if this is a good way to inject a connection string.</p>
  
  <p>The above approach is far from an original idea and it was pulled from several other discussions on this topic and our requirements are what they are.  I'd like help understanding why the configuration as it is in place (whether the right approach or not) isn't working as expected.</p>
  
  <p>I did verify that the first two components are being instantiated correctly. When I call Container.Resolve("TheString"), I get the correct value back.  For whatever reason, The parameter syntax is not working correctly.</p>
  
  <p>Any ideas?</p>