support document generation when parent is specified