LP#1744385: Various improvements based on testing
authorMike Rylander <mrylander@gmail.com>
Fri, 9 Feb 2018 20:19:31 +0000 (15:19 -0500)
committerDan Wells <dbw2@calvin.edu>
Wed, 28 Feb 2018 21:18:49 +0000 (16:18 -0500)
 * Improve author and publisher display fields
 * Reimplement Simple Record Extracts using Display Fields
 * Address potential failure in combined search collection
 * Provide useful helper function for inspecting transformed records
 * Implement MODS transforms specified by LoC documentation but not
   actually included in the stylesheet
 * Expand highlighting use to publisher, edition, and physical description
 * Reifying schema from updates

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/sql/Pg/030.schema.metabib.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/999.functions.global.sql
Open-ILS/src/sql/Pg/reporter-schema.sql
Open-ILS/src/sql/Pg/upgrade/WWWW.data.display-field-seed-data.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.highlight_search.sql
Open-ILS/src/sql/Pg/upgrade/YYYY.data.mods-title-punctuation-change.sql
Open-ILS/src/templates/opac/parts/record/summary.tt2

index 2f37b55..bc72c89 100644 (file)
@@ -245,25 +245,25 @@ CREATE VIEW metabib.wide_display_entry AS
    This VIEW expands as well-known display fields are added. */
     SELECT
         bre.id AS source,
-        COALESCE(mcde_title.value, 'null') AS title,
-        COALESCE(mcde_author.value, 'null') AS author,
-        COALESCE(mcde_subject_geographic.value, 'null') AS subject_geographic,
-        COALESCE(mcde_subject_name.value, 'null') AS subject_name,
-        COALESCE(mcde_subject_temporal.value, 'null') AS subject_temporal,
-        COALESCE(mcde_subject_topic.value, 'null') AS subject_topic,
-        COALESCE(mcde_creators.value, 'null') AS creators,
-        COALESCE(mcde_isbn.value, 'null') AS isbn,
-        COALESCE(mcde_issn.value, 'null') AS issn,
-        COALESCE(mcde_upc.value, 'null') AS upc,
-        COALESCE(mcde_tcn.value, 'null') AS tcn,
-        COALESCE(mcde_edition.value, 'null') AS edition,
-        COALESCE(mcde_physical_description.value, 'null') AS physical_description,
-        COALESCE(mcde_publisher.value, 'null') AS publisher,
-        COALESCE(mcde_series_title.value, 'null') AS series_title,
-        COALESCE(mcde_abstract.value, 'null') AS abstract,
-        COALESCE(mcde_toc.value, 'null') AS toc,
-        COALESCE(mcde_pubdate.value, 'null') AS pubdate,
-        COALESCE(mcde_type_of_resource.value, 'null') AS type_of_resource
+        COALESCE(mcde_title.value, 'null')::TEXT AS title,
+        COALESCE(mcde_author.value, 'null')::TEXT AS author,
+        COALESCE(mcde_subject_geographic.value, 'null')::TEXT AS subject_geographic,
+        COALESCE(mcde_subject_name.value, 'null')::TEXT AS subject_name,
+        COALESCE(mcde_subject_temporal.value, 'null')::TEXT AS subject_temporal,
+        COALESCE(mcde_subject_topic.value, 'null')::TEXT AS subject_topic,
+        COALESCE(mcde_creators.value, 'null')::TEXT AS creators,
+        COALESCE(mcde_isbn.value, 'null')::TEXT AS isbn,
+        COALESCE(mcde_issn.value, 'null')::TEXT AS issn,
+        COALESCE(mcde_upc.value, 'null')::TEXT AS upc,
+        COALESCE(mcde_tcn.value, 'null')::TEXT AS tcn,
+        COALESCE(mcde_edition.value, 'null')::TEXT AS edition,
+        COALESCE(mcde_physical_description.value, 'null')::TEXT AS physical_description,
+        COALESCE(mcde_publisher.value, 'null')::TEXT AS publisher,
+        COALESCE(mcde_series_title.value, 'null')::TEXT AS series_title,
+        COALESCE(mcde_abstract.value, 'null')::TEXT AS abstract,
+        COALESCE(mcde_toc.value, 'null')::TEXT AS toc,
+        COALESCE(mcde_pubdate.value, 'null')::TEXT AS pubdate,
+        COALESCE(mcde_type_of_resource.value, 'null')::TEXT AS type_of_resource
     FROM biblio.record_entry bre
     LEFT JOIN metabib.compressed_display_entry mcde_title
         ON (bre.id = mcde_title.source AND mcde_title.name = 'title')
