title: Import XSLT scripts containing templates with same names
body: <p>I am making a xslt script that imports two other xslt scripts.
  The two imported xslt sxripts contain some templates with the same names.
  I'm using xslt 2.0</p>
  
  <p>I have a choose and based on the countrycode either the d96a.xslt sxript is called or the d01b.xslt script is called.
  But I need to handle it all in one script.</p>
  
  <p>I have tried to add a use-when to each, but i cannot make it work.</p>
  
  <p>I have d96a.xslt with this template:</p>
  
  <pre><code>&lt;xsl:template name="BGM"&gt;
          &lt;xsl:param name="C002_1001"/&gt;
                                  &lt;xsl:value-of select="$C002_1001"/&gt;
      &lt;/xsl:template&gt;
  </code></pre>
  
  <p>and d01b.xslt with this template:</p>
  
  <pre><code>&lt;xsl:template name="BGM"&gt;
              &lt;xsl:param name="C002_1001"/&gt;
                                      &lt;xsl:value-of select="$C002_1001"/&gt;
          &lt;/xsl:template&gt;
  </code></pre>
  
  <p>And then I have another xslt that uses both of the other files:</p>
  
  <pre><code>&lt;xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
          &lt;xsl:import href="d01b.xslt"/&gt;
          &lt;xsl:import href="d96A.xslt"/&gt;
          &lt;xsl:template match="/"&gt;
              &lt;xsl:call-template name="BGM"&gt;
                  &lt;xsl:with-param name="BGM_C002_1001" select="'380'"/&gt;
              &lt;/xsl:call-template&gt;
          &lt;/xsl:template&gt;
      &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>And now it fails because BGM exists in both the imported xslt scripts.</p>
  
  <p>I tried use-when this, but couldn't get it to work:</p>
  
  <pre><code>    &lt;xsl:import href="d01b.xslt" use-when="Party/CountryCode = 'EN'"/&gt;
  
  &lt;xsl:call-template name="Header" use-when="Party[CountryCode = 'EN']"&gt;
  </code></pre>
  
  <p>Am I doing something wrong or is there another way to handle this?
  I canot change the name of the templates in the imported files.</p>