Koha/koha-tmpl/intranet-tmpl/prog/en/xslt
Katrin Fischer 8cfe35b044
Bug 25082: Make 041 descriptions display, if authorised value list is used
When 041$a or another subfield is linked to an authorised value list,
Koha will replace the codes with the descriptions from the authorised
value in the MARCXML before passing it to the XSLT.

The XSLT was made to translate codes into descriptions - as there is
no code now, this fails and 'unknown language' is shown.

The patch changes the handling so that when the XSLT is handled something
that doesn't match a known code, it displays the subfield without
processing.

To test:
- Create some records with 041.
  Examples: http://www.loc.gov/marc/bibliographic/bd041.html
- Verify this displays nicely in staff and OPAC
- Apply patch
- Verify display is unchanged
- Remove the patch
- Change one of your MARC frameworks (use another framework than
  for your first test records)
  and link the 041 subfields to the LANG authorised value list
- Go to administration and create some entries for LANG with language
  codes and descriptions
- Catalog a 041 using the normal editor (not advanced)
- You can now use a pull down to select the values you want
- Verify the display is now 'Unknown language' for this record
- Apply patch
- Verify all records display the language descriptions now, using
  an authorised value or not
- Run misc/maintenance/generate_MARC21Languages.pl

Verify the output at the end reads like:
<xsl:otherwise>
    <!-- when 041\$a is mapped to an authorised value list, this will show the description -->
    <xsl:value-of select="\$code" />
</xsl:otherwise>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:46:02 +01:00
..
compact.xsl
Del9LinksExcept952.xsl
Del9LinksExcept995.xsl
Del952.xsl
Del995.xsl
identity.xsl
MARC21Languages.xsl Bug 25082: Make 041 descriptions display, if authorised value list is used 2020-05-11 09:46:02 +01:00
MARC21slim2ATOM.xsl
MARC21slim2DC.xsl
MARC21slim2intranetDetail.xsl Bug 15727: Add MARC21 385 - Audience to detail pages 2020-05-05 11:07:02 +01:00
MARC21slim2intranetResults.xsl Bug 25233: Staff XSLT material type label "Book" should be "Text" 2020-04-27 11:28:12 +01:00
MARC21slim2MADS.xsl
MARC21slim2MODS.xsl
MARC21slim2MODS3-1.xsl
MARC21slim2MODS3.xsl
MARC21slim2MODS32.xsl
MARC21slim2OAIDC.xsl
MARC21slim2RDFDC.xsl
MARC21slim2RDFDC.xsl.1
MARC21slim2RSS2.xsl
MARC21slim2SRWDC.xsl
MARC21slim9522852.xsl
MARC21slimUtils-MODS31.xsl
MARC21slimUtils.xsl Bug 25082: Make 041 descriptions display, if authorised value list is used 2020-05-11 09:46:02 +01:00
MARC21slimUtils2.xsl
NORMARCslim2intranetDetail.xsl
NORMARCslim2intranetResults.xsl
NORMARCslim2OAIDC.xsl
NORMARCslimUtils.xsl
oilsMARC21slim2HTML.xsl
plainMARC.xsl
UNIMARC_compact.xsl
UNIMARCslim2intranetDetail.xsl Bug 22969: fix biblionumber on 001 in UNIMARC XSLT 2020-03-06 09:56:00 +00:00
UNIMARCslim2intranetResults.xsl
UNIMARCslim2OAIDC.xsl
UNIMARCslim2RDFDC.xsl
UNIMARCslim2SRWDC.xsl
UNIMARCslimUtils.xsl