Recently a reader drew my attention to a passage in the (Written) Torah that I had overlooked or rather just not read in the correct context. That passage is from the book of Deuteronomy and relates to the existence of transvestism among the ancient Israelites.
We are told that:
'A woman shall not wear anything that pertains to a man, nor shall a man put on a woman's garment; for whoever does these things is an abomination in the sight of the Lord.' (1)
Now this passages clearly has two separate meanings that we need to separate out.
The first is the enforcement of gender roles and identities in relation to the separation of the jewish man and woman in a situation not unlike that used by Islam in relation to its 'modesty regulations' (which are somewhat tangential to Judaism's own religious law [halakha] on this), which I will address in a several other articles.
The second is that the Israelites had a need to legislate (using the medium of religion) against the problem of male jews dressing up as female jews as well as female jews dressing up as male jews.
Based on the comments in the (Written) Torah and the Tanakh about homosexuality (which is limited exclusively to concerns about male and not female homosexuality): it would be reasonable to suggest that the concern over the issue of transvestism shown by this passage was primarily around male jews dressing up as female jews and that this had to do with their homosexuality.
This in all probability means then that male homosexual jews were routinely dressing up in female clothes to make their assignations with their 'lovers' and that the ruling in the book of Deuteronomy was specifically intended to counter this particular abomination within the rubric of jewish attempts to combat what must have been a veritable epidemic of homosexual relationships among them.
Thus we can see that the Torah specifically outlaws transvestism, but that this primarily targeted once again at male and not female jews.
References
(1) Deut. 22:5 (RSV)