Local Interface composition and band discontinuities in heterovalent heterostructures