Document derivation