@@ -1027,6 +1027,8 @@ BEGIN
                   WHERE record = $1
                         AND metabib_field = $2
             $$ USING bib_id, vfield, rdata;
+        WHEN OTHERS THEN
+            -- ignore and move on
         END;
     END LOOP;
 END;
index 94ea030..a66a12d 100644 (file)
@@ -307,6 +307,26 @@ VALUES (
 )
 ;
 
+INSERT INTO config.metabib_field (id, field_class, name, format,
+    label, xpath, display_xpath, display_field, search_field, browse_field)
+VALUES (
+    51, 'author', 'first_author', 'mods32',
+    oils_i18n_gettext(51, 'Author', 'cmf', 'label'),
+    $$//mods32:mods/mods32:name[mods32:role/mods32:roleTerm[text()='creator']][1]$$,
+    $$//*[local-name()='namePart']$$,
+    TRUE, TRUE, FALSE
+);
+
+INSERT INTO config.metabib_field (id, field_class, name, format,
+    label, xpath, display_xpath, display_field, search_field, browse_field)
+VALUES (
+    52, 'keyword', 'origin_info', 'marcxml',
+    oils_i18n_gettext(52, 'Origin Info', 'cmf', 'label'),
+    $$//*[@tag='260']$$,
+    $$//*[local-name()='subfield' and contains('abc',@code)]$$,
+    TRUE, TRUE, FALSE
+);
+
 INSERT INTO config.metabib_field_virtual_map (real, virtual)
     SELECT  id,
             45
