Two former world number ones, Maria Sharapova and Caroline Wozniacki, met in the first semi-final of the Sony Ericsson Open in Miami.