Jun 20, 2003 #1 YYYYUU Programmer Dec 13, 2002 47 GB This is the code I have <xsl:choose> <xsl:when test="//document/menu/@selectopt = 'Modify'"> I want this to work if the //document/menu/@selectopt = 'Modify' OR //document/menu/@selectopt = 'Delete'. How can I do this. cheers
This is the code I have <xsl:choose> <xsl:when test="//document/menu/@selectopt = 'Modify'"> I want this to work if the //document/menu/@selectopt = 'Modify' OR //document/menu/@selectopt = 'Delete'. How can I do this. cheers
Jun 26, 2003 1 #2 HowardMarks MIS Jan 26, 2001 550 GB I think this is what you want: <xsl:choose> <xsl:when test="//document/menu/@selectopt = 'Modify'"> Code in here </xsl:when> <xsl:when test="//document/menu/@selectopt = 'Delete'> Code in here </xsl:when> <xsltherwise> Code in here </xsltherwise> </xsl:choose> Nick (Software Developer) http://www.retrographics.co.ukhttp://www.retrotest.co.uk nick@retrographics.fsnet.co.uk nick.price@myenable.com Upvote 0 Downvote
I think this is what you want: <xsl:choose> <xsl:when test="//document/menu/@selectopt = 'Modify'"> Code in here </xsl:when> <xsl:when test="//document/menu/@selectopt = 'Delete'> Code in here </xsl:when> <xsltherwise> Code in here </xsltherwise> </xsl:choose> Nick (Software Developer) http://www.retrographics.co.ukhttp://www.retrotest.co.uk nick@retrographics.fsnet.co.uk nick.price@myenable.com
Jun 30, 2003 Thread starter #3 YYYYUU Programmer Dec 13, 2002 47 GB Thank you this overcomes my problem. I presume there is no xsl 'or'. thanks. Upvote 0 Downvote
Jun 30, 2003 #4 HowardMarks MIS Jan 26, 2001 550 GB Actually, it is possible to use "or" within an if or when statement in xsl such as : <xsl:when test="($variable= 1) Or ($variable=2)"> </xsl:when> Sorry, I should have seen this shorter solution to your problem. Nick (Software Developer) http://www.retrographics.co.ukhttp://www.retrotest.co.uk nick@retrographics.fsnet.co.uk nick.price@myenable.com Upvote 0 Downvote
Actually, it is possible to use "or" within an if or when statement in xsl such as : <xsl:when test="($variable= 1) Or ($variable=2)"> </xsl:when> Sorry, I should have seen this shorter solution to your problem. Nick (Software Developer) http://www.retrographics.co.ukhttp://www.retrotest.co.uk nick@retrographics.fsnet.co.uk nick.price@myenable.com