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: "Clapham, Paul" <pclapham at core-mark dot com>
- Date: Wed, 10 Jan 2001 15:48:56 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
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.
PC2
-----Original Message-----
From: Hahn, Kimberly [mailto:Kim.Hahn@enform.com]
Does anyone know if XSLT supports bitwise calculations (ex. '2 and 34'
evaluates to 2 or True)? From what I have been able to tell 'and' and 'or'
expressions do not apply bitwise operations. Are there other functions
available that do this?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list