Re: [xsl] Boolean logic

Subject: Re: [xsl] Boolean logic
From: Michel Hendriksen <michel.hendriksen@xxxxx>
Date: Tue, 3 Jan 2012 15:23:23 +0100
looks more like a substring thing to me

On Tue, Jan 3, 2012 at 3:11 PM, David Carlisle <davidc@xxxxxxxxx> wrote:
> On 29/12/2011 14:48, davep wrote:
>>
>> Select line:
>>   if n < 100 then 1
>>   if n < 200 then 2
>>   if n < 300 then 3
>>  etc.
>
>
> isn't that bit just
> n idiv 256 + 1
> rather than a repeated 'if' test?
>
> except that I'm confused as assuming a line position assumes that your
array
> is a dense format with all lines present, but I suspect it isn't, so rather
> than a line number don't you just want to select a line with the
appropriate
> base child, something like:
>
> line[base = (n idiv 256)]
>
> presumably things would be more efficient if you pre-processed the input
> array into some more amenable format, especially as xpath can't natively
> deal with integers written in hex?
>
> David
>
>
>
> ________________________________________________________________________
> The Numerical Algorithms Group Ltd is a company registered in England
> and Wales with company number 1249803. The registered office is:
> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
>
> This e-mail has been scanned for all viruses by Star. The service is
> powered by MessageLabs.
> ________________________________________________________________________

Current Thread