title: How to dynamically load an XML fragment in XML view?
body: <p>Suppose I have the following XML view:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;mvc:View xmlns:mvc="sap.ui.core.mvc" ...&gt;
      &lt;Page&gt;
          &lt;content&gt;
              &lt;l:VerticalLayout&gt;
                  &lt;l:content&gt;
                      &lt;core:Fragment fragmentName="my.static.Fragment" type="XML" /&gt;
                  &lt;/l:content&gt;
              &lt;/l:VerticalLayout&gt;
          &lt;/content&gt;
      &lt;/Page&gt;
  &lt;/mvc:View&gt;
  </code></pre>
  
  <p>The fragment <code>my.Fragment</code> is statically loaded. However, I now want to dynamically change the to-be-loaded fragment (ideally using data binding the <code>fragmentName</code> property, but any other means should be ok as well), ie. something like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;mvc:View xmlns:core="sap.ui.core.mvc" ...&gt;
      &lt;Page&gt;
          &lt;content&gt;
              &lt;l:VerticalLayout&gt;
                  &lt;l:content&gt;
                      &lt;core:Fragment fragmentName="{/myDynamicFragment}" type="XML" /&gt;
                  &lt;/l:content&gt;
              &lt;/l:VerticalLayout&gt;
          &lt;/content&gt;
      &lt;/Page&gt;
  &lt;/mvc:View&gt;
  </code></pre>
  
  <p>However, the latter does not work, and the Fragment definitions don't allow for data binding... I might have missed something, but how should I dynamically change the Fragment in my XML view based on a parameter/model property/etc?</p>
  
  <p><em>For now, I have resorted to a custom control instead of directly using a fragment in my view, and have that control do the dispatching to the appropriate Fragment, but I feel there should be an easier, out-of-the-box way...</em></p>