Skip to content

Instantly share code, notes, and snippets.

@phette23
Created May 1, 2020 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phette23/e11594c5c1d64f0742712b8197ec054e to your computer and use it in GitHub Desktop.
Save phette23/e11594c5c1d64f0742712b8197ec054e to your computer and use it in GitHub Desktop.
add OAK campus legacy MODS subject (openEQUELLA)
// only add if not already there, add as last subject with "local" authority
if (!xml.contains('mods/subject/topic', 'Oakland Campus Legacy')) {
var len = xml.count('mods/subject')
xml.set('mods/subject[' + len + ']/@authority', 'local')
xml.set('mods/subject[' + len + ']/topic', 'Oakland Campus Legacy')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment