This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: RE: xslt and bitwise operations
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] RE: xslt and bitwise operations
- From: Francis Norton <francis at redrice dot com>
- Date: Thu, 11 Jan 2001 14:37:35 +0000
- References: <DB4D0D451426D11190EA0060B03CCC79012246F8@VANCOUVER_NT>
- Reply-To: xsl-list at lists dot mulberrytech dot com
"Clapham, Paul" wrote:
>
> Not directly, but it does support the arithmetic operations "div" and "mod"
> that you can use to simulate bitwise calculations. For example, to extract
> the low-order bit from x you could use "x mod 2", and to extract the bit to
> the left of that you could use "floor(x div 2) mod 2" and like that.
>
> Extracting more than one bit at a time using a mask (e.g. "x and 17") is
> Left As An Exercise For The Student.
>
And as an excellent use case for Jeni's proposal for "xsl:script:
functions written in XSLT"
Francis.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list