ncx: generate document reference RDF metadata (with tests)