Fix name space bug in BuildDocumentVisitor