PDA

View Full Version : urgent: need help with field reference in xsl:choose


lesliemacneill
07-06-2006, 02:32 AM
I'm in the process of upgrading a huge website from FileMakerv6/CDML to FileMakerv8/XML-XSL. I have an often-used xsl:choose command that compares a field with a text string that doesn't work and I can't see why. A similar comparison between a token and a text string works just fine as did the comparison between the field and the text string in CDML. I've confirmed that the needed data was loaded via XML (using a method I picked up from an old thread on this forum - THANK YOU!).

<xsl:variable name="default-record" select="/fmrs:fmresultset/fmrs:resultset/fmrs:record[1]"/>...

<xsl:choose>
<xsl:when test="contains($default-record/fmrs:field[@name = 'combo_no']/fmrs:data[1], 'kit')">
Kit
</xsl:when><xsl:otherwise>
<xsl:choose>
<xsl:when test="contains($default-record/fmrs:field[@name = 'combo_no']/fmrs:data[1], 'kt')">
Kit
</xsl:when><xsl:otherwise>
Part
</xsl:otherwise></xsl:choose>
</xsl:otherwise></xsl:choose> Number

Please help!