Appendix answer key template
I don't see how that &lt;xsl:otherwise&gt; would ever do anything based on your sample xml. The template matches on appendix/title so your context would be the title element. Applying templates to appendix children of title would be a no-op. I think something like this would be closer to what you want

&lt;xsl:template match="appendix[title = 'Answer Key']"&gt;
  &lt;div class="answer-key"&gt;
    &lt;xsl:call-template name="solutions"/&gt;
  &lt;/div&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match="appendix"&gt;
  &lt;!-- Do something standard --&gt;
&lt;/xsl:template&gt;


Here, the first template has a higher implicit priority than the second template so it will match on the "Answer Keys". If the predicate evaluates to false, the second template will then match. Note though the code above will behave differently if the called template "solutions" depends on having a title element context node as it would in your code sample. In this sample the context would be the appendix element, which seems like possibly a more appropriate point in the document hierarchy to be performing whatever operations you intend to do.