<p>I need to get the value of the 'test' attribute in the xsl:when tag, and the 'name' attribute in the xsl:call-template tag.   This xpath gets me pretty close:  </p>

<pre><code>..../xsl:template/xsl:choose/xsl:when
</code></pre>

<p>But that just returns the 'when' elements, not the exact attribute values I need.</p>

<p>Here is a snippet of my XML:</p>

<pre><code>&lt;xsl:template match="field"&gt;
    &lt;xsl:choose&gt;
    &lt;xsl:when test="@name='First Name'"&gt;
        &lt;xsl:call-template name="handleColumn_1" /&gt; 
    &lt;/xsl:when&gt;
&lt;/xsl:choose&gt;
</code></pre>

do you want
```
.../xsl:template/xsl:choose/xsl:when/@test
```
If you want to actually get the value 'First Name' out of the test attribute, you're out of luck -- the content inside the attribute is just a string, and not a piece of xml, so you can't xpath it. If you need to get that, you must use string manipulation (Eg, substring) to get the right content