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


"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


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