Skip to content
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

metsHdr/agent causes error "Main METS.xml file is not valid" #3

Open
koit opened this issue Feb 28, 2019 · 2 comments
Open

metsHdr/agent causes error "Main METS.xml file is not valid" #3

koit opened this issue Feb 28, 2019 · 2 comments
Assignees

Comments

@koit
Copy link

koit commented Feb 28, 2019

If metsHdr/agent is present, the validator gives an error:

ERROR: Main METS.xml file is not valid.

This happens with a valid minimal IP that has folders metadata, representations, representations/rep1 and representations/rep1/data and the following METS.xml in the root folder:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/METS/" xmlns:csip="DILCIS" OBJID="ID0001" TYPE="SIP:X" csip:CONTENTTYPESPECIFICATION="MIXED" PROFILE="http://www.eark-project.com/METS/IP.xml">
  <metsHdr CREATEDATE="2018-10-12T14:20:00" csip:OAISPACKAGETYPE="SIP">
    <agent ROLE="CREATOR" TYPE="OTHER" OTHERTYPE="SOFTWARE">
      <name>E-ARK Corpus Team</name>
      <note csip:NOTETYPE="SOFTWARE VERSION">1.0</note>
    </agent>
  </metsHdr>
  <structMap TYPE="physical" LABEL="Common Specification structural map">
    <div ID="ID7063" LABEL="ID0001">
      <div LABEL="metadata" />
      <div LABEL="representations">
        <div LABEL="rep1">
          <div LABEL="data"/>
        </div>
      </div>
    </div>
  </structMap>
</mets>

Full IP as a zip file: valid_minimal_IP.zip

The error disappears when metsHdr/agent is removed:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/METS/" xmlns:csip="DILCIS" OBJID="ID0001" TYPE="SIP:X" csip:CONTENTTYPESPECIFICATION="MIXED" PROFILE="http://www.eark-project.com/METS/IP.xml">
  <metsHdr CREATEDATE="2018-10-12T14:20:00" csip:OAISPACKAGETYPE="SIP">
  </metsHdr>
  <structMap TYPE="physical" LABEL="Common Specification structural map">
    <div ID="ID7063" LABEL="ID0001">
      <div LABEL="metadata" />
      <div LABEL="representations">
        <div LABEL="rep1">
          <div LABEL="data"/>
        </div>
      </div>
    </div>
  </structMap>
</mets>

Full IP as a zip file: agent_removed.zip

@koit koit assigned koit and carlwilson and unassigned koit Feb 28, 2019
@karinbredenberg
Copy link

Looking at the XML, I'm missing SchemaLocations in the mets-element. You need to have that for getting the extra attributes for the agent.
For the note to be able to have the extra attribute, make sure you are using version 1.12 of METS.

@hsilva-keep
Copy link

In addition to what @karinbredenberg said, one needs to keep in mind that commons-ip library being used by the rest-ip-validator is still an old version which does not support these new attributes (based on METS version 1.11 and common specification version 0.17).
I'm working on the library during the next weeks in order to turn it common specification version 2 compliant (will use METS version 1.12).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants