Ed, the only problem I can see with position in the field is if a
preceding subfield does not exist in every record. For example, in a
given batch, most but not all records have an 856 subfield 3, followed
by multiple subfield u's. If you ask to delete the first u using pos,
then your target will be different determined by the presence of
subfield 3. If you know that you want to eliminate u's (without regard
to what else is in the field) then your target would be easier to hit.
However, you raise a good point -- how much functionality do people
need? Maybe some actual examples from the wild would be useful. I can
supply some but probably not until tomorrow afternoon since I have a
presentation to prepare for tomorrow. If other users have some examples
of real records or use cases they might clarify the most common usage.
I'll see what I can find tomorrow.
Mark
Edward Summers wrote:
On May 3, 2006, at 8:55 AM, Mark Jordan wrote:
I think it should mean "the zeroth occurrence of subfield 'u'", since
specifying which of a repeated group of subfields is a realistic task,
as you say. For example, each record has two 'u's but all of the first
ones are garbage.
Actually 'pos' as implemented will remove the subfield u if it is at
position n in the field. So we could have occurrence too. I feel like
I'm chasing windmills a bit. Do y'all really *need* all this
functionality in delete_subfield() :-) I guess you do or else you
wouldn't be so interested in asking for it.
I didn't implement the -1 behavior because i wasn't quite sure how to do
it quickly, and it seemed like too much somehow.
//Ed
--
Mark Jordan
Head of Library Systems
W.A.C. Bennett Library, Simon Fraser University
Burnaby, British Columbia, V5A 1S6, Canada
Phone (604) 291 5753 / Fax (604) 291 3023
[EMAIL PROTECTED] / http://www.sfu.ca/~mjordan/