Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Nesting an xsl:when

From: "Iain Emsley" <iainemsley@-------------->
To:
Date: 9/2/2008 7:36:00 AM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent