Implement document location

#1991