title: XSL- Multiple Template Conflict?
body: <p>I'm currently working on an XSL stylesheet for some finding aids, but I believe I have a conflict between multiple templates in the stylesheet. Granted, I'm fairly new to XSL, so I'm probably missing something here. I hope I've included all the necessary details.</p>
  
  <p>Here is the code I want the templates to act upon:</p>
  
  <pre><code>&lt;c05 level="item"&gt;&lt;did&gt;&lt;unittitle&gt;&lt;title render="italic"&gt;Souvenir&lt;/title&gt;, undated&lt;/unittitle&gt;&lt;/did&gt;
  &lt;scopecontent&gt;
  &lt;p&gt;With sketches of Confederate Generals and Confederate flags and a &lt;emph render="doublequote"&gt;bird's eye view&lt;/emph&gt; of Charleston.&lt;/p&gt;
  &lt;/scopecontent&gt;
  &lt;/c05&gt;    
  </code></pre>
  
  <p>Now, the 2 templates in question format my container list layout and some text formatting respectively. The template for the layout is here:</p>
  
  <pre><code>&lt;xsl:template name="item"&gt;
  
  &lt;xsl:variable name="title"&gt;
  
  &lt;xsl:if test="did/unitid"&gt;
  &lt;xsl:value-of select="did/unitid"/&gt;&lt;xsl:text&gt;.&amp;#8201;&lt;/xsl:text&gt;
  &lt;/xsl:if&gt;
  
  &lt;xsl:value-of select="did/unittitle"/&gt;
  
  &lt;xsl:if test="did/unitdate"&gt;
  &lt;xsl:text&gt;,&amp;#8201;&lt;/xsl:text&gt;&lt;xsl:value-of select="did/unitdate"/&gt;
  &lt;/xsl:if&gt;
  
  &lt;/xsl:variable&gt;
  
  
  &lt;div style="margin-left:80px; padding-top:10px;"&gt;&lt;xsl:value-of select="$title" /&gt;&lt;/div&gt;
  
  
  &lt;div class="c01sc" style="margin-left:80px;"&gt;&lt;xsl:value-of select="scopecontent" /&gt;&lt;/div&gt;
  
  
  &lt;xsl:element name="a"&gt;
  &lt;xsl:call-template name="addidtoc"/&gt;
  &lt;/xsl:element&gt;          
  
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>And here is the code for the text formatting. It calls another template that performs some formatting:</p>
  
  <pre><code>&lt;xsl:template match='emph'&gt;
      &lt;xsl:call-template name='render'/&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template name='render'&gt;
      &lt;xsl:choose&gt;
      &lt;xsl:when test="@render='italic'"&gt;
          &lt;xsl:element name="i"&gt;
              &lt;xsl:call-template name="addid"/&gt;
              &lt;xsl:apply-templates/&gt;
          &lt;/xsl:element&gt;
          &lt;/xsl:when&gt;
  
  etc.....
  
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>The problem is, only the actions of the first layout template are being performed. My layout styles are generated, but the area that should be in double quotes because of the emph tag are still plain. Is this an issue of template hierarchy, or have I done something completely wrong? Hopefully this makes some sense. I'd appreciate any help I can get! </p>