Depends on the type of spring compressor you have. I've been able to remove the springs in the way you mention when using an old C-clamp style manual compressor designed for British bikes, but couldn't do it with a modern over-center-lever style. I think I could probably make an adapter with clearance holes for the lever style that would allow it to work, but it doesn't seem worth the effort for the number of heads I plan to work on. Someone like comnoz, who does a lot of heads, has probably developed an efficient tool for the job. For me it's not much of an issue, since I'm usually removing the rocker arms anyhow when I work on a head.
Ken