From d1f553f184426655470142447d2cf48812565e1e Mon Sep 17 00:00:00 2001 From: Dan Wells Date: Mon, 7 Oct 2013 17:22:42 -0400 Subject: [PATCH] Tweak MODS32 stylesheet for titles was added to help certain search cases, but trailing punctuation makes it unsuitable for display. , on the other hand, chops all trailing punctuation out, which helps the trailing case but actually makes display of subtitle information worse. Let's split the difference and simplify at the same time by building the whole title, then trimming extra punctuation. While the above was done to help in browse display, it turns out that is not able to generate correct browse data. We want the display as corrected above, but we also need to preserve the tag for proper browse sorting. Rather than complicate the metabib logic, we'll add another special- purpose field to the MODS called . This field is a hybrid of and , which will give us a preformatted string (for preserving needed punctuation) but also keep the stuff in a separate field (for sorting). NOTE: We are purposely ignoring similar changes to MODS33, pending a discussion of how best to handle EG specific MODS changes overall. Signed-off-by: Dan Wells Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql | 61 ++++++++++++--------- Open-ILS/xsl/MARC21slim2MODS32.xsl | 61 ++++++++++++--------- 2 files changed, 68 insertions(+), 54 deletions(-) diff --git a/Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql b/Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql index f615039c3b..69b4ce6c2b 100644 --- a/Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql +++ b/Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql @@ -133,39 +133,46 @@ Added Log Comment - - - - - b - afgk - - - + + <xsl:call-template name="chopPunctuation"> + <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <xsl:with-param name="codes">abfgk</xsl:with-param> </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - <title> - <xsl:value-of select="$title"/> + </xsl:with-param> + </xsl:call-template> - - - - - - b - b - afgk - - - - - + + + + + + + abfgk + + + + + + + + + + + <xsl:value-of select="substring($titleBrowseChop,@ind2+1)"/> + + + + + <xsl:value-of select="$titleBrowseChop"/> + + + + + diff --git a/Open-ILS/xsl/MARC21slim2MODS32.xsl b/Open-ILS/xsl/MARC21slim2MODS32.xsl index 3302213f1c..2595e169a9 100644 --- a/Open-ILS/xsl/MARC21slim2MODS32.xsl +++ b/Open-ILS/xsl/MARC21slim2MODS32.xsl @@ -133,39 +133,46 @@ Added Log Comment - - - - - b - afgk - - - + + <xsl:call-template name="chopPunctuation"> + <xsl:with-param name="chopString"> <xsl:call-template name="subfieldSelect"> <xsl:with-param name="codes">abfgk</xsl:with-param> </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - <title> - <xsl:value-of select="$title"/> + </xsl:with-param> + </xsl:call-template> - - - - - - b - b - afgk - - - - - + + + + + + + abfgk + + + + + + + + + + + <xsl:value-of select="substring($titleBrowseChop,@ind2+1)"/> + + + + + <xsl:value-of select="$titleBrowseChop"/> + + + + + -- 2.43.2