I'm happy... my basic application - a proof-of-concept text viewer that manipulates some text with heaps of in-band metadata and allows a user to accept (or not) an automatically generated correction to the text is working, as far as I need to go right now.
The metadata is generated externally, and represents multiple suggested corrections to OCR text output. The user gets to see the suggested correction, the original and other alternatives, and the reasons why the choice has been made. For the moment the metadata is manual test data only.
Thanks for all who helped when I got stuck!