[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Nesting an xsl:when

Subject: Nesting an xsl:when
From: "Iain Emsley" <iainemsley@xxxxxxxxxxxxxx>
Date: Tue, 2 Sep 2008 08:35:51 +0100
 Nesting an xsl:when
Hi,

I'm trying to write an xsl sheet which swaps various buttons if a
different css sheet is loaded for accessibility reasons but I haven't
been able to quite achieve this. The css sheet is changed by choosing
from a drop down menu and that is swapping the site colours but I'm
trying to also swap types of buttons for each sheet depending on what
has css been loaded. I've tried to write an xsl:when test to change
the image url but haven't been successful in changing the button.

<td class="sideBarOpenCloseIcon">
          <xsl:choose>
            <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'">
              <a href="?setappvar=sidebar(opened)">
               <xsl:choose>
                 <xsl:when test="/bedework/appvar[key='style']/value='yellow'">
                   <img alt="open sidebar"
src="{$resourcesRoot}/resources/sideBarArrowOpenyellow.gif" width="21"
height="16" border="0" align="left"/>
                 </xsl:when>
                 <xsl:when test="/bedework/appvar[key='style']/value='white'">
               <img alt="open sidebar"
src="{$resourcesRoot}/resources/sidebaropenwhitearrow.gif" width="21"
height="16" border="0" align="left"/>
                 </xsl:when>
                 <xsl:otherwise
test="/bedework/appvar[key='style']/value='default'">
               <img alt="open sidebar"
src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21"
height="16" border="0" align="left"/>
                 </xsl:otherwise>
                </xsl:choose>
               </a>
            </xsl:when>
            <xsl:otherwise>
              <a href="?setappvar=sidebar(closed)">
                <img alt="close sidebar"
src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21"
height="16" border="0" align="left"/>
              </a>
            </xsl:otherwise>
          </xsl:choose>
        </td>

I'm trying to get this working before taking on the rest of the
buttons on the site and any guidance would be gratefully received.
Many thanks in advance,

Iain

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.