Open kieranjol opened 3 years ago
OK, so i see the SO link referenced here as well - https://github.com/artefactual-labs/mets-reader-writer/blob/master/metsrw/validate.py - seems like the long and short of it is that ye are aware of this validation quirk and created workarounds as a result?
I'm going to bump this, as I'm curious what the response/solution is. Actual issue? Falsely flagged as invalid? Known issue being worked on?
I totally forgot writing this but i appreciate the bump and echo those questions :)
On Thu 30 May 2024 at 21:50, Jin @.***> wrote:
I'm going to bump this, as I'm curious what the response/solution is. Actual issue? Falsely flagged as invalid? Known issue being worked on?
— Reply to this email directly, view it on GitHub https://github.com/artefactual-labs/mets-reader-writer/issues/91#issuecomment-2140843750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAITFPQYUHRIPAMSYWDLATLZE6GJTAVCNFSM5DQMJ3JKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJUGA4DIMZXGUYA . You are receiving this because you authored the thread.Message ID: @.***>
Hi, SUMMARY: When I validate the output of Archivematica METS againest the mets.xsd schema, it says that it's invalid. When I create a custom XSD that references both METS and PREMIS schemas, then all is well. How do ye validate your XML as part of your dev process?
ISSUE: This particularly seems to relate to PREMIS:TYPE definitions, and when I remove some of the extra namespace info for the PREMIS data, it validates just fine. Perhaps xmlstarlet isn't the best for this type of operation?
How to replicate: I took a METS XML file from the current archivematica sandbox , and I uploaded it here: https://gist.github.com/kieranjol/43f3d977306e3740daefaa284cc2d565 I validated it with the METS XSD from here: https://www.loc.gov/standards/mets/mets.xsd and the result is at the end of this issue. However eventually I found this from the PREMISv2 days, and it appears to be a similar issue: https://stackoverflow.com/questions/26712645/xml-type-definition-is-absent
I edited the example in the answer and created a new xsd which contains the following, and that validated your XML output just fine.
And here's the error I got when validating archivematica METS against the original mets.xsd