Open bondjimbond opened 8 years ago
Hmmm, I've updated the Search and Replace fields to textareas for an unrelated issue. Maybe try that though it's possible that Drupal is trimming the the whitespace from the form input?
Doesn't seem to have helped...
It did paste properly into Search Text field:
Hi.
In the MODS datastream, I want to change the role for one contributor from "contributor" to "host institution". There are other contributors that I don't want to touch, so I have to include the name field as well as the role field.
I've tried a variety of ways (deleting spaces, deleting line returns, etc.) to find and replace, but I do not get results.
Original:
<namePart>University of Iowa. Libraries. Map Collection</namePart>
<role>
<roleTerm authority="marcrelator" type="text">contributor</roleTerm>
Desired result:
<namePart>University of Iowa. Libraries. Map Collection</namePart>
<role>
<roleTerm authority="marcrelator" type="text">host institution</roleTerm>
I think Find and Replace doesn't find any matches because of the line breaks in the MODS. Has anyone figured out how to do multi-line find and replace?
Thanks. Jennifer
For reference the full code for the field looks like this:
<name type="corporate" authority="lcsh">
<namePart>University of Iowa. Libraries. Map Collection</namePart>
<role>
<roleTerm authority="marcrelator" type="text">contributor</roleTerm>
</role>
</name>
I haven't used this module for quite a long time now, because https://github.com/ulsdevteam/islandora_datastreams_io does a better job. I use this to export all the MODS datastreams I'm interested in, make the complex replacements on my computer with more powerful tools, and then re-upload them.
I attempted to use this module to correct a problem in about 1500 of our records, where a carriage return was mistakenly added in the field, resulting in poor display in search results.
MODS datastream example: (link)
Wanted to change:
<note> The original print copy of this thesis
to:
<note>The original print copy of this thesis
But in the single-line search string field, the carriage return was converted to a space, and the search returned no results. (I tried using different ways of representing the carriage return character, but nothing seems to work.)
Would turning these short text fields into long text fields resolve this problem?