Transcription factor that acts as a key regulator of spermatogenesis. Acts by regulating expression of genes required for the haploid phase during spermiogenesis, such as genes required for cilium assembly and function (By similarity). Recognizes and binds the X-box, a regulatory motif with DNA sequence 5'-GTNRCC(0-3N)RGYAAC-3' present on promoters (PubMed:10330134). Probably activates transcription of the testis-specific histone gene H1-6 (By similarity). . This is the function of RFX2 (regulatory factor X2, Ensembl gene identifier ENSG00000087903).