title: "Namespace Manager or XsltContext needed" when {Binding XPath=ns:Foo}
body: <p>I'm binding DataTemplates to an XmlDataProvider. Since the XML data in question makes use of namespaces, I've also attached an XmlNamespaceManager to the XmlDataProvider and mapped a prefix to it. </p>
  
  <p>When Binding to an XPath fresh off the root of the XmlDataProvider, the namespace prefix is understood just fine and I get results. However, if from within the DataTemplate I try to do another XPath based binding, the Output window shows this error at runtime:</p>
  
  <p>Cannot obtain result node collection because of bad source node or bad Path.; SourceNode='IntegrationProfile'; Path='i:Role' BindingExpression:Path=; DataItem='XmlElement' (HashCode=19883454); target element is 'TabControl' (Name=''); target property is 'ItemsSource' (type 'IEnumerable') XPathException:'System.Xml.XPath.XPathException: Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.</p>
  
  <p>This error was provoked with this line of XAML:</p>
  
  <pre><code>&lt;TabControl ItemsSource="{Binding XPath=i:Role}"/&gt;
  </code></pre>
  
  <p>which is within a DataTemplate. The NamespaceManager was attached in code, like this:</p>
  
  <pre><code>_profile = new XmlDataProvider();
  _profile.Document = new XmlDocument();
  _profile.Document.Load(ProfilePath);
  _profile.XmlNamespaceManager = NamespaceManager;
  </code></pre>
  
  <p>Is WPF forgetting that there's a NamespaceManager attached?</p>