tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <bay...@essentially.net>
Subject Re: RE: missing if/else syntax
Date Thu, 08 May 2003 21:12:26 GMT
On Thu, 8 May 2003, otisg wrote:

> Shawn, you are saying 'we', so it looks you participated in decision
> making, or were at least close to it. I'm just curious, why was
> c:choose chosen, insteaf of (a more 'natural') c:switch?
> 
> Lot's of programming languages use the switch keyword.  I don't
> use any PL that uses choose keyword.  Does XSLT use choose?  If
> so, why did they decide on choose, any idea?

I was indeed a member of the JSTL expert group.

The construct in JSTL isn't quite analogous to a switch, which in
languages that people are familiar with represents a branch (typically
based on an integer) against matching possibilities.  In XSLT's and JSTL's
case, the mutually exclusive paths are always chosen by boolean
expressions, which may be independent from one another; aside from the
fact that both allow multi-way conditions, 'switch' in (say) Java and and
'choose' in JSTL really don't have much in common either syntactically or
semantically.

-- 
Shawn Bayern
"JSTL in Action"   http://www.manning.com/bayern


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message