islandora_xml_forms icon indicating copy to clipboard operation
islandora_xml_forms copied to clipboard

ISLANDORA-1647: New XSL self-transform to strip names without nameParts

Open bondjimbond opened this issue 5 years ago • 6 comments

JIRA Ticket: (https://jira.duraspace.org/browse/ISLANDORA-1647)

What does this Pull Request do?

Adds a new XSL self-transform (just a copy of the islandora_cleanup_mods_extended.xsl with more code) that strips out elements that have either no <namePart> element or an empty <namePart/>.

This allows forms to prepopulate certain elements like roleTerm silently, but remove them if they're left empty (instead of creating useless <name> elements that contain nothing but a roleTerm).

What's new?

New XSL option is available for your form associations.

How should this be tested?

  • Ingest an object via a form, include details in the section but nothing in the <namePart>.
  • View the resulting MODS
  • Associate form with this XSLT and edit that object
  • The bad <name> and its child elements should be gone
  • In the same form, create some names that do have nameParts and view the MODS -- it should look normal.

Additional Notes:

I would really like to make this change simply part of the included islandora_cleanup_mods_extended.xsl file -- although I can see where folks might object. Can we perhaps discuss that here? If not, I'm happy enough to have the new option available.

Interested parties

@Islandora/7-x-1-x-committers @whikloj

bondjimbond avatar May 17 '19 15:05 bondjimbond