Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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