-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem: In pointer file, ID refs are AIP names instead of UUIDs with non-numeric prefixes #660
Comments
Related, possible duplicate of: #380 |
As a solution I would suggest replacing the AIP name in ID refs with |
@joel-simpson @sromkey this seemed to escape the addition of the |
Having analysed this in a little more detail, the change needs to be made to both the Storage Service and mets-reader-writer. In the storage service, the Which refers to this init method. And then the derivation for the file id happens here. The mets-reader-writer constructor is getting a little busy though, so this (as a design pattern) might need to be discussed further/revisited again in future. |
Requires: #732 or artefactual/archivematica-storage-service#466 |
Expected behaviour
ID refs should have a non-numeric prefix to conform to NCName requirements. For example, in the AIP METS file an ID ref in the fileSec is "file-UUID", like this:
'<mets:file GROUPID="Group-869d9b1c-0a7b-4061-8832-75430086015b" ID="file-869d9b1c-0a7b-4061-8832-75430086015b" ADMID="amdSec_1">'
Current behaviour
In the AIP pointer file the ID refs are just the AIP names with UUIDs appended, like this:
'<mets:file ID="MyAIP-23e81b05-db90-4f0d-bfc3-96eb65dc4ba5" GROUPID="Group-23e81b05-db90-4f0d-bfc3-96eb65dc4ba5" ADMID="amdSec_733264">'
In this case the pointer file will still validate because the AIP name happens to start with letters instead of numbers. However, if the AIP name starts with a number, the pointer file will fail validation. Here is some sample validation output for an AIP named "1920-2":
-line 166, column 142: cvc-datatype-valid.1.2.1: '1920-2-23e81b05-db90-4f0d-bfc3-96eb65dc4ba5' is not a valid value for 'NCName'.
-line 166, column 142: cvc-attribute.3: The value '1920-2-23e81b05-db90-4f0d-bfc3-96eb65dc4ba5' of attribute 'ID' on element 'mets:file' is not valid with respect to its type, 'ID'.
-line 174, column 72: cvc-datatype-valid.1.2.1: '1920-2-23e81b05-db90-4f0d-bfc3-96eb65dc4ba5' is not a valid value for 'NCName'.
-line 174, column 72: cvc-attribute.3: The value '1920-2-23e81b05-db90-4f0d-bfc3-96eb65dc4ba5' of attribute 'FILEID' on element 'mets:fptr' is not valid with respect to its type, 'IDREF'.
Steps to reproduce
Create an AIP with a number for the AIP name and validate the pointer file.
Your environment (version of Archivematica, OS version, etc)
AM 1.9.1 sandbox
For Artefactual use:
Please make sure these steps are taken before moving this issue from Review to Verified in Waffle:
The text was updated successfully, but these errors were encountered: