Peter and Stuart can have what they want by saying
where "resolver" is a script which looks up FOO in a database and
redirects to the right place.
How to validate such instance files is left as an exercise for the reader.
Or, if you prefer
or the like
My view is that this is not a TEI-specific problem, and so the TEI
should not come
up with its own solutions.