-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISLANDORA-1647: New XSL self-transform to strip names without nameParts #264
base: 7.x
Are you sure you want to change the base?
Conversation
I have started using this in production and have not yet seen any ill effects. |
@whikloj Ever have a chance to review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works as described, but it does remove roleTerms if there is not a name associated. Because this is the destruction of user content I would not make this the default. But as a roleTerm without a name is not useful you might choose to remove it.
For instance
Test | Default transform | This transform |
---|---|---|
name exists, role term exists | Left alone | Left alone |
name exists, role term doesn't | Left alone | Left alone |
name doesn't exist, role term does | Left alone | Removed |
Starting the 24 hour 🕐 |
@whikloj Can you test this with names that include |
@bondjimbond Ok, I modified the form to make two namePart fields. Added a bunch of names.
|
That's what I was afraid of. I wish I could remember how I came up with those lines in the first place. |
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?
<namePart>
.<name>
and its child elements should be goneAdditional 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