A hybrid logic for XML reference constraints