I can see how it may be confusing at first because you're most likely thinking in terms of human reproduction.
We know that the Xenomorph takes on traits of it's host, this would only work if the embryo and the host shared genetic information somehow, which is exactly what happens. It's never stated that clearly though.
We do see how the effects of the genetic crossover work when the Xenomorph that comes out is different, like the Dog Alien. Alien 4 assumes this crossover works both ways to some degree (between the host and alien).
Seeing how Ripley was pregnant with an Alien, the genetic swapping was already taking place. This means that the Alien was taking on it's usual "human form" and Ripley's DNA now contained some Xenomorph code.
So what the doctors in Resurrection really had was a Xenomorph/Human hybrid DNA sample, although much more human than alien in ratio. With this, they had enough information to make Ripley AND the queen embryo inside of her in one process (with much iteration and much trial and error of course).
They did not have access to any part of the alien whatsoever, so this is the only logical possibility.