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

RE: Q on xsl:choose

Subject: RE: Q on xsl:choose
From: sara.mitchell@xxxxxxxxx
Date: Wed, 21 Feb 2001 13:35:17 -0500
attribute match is invalid on
Sorry :(, but the error message is correct. 
The element xsl:when does not have a 'match' attribute
it has a 'test' attribute. Your code should be : 

     <xsl:choose>
      <xsl:when test="@order='D'">DN</xsl:when>
      <xsl:otherwise>UP</xsl:otherwise>
     </xsl:choose>

Sara
> -----Original Message-----
> From: Walter Torres [mailto:walter@xxxxxxxxx]
> Sent: Tuesday, February 20, 2001 5:55 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Q on xsl:choose
> 
> 
> I seem to be stuck!
> 
> I have a small sample data set and am trying to use 
> xsl:choose and xsl:when.
> 
> (My code and data is below)
> 
> I get this error message...
> 
>    Attribute 'match' is invalid on 'xsl:when'
> 
> I have spent the last 2 days trying to see the error here.
> 
> Can anyone elighten me?
> 
> Thanks
> 
> Walter
> 
> PS: This is an extention to an example in Mr Kay's book.
> 
> 
> This is my data...
> 
> <books>
>  <titles>
>   <display colWidth='040' id='item' order='D'>Item</display>
>  </titles>
> </books>
> 
> This is my code
> 
> <xsl:template match='display'>
>   <th valign='top'>
>    <!-- define Default Sort Direction -->
>    <xsl:attribute name='ind'>
>     <xsl:choose>
>      <xsl:when match="@order='D'">DN</xsl:when>
>      <xsl:otherwise>UP</xsl:otherwise>
>     </xsl:choose>
>    </xsl:attribute>
>    <!-- Display Title -->
>    <xsl:value-of select='.'/>
>   </th>
> </xsl:template>
> 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

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


Current Thread
  • RE: Q on xsl:choose, (continued)
    • Michael Kay - Wed, 21 Feb 2001 14:57:15 -0500 (EST)
    • Don Bruey - Wed, 21 Feb 2001 13:21:55 -0500 (EST)
    • Clapham, Paul - Wed, 21 Feb 2001 13:24:57 -0500 (EST)
    • sara . mitchell - Wed, 21 Feb 2001 13:33:51 -0500 (EST) <=
    • Ben Robb - Wed, 21 Feb 2001 13:35:34 -0500 (EST)
    • RSuiter - Wed, 21 Feb 2001 13:59:49 -0500 (EST)

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.