Compact embedding from W01,2(Ω) to Lq(x)(Ω) and its application to nonlinear elliptic boundary value problem with variable critical exponent