islandora-interest-groups / Islandora-Metadata-Interest-Group

We investigate and provide metadata solutions that help improve metadata creation, maintenance and enhancement in Islandora.
37 stars 43 forks source link

Editing the MODS after replacing the datastream for change to take effect #14

Closed uconnjeustis closed 8 years ago

uconnjeustis commented 8 years ago

This came up on the Islandora Google List: https://groups.google.com/forum/#!topic/islandora/EX2CBR9fBDY. It was noticed that when you replace the MODS datastream that the new information would not display unless you went back in and edited the datastream, even just to press update in the form.

Have others noticed this same behavior? Could this be considered a bug?

mitchmac commented 8 years ago

To clarify based on what is in the link, this refers to the DC datastream not being updated after replacing the MODS datastream?

The MODS to DC updates are a feature of Islandora XML Forms, while replacing a datastream is a feature of the Islandora core module -- so I wouldn't technically call it a bug, it's a gap in functionality based on expectations created by XML Forms. The solution for this would likely need to abstract what Islandora XML Forms is doing. The scope of what the core Islandora module includes is already stretched to the limit, so I believe this functionality would be best handled in a new module.

A lightweight, general solution may involve adding a Drupal Rules action that reacts to a datastream being modified. Something like:

abbistani commented 8 years ago

To what extent does the (relatively) new "Use Default DC XSLTs" preference solve this problem? Does anyone use more than one MODS->DC XSLT per content model? Perhaps we should turn this on by default.

alehman-loc commented 8 years ago

@mitchmac I agree that the MODS to DC update is a functionality that needs to be added to the update process. I am not familiar with Drupal Rules, but I would like to try that out when we get around to our batch updating project (someday).

I was also thinking that, depending on how you are batch updating your MODS, it would be good practice to hook in a DC datastream update/regenerate... but I don't know how to suggest that be done.

@abbistani As I understand it (please correct me if I'm wrong) the XSLTs are engaged upon submitting an XML form, so you come to the same problem of invoking the transformation either inside or outside of that process.