I
Ian Rutgers
In transforming the <towing> element (boolean) I want the xlst document
test the <towing> element for the "true" text and if found output
"available", otherwise output "not available". While the complete code
is on http://www.otima.ca/XML/auto2.xslt from auto.xml .. below is the
relevant snippet.
The code below always evaluates to "false" showing "not available" ...
what I am doing wrong?
<tr>
<td class="autoDescr">Towing</td>
<td><xsl:variable name="towingCapable" select=".//towing/text()"
/>
<xsl:choose>
<xsl:when test="$towingCapable=true">
<xsl:text>Available</xsl:text>
</xsl:when>
<xsltherwise> <xsl:text>Not Available</xsl:text>
</xsltherwise>
</xsl:choose></td>
</tr>
Thank you,
Ian
test the <towing> element for the "true" text and if found output
"available", otherwise output "not available". While the complete code
is on http://www.otima.ca/XML/auto2.xslt from auto.xml .. below is the
relevant snippet.
The code below always evaluates to "false" showing "not available" ...
what I am doing wrong?
<tr>
<td class="autoDescr">Towing</td>
<td><xsl:variable name="towingCapable" select=".//towing/text()"
/>
<xsl:choose>
<xsl:when test="$towingCapable=true">
<xsl:text>Available</xsl:text>
</xsl:when>
<xsltherwise> <xsl:text>Not Available</xsl:text>
</xsltherwise>
</xsl:choose></td>
</tr>
Thank you,
Ian