Not as cut and dry as you originally thought.
No. my original contention is still cut and dried. Gender is determined by Chromosomes. However, just like the previously mentioned spina bifida et al birth defects happen and need to be dealt with. Marriage is between a woman (XX) and a man (XY).