I am trying to get value-of $deal/total_price
. In the first block, I am able to get value and everything works great. In the second block where I am using value-of
to set the variable named deal
, I get an error when trying to display $deal/total_price
. How can I return $deal/total_price
using setup in second block?
Works:
<xsl:variable name="deal" select="/webpage/results/cars/*[partner_name = $company_name and vehicle_class_description = $vehicle_class_description_full]" />
<xsl:value-of select="$deal/total_price"/>
Does Not Work :
<xsl:variable name="deal">
<xsl:value-of select="/webpage/results/cars/*[partner_name = $company_name and vehicle_class_description = $vehicle_class_description_full]"/>
</xsl:variable>
<xsl:value-of select="$deal/total_price"/>
I am receiving the following errors/warnings:
Warning: XSLTProcessor::transformToXml(): Invalid type
Warning: XSLTProcessor::transformToXml(): runtime error:
Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result