user: postprocess not found with the default config, and a path for the site url
Hi Daniel,
I used Mapper to build an OAI-PMH format (curation, see Omeka-S-module-OaiPmhRepository#10). I found two small points. Patch attached, based on 3.4.9.
1. user: references in preprocess and postprocess are not found
MapperConfigFactory falls back to OMEKA_PATH . '/files' when file_store.local.base_path is null, which is the default config. PreprocessorFactory does not. So with the default config, a mapping user:omeka_to_x.xml loads, but its <postprocess>user:omeka_to_x.xsl</postprocess> fails with "Preprocessor: transformation not found". The serializer then returns the result without the postprocess, with no visible error in the output.
The fix uses the same fallback as MapperConfigFactory.
2. o:site_url
An export often needs the public url of the item, for example as dc:relation or as a link for a harvester. The omeka querier has no path for it, and it cannot be built with a pattern: it depends on the site slug and on modules like CleanUrl.
The patch adds o:site_url, the absolute url of the item in each of its sites, via siteUrl($slug, true). One line was added to the table of paths in the readme.
Test
On a copy of a site (1,700 public items), the mapping with o:site_url and an XSL postprocess gives the same output as the old hand-written format for all records.
Best wishes, Satoru