Subject: Re: [xsl] 99 bottles of beer From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx> Date: Tue, 6 Feb 2007 10:18:21 +0000 |
Andrew Welch wrote: > > The difference there is that (1 to 2) != 10 returns a sequence of 2 > items "true true", whereas (1,2) != 10 returns a single "true". I > would have to look it up but I think anything other than a single > "true" converts to false, so "true true" returns false. > > You could rewrite it as ((1 to 2) != 10) = false() to check the values > in the sequence for any occurance of false(), and return a single > true/false.
I read an reread it, and in either case misread it. But now I see my mistake, and it is pretty simple really (well, it took me a couple of hours, hope that others grasp it quicker ;) Let's put my thoughts to paper.
Yes, sorry about that, I got that wrong. I should do a couple hours of spec reading too as punishment...
Thanks Andrew, for the mind exercise, it was fun getting the grips (almost) to some less-than-obvious stuff.
:) I'm glad you didn't see it the other way and get really annoyed with the misinformation.
Note that the trick you mentioned, does not work, because the first part (before '= false()') does not return a sequence of all false/true values, it returns, as I see it, a sequence of one item.
((1 , 3) != 4) = false()
returns the opposite of
((1 , 3) != 4) = true()
for all tests above (replace (1, 3) with (1 to 3) to see the effect).
and based on my incorrect assumptions of the above producing a sequence of booleans I thought it could be rewritten to:
cheers andrew
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] 99 bottles of beer, Abel Braaksma | Thread | RE: [xsl] 99 bottles of beer, Michael Kay |
[xsl] XSL-FO: Centering text vertic, Chris Graham [WarpSp | Date | Re: [xsl] conditional multiline out, Owen Rees |
Month |