Who's definition is that?
That's not the definition of female either I (and others) use, and it's also not the definition of female used by modern society.
Hardly anyone knows what their chromosomes actually are, since people rarely get them tested (do you know yours? did you get them tested?), there are numerous biological conditions where people-commonly-treated-by-society-as-female do not have XX chromosomes, e.g. http://en.wikipedia.org/wiki/Complete_androgen_insensitivity... and all the other "intersex" conditions. Likewise some people-commonly-treated-by-society-as-male do not have XY chromosomes. Phenotypically female does not always imply genetically XX. Many people only discover their genetic gender if they go to a fertility treatment (since many of these conditions affect fertility), sometimes the genetic gender is not their gender.
There are also lots of people-commonly-treated-by-society-as-female who do not (or cannot) produce eggs. Pre-pubescent girls, post-menopausal women, women after a hysterectomy, women on the contraceptive pill, etc. Likewise there are many people-commonly-treated-by-society-as-male who cannot produce sperm, sterile men, men after testicular cancer etc.
Regardless, some regions (e.g. UK), have law that allows a person to change their gender (they are treated as that gender "for all purposes"), and get a new birth cert in that gender, and makes revealing the previous gender a criminal offence. ( http://www.yourrights.org.uk/yourrights/right-to-receive-equ... ). That's another definition of gender right there.
Sorry, but the world/people/biology are complex and does not fit your simple definitions.