heading_text := '';
FOR acsaf IN SELECT * FROM authority.control_set_authority_field WHERE control_set = cset AND main_entry IS NULL LOOP
- tag_use := acsaf.tag;
+ tag_used := acsaf.tag;
FOR sf IN SELECT * FROM regexp_split_to_table(acsaf.sf_list,'') LOOP
tmp_text := oils_xpath_string('//*[@tag="'||tag_used||'"]/*[@code="'||sf||'"]', marcxml);
IF tmp_text IS NOT NULL THEN
- heading_text := heading_text || E'\U2021' || sf || ' ' || tmp_text;
+ heading_text := heading_text || E'\u2021' || sf || ' ' || tmp_text;
END IF;
END LOOP;
EXIT WHEN heading_text <> '';
auth_field := XPATH('//*[@tag="'||main_entry.tag||'"][1]',source_xml);
IF ARRAY_LENGTH(auth_field) > 0 THEN
FOR bib_field IN SELECT * FROM authority.control_set_bib_field WHERE authority_field = main_entry.id LOOP
- replace_data := replace_data || XMLELEMENT( name datafield, bib_field.tag AS tag, XPATH('//*[local-name()="subfield"]',auth_field[1])::XML[]);
+ replace_data := replace_data || XMLELEMENT( name datafield, XMLATTRIBUTES(bib_field.tag AS tag), XPATH('//*[local-name()="subfield"]',auth_field[1])::XML[]);
replace_rules := replace_rules || ( bib_field.tag || main_entry.sf_list || E'[0~\\)' || auth_id || '$]' );
END LOOP;
EXIT;
RETURN XMLELEMENT(
name record,
- XMLATTRIBUTES('http://www.loc.gov/MARC21/slim' AS xmlns)
+ XMLATTRIBUTES('http://www.loc.gov/MARC21/slim' AS xmlns),
XMLELEMENT( name leader, '00881nam a2200193 4500'),
replace_data,
XMLELEMENT(
name datafield,
- '905' AS tag,
- ' ' AS ind1,
- ' ' AS ind2,
+ XMLATTRIBUTES( '905' AS tag, ' ' AS ind1, ' ' AS ind2),
XMLELEMENT(
name subfield,
- 'r' AS code,
+ XMLATTRIBUTES('r' AS code),
ARRAY_TO_STRING(replace_rules,',')
)
)
('subject', 7 ),
('subject', 12);
-INSERT INTO authority.control_set_bib_field (tag, authority_field) VALUES
+INSERT INTO authority.control_set_bib_field (tag, authority_field)
SELECT '100', id FROM authority.control_set_authority_field WHERE tag IN ('100')
UNION
SELECT '600', id FROM authority.control_set_authority_field WHERE tag IN ('100','180','181','182','185')
('r', oils_i18n_gettext('r','Art and Architecture Thesaurus','at','name'), 1),
('s', oils_i18n_gettext('s','Sears List of Subject Headings','at','name'), 1),
('v', oils_i18n_gettext('v','Repertoire de vedettes-matiere','at','name'), 1),
- ('z', oils_i18n_gettext('z','Other','at','name') 1),
- ('|', oils_i18n_gettext('|','No attempt to code','at','name') 1);
+ ('z', oils_i18n_gettext('z','Other','at','name'), 1),
+ ('|', oils_i18n_gettext('|','No attempt to code','at','name'), 1);
vandelay.marc21_extract_fixed_field(marc,'RecStat'),
vandelay.marc21_extract_fixed_field(marc,'ELvl'),
vandelay.marc21_extract_fixed_field(marc,'Subj')
- FROM authority.record
+ FROM authority.record_entry
WHERE id = auth_id;
RETURN;
END;