Correlations in the XY model and screw dislocations in the solid-on-solid model