(ii) is a pseudo-cleft version of (i). The focussed part X (a herring) is associated with a free relative clause in a copula construction:
(i) John ate a herring (ii) [What John ate e] was a herring
- Smits, R.J.C. 1989. The relative and cleft constructions of the Germanic and Romance languages, doct. diss. KUB, Tilburg, Dordrecht: Foris, 1988.