simplify implementation of doc-from-ns-form