archivematica / Issues

Issues repository for the Archivematica project
GNU Affero General Public License v3.0
16 stars 1 forks source link

Problem: METS XML files are badly formatted when transfer includes a structmap #1142

Open sallain opened 4 years ago

sallain commented 4 years ago

Expected behaviour The METS XM should be pretty-printed for ease of reading, like this:

Screen Shot 2020-03-09 at 9 36 07 PM

Current behaviour The METS XML is poorly formatted - missing line breaks:

Screen Shot 2020-03-09 at 10 17 32 PM

The XML seems otherwise valid, and it can be reformatted easily. The structmap is parsed into the METS as expected. The AIP can be downloaded and re-ingested.

Steps to reproduce

  1. Create a transfer using any of the samples in SampleTransfers/StructMapSampleTransfers.
  2. Process it to an AIP.
  3. Check the resulting METS file.

Your environment (version of Archivematica, operating system, other relevant details) qa/1.x, confirmed on RPM and Ubuntu Xenial. I checked on 1.10 and this doesn't seem to be a problem there, so this is a 1.11 regression.


For Artefactual use:

Before you close this issue, you must check off the following:

replaceafill commented 4 years ago

I checked on 1.10 and this doesn't seem to be a problem there, so this is a 1.11 regression.

@sallain I tested the SampleTransfers/StructMapTransferSamples/ComplexStructureExample transfer on docker using the 1.10.x branch and I can see the bad XML format. The same happens in the sandbox (currently running 1.10.1).

Could it be transfer or processing config specific?

sallain commented 4 years ago

@replaceafill So this is funny - when I checked on amdemo (also running 1.10.1), I checked by clicking on Review and then viewing the METS when AM stopped at Store AIP?. @sarah-mason noticed that when you check the METS that way, the formatting is fine.

image

image

It's only when you check the METS by downloading it from the AIP store that the formatting is messed up. METS file for the same AIP as above:

Screenshot from 2020-03-10 09-24-02

So! Either the browser has some magical formatting capabilities or there is something happening between the moment that you select Store AIP and when it gets into storage.

replaceafill commented 4 years ago

Either the browser has some magical formatting capabilities

Yep.

Captura de pantalla de 2020-03-11 16-57-16

or there is something happening between the moment that you select Store AIP and when it gets into storage.

AFAIK the file has been generated a few of microservices before the Store AIP [Review] stage. In the Generate AIP METS -> Generate METS.xml document job specifically.