Re: [xsl] XSLT 2.0 courses?

Subject: Re: [xsl] XSLT 2.0 courses?
From: "Peter Flynn peter@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Sep 2020 11:30:27 -0000
On 21/09/2020 11:53, Michael Kay mike@xxxxxxxxxxxx wrote:
Well, I thought about using EBV, so it means (if ($a) then $a else $b), but zero is falsey, so you get surprises with, for example

@price * (1 + (@VAT_Rate otherwise 0.2))

which potentially gives the wrong answer if @VAT_Rate is present but zero.

I thought zero was a valid VAT rate, which would be a correct answer.


And it also gets complicated with atomization: if the attribute is present but set to a zero length string, which way do you go?

NaN. Business rule defaults always need specifying with a level of care and accuracy which surprises a lot of retail managers.


Peter

Current Thread