XML prologue lost in downloaded XML files

Issue #1 resolved
Craig Berry created an issue

When choosing "XML" from the download menu, the text produced is missing the ?xml and ?xml-model elements. The latter is necessary to validate the document. There are at least a couple of reasons for this. The "import" post-processing located at:

/db/apps/annotation-service/modules/import.xql

contains the line:

let $ndoc:= normalization:normalize($doc/tei:TEI)

That is going to throw away anything that is not under the <TEI> element. If this import step is skipped and texts are loaded directly to /db/apps/shctexts/data/normalized/, the schema declaration is preserved, but the xml declaration is not.

So the import needs to be fixed and/or the export needs to be made more robust to add what's missing.

Comments (2)

  1. Philip Burns

    Pib has a fix.

    The get-tei module, which generates the TEI output for download, should add the header at the start of the output stream.

  2. Log in to comment