Uploaded image for project: 'MyCoRe'
  1. MCR-1090

MODS schema has errors that results in invalid attributes added to elements

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2015.05.0, 2015.07
    • Fix Version/s: 2015.05.01, 2015.11
    • Component/s: mycore-mods
    • Labels:
      None

      Description

      recently we updated our code to support MODS 3.6 and the new
      nameIdentifier which uses the type definition "identifierDefinition":

      <xs:complexType name="identifierDefinition">
      <xs:simpleContent>
      <xs:extension base="stringPlusLanguage">
      <xs:attribute name="displayLabel" type="xs:string"/>
      <xs:attribute name="type" type="xs:string"/>
      <xs:attribute name="typeURI" type="xs:anyURI"/>
      <xs:attribute name="invalid" fixed="yes"/>
      <xs:attribute name="altRepGroup" type="xs:string"/>
      </xs:extension>
      </xs:simpleContent>
      </xs:complexType>

      Problematic is the fact that @invalid is set to fixed="yes". When you
      use a schema aware parser to parse a MODS document this will actually
      attach a @invalid="yes" on every element of "identifierDefinition" (like
      "identifier" or "nameIdentifier") that is missing that attribute.

      XML Schema part 1, section 3.2.1:
      "[..] fixed indicates that the attribute value if present must equal the
      supplied constraint value, and if absent receives the supplied value as
      for default."

      This bug is not introduced in 3.6 but is also in older versions of MODS.

      Currently all identifier|nameIdentifier get an 'invalid' label.
      Obviously this is not way it was intended.

        Attachments

          Activity

            People

            • Assignee:
              yagee Thomas Scheffler
              Reporter:
              yagee Thomas Scheffler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: