The current approach implies:
- A translation template requires a minimum of (force-required[1]) translation fields, corresponding to Citoid API's required fields: itemType and title (we do not currently have a template field for url, which is filled in with the translation target's url; see T302492#7983556).
- If no translation template applies for a translation target, a predefined "fallback template" is used. This fallback template also has (at least) the same minimum force-required translation fields. The current approach dictates that this fallback template is one with all supported template fields set to Citoid selection + no transformation steps (see T308354 though).
- If a user wants to reuse one of Citoid outputs in a template field, they have to explicitly use a Citoid selection step. This may presumably save requests to the Citoid service.
- If a non-required template field output is invalid, the template is still applicable, but the citation field to which this output would have mapped will be undefined.
This approach saves requests to the Citoid service, because we would only reach them in these two cases:
- One of the translation template tried has one or more Citoid selection steps.
- There are no applicable templates and the fallback (all-Citoid) template is used.
A possible alternative approach (an "use Citoid except for"-approach) to consider would imply:
- The concept of force-required fields disappears and translation templates require a minimum of one (any) template fields (a template without any template fields would be a useless template).
- Just like in the current approach, for a given translation target, translation templates are tried in order and the first applicable template is used. However, if no applicable templates are found, no fallback template is used.
- The undefined fields of the resulting citation (whether because: 1. a template applies but some template field outputs are invalid, 2. no template applies, or 3. we do not have template fields mapping to these citation fields) are automatically filled in with the corresponding Citoid response.
- Users can still explicitly use and transform Citoid responses by explicitly using the Citoid selection.
This alternative would imply making one obligatory Citoid request per Web2Cit request, but in many cases this request would have been made anyway (see above).
This alternative may encourage using Web2Cit as it would provide the benefits of both Web2Cit and Citoid translation.
[1] A "required" template field is one whose output must be "valid" for the template to which it belongs to be "applicable".