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]

problem with xsl:choose


hi all,

i have a little problem with the xsl:choose, because it stops if
a match has been found. not like the c style switch statement - which needs
a explicit BREAK to stop!

my xml looks like this:
<data>
  <screen h=3 w=5 />
  <screen h=5 w=6 />
  <table h=2 w=2 />
  <table h=6 w=8 />
  <table h=1 w=9 />
</data>

my xsl like this:
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
  <xsl:template match='/'>
     <xsl:choose>
       <xsl:when select='//screen'>
         ....call template
       </xsl:when>
       <xsl:when select='//table'>
         ....call template
       </xsl:when>
       <xsl:otherwise>
         ....
       </xsl:otherwise>
     </xsl:choose>
  </xsl:stylesheet>
...
</xsl:stylsheet>

but unfortunately this one exits, after having processed all screens
any suggestions ?
thx in advance

cu goose

 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]