]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/js/ui/default/staff/marcrecord.js
LP#1402797 Global undo/redo stack stack
[working/Evergreen.git] / Open-ILS / web / js / ui / default / staff / marcrecord.js
1 /* ---------------------------------------------------------------------------
2  * Copyright (C) 2009-2015  Equinox Software, Inc.
3  * Mike Rylander <miker@esilibrary.com>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  * ---------------------------------------------------------------------------
15  */
16
17 // !!! Head's up !!!
18 // This module requires a /real/ jQuery be used with your
19 // angularjs, so as to avoid using hand-rolled AJAX.
20
21 var MARC = {
22
23     Record : function(kwargs) {
24         if (!kwargs) kwargs = {};
25
26         this.title = function () { return this.subfield('245','a')[1] }
27
28         this.field = function (spec) {
29             var list = this.fields.filter(function (f) {
30                 if (f.tag.match(spec)) return true;
31                 return false;
32             });
33
34             if (list.length == 1) return list[0];
35             return list;
36         }
37
38         this.subfield = function (spec, code) {
39             var f = this.field(spec);
40             if (Array.isArray(f)) {
41                 if (!f.length) return f;
42                 f = f[0];
43             }
44             return f.subfield(code)
45         }
46
47         this.appendFields = function () {
48             var me = this;
49             Array.prototype.slice.call(arguments).forEach( function (f) { me.fields.push( f ) } );
50         }
51
52         this.deleteField = function (f) { return this.deleteFields(f) },
53
54         this.insertOrderedFields = function () {
55             var me = this;
56             for (var i = 0; i < arguments.length; i++) {
57                 var f = arguments[i];
58                 var done = false;
59                 for (var j = 0; j < this.fields.length; j++) {
60                     if (f.tag < this.fields[j].tag) {
61                         this.insertFieldsBefore(this.fields[j], f);
62                         done = true;
63                         break;
64                     }
65                 }
66                 if (!done) this.appendFields(f);
67             }
68         }
69
70         this.insertFieldsBefore = function (target) {
71             var args = Array.prototype.slice.call(arguments);
72             args.splice(0,1);
73             var me = this;
74             for (var j = 0; j < this.fields.length; j++) {
75                 if (target === this.fields[j]) {
76                     j--;
77                     args.forEach( function (f) {
78                         me.fields.splice(j++,0,f);
79                     });
80                     break;
81                 }
82             }
83         }
84
85         this.insertFieldsAfter = function (target) {
86             var args = Array.prototype.slice.call(arguments);
87             args.splice(0,1);
88             var me = this;
89             for (var j = 0; j < this.fields.length; j++) {
90                 if (target === this.fields[j]) {
91                     args.forEach( function (f) {
92                         me.fields.splice(j++,0,f);
93                     });
94                     break;
95                 }
96             }
97         }
98
99         this.deleteFields = function () {
100             var me = this;
101             var counter = 0;
102             for ( var i in arguments ) {
103                 var f = arguments[i];
104                 for (var j = 0; j < me.fields.length; j++) {
105                     if (f === me.fields[j]) {
106                         me.fields[j].record = null;
107                         me.fields.splice(j,0);
108                         counter++
109                         break;
110                     }
111                 }
112             }
113             return counter;
114         }
115
116         // this.clone = function () { return dojo.clone(this) } // maybe implement later...
117
118         this.fromXmlURL = function (url) {
119             var me = this;
120             return $.get( // This is a Promise
121                 url,
122                 function (mxml) {
123                     me.fromXmlDocument($('record', mxml)[0]);
124                     if (me.onLoad) me.onLoad();
125             });
126         },
127
128         this.fromXmlString = function (mxml) {
129                 this.fromXmlDocument( $( $.parseXML( mxml ) ).find('record')[0] );
130         },
131
132         this.fromXmlDocument = function (mxml) {
133             var me = this;
134             me.leader = $($('leader',mxml)[0]).text() || '00000cam a2200205Ka 4500';
135
136             $('controlfield', mxml).each(function (ind) {
137                 var cf=$(this);
138                 me.fields.push(
139                     new MARC.Field({
140                           record : me,
141                           tag    : cf.attr('tag'),
142                           data   : cf.text(),
143                           position: ind
144                     })
145                 )
146             });
147
148             var cfield_count = me.fields.length + 1;
149
150             $('datafield', mxml).each(function (ind) {
151                 var df=$(this);
152                 me.fields.push(
153                     new MARC.Field({
154                         record    : me,
155                         tag       : df.attr('tag'),
156                         ind1      : df.attr('ind1'),
157                         ind2      : df.attr('ind2'),
158                         position  : ind + cfield_count,
159                         subfields : $('subfield', df).map(
160                             function (i, sf) {
161                                 return [[ $(sf).attr('code'), $(sf).text(), i ]];
162                             }
163                         ).get()
164                     })
165                 )
166             });
167             me.ready = true;
168
169         },
170
171         this.toXmlDocument = function () {
172
173             var doc = $.parseXML('<record xmlns="http://www.loc.gov/MARC21/slim"/>');
174             var rec_node = $('record', doc)[0];
175
176             var ldr = doc.createElementNS('http://www.loc.gov/MARC21/slim', 'leader');
177             ldr.textContent = this.leader;
178             rec_node.appendChild( ldr );
179
180             this.fields.forEach(function (f) {
181                 var element = f.isControlfield() ? 'controlfield' : 'datafield';
182                 var f_node = doc.createElementNS( 'http://www.loc.gov/MARC21/slim', element );
183                 f_node.setAttribute('tag', f.tag);
184                 
185                 if (f.isControlfield()) {
186                     if (f.data) f_node.textContent = f.data;
187                 } else {
188                     f_node.setAttribute('ind1', f.indicator(1));
189                     f_node.setAttribute('ind2', f.indicator(2));
190                     f.subfields.forEach( function (sf) {
191                         var sf_node = doc.createElementNS('http://www.loc.gov/MARC21/slim', 'subfield');
192                         sf_node.setAttribute('code', sf[0]);
193                         sf_node.textContent = sf[1];
194                         f_node.appendChild(sf_node);
195                     });
196                 }
197
198                 rec_node.appendChild(f_node);
199             });
200
201             return doc;
202         },
203
204         this.toXmlString = function () {
205             return (new XMLSerializer()).serializeToString( this.toXmlDocument() );
206         },
207
208         this.fromBreaker = function (marctxt) {
209             var me = this;
210
211             function cf_line_data (l) { return l.substring(4) || '' };
212             function df_line_data (l) { return l.substring(6) || '' };
213             function line_tag (l) { return l.substring(0,3) };
214             function df_ind1 (l) { return l.substring(4,5).replace('\\',' ') };
215             function df_ind2 (l) { return l.substring(5,6).replace('\\',' ') };
216             function isControlField (l) {
217                 var x = line_tag(l);
218                 return (x == 'LDR' || x < '010') ? true : false;
219             }
220             
221             var lines = marctxt.replace(/^=/gm,'').split('\n');
222             lines.forEach(function (current_line, ind) {
223
224                 if (current_line.match(/^#/)) {
225                     // skip comment lines
226                 } else if (isControlField(current_line)) {
227                     if (line_tag(current_line) == 'LDR') {
228                         me.leader = cf_line_data(current_line) || '00000cam a2200205Ka 4500';
229                     } else {
230                         me.fields.push(
231                             new MARC.Field({
232                                 record : me,
233                                 tag    : line_tag(current_line),
234                                 data   : cf_line_data(current_line).replace('\\',' ','g'),
235                                 position: ind
236                             })
237                         );
238                     }
239                 } else {
240                     if (current_line.substring(4,5) == me.delimiter) // add delimiters if they were left out
241                         current_line = current_line.substring(0,3) + ' \\\\' + current_line.substring(4);
242
243                     var data = df_line_data(current_line);
244                     if (!(data.substring(0,1) == me.delimiter)) data = me.delimiter + 'a' + data;
245
246                     var sf_list = data.split(me.delimiter);
247                     sf_list.shift();
248
249                     me.fields.push(
250                         new MARC.Field({
251                                 record    : me,
252                                 tag       : line_tag(current_line),
253                                 ind1      : df_ind1(current_line),
254                                 ind2      : df_ind2(current_line),
255                                 position  : ind,
256                                 subfields : sf_list.map( function (sf, i) {
257                                                 var sf_data = sf.substring(1);
258                                                 if (me.delimiter == '$') sf_data = sf_data.replace(/\{dollar\}/g, '$');
259                                                 return [ sf.substring(0,1), sf_data, i ];
260                                             })
261                         })
262                     );
263                 }
264             });
265
266             me.ready = true;
267             return this;
268         },
269
270         this.toBreaker = function () {
271
272             var me = this;
273             var mtxt = '=LDR ' + this.leader + '\n';
274
275             mtxt += this.fields.map( function (f) {
276                 if (f.isControlfield()) {
277                     if (f.data) return '=' + f.tag + ' ' + f.data.replace(' ','\\','g');
278                     return '=' + f.tag;
279                 } else {
280                     return '=' + f.tag + ' ' +
281                         f.indicator(1).replace(' ','\\') + 
282                         f.indicator(2).replace(' ','\\') + 
283                         f.subfields.map( function (sf) {
284                             var sf_data = sf[1];
285                             if (me.delimiter == '$') sf_data = sf_data.replace(/\$/g, '{dollar}');
286                             return me.delimiter + sf[0] + sf_data;
287                         }).join('');
288                 }
289             }).join('\n');
290
291             return mtxt;
292         }
293
294         this.recordType = function () {
295         
296             var _t = this.leader.substr(MARC.Record._ff_pos.Type.ldr.BKS.start, MARC.Record._ff_pos.Type.ldr.BKS.len);
297             var _b = this.leader.substr(MARC.Record._ff_pos.BLvl.ldr.BKS.start, MARC.Record._ff_pos.BLvl.ldr.BKS.len);
298         
299             for (var t in MARC.Record._recType) {
300                 if (_t.match(MARC.Record._recType[t].Type) && _b.match(MARC.Record._recType[t].BLvl)) {
301                     return t;
302                 }
303             }
304             return 'BKS'; // default
305         }
306         
307         this.videorecordingFormatName = function () {
308             var _7 = this.field('007').data;
309         
310             if (_7 && _7.match(/^v/)) {
311                 var _v_e = _7.substr(
312                     MARC.Record._physical_characteristics.v.subfields.e.start,
313                     MARC.Record._physical_characteristics.v.subfields.e.len
314                 );
315         
316                 return MARC.Record._physical_characteristics.v.subfields.e.values[ _v_e ];
317             }
318         
319             return null;
320         }
321         
322         this.videorecordingFormatCode = function () {
323             var _7 = this.field('007').data;
324         
325             if (_7 && _7.match(/^v/)) {
326                 return _7.substr(
327                     MARC.Record._physical_characteristics.v.subfields.e.start,
328                     MARC.Record._physical_characteristics.v.subfields.e.len
329                 );
330             }
331         
332             return null;
333         }
334         
335         this.extractFixedField = function (field, dflt) {
336         if (!MARC.Record._ff_pos[field]) return null;
337         
338             var _l = this.leader;
339             var _8 = this.field('008').data;
340             var _6 = this.field('006').data;
341         
342             var rtype = this.recordType();
343         
344             var val;
345         
346             if (MARC.Record._ff_pos[field].ldr && _l) {
347                 if (MARC.Record._ff_pos[field].ldr[rtype]) {
348                     val = _l.substr(
349                         MARC.Record._ff_pos[field].ldr[rtype].start,
350                         MARC.Record._ff_pos[field].ldr[rtype].len
351                     );
352                 }
353             } else if (MARC.Record._ff_pos[field]._8 && _8) {
354                 if (MARC.Record._ff_pos[field]._8[rtype]) {
355                     val = _8.substr(
356                         MARC.Record._ff_pos[field]._8[rtype].start,
357                         MARC.Record._ff_pos[field]._8[rtype].len
358                     );
359                 }
360             }
361         
362             if (!val && MARC.Record._ff_pos[field]._6 && _6) {
363                 if (MARC.Record._ff_pos[field]._6[rtype]) {
364                     val = _6.substr(
365                         MARC.Record._ff_pos[field]._6[rtype].start,
366                         MARC.Record._ff_pos[field]._6[rtype].len
367                     );
368                 }
369             }
370     
371             if (!val && dflt) {
372                 val = '';
373                 var d;
374                 var p;
375                 if (MARC.Record._ff_pos[field].ldr && MARC.Record._ff_pos[field].ldr[rtype]) {
376                     d = MARC.Record._ff_pos[field].ldr[rtype].def;
377                     p = 'ldr';
378                 }
379     
380                 if (MARC.Record._ff_pos[field]._8 && MARC.Record._ff_pos[field]._8[rtype]) {
381                     d = MARC.Record._ff_pos[field]._8[rtype].def;
382                     p = '_8';
383                 }
384     
385                 if (!val && MARC.Record._ff_pos[field]._6 && MARC.Record._ff_pos[field]._6[rtype]) {
386                     d = MARC.Record._ff_pos[field]._6[rtype].def;
387                     p = '_6';
388                 }
389     
390                 if (p) {
391                     for (var j = 0; j < MARC.Record._ff_pos[field][p][rtype].len; j++) {
392                         val += d;
393                     }
394                 } else {
395                     val = null;
396                 }
397             }
398     
399             return val;
400         }
401     
402         this.setFixedField = function (field, value) {
403             if (!MARC.Record._ff_pos[field]) return null;
404         
405             var _l = this.leader;
406             var _8 = this.field('008').data;
407             var _6 = this.field('006').data;
408         
409             var rtype = this.recordType();
410         
411             var val;
412         
413             if (MARC.Record._ff_pos[field].ldr && _l) {
414                 if (MARC.Record._ff_pos[field].ldr[rtype]) { // It's in the leader
415                     val = value.substr(0, MARC.Record._ff_pos[field].ldr[rtype].len);
416                     this.leader =
417                         _l.substring(0, MARC.Record._ff_pos[field].ldr[rtype].start) +
418                         val +
419                         _l.substring(
420                             MARC.Record._ff_pos[field].ldr[rtype].start
421                             + MARC.Record._ff_pos[field].ldr[rtype].len
422                         );
423                 }
424             } else if (MARC.Record._ff_pos[field]._8 && _8) {
425                 if (MARC.Record._ff_pos[field]._8[rtype]) { // Nope, it's in the 008
426                     val = value.substr(0, MARC.Record._ff_pos[field]._8[rtype].len);
427                     this.field('008').update(
428                         _8.substring(0, MARC.Record._ff_pos[field]._8[rtype].start) +
429                         val +
430                         _8.substring(
431                             MARC.Record._ff_pos[field]._8[rtype].start
432                             + MARC.Record._ff_pos[field]._8[rtype].len
433                         )
434                     );
435                 }
436             }
437         
438             if (!val && MARC.Record._ff_pos[field]._6 && _6) {
439                 if (MARC.Record._ff_pos[field]._6[rtype]) { // ok, maybe the 006?
440                     val = value.substr(0, MARC.Record._ff_pos[field]._6[rtype].len);
441                     this.field('006').update(
442                         _6.substring(0, MARC.Record._ff_pos[field]._6[rtype].start) +
443                         val +
444                         _6.substring(
445                             MARC.Record._ff_pos[field]._6[rtype].start
446                             + MARC.Record._ff_pos[field]._6[rtype].len
447                         )
448                     );
449                 }
450             }
451     
452             return val;
453         }
454
455         this.ready = false;
456         this.fields = [];
457         this.delimiter = '\u2021';
458         this.leader = '00000cam a2200205Ka 4500';
459
460         if (kwargs.delimiter) this.delimiter = kwargs.delimiter;
461         if (kwargs.onLoad) this.onLoad = kwargs.onLoad;
462
463         if (kwargs.url) {
464             this.fromXmlURL(kwargs.url);
465         } else if (kwargs.marcxml) {
466             this.fromXmlString(kwargs.marcxml);
467             if (this.onLoad) this.onLoad();
468         } else if (kwargs.xml) {
469             this.fromXmlDocument(kwargs.xml);
470             if (this.onLoad) this.onLoad();
471         } else if (kwargs.marcbreaker) {
472             this.fromBreaker(kwargs.marcbreaker);
473             if (this.onLoad) this.onLoad();
474         }
475
476         if (kwargs.rtype == 'AUT') {
477             this.setFixedField('Type','z');
478         }
479
480     },
481
482     Field : function (kwargs) {
483         if (!kwargs) kwargs = {};
484
485         this.subfield = function (code) {
486             var list = this.subfields.filter( function (s) {
487                 if (s[0] == code) return true; return false;
488             });
489             if (list.length == 1) return list[0];
490             return list;
491         }
492
493         this.addSubfields = function () {
494             for (var i = 0; i < arguments.length; i++) {
495                 var code = arguments[i];
496                 var value = arguments[++i];
497                 this.subfields.push( [ code, value ] );
498             }
499         }
500
501         this.deleteSubfields = function (c) {
502             return this.deleteSubfield( { code : c } );
503         }
504
505         this.deleteSubfield = function (args) {
506             var me = this;
507             if (!Array.isArray( args.code )) {
508                 args.code = [ args.code ];
509             }
510
511             if (args.pos && !Array.isArray( args.pos )) {
512                 args.pos = [ args.pos ];
513             }
514
515             for (var i = 0; i < args.code.length; i++) {
516                 var sub_pos = {};
517                 for (var j = 0; j < me.subfields; j++) {
518                     if (me.subfields[j][0] == args.code[i]) {
519
520                         if (!sub_pos[args.code[i]]) sub_pos[args.code[j]] = 0;
521                         else sub_pos[args.code[i]]++;
522
523                         if (args.pos) {
524                             for (var k = 0; k < args.pos.length; k++) {
525                                 if (sub_pos[args.code[i]] == args.pos[k]) me.subfields.splice(j,1);
526                             }
527                         } else if (args.match && me.subfields[j][1].match( args.match )) {
528                             me.subfields.splice(j,1);
529                         } else {
530                             me.subfields.splice(j,1);
531                         }
532                     }
533                 }
534             }
535         }
536
537         this.update = function ( args ) {
538             if (this.isControlfield()) {
539                 this.data = args;
540             } else {
541                 if (args.ind1) this.ind1 = args.ind1;
542                 if (args.ind2) this.ind2 = args.ind2;
543                 if (args.tag) this.tag = args.tag;
544
545                 for (var i in args) {
546                     if (i == 'tag' || i == 'ind1' || i == 'ind2') continue;
547                     var done = 0;
548                     this.subfields.forEach( function (f) {
549                         if (!done && f[0] == i) {
550                             f[1] = args[i];
551                             done = 1;
552                         }
553                     });
554                 }
555             }
556         }
557
558         this.isControlfield = function () {
559             return this.tag < '010' ? true : false;
560         }
561
562         this.indicator = function (num, value) {
563             if (value !== undefined) {
564                 if (num == 1) this.ind1 = value;
565                 else if (num == 2) this.ind2 = value;
566                 else { this.error = true; return null; }
567             }
568             if (num == 1) return this.ind1;
569             else if (num == 2) return this.ind2;
570             else { this.error = true; return null; }
571         }
572
573         this.error = false; 
574         this.record = null; // MARC record pointer
575         this.tag = ''; // MARC tag
576         this.ind1 = ' '; // MARC indicator 1
577         this.ind2 = ' '; // MARC indicator 2
578         this.data = ''; // MARC data for a controlfield element
579         this.subfields = []; // list of MARC subfields for a datafield element
580
581         this.position = kwargs.position;
582         this.record = kwargs.record;
583         this.tag = kwargs.tag;
584         this.ind1 = kwargs.ind1 || ' ';
585         this.ind2 = kwargs.ind2 || ' ';
586         this.data = kwargs.data;
587
588         if (kwargs.subfields) this.subfields = kwargs.subfields;
589         else this.subfields = [];
590
591     },
592
593     Batch : function(kwargs) {
594
595         this.parse = function () {
596             if (this.source instanceof Object ) { // assume an xml collection document
597                 this.source = $('record', this.source);
598                 this.type = 'xml';
599             } else if (this.source.match(/^\s*</)) { // this is xml text
600                 this.source = $.parseXML( mxml ).find('record');
601                 this.type = 'xml';
602             } else { // must be a marcbreaker doc. split on blank lines
603                 this.source = this.source.split(/^$/);
604                 this.type = 'marcbreaker';
605             }
606         }
607
608         this.fetchURL = function (u) {
609             var me = this;
610             $.get( u, function (mrc) {
611                 me.source = mrc;
612                 me.ready = true;
613             });
614         }
615
616         this.next = function () {
617             var chunk = this.source[this.current_record++];
618
619             if (chunk) {
620                 var args = {};
621                 args[this.type] = chunk;
622                 if (this.delimiter) args.delimiter = this.delimiter;
623                 return new MARC.Record(args);
624             }
625
626             return null;
627         }
628
629         this.ready = false;
630         this.records = [];
631         this.source = kwargs.source;
632         this.delimiter = kwargs.delimiter
633         this.current_record = 0;
634
635         if (this.source) this.ready = true;
636         if (!this.ready && kwargs.url) this.fetchURL( kwargs.url );
637
638         if (this.ready) this.parse();
639
640     }
641 };
642
643 MARC.Record._recType = {
644     BKS : { Type : /[at]{1}/,    BLvl : /[acdm]{1}/ },
645     SER : { Type : /[a]{1}/,    BLvl : /[bsi]{1}/ },
646     VIS : { Type : /[gkro]{1}/,    BLvl : /[abcdmsi]{1}/ },
647     MIX : { Type : /[p]{1}/,    BLvl : /[cdi]{1}/ },
648     MAP : { Type : /[ef]{1}/,    BLvl : /[abcdmsi]{1}/ },
649     SCO : { Type : /[cd]{1}/,    BLvl : /[abcdmsi]{1}/ },
650     REC : { Type : /[ij]{1}/,    BLvl : /[abcdmsi]{1}/ },
651     COM : { Type : /[m]{1}/,    BLvl : /[abcdmsi]{1}/ },
652     AUT : { Type : /[z]{1}/,    BLvl : /.{1}/ },
653     MFHD : { Type : /[uvxy]{1}/,  BLvl : /.{1}/ }
654 };
655
656 MARC.Record._ff_pos = {
657     AccM : {
658         _8 : {
659             SCO : {start: 24, len : 6, def : ' ' },
660             REC : {start: 24, len : 6, def : ' ' }
661         },
662         _6 : {
663             SCO : {start: 7, len : 6, def : ' ' },
664             REC : {start: 7, len : 6, def : ' ' }
665         }
666     },
667     Alph : {
668         _8 : {
669             SER : {start : 33, len : 1, def : ' ' }
670         },
671         _6 : {
672             SER : {start : 16, len : 1, def : ' ' }
673         }
674     },
675     Audn : {
676         _8 : {
677             BKS : {start : 22, len : 1, def : ' ' },
678             SER : {start : 22, len : 1, def : ' ' },
679             VIS : {start : 22, len : 1, def : ' ' },
680             SCO : {start : 22, len : 1, def : ' ' },
681             REC : {start : 22, len : 1, def : ' ' },
682             COM : {start : 22, len : 1, def : ' ' }
683         },
684         _6 : {
685             BKS : {start : 5, len : 1, def : ' ' },
686             SER : {start : 5, len : 1, def : ' ' },
687             VIS : {start : 5, len : 1, def : ' ' },
688             SCO : {start : 5, len : 1, def : ' ' },
689             REC : {start : 5, len : 1, def : ' ' },
690             COM : {start : 5, len : 1, def : ' ' }
691         }
692     },
693     Biog : {
694         _8 : {
695             BKS : {start : 34, len : 1, def : ' ' }
696         },
697         _6 : {
698             BKS : {start : 17, len : 1, def : ' ' }
699         }
700     },
701     BLvl : {
702         ldr : {
703             BKS : {start : 7, len : 1, def : 'm' },
704             SER : {start : 7, len : 1, def : 's' },
705             VIS : {start : 7, len : 1, def : 'm' },
706             MIX : {start : 7, len : 1, def : 'c' },
707             MAP : {start : 7, len : 1, def : 'm' },
708             SCO : {start : 7, len : 1, def : 'm' },
709             REC : {start : 7, len : 1, def : 'm' },
710             COM : {start : 7, len : 1, def : 'm' }
711         }
712     },
713     Comp : {
714         _8 : {
715             SCO : {start : 18, len : 2, def : 'uu'},
716             REC : {start : 18, len : 2, def : 'uu'}
717         },
718         _6 : {
719             SCO : {start : 1, len : 2, def : 'uu'},
720             REC : {start : 1, len : 2, def : 'uu'}
721         },
722     },
723     Conf : {
724         _8 : {
725             BKS : {start : 29, len : 1, def : '0' },
726             SER : {start : 29, len : 1, def : '0' }
727         },
728         _6 : {
729             BKS : {start : 11, len : 1, def : '0' },
730             SER : {start : 11, len : 1, def : '0' }
731         }
732     },
733     Cont : {
734         _8 : {
735             BKS : {start : 24, len : 4, def : ' ' },
736             SER : {start : 25, len : 3, def : ' ' }
737         },
738         _6 : {
739             BKS : {start : 7, len : 4, def : ' ' },
740             SER : {start : 8, len : 3, def : ' ' }
741         }
742     },
743     CrTp : {
744         _8 : {
745             MAP : {start: 25, len : 1, def : 'a' }
746         },
747         _6 : { 
748             MAP : {start : 8, len : 1, def : 'a' }
749         }
750     },
751     Ctrl : {
752         ldr : {
753             BKS : {start : 8, len : 1, def : ' ' },
754             SER : {start : 8, len : 1, def : ' ' },
755             VIS : {start : 8, len : 1, def : ' ' },
756             MIX : {start : 8, len : 1, def : ' ' },
757             MAP : {start : 8, len : 1, def : ' ' },
758             SCO : {start : 8, len : 1, def : ' ' },
759             REC : {start : 8, len : 1, def : ' ' },
760             COM : {start : 8, len : 1, def : ' ' }
761         }
762     },
763     Ctry : {
764             _8 : {
765                 BKS : {start : 15, len : 3, def : ' ' },
766                 SER : {start : 15, len : 3, def : ' ' },
767                 VIS : {start : 15, len : 3, def : ' ' },
768                 MIX : {start : 15, len : 3, def : ' ' },
769                 MAP : {start : 15, len : 3, def : ' ' },
770                 SCO : {start : 15, len : 3, def : ' ' },
771                 REC : {start : 15, len : 3, def : ' ' },
772                 COM : {start : 15, len : 3, def : ' ' }
773             }
774         },
775     Date1 : {
776         _8 : {
777             BKS : {start : 7, len : 4, def : ' ' },
778             SER : {start : 7, len : 4, def : ' ' },
779             VIS : {start : 7, len : 4, def : ' ' },
780             MIX : {start : 7, len : 4, def : ' ' },
781             MAP : {start : 7, len : 4, def : ' ' },
782             SCO : {start : 7, len : 4, def : ' ' },
783             REC : {start : 7, len : 4, def : ' ' },
784             COM : {start : 7, len : 4, def : ' ' }
785         }
786     },
787     Date2 : {
788         _8 : {
789             BKS : {start : 11, len : 4, def : ' ' },
790             SER : {start : 11, len : 4, def : '9' },
791             VIS : {start : 11, len : 4, def : ' ' },
792             MIX : {start : 11, len : 4, def : ' ' },
793             MAP : {start : 11, len : 4, def : ' ' },
794             SCO : {start : 11, len : 4, def : ' ' },
795             REC : {start : 11, len : 4, def : ' ' },
796             COM : {start : 11, len : 4, def : ' ' }
797         }
798     },
799     Desc : {
800         ldr : {
801             BKS : {start : 18, len : 1, def : ' ' },
802             SER : {start : 18, len : 1, def : ' ' },
803             VIS : {start : 18, len : 1, def : ' ' },
804             MIX : {start : 18, len : 1, def : ' ' },
805             MAP : {start : 18, len : 1, def : ' ' },
806             SCO : {start : 18, len : 1, def : ' ' },
807             REC : {start : 18, len : 1, def : ' ' },
808             COM : {start : 18, len : 1, def : ' ' }
809         }
810     },
811     DtSt : {
812         _8 : {
813             BKS : {start : 6, len : 1, def : ' ' },
814             SER : {start : 6, len : 1, def : 'c' },
815             VIS : {start : 6, len : 1, def : ' ' },
816             MIX : {start : 6, len : 1, def : ' ' },
817             MAP : {start : 6, len : 1, def : ' ' },
818             SCO : {start : 6, len : 1, def : ' ' },
819             REC : {start : 6, len : 1, def : ' ' },
820             COM : {start : 6, len : 1, def : ' ' }
821         }
822     },
823     ELvl : {
824         ldr : {
825             BKS : {start : 17, len : 1, def : ' ' },
826             SER : {start : 17, len : 1, def : ' ' },
827             VIS : {start : 17, len : 1, def : ' ' },
828             MIX : {start : 17, len : 1, def : ' ' },
829             MAP : {start : 17, len : 1, def : ' ' },
830             SCO : {start : 17, len : 1, def : ' ' },
831             REC : {start : 17, len : 1, def : ' ' },
832             COM : {start : 17, len : 1, def : ' ' },
833             AUT : {start : 17, len : 1, def : 'n' },
834             MFHD : {start : 17, len : 1, def : 'u' }
835         }
836     },
837     EntW : {
838         _8 : {
839             SER : {start : 24, len : 1, def : ' '}
840         },
841         _6 : {
842             SER : {start : 7, len : 1, def : ' '}
843         }
844     },
845     Fest : {
846         _8 : {
847             BKS : {start : 30, len : 1, def : '0' }
848         },
849         _6 : {
850             BKS : {start : 13, len : 1, def : '0' }
851         }
852     },
853     File : {
854         _8 : {
855             COM : {start: 26, len : 1, def : 'u' }
856         },
857         _6 : {
858             COM : {start: 9, len : 1, def : 'u' }
859         }
860     },
861     FMus : {
862         _8 : {
863             SCO : {start : 20, len : 1, def : 'u'},
864             REC : {start : 20, len : 1, def : 'n'}
865         },
866         _6 : {
867             SCO : {start : 3, len : 1, def : 'u'},
868             REC : {start : 3, len : 1, def : 'n'}
869         },
870     },
871     Form : {
872         _8 : {
873             BKS : {start : 23, len : 1, def : ' ' },
874             SER : {start : 23, len : 1, def : ' ' },
875             VIS : {start : 29, len : 1, def : ' ' },
876             MIX : {start : 23, len : 1, def : ' ' },
877             MAP : {start : 29, len : 1, def : ' ' },
878             SCO : {start : 23, len : 1, def : ' ' },
879             REC : {start : 23, len : 1, def : ' ' }
880         },
881         _6 : {
882             BKS : {start : 6, len : 1, def : ' ' },
883             SER : {start : 6, len : 1, def : ' ' },
884             VIS : {start : 12, len : 1, def : ' ' },
885             MIX : {start : 6, len : 1, def : ' ' },
886             MAP : {start : 12, len : 1, def : ' ' },
887             SCO : {start : 6, len : 1, def : ' ' },
888             REC : {start : 6, len : 1, def : ' ' }
889         }
890     },
891     Freq : {
892         _8 : {
893             SER : {start : 18, len : 1, def : ' '}
894         },
895         _6 : {
896             SER : {start : 1, len : 1, def : ' '}
897         }
898     },
899     GPub : {
900         _8 : {
901             BKS : {start : 28, len : 1, def : ' ' },
902             SER : {start : 28, len : 1, def : ' ' },
903             VIS : {start : 28, len : 1, def : ' ' },
904             MAP : {start : 28, len : 1, def : ' ' },
905             COM : {start : 28, len : 1, def : ' ' }
906         },
907         _6 : {
908             BKS : {start : 11, len : 1, def : ' ' },
909             SER : {start : 11, len : 1, def : ' ' },
910             VIS : {start : 11, len : 1, def : ' ' },
911             MAP : {start : 11, len : 1, def : ' ' },
912             COM : {start : 11, len : 1, def : ' ' }
913         }
914     },
915     Ills : {
916         _8 : {
917             BKS : {start : 18, len : 4, def : ' ' }
918         },
919         _6 : {
920             BKS : {start : 1, len : 4, def : ' ' }
921         }
922     },
923     Indx : {
924         _8 : {
925             BKS : {start : 31, len : 1, def : '0' },
926             MAP : {start : 31, len : 1, def : '0' }
927         },
928         _6 : {
929             BKS : {start : 14, len : 1, def : '0' },
930             MAP : {start : 14, len : 1, def : '0' }
931         }
932     },
933     Item : {
934         ldr : {
935             MFHD : {start : 18, len : 1, def : 'i' }
936         }
937     },
938     Lang : {
939         _8 : {
940             BKS : {start : 35, len : 3, def : ' ' },
941             SER : {start : 35, len : 3, def : ' ' },
942             VIS : {start : 35, len : 3, def : ' ' },
943             MIX : {start : 35, len : 3, def : ' ' },
944             MAP : {start : 35, len : 3, def : ' ' },
945             SCO : {start : 35, len : 3, def : ' ' },
946             REC : {start : 35, len : 3, def : ' ' },
947             COM : {start : 35, len : 3, def : ' ' }
948         }
949     },
950     LitF : {
951         _8 : {
952             BKS : {start : 33, len : 1, def : '0' }
953         },
954         _6 : {
955             BKS : {start : 16, len : 1, def : '0' }
956         }
957     },
958     LTxt : {
959         _8 : {
960             SCO : {start : 30, len : 2, def : 'n'},
961             REC : {start : 30, len : 2, def : ' '}
962         },
963         _6 : {
964             SCO : {start : 13, len : 2, def : 'n'},
965             REC : {start : 13, len : 2, def : ' '}
966         },
967     },
968     MRec : {
969         _8 : {
970             BKS : {start : 38, len : 1, def : ' ' },
971             SER : {start : 38, len : 1, def : ' ' },
972             VIS : {start : 38, len : 1, def : ' ' },
973             MIX : {start : 38, len : 1, def : ' ' },
974             MAP : {start : 38, len : 1, def : ' ' },
975             SCO : {start : 38, len : 1, def : ' ' },
976             REC : {start : 38, len : 1, def : ' ' },
977             COM : {start : 38, len : 1, def : ' ' }
978         }
979     },
980     Orig : {
981         _8 : {
982             SER : {start : 22, len : 1, def : ' '}
983         },
984         _6 : {
985             SER : {start: 5, len : 1, def: ' '}
986         }
987     },
988     Part : {
989         _8 : {
990             SCO : {start : 21, len : 1, def : ' '},
991             REC : {start : 21, len : 1, def : 'n'}
992         },
993         _6 : {
994             SCO : {start : 4, len : 1, def : ' '},
995             REC : {start : 4, len : 1, def : 'n'}
996         },
997     },
998     Proj : {
999         _8 : {
1000             MAP : {start : 22, len : 2, def : ' ' }
1001         },
1002         _6 : {
1003             MAP: {start : 5, len : 2, def : ' ' }
1004         }
1005     },
1006     RecStat : {
1007         ldr : {
1008             BKS : {start : 5, len : 1, def : 'n' },
1009             SER : {start : 5, len : 1, def : 'n' },
1010             VIS : {start : 5, len : 1, def : 'n' },
1011             MIX : {start : 5, len : 1, def : 'n' },
1012             MAP : {start : 5, len : 1, def : 'n' },
1013             SCO : {start : 5, len : 1, def : 'n' },
1014             REC : {start : 5, len : 1, def : 'n' },
1015             COM : {start : 5, len : 1, def : 'n' },
1016             MFHD: {start : 5, len : 1, def : 'n' },
1017             AUT : {start : 5, len : 1, def : 'n' }
1018         }
1019     },
1020     Regl : {
1021         _8 : {
1022             SER : {start : 19, len : 1, def : ' '}
1023         },
1024         _6 : {
1025             SER : {start : 2, len : 1, def : ' '}
1026         }
1027     },
1028     Relf : {
1029         _8 : {
1030             MAP : {start: 18, len : 4, def : ' '}
1031         },
1032         _6 : {
1033             MAP : {start: 1, len : 4, def : ' '}
1034         }
1035     },
1036     'S/L' : {
1037         _8 : {
1038             SER : {start : 34, len : 1, def : '0' }
1039         },
1040         _6 : {
1041             SER : {start : 17, len : 1, def : '0' }
1042         }
1043     },
1044     SpFM : {
1045         _8 : {
1046             MAP : {start: 33, len : 2, def : ' ' }
1047         },
1048         _6 : {
1049             MAP : {start: 16, len : 2, def : ' '}
1050         }
1051     },
1052     Srce : {
1053         _8 : {
1054             BKS : {start : 39, len : 1, def : 'd' },
1055             SER : {start : 39, len : 1, def : 'd' },
1056             VIS : {start : 39, len : 1, def : 'd' },
1057             SCO : {start : 39, len : 1, def : 'd' },
1058             REC : {start : 39, len : 1, def : 'd' },
1059             COM : {start : 39, len : 1, def : 'd' },
1060             MFHD : {start : 39, len : 1, def : 'd' },
1061             "AUT" : {"start" : 39, "len" : 1, "def" : 'd' }
1062         }
1063     },
1064     SrTp : {
1065         _8 : {
1066             SER : {start : 21, len : 1, def : ' '}
1067         },
1068         _6 : {
1069             SER : {start : 4, len : 1, def : ' '}
1070         }
1071     },
1072     Tech : {
1073         _8 : {
1074             VIS : {start : 34, len : 1, def : ' '}
1075         },
1076         _6 : {
1077             VIS : {start : 17, len : 1, def : ' '}
1078         }
1079     },
1080     Time : {
1081         _8 : {
1082             VIS : {start : 18, len : 3, def : ' '}
1083         },
1084         _6 : {
1085             VIS : {start : 1, len : 3, def : ' '}
1086         }
1087     },
1088     TMat : {
1089         _8 : {
1090             VIS : {start : 33, len : 1, def : ' ' }
1091         },
1092         _6 : {
1093             VIS : {start : 16, len : 1, def : ' ' }
1094         }
1095     },
1096     TrAr : {
1097         _8 : {
1098             SCO : {start : 33, len : 1, def : ' ' },
1099             REC : {start : 33, len : 1, def : 'n' }
1100         },
1101         _6 : {
1102             SCO : {start : 16, len : 1, def : ' ' },
1103             REC : {start : 16, len : 1, def : 'n' }
1104         }
1105     },
1106     Type : {
1107         ldr : {
1108             BKS : {start : 6, len : 1, def : 'a' },
1109             SER : {start : 6, len : 1, def : 'a' },
1110             VIS : {start : 6, len : 1, def : 'g' },
1111             MIX : {start : 6, len : 1, def : 'p' },
1112             MAP : {start : 6, len : 1, def : 'e' },
1113             SCO : {start : 6, len : 1, def : 'c' },
1114             REC : {start : 6, len : 1, def : 'i' },
1115             COM : {start : 6, len : 1, def : 'm' },
1116             AUT : {start : 6, len : 1, def : 'z' },
1117             MFHD : {start : 6, len : 1, def : 'y' }
1118         }
1119     },
1120     "GeoDiv" : {
1121          "_8" : {
1122              "AUT" : {"start" : 6, "len" : 1, "def" : ' ' }
1123          }
1124      },
1125      "Roman" : {
1126          "_8" : {
1127              "AUT" : {"start" : 7, "len" : 1, "def" : ' ' }
1128          }
1129      },
1130      "CatLang" : {
1131          "_8" : {
1132              "AUT" : {"start" : 8, "len" : 1, "def" : ' ' }
1133          }
1134      },
1135      "Kind" : {
1136          "_8" : {
1137              "AUT" : {"start" : 9, "len" : 1, "def" : ' ' }
1138          }
1139      },
1140      "Rules" : {
1141          "_8" : {
1142              "AUT" : {"start" : 10, "len" : 1, "def" : ' ' }
1143          }
1144      },
1145      "Subj" : {
1146          "_8" : {
1147              "AUT" : {"start" : 11, "len" : 1, "def" : ' ' }
1148          }
1149      },
1150      "Series" : {
1151          "_8" : {
1152              "AUT" : {"start" : 12, "len" : 1, "def" : ' ' }
1153          }
1154      },
1155      "SerNum" : {
1156          "_8" : {
1157              "AUT" : {"start" : 13, "len" : 1, "def" : ' ' }
1158          }
1159      },
1160      "NameUse" : {
1161          "_8" : {
1162              "AUT" : {"start" : 14, "len" : 1, "def" : ' ' }
1163          }
1164      },
1165      "SubjUse" : {
1166          "_8" : {
1167              "AUT" : {"start" : 15, "len" : 1, "def" : ' ' }
1168          }
1169      },
1170      "SerUse" : {
1171          "_8" : {
1172              "AUT" : {"start" : 16, "len" : 1, "def" : ' ' }
1173          }
1174      },
1175      "TypeSubd" : {
1176          "_8" : {
1177              "AUT" : {"start" : 17, "len" : 1, "def" : ' ' }
1178          }
1179      },
1180      "GovtAgn" : {
1181          "_8" : {
1182              "AUT" : {"start" : 28, "len" : 1, "def" : ' ' }
1183          }
1184      },
1185      "RefStatus" : {
1186          "_8" : {
1187              "AUT" : {"start" : 29, "len" : 1, "def" : ' ' }
1188          }
1189      },
1190      "UpdStatus" : {
1191          "_8" : {
1192              "AUT" : {"start" : 31, "len" : 1, "def" : ' ' }
1193          }
1194      },
1195      "Name" : {
1196          "_8" : {
1197              "AUT" : {"start" : 32, "len" : 1, "def" : ' ' }
1198          }
1199      },
1200      "Status" : {
1201          "_8" : {
1202              "AUT" : {"start" : 33, "len" : 1, "def" : ' ' }
1203          }
1204      },
1205      "ModRec" : {
1206          "_8" : {
1207              "AUT" : {"start" : 38, "len" : 1, "def" : ' ' }
1208          }
1209      },
1210      "Source" : {
1211          "_8" : {
1212              "AUT" : {"start" : 39, "len" : 1, "def" : ' ' }
1213          }
1214      }
1215 };
1216
1217 MARC.Record._physical_characteristics = {
1218     c : {
1219         label     : "Electronic Resource",
1220         subfields : {
1221             b : {    start : 1,
1222                 len   : 1,
1223                 label : "SMD",
1224                 values: {    a : "Tape Cartridge",
1225                         b : "Chip cartridge",
1226                         c : "Computer optical disk cartridge",
1227                         f : "Tape cassette",
1228                         h : "Tape reel",
1229                         j : "Magnetic disk",
1230                         m : "Magneto-optical disk",
1231                         o : "Optical disk",
1232                         r : "Remote",
1233                         u : "Unspecified",
1234                         z : "Other"
1235                 }
1236             },
1237             d : {    start : 3,
1238                 len   : 1,
1239                 label : "Color",
1240                 values: {    a : "One color",
1241                         b : "Black-and-white",
1242                         c : "Multicolored",
1243                         g : "Gray scale",
1244                         m : "Mixed",
1245                         n : "Not applicable",
1246                         u : "Unknown",
1247                         z : "Other"
1248                 }
1249             },
1250             e : {    start : 4,
1251                 len   : 1,
1252                 label : "Dimensions",
1253                 values: {    a : "3 1/2 in.",
1254                         e : "12 in.",
1255                         g : "4 3/4 in. or 12 cm.",
1256                         i : "1 1/8 x 2 3/8 in.",
1257                         j : "3 7/8 x 2 1/2 in.",
1258                         n : "Not applicable",
1259                         o : "5 1/4 in.",
1260                         u : "Unknown",
1261                         v : "8 in.",
1262                         z : "Other"
1263                 }
1264             },
1265             f : {    start : 5,
1266                 len   : 1,
1267                 label : "Sound",
1268                 values: {    ' ' : "No sound (Silent)",
1269                         a   : "Sound",
1270                         u   : "Unknown"
1271                 }
1272             },
1273             g : {    start : 6,
1274                 len   : 3,
1275                 label : "Image bit depth",
1276                 values: {    mmm   : "Multiple",
1277                         nnn   : "Not applicable",
1278                         '---' : "Unknown"
1279                 }
1280             },
1281             h : {    start : 9,
1282                 len   : 1,
1283                 label : "File formats",
1284                 values: {    a : "One file format",
1285                         m : "Multiple file formats",
1286                         u : "Unknown"
1287                 }
1288             },
1289             i : {    start : 10,
1290                 len   : 1,
1291                 label : "Quality assurance target(s)",
1292                 values: {    a : "Absent",
1293                         n : "Not applicable",
1294                         p : "Present",
1295                         u : "Unknown"
1296                 }
1297             },
1298             j : {    start : 11,
1299                 len   : 1,
1300                 label : "Antecedent/Source",
1301                 values: {    a : "File reproduced from original",
1302                         b : "File reproduced from microform",
1303                         c : "File reproduced from electronic resource",
1304                         d : "File reproduced from an intermediate (not microform)",
1305                         m : "Mixed",
1306                         n : "Not applicable",
1307                         u : "Unknown"
1308                 }
1309             },
1310             k : {    start : 12,
1311                 len   : 1,
1312                 label : "Level of compression",
1313                 values: {    a : "Uncompressed",
1314                         b : "Lossless",
1315                         d : "Lossy",
1316                         m : "Mixed",
1317                         u : "Unknown"
1318                 }
1319             },
1320             l : {    start : 13,
1321                 len   : 1,
1322                 label : "Reformatting quality",
1323                 values: {    a : "Access",
1324                         n : "Not applicable",
1325                         p : "Preservation",
1326                         r : "Replacement",
1327                         u : "Unknown"
1328                 }
1329             }
1330         }
1331     },
1332     d : {
1333         label     : "Globe",
1334         subfields : {
1335             b : {    start : 1,
1336                 len   : 1,
1337                 label : "SMD",
1338                 values: {    a : "Celestial globe",
1339                         b : "Planetary or lunar globe",
1340                         c : "Terrestrial globe",
1341                         e : "Earth moon globe",
1342                         u : "Unspecified",
1343                         z : "Other"
1344                 }
1345             },
1346             d : {    start : 3,
1347                 len   : 1,
1348                 label : "Color",
1349                 values: {    a : "One color",
1350                         c : "Multicolored"
1351                 }
1352             },
1353             e : {    start : 4,
1354                 len   : 1,
1355                 label : "Physical medium",
1356                 values: {    a : "Paper",
1357                         b : "Wood",
1358                         c : "Stone",
1359                         d : "Metal",
1360                         e : "Synthetics",
1361                         f : "Skins",
1362                         g : "Textile",
1363                         p : "Plaster",
1364                         u : "Unknown",
1365                         z : "Other"
1366                 }
1367             },
1368             f : {    start : 5,
1369                 len   : 1,
1370                 label : "Type of reproduction",
1371                 values: {    f : "Facsimile",
1372                         n : "Not applicable",
1373                         u : "Unknown",
1374                         z : "Other"
1375                 }
1376             }
1377         }
1378     },
1379     a : {
1380         label     : "Map",
1381         subfields : {
1382             b : {    start : 1,
1383                 len   : 1,
1384                 label : "SMD",
1385                 values: {    d : "Atlas",
1386                         g : "Diagram",
1387                         j : "Map",
1388                         k : "Profile",
1389                         q : "Model",
1390                         r : "Remote-sensing image",
1391                         s : "Section",
1392                         u : "Unspecified",
1393                         y : "View",
1394                         z : "Other"
1395                 }
1396             },
1397             d : {    start : 3,
1398                 len   : 1,
1399                 label : "Color",
1400                 values: {    a : "One color",
1401                         c : "Multicolored"
1402                 }
1403             },
1404             e : {    start : 4,
1405                 len   : 1,
1406                 label : "Physical medium",
1407                 values: {    a : "Paper",
1408                         b : "Wood",
1409                         c : "Stone",
1410                         d : "Metal",
1411                         e : "Synthetics",
1412                         f : "Skins",
1413                         g : "Textile",
1414                         p : "Plaster",
1415                         q : "Flexible base photographic medium, positive",
1416                         r : "Flexible base photographic medium, negative",
1417                         s : "Non-flexible base photographic medium, positive",
1418                         t : "Non-flexible base photographic medium, negative",
1419                         u : "Unknown",
1420                         y : "Other photographic medium",
1421                         z : "Other"
1422                 }
1423             },
1424             f : {    start : 5,
1425                 len   : 1,
1426                 label : "Type of reproduction",
1427                 values: {    f : "Facsimile",
1428                         n : "Not applicable",
1429                         u : "Unknown",
1430                         z : "Other"
1431                 }
1432             },
1433             g : {    start : 6,
1434                 len   : 1,
1435                 label : "Production/reproduction details",
1436                 values: {    a : "Photocopy, blueline print",
1437                         b : "Photocopy",
1438                         c : "Pre-production",
1439                         d : "Film",
1440                         u : "Unknown",
1441                         z : "Other"
1442                 }
1443             },
1444             h : {    start : 7,
1445                 len   : 1,
1446                 label : "Positive/negative",
1447                 values: {    a : "Positive",
1448                         b : "Negative",
1449                         m : "Mixed",
1450                         n : "Not applicable"
1451                 }
1452             }
1453         }
1454     },
1455     h : {
1456         label     : "Microform",
1457         subfields : {
1458             b : {    start : 1,
1459                 len   : 1,
1460                 label : "SMD",
1461                 values: {    a : "Aperture card",
1462                         b : "Microfilm cartridge",
1463                         c : "Microfilm cassette",
1464                         d : "Microfilm reel",
1465                         e : "Microfiche",
1466                         f : "Microfiche cassette",
1467                         g : "Microopaque",
1468                         u : "Unspecified",
1469                         z : "Other"
1470                 }
1471             },
1472             d : {    start : 3,
1473                 len   : 1,
1474                 label : "Positive/negative",
1475                 values: {    a : "Positive",
1476                         b : "Negative",
1477                         m : "Mixed",
1478                         u : "Unknown"
1479                 }
1480             },
1481             e : {    start : 4,
1482                 len   : 1,
1483                 label : "Dimensions",
1484                 values: {    a : "8 mm.",
1485                         e : "16 mm.",
1486                         f : "35 mm.",
1487                         g : "70mm.",
1488                         h : "105 mm.",
1489                         l : "3 x 5 in. (8 x 13 cm.)",
1490                         m : "4 x 6 in. (11 x 15 cm.)",
1491                         o : "6 x 9 in. (16 x 23 cm.)",
1492                         p : "3 1/4 x 7 3/8 in. (9 x 19 cm.)",
1493                         u : "Unknown",
1494                         z : "Other"
1495                 }
1496             },
1497             f : {    start : 5,
1498                 len   : 4,
1499                 label : "Reduction ratio range/Reduction ratio",
1500                 values: {    a : "Low (1-16x)",
1501                         b : "Normal (16-30x)",
1502                         c : "High (31-60x)",
1503                         d : "Very high (61-90x)",
1504                         e : "Ultra (90x-)",
1505                         u : "Unknown",
1506                         v : "Reduction ratio varies"
1507                 }
1508             },
1509             g : {    start : 9,
1510                 len   : 1,
1511                 label : "Color",
1512                 values: {    b : "Black-and-white",
1513                         c : "Multicolored",
1514                         m : "Mixed",
1515                         u : "Unknown",
1516                         z : "Other"
1517                 }
1518             },
1519             h : {    start : 10,
1520                 len   : 1,
1521                 label : "Emulsion on film",
1522                 values: {    a : "Silver halide",
1523                         b : "Diazo",
1524                         c : "Vesicular",
1525                         m : "Mixed",
1526                         n : "Not applicable",
1527                         u : "Unknown",
1528                         z : "Other"
1529                 }
1530             },
1531             i : {    start : 11,
1532                 len   : 1,
1533                 label : "Quality assurance target(s)",
1534                 values: {    a : "1st gen. master",
1535                         b : "Printing master",
1536                         c : "Service copy",
1537                         m : "Mixed generation",
1538                         u : "Unknown"
1539                 }
1540             },
1541             j : {    start : 12,
1542                 len   : 1,
1543                 label : "Base of film",
1544                 values: {    a : "Safety base, undetermined",
1545                         c : "Safety base, acetate undetermined",
1546                         d : "Safety base, diacetate",
1547                         l : "Nitrate base",
1548                         m : "Mixed base",
1549                         n : "Not applicable",
1550                         p : "Safety base, polyester",
1551                         r : "Safety base, mixed",
1552                         t : "Safety base, triacetate",
1553                         u : "Unknown",
1554                         z : "Other"
1555                 }
1556             }
1557         }
1558     },
1559     m : {
1560         label     : "Motion Picture",
1561         subfields : {
1562             b : {    start : 1,
1563                 len   : 1,
1564                 label : "SMD",
1565                 values: {    a : "Film cartridge",
1566                         f : "Film cassette",
1567                         r : "Film reel",
1568                         u : "Unspecified",
1569                         z : "Other"
1570                 }
1571             },
1572             d : {    start : 3,
1573                 len   : 1,
1574                 label : "Color",
1575                 values: {    b : "Black-and-white",
1576                         c : "Multicolored",
1577                         h : "Hand-colored",
1578                         m : "Mixed",
1579                         u : "Unknown",
1580                         z : "Other"
1581                 }
1582             },
1583             e : {    start : 4,
1584                 len   : 1,
1585                 label : "Motion picture presentation format",
1586                 values: {    a : "Standard sound aperture, reduced frame",
1587                         b : "Nonanamorphic (wide-screen)",
1588                         c : "3D",
1589                         d : "Anamorphic (wide-screen)",
1590                         e : "Other-wide screen format",
1591                         f : "Standard. silent aperture, full frame",
1592                         u : "Unknown",
1593                         z : "Other"
1594                 }
1595             },
1596             f : {    start : 5,
1597                 len   : 1,
1598                 label : "Sound on medium or separate",
1599                 values: {    a : "Sound on medium",
1600                         b : "Sound separate from medium",
1601                         u : "Unknown"
1602                 }
1603             },
1604             g : {    start : 6,
1605                 len   : 1,
1606                 label : "Medium for sound",
1607                 values: {    a : "Optical sound track on motion picture film",
1608                         b : "Magnetic sound track on motion picture film",
1609                         c : "Magnetic audio tape in cartridge",
1610                         d : "Sound disc",
1611                         e : "Magnetic audio tape on reel",
1612                         f : "Magnetic audio tape in cassette",
1613                         g : "Optical and magnetic sound track on film",
1614                         h : "Videotape",
1615                         i : "Videodisc",
1616                         u : "Unknown",
1617                         z : "Other"
1618                 }
1619             },
1620             h : {    start : 7,
1621                 len   : 1,
1622                 label : "Dimensions",
1623                 values: {    a : "Standard 8 mm.",
1624                         b : "Super 8 mm./single 8 mm.",
1625                         c : "9.5 mm.",
1626                         d : "16 mm.",
1627                         e : "28 mm.",
1628                         f : "35 mm.",
1629                         g : "70 mm.",
1630                         u : "Unknown",
1631                         z : "Other"
1632                 }
1633             },
1634             i : {    start : 8,
1635                 len   : 1,
1636                 label : "Configuration of playback channels",
1637                 values: {    k : "Mixed",
1638                         m : "Monaural",
1639                         n : "Not applicable",
1640                         q : "Multichannel, surround or quadraphonic",
1641                         s : "Stereophonic",
1642                         u : "Unknown",
1643                         z : "Other"
1644                 }
1645             },
1646             j : {    start : 9,
1647                 len   : 1,
1648                 label : "Production elements",
1649                 values: {    a : "Work print",
1650                         b : "Trims",
1651                         c : "Outtakes",
1652                         d : "Rushes",
1653                         e : "Mixing tracks",
1654                         f : "Title bands/inter-title rolls",
1655                         g : "Production rolls",
1656                         n : "Not applicable",
1657                         z : "Other"
1658                 }
1659             }
1660         }
1661     },
1662     k : {
1663         label     : "Non-projected Graphic",
1664         subfields : {
1665             b : {    start : 1,
1666                 len   : 1,
1667                 label : "SMD",
1668                 values: {    c : "Collage",
1669                         d : "Drawing",
1670                         e : "Painting",
1671                         f : "Photo-mechanical print",
1672                         g : "Photonegative",
1673                         h : "Photoprint",
1674                         i : "Picture",
1675                         j : "Print",
1676                         l : "Technical drawing",
1677                         n : "Chart",
1678                         o : "Flash/activity card",
1679                         u : "Unspecified",
1680                         z : "Other"
1681                 }
1682             },
1683             d : {    start : 3,
1684                 len   : 1,
1685                 label : "Color",
1686                 values: {    a : "One color",
1687                         b : "Black-and-white",
1688                         c : "Multicolored",
1689                         h : "Hand-colored",
1690                         m : "Mixed",
1691                         u : "Unknown",
1692                         z : "Other"
1693                 }
1694             },
1695             e : {    start : 4,
1696                 len   : 1,
1697                 label : "Primary support material",
1698                 values: {    a : "Canvas",
1699                         b : "Bristol board",
1700                         c : "Cardboard/illustration board",
1701                         d : "Glass",
1702                         e : "Synthetics",
1703                         f : "Skins",
1704                         g : "Textile",
1705                         h : "Metal",
1706                         m : "Mixed collection",
1707                         o : "Paper",
1708                         p : "Plaster",
1709                         q : "Hardboard",
1710                         r : "Porcelain",
1711                         s : "Stone",
1712                         t : "Wood",
1713                         u : "Unknown",
1714                         z : "Other"
1715                 }
1716             },
1717             f : {    start : 5,
1718                 len   : 1,
1719                 label : "Secondary support material",
1720                 values: {    a : "Canvas",
1721                         b : "Bristol board",
1722                         c : "Cardboard/illustration board",
1723                         d : "Glass",
1724                         e : "Synthetics",
1725                         f : "Skins",
1726                         g : "Textile",
1727                         h : "Metal",
1728                         m : "Mixed collection",
1729                         o : "Paper",
1730                         p : "Plaster",
1731                         q : "Hardboard",
1732                         r : "Porcelain",
1733                         s : "Stone",
1734                         t : "Wood",
1735                         u : "Unknown",
1736                         z : "Other"
1737                 }
1738             }
1739         }
1740     },
1741     g : {
1742         label     : "Projected Graphic",
1743         subfields : {
1744             b : {    start : 1,
1745                 len   : 1,
1746                 label : "SMD",
1747                 values: {    c : "Film cartridge",
1748                         d : "Filmstrip",
1749                         f : "Film filmstrip type",
1750                         o : "Filmstrip roll",
1751                         s : "Slide",
1752                         t : "Transparency",
1753                         z : "Other"
1754                 }
1755             },
1756             d : {    start : 3,
1757                 len   : 1,
1758                 label : "Color",
1759                 values: {    b : "Black-and-white",
1760                         c : "Multicolored",
1761                         h : "Hand-colored",
1762                         m : "Mixed",
1763                         n : "Not applicable",
1764                         u : "Unknown",
1765                         z : "Other"
1766                 }
1767             },
1768             e : {    start : 4,
1769                 len   : 1,
1770                 label : "Base of emulsion",
1771                 values: {    d : "Glass",
1772                         e : "Synthetics",
1773                         j : "Safety film",
1774                         k : "Film base, other than safety film",
1775                         m : "Mixed collection",
1776                         o : "Paper",
1777                         u : "Unknown",
1778                         z : "Other"
1779                 }
1780             },
1781             f : {    start : 5,
1782                 len   : 1,
1783                 label : "Sound on medium or separate",
1784                 values: {    a : "Sound on medium",
1785                         b : "Sound separate from medium",
1786                         u : "Unknown"
1787                 }
1788             },
1789             g : {    start : 6,
1790                 len   : 1,
1791                 label : "Medium for sound",
1792                 values: {    a : "Optical sound track on motion picture film",
1793                         b : "Magnetic sound track on motion picture film",
1794                         c : "Magnetic audio tape in cartridge",
1795                         d : "Sound disc",
1796                         e : "Magnetic audio tape on reel",
1797                         f : "Magnetic audio tape in cassette",
1798                         g : "Optical and magnetic sound track on film",
1799                         h : "Videotape",
1800                         i : "Videodisc",
1801                         u : "Unknown",
1802                         z : "Other"
1803                 }
1804             },
1805             h : {    start : 7,
1806                 len   : 1,
1807                 label : "Dimensions",
1808                 values: {    a : "Standard 8 mm.",
1809                         b : "Super 8 mm./single 8 mm.",
1810                         c : "9.5 mm.",
1811                         d : "16 mm.",
1812                         e : "28 mm.",
1813                         f : "35 mm.",
1814                         g : "70 mm.",
1815                         j : "2 x 2 in. (5 x 5 cm.)",
1816                         k : "2 1/4 x 2 1/4 in. (6 x 6 cm.)",
1817                         s : "4 x 5 in. (10 x 13 cm.)",
1818                         t : "5 x 7 in. (13 x 18 cm.)",
1819                         v : "8 x 10 in. (21 x 26 cm.)",
1820                         w : "9 x 9 in. (23 x 23 cm.)",
1821                         x : "10 x 10 in. (26 x 26 cm.)",
1822                         y : "7 x 7 in. (18 x 18 cm.)",
1823                         u : "Unknown",
1824                         z : "Other"
1825                 }
1826             },
1827             i : {    start : 8,
1828                 len   : 1,
1829                 label : "Secondary support material",
1830                 values: {    c : "Cardboard",
1831                         d : "Glass",
1832                         e : "Synthetics",
1833                         h : "metal",
1834                         j : "Metal and glass",
1835                         k : "Synthetics and glass",
1836                         m : "Mixed collection",
1837                         u : "Unknown",
1838                         z : "Other"
1839                 }
1840             }
1841         }
1842     },
1843     r : {
1844         label     : "Remote-sensing Image",
1845         subfields : {
1846             b : {    start : 1,
1847                 len   : 1,
1848                 label : "SMD",
1849                 values: { u : "Unspecified" }
1850             },
1851             d : {    start : 3,
1852                 len   : 1,
1853                 label : "Altitude of sensor",
1854                 values: {    a : "Surface",
1855                         b : "Airborne",
1856                         c : "Spaceborne",
1857                         n : "Not applicable",
1858                         u : "Unknown",
1859                         z : "Other"
1860                 }
1861             },
1862             e : {    start : 4,
1863                 len   : 1,
1864                 label : "Attitude of sensor",
1865                 values: {    a : "Low oblique",
1866                         b : "High oblique",
1867                         c : "Vertical",
1868                         n : "Not applicable",
1869                         u : "Unknown"
1870                 }
1871             },
1872             f : {    start : 5,
1873                 len   : 1,
1874                 label : "Cloud cover",
1875                 values: {    0 : "0-09%",
1876                         1 : "10-19%",
1877                         2 : "20-29%",
1878                         3 : "30-39%",
1879                         4 : "40-49%",
1880                         5 : "50-59%",
1881                         6 : "60-69%",
1882                         7 : "70-79%",
1883                         8 : "80-89%",
1884                         9 : "90-100%",
1885                         n : "Not applicable",
1886                         u : "Unknown"
1887                 }
1888             },
1889             g : {    start : 6,
1890                 len   : 1,
1891                 label : "Platform construction type",
1892                 values: {    a : "Balloon",
1893                         b : "Aircraft-low altitude",
1894                         c : "Aircraft-medium altitude",
1895                         d : "Aircraft-high altitude",
1896                         e : "Manned spacecraft",
1897                         f : "Unmanned spacecraft",
1898                         g : "Land-based remote-sensing device",
1899                         h : "Water surface-based remote-sensing device",
1900                         i : "Submersible remote-sensing device",
1901                         n : "Not applicable",
1902                         u : "Unknown",
1903                         z : "Other"
1904                 }
1905             },
1906             h : {    start : 7,
1907                 len   : 1,
1908                 label : "Platform use category",
1909                 values: {    a : "Meteorological",
1910                         b : "Surface observing",
1911                         c : "Space observing",
1912                         m : "Mixed uses",
1913                         n : "Not applicable",
1914                         u : "Unknown",
1915                         z : "Other"
1916                 }
1917             },
1918             i : {    start : 8,
1919                 len   : 1,
1920                 label : "Sensor type",
1921                 values: {    a : "Active",
1922                         b : "Passive",
1923                         u : "Unknown",
1924                         z : "Other"
1925                 }
1926             },
1927             j : {    start : 9,
1928                 len   : 2,
1929                 label : "Data type",
1930                 values: {    nn : "Not applicable",
1931                         uu : "Unknown",
1932                         zz : "Other",
1933                         aa : "Visible light",
1934                         da : "Near infrared",
1935                         db : "Middle infrared",
1936                         dc : "Far infrared",
1937                         dd : "Thermal infrared",
1938                         de : "Shortwave infrared (SWIR)",
1939                         df : "Reflective infrared",
1940                         dv : "Combinations",
1941                         dz : "Other infrared data",
1942                         ga : "Sidelooking airborne radar (SLAR)",
1943                         gb : "Synthetic aperture radar (SAR-single frequency)",
1944                         gc : "SAR-multi-frequency (multichannel)",
1945                         gd : "SAR-like polarization",
1946                         ge : "SAR-cross polarization",
1947                         gf : "Infometric SAR",
1948                         gg : "Polarmetric SAR",
1949                         gu : "Passive microwave mapping",
1950                         gz : "Other microwave data",
1951                         ja : "Far ultraviolet",
1952                         jb : "Middle ultraviolet",
1953                         jc : "Near ultraviolet",
1954                         jv : "Ultraviolet combinations",
1955                         jz : "Other ultraviolet data",
1956                         ma : "Multi-spectral, multidata",
1957                         mb : "Multi-temporal",
1958                         mm : "Combination of various data types",
1959                         pa : "Sonar-water depth",
1960                         pb : "Sonar-bottom topography images, sidescan",
1961                         pc : "Sonar-bottom topography, near-surface",
1962                         pd : "Sonar-bottom topography, near-bottom",
1963                         pe : "Seismic surveys",
1964                         pz : "Other acoustical data",
1965                         ra : "Gravity anomales (general)",
1966                         rb : "Free-air",
1967                         rc : "Bouger",
1968                         rd : "Isostatic",
1969                         sa : "Magnetic field",
1970                         ta : "Radiometric surveys"
1971                 }
1972             }
1973         }
1974     },
1975     s : {
1976         label     : "Sound Recording",
1977         subfields : {
1978             b : {    start : 1,
1979                 len   : 1,
1980                 label : "SMD",
1981                 values: {    d : "Sound disc",
1982                         e : "Cylinder",
1983                         g : "Sound cartridge",
1984                         i : "Sound-track film",
1985                         q : "Roll",
1986                         s : "Sound cassette",
1987                         t : "Sound-tape reel",
1988                         u : "Unspecified",
1989                         w : "Wire recording",
1990                         z : "Other"
1991                 }
1992             },
1993             d : {    start : 3,
1994                 len   : 1,
1995                 label : "Speed",
1996                 values: {    a : "16 rpm",
1997                         b : "33 1/3 rpm",
1998                         c : "45 rpm",
1999                         d : "78 rpm",
2000                         e : "8 rpm",
2001                         f : "1.4 mps",
2002                         h : "120 rpm",
2003                         i : "160 rpm",
2004                         k : "15/16 ips",
2005                         l : "1 7/8 ips",
2006                         m : "3 3/4 ips",
2007                         o : "7 1/2 ips",
2008                         p : "15 ips",
2009                         r : "30 ips",
2010                         u : "Unknown",
2011                         z : "Other"
2012                 }
2013             },
2014             e : {    start : 4,
2015                 len   : 1,
2016                 label : "Configuration of playback channels",
2017                 values: {    m : "Monaural",
2018                         q : "Quadraphonic",
2019                         s : "Stereophonic",
2020                         u : "Unknown",
2021                         z : "Other"
2022                 }
2023             },
2024             f : {    start : 5,
2025                 len   : 1,
2026                 label : "Groove width or pitch",
2027                 values: {    m : "Microgroove/fine",
2028                         n : "Not applicable",
2029                         s : "Coarse/standard",
2030                         u : "Unknown",
2031                         z : "Other"
2032                 }
2033             },
2034             g : {    start : 6,
2035                 len   : 1,
2036                 label : "Dimensions",
2037                 values: {    a : "3 in.",
2038                         b : "5 in.",
2039                         c : "7 in.",
2040                         d : "10 in.",
2041                         e : "12 in.",
2042                         f : "16 in.",
2043                         g : "4 3/4 in. (12 cm.)",
2044                         j : "3 7/8 x 2 1/2 in.",
2045                         o : "5 1/4 x 3 7/8 in.",
2046                         s : "2 3/4 x 4 in.",
2047                         n : "Not applicable",
2048                         u : "Unknown",
2049                         z : "Other"
2050                 }
2051             },
2052             h : {    start : 7,
2053                 len   : 1,
2054                 label : "Tape width",
2055                 values: {    l : "1/8 in.",
2056                         m : "1/4in.",
2057                         n : "Not applicable",
2058                         o : "1/2 in.",
2059                         p : "1 in.",
2060                         u : "Unknown",
2061                         z : "Other"
2062                 }
2063             },
2064             i : {    start : 8,
2065                 len   : 1,
2066                 label : "Tape configuration ",
2067                 values: {    a : "Full (1) track",
2068                         b : "Half (2) track",
2069                         c : "Quarter (4) track",
2070                         d : "8 track",
2071                         e : "12 track",
2072                         f : "16 track",
2073                         n : "Not applicable",
2074                         u : "Unknown",
2075                         z : "Other"
2076                 }
2077             },
2078             m : {    start : 12,
2079                 len   : 1,
2080                 label : "Special playback",
2081                 values: {    a : "NAB standard",
2082                         b : "CCIR standard",
2083                         c : "Dolby-B encoded, standard Dolby",
2084                         d : "dbx encoded",
2085                         e : "Digital recording",
2086                         f : "Dolby-A encoded",
2087                         g : "Dolby-C encoded",
2088                         h : "CX encoded",
2089                         n : "Not applicable",
2090                         u : "Unknown",
2091                         z : "Other"
2092                 }
2093             },
2094             n : {    start : 13,
2095                 len   : 1,
2096                 label : "Capture and storage",
2097                 values: {    a : "Acoustical capture, direct storage",
2098                         b : "Direct storage, not acoustical",
2099                         d : "Digital storage",
2100                         e : "Analog electrical storage",
2101                         u : "Unknown",
2102                         z : "Other"
2103                 }
2104             }
2105         }
2106     },
2107     f : {
2108         label     : "Tactile Material",
2109         subfields : {
2110             b : {    start : 1,
2111                 len   : 1,
2112                 label : "SMD",
2113                 values: {    a : "Moon",
2114                         b : "Braille",
2115                         c : "Combination",
2116                         d : "Tactile, with no writing system",
2117                         u : "Unspecified",
2118                         z : "Other"
2119                 }
2120             },
2121             d : {    start : 3,
2122                 len   : 2,
2123                 label : "Class of braille writing",
2124                 values: {    a : "Literary braille",
2125                         b : "Format code braille",
2126                         c : "Mathematics and scientific braille",
2127                         d : "Computer braille",
2128                         e : "Music braille",
2129                         m : "Multiple braille types",
2130                         n : "Not applicable",
2131                         u : "Unknown",
2132                         z : "Other"
2133                 }
2134             },
2135             e : {    start : 4,
2136                 len   : 1,
2137                 label : "Level of contraction",
2138                 values: {    a : "Uncontracted",
2139                         b : "Contracted",
2140                         m : "Combination",
2141                         n : "Not applicable",
2142                         u : "Unknown",
2143                         z : "Other"
2144                 }
2145             },
2146             f : {    start : 6,
2147                 len   : 3,
2148                 label : "Braille music format",
2149                 values: {    a : "Bar over bar",
2150                         b : "Bar by bar",
2151                         c : "Line over line",
2152                         d : "Paragraph",
2153                         e : "Single line",
2154                         f : "Section by section",
2155                         g : "Line by line",
2156                         h : "Open score",
2157                         i : "Spanner short form scoring",
2158                         j : "Short form scoring",
2159                         k : "Outline",
2160                         l : "Vertical score",
2161                         n : "Not applicable",
2162                         u : "Unknown",
2163                         z : "Other"
2164                 }
2165             },
2166             g : {    start : 9,
2167                 len   : 1,
2168                 label : "Special physical characteristics",
2169                 values: {    a : "Print/braille",
2170                         b : "Jumbo or enlarged braille",
2171                         n : "Not applicable",
2172                         u : "Unknown",
2173                         z : "Other"
2174                 }
2175             }
2176         }
2177     },
2178     v : {
2179         label     : "Videorecording",
2180         subfields : {
2181             b : {    start : 1,
2182                 len   : 1,
2183                 label : "SMD",
2184                 values: {     c : "Videocartridge",
2185                         d : "Videodisc",
2186                         f : "Videocassette",
2187                         r : "Videoreel",
2188                         u : "Unspecified",
2189                         z : "Other"
2190                 }
2191             },
2192             d : {    start : 3,
2193                 len   : 1,
2194                 label : "Color",
2195                 values: {    b : "Black-and-white",
2196                         c : "Multicolored",
2197                         m : "Mixed",
2198                         n : "Not applicable",
2199                         u : "Unknown",
2200                         z : "Other"
2201                 }
2202             },
2203             e : {    start : 4,
2204                 len   : 1,
2205                 label : "Videorecording format",
2206                 values: {    a : "Beta",
2207                         b : "VHS",
2208                         c : "U-matic",
2209                         d : "EIAJ",
2210                         e : "Type C",
2211                         f : "Quadruplex",
2212                         g : "Laserdisc",
2213                         h : "CED",
2214                         i : "Betacam",
2215                         j : "Betacam SP",
2216                         k : "Super-VHS",
2217                         m : "M-II",
2218                         o : "D-2",
2219                         p : "8 mm.",
2220                         q : "Hi-8 mm.",
2221                         u : "Unknown",
2222                         v : "DVD",
2223                         z : "Other"
2224                 }
2225             },
2226             f : {    start : 5,
2227                 len   : 1,
2228                 label : "Sound on medium or separate",
2229                 values: {    a : "Sound on medium",
2230                         b : "Sound separate from medium",
2231                         u : "Unknown"
2232                 }
2233             },
2234             g : {    start : 6,
2235                 len   : 1,
2236                 label : "Medium for sound",
2237                 values: {    a : "Optical sound track on motion picture film",
2238                         b : "Magnetic sound track on motion picture film",
2239                         c : "Magnetic audio tape in cartridge",
2240                         d : "Sound disc",
2241                         e : "Magnetic audio tape on reel",
2242                         f : "Magnetic audio tape in cassette",
2243                         g : "Optical and magnetic sound track on motion picture film",
2244                         h : "Videotape",
2245                         i : "Videodisc",
2246                         u : "Unknown",
2247                         z : "Other"
2248                 }
2249             },
2250             h : {    start : 7,
2251                 len   : 1,
2252                 label : "Dimensions",
2253                 values: {    a : "8 mm.",
2254                         m : "1/4 in.",
2255                         o : "1/2 in.",
2256                         p : "1 in.",
2257                         q : "2 in.",
2258                         r : "3/4 in.",
2259                         u : "Unknown",
2260                         z : "Other"
2261                 }
2262             },
2263             i : {    start : 8,
2264                 len   : 1,
2265                 label : "Configuration of playback channel",
2266                 values: {    k : "Mixed",
2267                         m : "Monaural",
2268                         n : "Not applicable",
2269                         q : "Multichannel, surround or quadraphonic",
2270                         s : "Stereophonic",
2271                         u : "Unknown",
2272                         z : "Other"
2273                 }
2274             }
2275         }
2276     }
2277 };
2278