Created
October 15, 2014 14:52
-
-
Save kimpham54/0c76e0b99cca9a08e1cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace mods="http://www.loc.gov/mods/v3"; | |
declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; | |
declare namespace xlink="http://www.w3.org/1999/xlink"; | |
declare namespace schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd"; | |
declare default element namespace "http://www.loc.gov/mods/v3"; | |
copy $xml := . | |
modify ( | |
let $topic := $xml/mods/subject/topic | |
return replace node $topic with | |
for $token in tokenize($topic, '; ') | |
return <topic>{ $token }</topic> | |
) | |
return $xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
turns
into
stick this into your islandora xquery module and it'll sit pretty. guess what anything with $ prefix is a variable, it can be named anything as long it's consistent
namespace declarations may differe based on the structure of your metadata