Actually, if you write out the explicit matrix form of each transformation, there are some fairly obvious ways to extract the angles from the entries in the matrix, although there are some special cases to observe due to the fact that some of the entries may be zero. You can find procedures for obtaining the angles in < (in particular sections 3.2.4.1 and 3.2.4.2) and in several other places.
This suggests that you could convert from one system to the other by converting a given set of angles to a rotation matrix and then converting the matrix to the angles in the other system. In practice, you could save a few steps by computing the entries of the matrix only when they are required by the procedure for extracting the second set of angles.