@@ -340,7 +360,7 @@ SELECT SETVAL('config.metabib_field_id_seq', GREATEST(1000, (SELECT MAX(id) FROM
 
 INSERT INTO config.display_field_map (name, field, multi) VALUES
     ('title', 6, FALSE),
-    ('author', 8, FALSE),
+    ('author', 51, FALSE),
     ('creators', 37, TRUE),
     ('subject', 16, TRUE),
     ('isbn', 18, TRUE),
@@ -354,7 +374,7 @@ INSERT INTO config.display_field_map (name, field, multi) VALUES
     ('tcn',                 26, FALSE),
     ('edition',             38, FALSE),
     ('physical_description',39, TRUE),
-    ('publisher',           40, FALSE),
+    ('publisher',           52, FALSE),
     ('abstract',            41, FALSE),
     ('toc',                 42, FALSE),
     ('type_of_resource',    43, FALSE),
index dd36aa9..44157c1 100644 (file)
@@ -2178,4 +2178,8 @@ BEGIN
 END;
 $$ LANGUAGE PLPGSQL;
 
+-- Handy function for transforming marc to a variant available on config.xml_transform
+CREATE OR REPLACE FUNCTION evergreen.marc_to (marc text, xfrm text) RETURNS TEXT AS $$
+    SELECT evergreen.xml_pretty_print(xslt_process($1,xslt)::XML)::TEXT FROM config.xml_transform WHERE name = $2;
+$$ LANGUAGE SQL;
 
index 28d9d44..ce302a6 100644 (file)
@@ -154,37 +154,20 @@ SELECT  r.id,
     r.quality,
     r.tcn_source,
     r.tcn_value,
-    CONCAT_WS(' ', FIRST(title.value),FIRST(title_np.val)) AS title,
-    FIRST(author.value) AS author,
-    STRING_AGG(DISTINCT publisher.value, ', ') AS publisher,
-    STRING_AGG(DISTINCT SUBSTRING(pubdate.value FROM $$\d+$$), ', ') AS pubdate,
-    CASE WHEN ARRAY_AGG( DISTINCT REPLACE(SUBSTRING(isbn.value FROM $$^\S+$$), '-', '') ) = '{NULL}'
+    evergreen.oils_json_to_text(d.title) AS title,
+    evergreen.oils_json_to_text(d.author) AS author,
+    evergreen.oils_json_to_text(d.publisher) AS publisher,
+    evergreen.oils_json_to_text(d.pubdate) AS pubdate,
+    CASE WHEN d.isbn = 'null'
         THEN NULL
-        ELSE ARRAY_AGG( DISTINCT REPLACE(SUBSTRING(isbn.value FROM $$^\S+$$), '-', '') )
+        ELSE (SELECT ARRAY(SELECT json_array_elements_text(d.isbn::JSON)))
     END AS isbn,
-    CASE WHEN ARRAY_AGG( DISTINCT REGEXP_REPLACE(issn.value, E'^\\S*(\\d{4})[-\\s](\\d{3,4}x?)', E'\\1 \\2') ) = '{NULL}'
+    CASE WHEN d.issn = 'null'
         THEN NULL
-        ELSE ARRAY_AGG( DISTINCT REGEXP_REPLACE(issn.value, E'^\\S*(\\d{4})[-\\s](\\d{3,4}x?)', E'\\1 \\2') )
+        ELSE (SELECT ARRAY(SELECT json_array_elements_text(d.issn::JSON)))
     END AS issn
   FROM  biblio.record_entry r
-    LEFT JOIN metabib.full_rec title ON (r.id = title.record AND title.tag = '245' AND title.subfield = 'a')
-    LEFT JOIN ( -- Grab 245 N and P subfields in the order that they appear.
-      SELECT b.record, string_agg(val, ' ') AS val FROM (
-             SELECT title_np.record, title_np.value AS val
-              FROM metabib.full_rec title_np
-              WHERE
-              title_np.tag = '245'
-                        AND title_np.subfield IN ('p','n')
-                        ORDER BY title_np.id
-                ) b
-                GROUP BY 1
-         ) title_np ON (title_np.record=r.id)
-    LEFT JOIN metabib.full_rec author ON (r.id = author.record AND author.tag IN ('100','110','111') AND author.subfield = 'a')
-    LEFT JOIN metabib.full_rec publisher ON (r.id = publisher.record AND (publisher.tag = '260' OR (publisher.tag = '264' AND publisher.ind2 = '1')) AND publisher.subfield = 'b')
-    LEFT JOIN metabib.full_rec pubdate ON (r.id = pubdate.record AND (pubdate.tag = '260' OR (pubdate.tag = '264' AND pubdate.ind2 = '1')) AND pubdate.subfield = 'c')
-    LEFT JOIN metabib.full_rec isbn ON (r.id = isbn.record AND isbn.tag IN ('024', '020') AND isbn.subfield IN ('a','z'))
-    LEFT JOIN metabib.full_rec issn ON (r.id = issn.record AND issn.tag = '022' AND issn.subfield = 'a')
-  GROUP BY 1,2,3,4,5;
+        JOIN metabib.wide_display_entry d ON (r.id = d.source);
 
 CREATE TABLE reporter.materialized_simple_record AS SELECT * FROM reporter.old_super_simple_record WHERE 1=0;
 ALTER TABLE reporter.materialized_simple_record ADD PRIMARY KEY (id);
index b44afd4..fae9b21 100644 (file)
@@ -99,6 +99,26 @@ VALUES (
 )
 ;
 
+INSERT INTO config.metabib_field (id, field_class, name, format,
+    label, xpath, display_xpath, display_field, search_field, browse_field)
+VALUES (
+    51, 'author', 'first_author', 'mods32',
+    oils_i18n_gettext(51, 'Author', 'cmf', 'label'),
+    $$//mods32:mods/mods32:name[mods32:role/mods32:roleTerm[text()='creator']][1]$$,
+    $$//*[local-name()='namePart']$$,
+    TRUE, TRUE, FALSE
+);
+
+INSERT INTO config.metabib_field (id, field_class, name, format,
+    label, xpath, display_xpath, display_field, search_field, browse_field)
+VALUES (
+    52, 'keyword', 'origin_info', 'marcxml',
+    oils_i18n_gettext(52, 'Origin Info', 'cmf', 'label'),
+    $$//*[@tag='260']$$,
+    $$//*[local-name()='subfield' and contains('abc',@code)]$$,
+    TRUE, TRUE, FALSE
+);
+
 
 -- Modify existing config.metabib_field entries
 
@@ -126,38 +146,40 @@ INSERT INTO config.display_field_map (name, field, multi) VALUES
     ('tcn',                 26, FALSE),
     ('edition',             38, FALSE),
     ('physical_description',39, TRUE),
-    ('publisher',           40, FALSE),
+    ('publisher',           52, FALSE),
     ('abstract',            41, FALSE),
     ('toc',                 42, FALSE),
     ('type_of_resource',    43, FALSE),
     ('pubdate',             44, FALSE)
 ;
 
+UPDATE config.display_field_map SET field = 51 WHERE name = 'author';
+
 -- Add a column to wide-display-entry per well-known field
 
-DROP VIEW metabib.wide_display_entry;
+DROP VIEW IF EXISTS metabib.wide_display_entry;
 CREATE VIEW metabib.wide_display_entry AS
     SELECT 
         bre.id AS source,
-        COALESCE(mcde_title.value, 'null') AS title,
-        COALESCE(mcde_author.value, 'null') AS author,
-        COALESCE(mcde_subject_geographic.value, 'null') AS subject_geographic,
-        COALESCE(mcde_subject_name.value, 'null') AS subject_name,
-        COALESCE(mcde_subject_temporal.value, 'null') AS subject_temporal,
-        COALESCE(mcde_subject_topic.value, 'null') AS subject_topic,
-        COALESCE(mcde_creators.value, 'null') AS creators,
-        COALESCE(mcde_isbn.value, 'null') AS isbn,
-        COALESCE(mcde_issn.value, 'null') AS issn,
-        COALESCE(mcde_upc.value, 'null') AS upc,
-        COALESCE(mcde_tcn.value, 'null') AS tcn,
-        COALESCE(mcde_edition.value, 'null') AS edition,
-        COALESCE(mcde_physical_description.value, 'null') AS physical_description,
-        COALESCE(mcde_publisher.value, 'null') AS publisher,
-        COALESCE(mcde_series_title.value, 'null') AS series_title,
-        COALESCE(mcde_abstract.value, 'null') AS abstract,
-        COALESCE(mcde_toc.value, 'null') AS toc,
-        COALESCE(mcde_pubdate.value, 'null') AS pubdate,
-        COALESCE(mcde_type_of_resource.value, 'null') AS type_of_resource
+        COALESCE(mcde_title.value, 'null')::TEXT AS title,
+        COALESCE(mcde_author.value, 'null')::TEXT AS author,
+        COALESCE(mcde_subject_geographic.value, 'null')::TEXT AS subject_geographic,
+        COALESCE(mcde_subject_name.value, 'null')::TEXT AS subject_name,
+        COALESCE(mcde_subject_temporal.value, 'null')::TEXT AS subject_temporal,
+        COALESCE(mcde_subject_topic.value, 'null')::TEXT AS subject_topic,
+        COALESCE(mcde_creators.value, 'null')::TEXT AS creators,
+        COALESCE(mcde_isbn.value, 'null')::TEXT AS isbn,
+        COALESCE(mcde_issn.value, 'null')::TEXT AS issn,
+        COALESCE(mcde_upc.value, 'null')::TEXT AS upc,
+        COALESCE(mcde_tcn.value, 'null')::TEXT AS tcn,
+        COALESCE(mcde_edition.value, 'null')::TEXT AS edition,
+        COALESCE(mcde_physical_description.value, 'null')::TEXT AS physical_description,
+        COALESCE(mcde_publisher.value, 'null')::TEXT AS publisher,
+        COALESCE(mcde_series_title.value, 'null')::TEXT AS series_title,
+        COALESCE(mcde_abstract.value, 'null')::TEXT AS abstract,
+        COALESCE(mcde_toc.value, 'null')::TEXT AS toc,
+        COALESCE(mcde_pubdate.value, 'null')::TEXT AS pubdate,
+        COALESCE(mcde_type_of_resource.value, 'null')::TEXT AS type_of_resource
     FROM biblio.record_entry bre 
     LEFT JOIN metabib.compressed_display_entry mcde_title 
         ON (bre.id = mcde_title.source AND mcde_title.name = 'title')
@@ -207,5 +229,26 @@ CREATE VIEW metabib.wide_display_entry AS
             AND mcde_type_of_resource.name = 'type_of_resource')
 ;
 
+CREATE OR REPLACE VIEW reporter.old_super_simple_record AS
+SELECT  r.id,
+    r.fingerprint,
+    r.quality,
+    r.tcn_source,
+    r.tcn_value,
+    evergreen.oils_json_to_text(d.title) AS title,
+    evergreen.oils_json_to_text(d.author) AS author,
+    evergreen.oils_json_to_text(d.publisher) AS publisher,
+    evergreen.oils_json_to_text(d.pubdate) AS pubdate,
+    CASE WHEN d.isbn = 'null'
+        THEN NULL
+        ELSE (SELECT ARRAY(SELECT json_array_elements_text(d.isbn::JSON)))
+    END AS isbn,
+    CASE WHEN d.issn = 'null'
+        THEN NULL
+        ELSE (SELECT ARRAY(SELECT json_array_elements_text(d.issn::JSON)))
+    END AS issn
+  FROM  biblio.record_entry r
+        JOIN metabib.wide_display_entry d ON (r.id = d.source);
+
 COMMIT;
 
index 2fc357b..7a4e551 100644 (file)
@@ -322,6 +322,8 @@ BEGIN
                   WHERE record = $1
                         AND metabib_field = $2
             $$ USING bib_id, vfield, rdata;
+        WHEN OTHERS THEN
+            -- ignore and move on
         END;
     END LOOP;
 END;
@@ -555,5 +557,9 @@ BEGIN
 END;
 $function$ LANGUAGE plpgsql;
 
+CREATE OR REPLACE FUNCTION evergreen.marc_to (marc text, xfrm text) RETURNS TEXT AS $$
+    SELECT evergreen.xml_pretty_print(xslt_process($1,xslt)::XML)::TEXT FROM config.xml_transform WHERE name = $2;
+$$ LANGUAGE SQL;
+
 COMMIT;
 
index 5efb1ff..eb7e34e 100644 (file)
@@ -1358,6 +1358,45 @@ Added Log Comment
 
                 <!--3.2 change tmee additional note fields-->
 
+                <xsl:for-each select="marc:datafield[@tag=502]">
+                        <note type="thesis">
+                                <xsl:call-template name="uri"/>
+                                <xsl:variable name="str">
+                                        <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                                                <xsl:value-of select="."/>
+                                                <xsl:text> </xsl:text>
+                                        </xsl:for-each>
+                                </xsl:variable>
+                                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+                        </note>
+                </xsl:for-each>
+
+                <xsl:for-each select="marc:datafield[@tag=504]">
+                        <note type="bibliography">
+                                <xsl:call-template name="uri"/>
+                                <xsl:variable name="str">
+                                        <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                                                <xsl:value-of select="."/>
+                                                <xsl:text> </xsl:text>
+                                        </xsl:for-each>
+                                </xsl:variable>
+                                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+                        </note>
+                </xsl:for-each>
+
+                <xsl:for-each select="marc:datafield[@tag=508]">
+                        <note type="creation/production credits">
+                                <xsl:call-template name="uri"/>
+                                <xsl:variable name="str">
+                                        <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                                                <xsl:value-of select="."/>
+                                                <xsl:text> </xsl:text>
+                                        </xsl:for-each>
+                                </xsl:variable>
+                                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+                        </note>
+                </xsl:for-each>
+
                 <xsl:for-each select="marc:datafield[@tag=506]">
                         <note type="restrictions">
                                 <xsl:call-template name="uri"></xsl:call-template>
@@ -1467,7 +1506,7 @@ Added Log Comment
 
 
 
-                <xsl:for-each select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=507 or @tag=508 or  @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
+                <xsl:for-each select="marc:datafield[@tag=501 or @tag=507 or  @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
                         <note>
                                 <xsl:call-template name="uri"></xsl:call-template>
                                 <xsl:variable name="str">
@@ -4717,6 +4756,45 @@ Revision 1.2 - Added Log Comment  2003/03/24 19:37:42  ckeith
 
                 <!--3.2 change tmee additional note fields-->
 
+                <xsl:for-each select="marc:datafield[@tag=502]">
+                        <note type="thesis">
+                                <xsl:call-template name="uri"/>
+                                <xsl:variable name="str">
+                                        <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                                                <xsl:value-of select="."/>
+                                                <xsl:text> </xsl:text>
+                                        </xsl:for-each>
+                                </xsl:variable>
+                                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+                        </note>
+                </xsl:for-each>
+
+                <xsl:for-each select="marc:datafield[@tag=504]">
+                        <note type="bibliography">
+                                <xsl:call-template name="uri"/>
+                                <xsl:variable name="str">
+                                        <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                                                <xsl:value-of select="."/>
+                                                <xsl:text> </xsl:text>
+                                        </xsl:for-each>
+                                </xsl:variable>
+                                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+                        </note>
+                </xsl:for-each>
+
+                <xsl:for-each select="marc:datafield[@tag=508]">
+                        <note type="creation/production credits">
+                                <xsl:call-template name="uri"/>
+                                <xsl:variable name="str">
+                                        <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+                                                <xsl:value-of select="."/>
+                                                <xsl:text> </xsl:text>
+                                        </xsl:for-each>
+                                </xsl:variable>
+                                <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+                        </note>
+                </xsl:for-each>
+
                 <xsl:for-each select="marc:datafield[@tag=506]">
                         <note type="restrictions">
                                 <xsl:call-template name="uri"/>
@@ -4823,7 +4901,7 @@ Revision 1.2 - Added Log Comment  2003/03/24 19:37:42  ckeith
                 </xsl:for-each>
 
                 <xsl:for-each
-                        select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=507 or @tag=508 or  @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">+
+                        select="marc:datafield[@tag=501 or @tag=507 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">+
                         <note>
                                 <xsl:call-template name="uri"/>
                                 <xsl:variable name="str">
index 15d2a37..374182f 100644 (file)
@@ -333,13 +333,22 @@ END;
     </li>
         [%- END %]
     [%- END %]
-    [%- IF attrs.phys_desc %]
+    [%- IF attrs.hl.physical_description.size %]
+    <li id='rdetail_phys_desc'>
+        <strong class='rdetail_label'>[% l("Physical Description:") %]</strong>
+        <span class='rdetail_value' highlighted='true'>[% attrs.hl.physical_description.join('<br/>') %]</span>
+    </li>
+    [%- ELSIF attrs.phys_desc %]
     <li id='rdetail_phys_desc'>
         <strong class='rdetail_label'>[% l("Physical Description:") %]</strong>
         <span class='rdetail_value'>[% attrs.phys_desc | html %]</span>
     </li>
     [%- END %]
-    [%- IF attrs.edition %]
+    [%- IF attrs.hl.edition %]
+    <li id='rdetail_edition'>
+        <strong class='rdetail_label'>[% l("Edition:") %]</strong>
+        <span class='rdetail_value' highlighted='true'>[% attrs.hl.edition %]</span>
+    [%- ELSIF attrs.edition %]
     <li id='rdetail_edition'>
         <strong class='rdetail_label'>[% l("Edition:") %]</strong>
         <span class='rdetail_value'>[% attrs.edition | html %]</span>
@@ -360,7 +369,12 @@ END;
         -%]
     </li>
     [%- END %]
-    [%- IF attrs.publisher %]
+    [%- IF attrs.hl.publisher %]
+    <li id='rdetail_publisher'>
+        <strong class='rdetail_label'>[% l("Publisher:") %]</strong>
+        <span class='rdetail_value' highlighted='true'>[% attrs.hl.publisher %]</span>
+    </li>
+    [%- ELSIF attrs.publisher %]
     <li id='rdetail_publisher'>
         <strong class='rdetail_label'>[% l("Publisher:") %]</strong>
         <span class='rdetail_value' property="publisher" typeof="Organization">