I have an existing data set that utilizes an integer to store multiple values; the legacy front end did a simple bitwise check (e.g. in C#: iValues & 16 == 16) to see if
XSLT does not define bitwise operations. If you want them, you have to roll your own.
If you're using XSLT specifically in .NET 2.0 context - that is, XslCompiledTransform
class - then the simplest solution is to use a scripting block to introduce a C# function that does it, and then just call that:
...
...
Or you can define the more high-level primitives in a scripting block, such as HasFlag
, and then use those.
When loading such a stylesheet, you will need to explicitly enable scripting in it:
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load("foo.xsl",
new XsltSettings { EnableScript = true },
new XmlUrlResolver());