The generators of $SO(n)$ are antisymmetric, which means there are no diagonal generators and therefore rank zero for the Lie algebra? Okay, this may be a silly question but I can't figure it out myself right now. 
By definition $O \in SO(n)$ fulfils $O^T O=1$ and $\det(O)=1$.
For the generators of the group $ T_a \in so(n)$, this means because $O= e^{\alpha_a T_a}$ that $T_a^T = -T_a$ and $Tr(T_a)=0$. 
1.) Now, for explicit matrix representations of our Lie algebra this means that our matrices representing the generators must be antisymmetric. This means that the matrices have no diagonal entries. 
2.) The rank of a Lie algebra is defined as dimension of the Cartan subalgebra, which is the subset of all diagonal generators. 
Putting 1.) and 2.) together means that the rank of every $SO(n)$ algebra is zero, which is certainly wrong. What's wrong here?
 A: The problem is that the property "diagonal matrices", or "antisymmetric matrices" depends on the basis of the underlying vector space. The standard way to represent the Lie algebra $\mathfrak{so}(n)$ faithfully by matrices, is by antisymmetric matrices. However, 
we may also represent $\mathfrak{so}(n)$ faithfully by matrices which are not skew-symmetric.
The same is true for Cartan subalgebras. They may consist of diagonal matrices in one representation, but to completely other matrices relative to another representation.  
However, we can always say that over a field of characteristic zero, all Cartan subalgebras are isomorphic (and even conjugated over the complex numbers).
A: The problem is with #2.  The rank of a Lie algebra is the dimension of any of its Cartan subalgebras (all of which are isomorphic).  None of them need to contain diagonal matrices.  You can see one such subalgebra computed for $SO(2n + 1, \mathbb{C})$ in this paper: Structure Theory of Semisimple Lie Groups - Knapp
