xsl-list
[Top] [All Lists]

Re: [xsl] XSLT 2.0 courses?

2020-09-21 08:56:37
On Mon, 21 Sep 2020 at 14:47, Chris Papademetrious
christopher(_dot_)papademetrious(_at_)synopsys(_dot_)com <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

I suppose it depends on your background. I use other languages that chain
equal-precedence operators in this fashion. Perl's logical OR operator
comes to mind first - "$a or $b or $c", with short-circuiting evaluation.
Python has a similar short-circuiting OR operator.



sure but there in perl you are applying "logical or" to singleton values
and it's clear what it means.

The suggestion here is to allow

    $a  zzz $b zzz $c

where $a, $b, $c, are possibly empty sequences including sequences of
booleans, so as this thread shows there are multiple essentially arbitrary
choices about how you define  zzz,  in particular what do you do if the
first item of $a is false (or 0  or an empty string, which have effective
boolean values of false).  It  is easy to pick a definition and define the
behaviour unambiguously but the end result is most likely people get caught
out when these edge cases do not behave as they expected.

David






Although I'm an XSLT novice, so perhaps if my brain were steeped more in
XSLT, its nuances would render this less obvious to me?

 - Chris


--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>