BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XSLT
Web Methodology (Layout Management)
The pow(a, b) function
Grouping an XML Node by First Letter
Dependent ComboBox in HTML build with XSLT
Re: How to use XSL function sum() to sum 2 XML fields
Re: How to use XSL function sum() to sum 2 XML fields
How to use XSL function sum() to sum 2 XML fields
A simple template to display singular and plural counts
Helpful XSLT ""break"" template
Support automatic transformation using XSLT in IE in side by side mode
Displaying XML data in Pages
Repeated search and replace in XSLT
Combinations of k out of n numbers
Permutations of the values of N nodes
DVC Algorithms in XSLT
Another way of avoiding XSLT processor crash
Re: DVC Algorithms in XSLT
trig functions in xslt
XSLT string Replace function
A Slide-In Menu made with XML/XSLT


 
 

<< XQuery.NET and XML >>


By Dimitre Novatchev
First Posted 06/13/2001
Times viewed 368

Test if a bit is on


Summary For hardcore programmers, who may miss this feature in XPath/XSLT, here it is:

See the code below:

This tests if in an attribute named Flags the N+1st bit is on (supposing bits are ordered from right to left).

$pow2ToN is the value of 2 to the power of N.

 

 

Additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< XQuery.NET and XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML