Blank MODS elements from the crosswalk #117

JenniferMartin opened this Issue Jan 16, 2013 · 0 comments


None yet

3 participants


Currently, the crosswalk creates a blank MODS element if the element it is mapped to is blank. The idea is to add logic which will cause the crosswalk to not write blank elements.

  • If/then logic: if field mapped to is blank, then don't write element set.
  • Must discount attributes with preset values, so that they don't trigger a "not blank" response.
  • Have way for users to indicate whether a subelement is important or not (e.g. only want mapped if 's field has a value, regardless of what's going on with /).
  • Have way for users to mark elements as required or not, and throw up a warning if a required element is not mapped because it's blank, indicating what line the error is from.
  • Probably use some form of recursive logic, where the system checks the parent element and all subelements/attributes and then loops back to the parent element to determine whether to write the whole block or not. (This prevents partly written metadata elements.)
@mdaines mdaines was assigned Jan 30, 2013
@mdaines mdaines pushed a commit that referenced this issue Jan 30, 2013
@daines daines In MappedAttributeImpl#updateRecord, if the string value is blank, se…
…t the default instead (or null if there is no default). MappedElementImpl#isEmpty will then determine that a record is empty when it would otherwise just have a blank attribute. The result is that elements with blank values are not present in the MODS. References #117.
@mdaines mdaines pushed a commit that referenced this issue Jan 30, 2013
@daines daines Add "Omitted When Blank" attribute to the MappedAttribute class (defa…
…ult is true). Check this when setting blank values to blank in updateRecord. (References #117)
@gregjan gregjan closed this Mar 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment