XSL Invalid Type Error - Setting Variable using Value-of
<p>I am trying to get <code>value-of $deal/total_price</code>. In the first block, I am able to get value and everything works great. In the second block where I am using <code>value-of</code> to set the variable named <code>deal</code>, I get an error when trying to display <code>$deal/total_price</code>. How can I return <code>$deal/total_price</code> using setup in second block?</p>

<p><strong>Works:</strong></p>

<pre><code>&lt;xsl:variable name="deal" select="/webpage/results/cars/*[partner_name = $company_name and vehicle_class_description = $vehicle_class_description_full]" /&gt;        
&lt;xsl:value-of select="$deal/total_price"/&gt;
</code></pre>

<p><strong>Does Not Work :</strong></p>

<pre><code>&lt;xsl:variable name="deal"&gt;
    &lt;xsl:value-of select="/webpage/results/cars/*[partner_name = $company_name and vehicle_class_description = $vehicle_class_description_full]"/&gt;
&lt;/xsl:variable&gt;
&lt;xsl:value-of select="$deal/total_price"/&gt;
</code></pre>

<p><strong>I am receiving the following errors/warnings:</strong></p>

<pre><code>Warning: XSLTProcessor::transformToXml(): Invalid type
Warning: XSLTProcessor::transformToXml(): runtime error:
Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result
</code></pre>