State Library of Queensland global change method
Tags: manage-21
, ret-01
, global_change
, export_digital_entities
, xslt
Last Updated: Aug 30, 2010 09:03
- Description
Automating and speeding up a large number of global changes in Digitool.
- Author: Neal Fitzgerald
- Institution: State Library of Queensland
- Year: 2010
- License: GPL v2
- Short description: Use, modification and distribution of the code are permitted provided the copyright notice, list of conditions and disclaimer appear in all related material.
- Link to terms: http://www.gnu.org/licenses/gpl-2.0.txt
- Skill required for using this code:
intermediate
State
Stable
Programming language
XSLT 2.0, perl, shell scripting
Software requirements
ActivePerl, Saxon version 9
Author homepage
http://onesearch.slq.qld.gov.au
Contact me with questions : Neal.Fitzgerald@slq.qld.gov.au
IGeLU Ghent presentation (31/8/2010) giving an overview of this topic: http://www.youtube.com/watch?v=llNHoBkoEAw
Comments
This technique creates a server shell script to perform a batch of global changes using manage-21 server commands.
Successive XSLT 2.0 stylesheets transform digital entity XML exported using the 'Export digital entities' web management job.
Normally you do global changes using the meditor ‘Services’ menu.
The first step is to retrieve the records from the resource discovery silo using the ret-01 service. This creates a file of Digitool object numbers (pids) for records containing the text that you want to change.
Then you start a ‘Global change (manage-21)’ service to actually make the changes in these records.
I asked Ex-Libris for a server command version of the manage-21 meditor service so I could automate a number of global change processes in a server shell script.
For a single change this looks like:
csh -f p_manage_21 <admin_unit>,<input_file>,<output_file>,<update_database=Y or N>,,<RD index for the element in tab12>,,,,N,,,,,,,<replace_this_text>,<with_this_text>,,,,,,,,N,,<user_name, e.g. STAFF>,R,<descriptive metadata format= D (dc) or M (marc)> > &$dtle_scratch/p_manage_21_datestamp.log &
The ret-01 process takes about 10 minutes to scan our image set for each change. So in our first example with 60,000 changes times 10 minutes meant about a year and a half processing.
Also in ret-01, the string you want to change has to be in the first 20 characters of the element. In the more complicated example in the attached document, the text we wanted to change occurred after the 20th character.
So I developed these XSL style sheets to replace the ret-01 function and automatically generate shell script commands for the manage-21 processes and the corresponding files of pids.
This XSL method is more flexible than the ret-01 process and a lot quicker.
These scripts and stylesheets are model examples of a technique to automate global changes that can be adapted for your particular requirements.

