Using Choose and Apply Templates with Mode, vs Complexless Template Matches So I have a little XML (Sub)language,
it has 3 elements of interest: para, point, and code

If a code occurs inside a para, point element I want to handle it for inline use,
if not, i want to set it up as it's own display section

Currently I'm doing it like so:

  &lt;xsl:template match="code"&gt;
    &lt;xsl:choose&gt;
      &lt;xsl:when test="exists(ancestor::para) or exists(ancestor::point)"&gt;
        &lt;xsl:apply-templates select="." mode="inline"/&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:otherwise&gt;
        &lt;xsl:apply-templates select="." mode="display"/&gt;
      &lt;/xsl:otherwise&gt;
    &lt;/xsl:choose&gt;
  &lt;/xsl:template&gt;

  &lt;xsl:template match="code" mode="inline"&gt;
    &lt;code&gt;&lt;xsl:value-of select="."/&gt;&lt;/code&gt; 
  &lt;/xsl:template&gt;

  &lt;xsl:template match="code" mode="display"&gt;
    &lt;pre&gt;&lt;code&gt;&lt;xsl:value-of select="."/&gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/xsl:template&gt;


Instead of doing it like that i could have just two templates,
one for display and one for inline, and set up the match expressions to work out which it was.

Which is better?
It may not matter a lot for this case, but usually when dealing with XSLT our rule of thumb has been, always to handle different cases with different stylesheets rather than one huge complex XSLT.