Homogenization and two-scale convergence in the Sobolev space with an oscillating exponent