This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: RE: xslt and bitwise operations


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]