This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Problem with xsl:choose


> <!-- main/timer -->
>     <xsl:template match = "main/timer">
>         <xsl:choose>
>             <xsl:when test=" main/timer = 'On'">

Within this template rule, the context node is a <timer> element. By writing
test="main/timer" you are looking for a <main> element that is a child of
this <timer> element, and then for a <timer> element that is a child of this
<main> element. You actually just want to test the context node itself:

 <xsl:when test=". = 'On'">

Mike Kay
Software AG


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]