SFULibrary / islandora_datastream_crud

Islandora Drush module for performing Create, Read, Update, and Delete operations on datastreams.
GNU General Public License v3.0
15 stars 15 forks source link

Self-transform MODS function #75

Open bondjimbond opened 5 years ago

bondjimbond commented 5 years ago

A nice new feature would be to update the MODS datastreams for a list of PIDs by running them through a given self-transform XSL.

Use case: I've got a pull request open for Islandora XML Forms that provides a new self-transform XSLT, which I would like to apply against every object with a MODS datastream in the repository (~176,000 objects).

mjordan commented 5 years ago

This would be a useful feature... but maybe we can extend it to allow the use of an arbitrary XSLT stylesheet. If the user wanted to use the self transform configured in XML forms, they would pass a specific value to the drush command, but if they wanted to use an external XSLT stylesheet, they could pass the path to it.

mjordan commented 5 years ago

Of course, we don't want to make it specific to MODS, we'd need to allow the user to indicate the DSID that would be updated.

bondjimbond commented 5 years ago

Sounds good to me!

mjordan commented 5 years ago

Over the weekend, I will test and merge (unless there are large issues) #74. Do you want me to take an initial stab at implementing this new feature as well?

bondjimbond commented 5 years ago

Sure, no reason not to if you have the time!

mjordan commented 5 years ago

Just a note here, but this feature will need to take the behavior described in the "Updating DC datastreams by pushing other XML datastreams" section of the readme into account, which means we'll probably need an option to also update the DC or not.

bondjimbond commented 5 years ago

Absolutely! And default behaviour should be to update DC if updating MODS.

mjordan commented 5 years ago

I was thinking the default behavior would be to do as it does now - prompt you for a yes or no. But I'll have to think about it a bit more.

bondjimbond commented 5 years ago

Yes, that's sensible.