It seems that currently the mixing of composite and non-composite fe spaces in a varf is not possible. For me it would be nice to do things like in the following simplified example:
int nn = 30;
mesh Th=square(nn,nn);
mesh Tht = trunc(Th, 1, split=2);
fespace Uh(Th,P1);
fespace Ph(Tht,P2);
fespace Xh=Uh*Ph;
varf testVarf([u,p], [v]) = int2d(Th)(u*v) + int2d(Th)(p*v);
matrix M = testVarf(Xh,Uh);