[Koha] [EXTERNAL] Re: Another XSLT question: adding a line break between multiple names

King, Fred Fred.King at Medstar.net
Sat Feb 25 07:01:17 NZDT 2023

Yep, that worked. I probably just *thought* I’d tried that.



From: Coehoorn, Joel <jcoehoorn at york.edu>
Sent: Thursday, February 23, 2023 12:02 PM
To: King, Fred <Fred.King at Medstar.net>
Cc: koha-US list <koha-us at koha-us.org>; koha <koha at lists.katipo.co.nz>
Subject: [EXTERNAL] Re: [Koha] Another XSLT question: adding a line break between multiple names

**ATTENTION: This email originated from outside the MedStar Health network.
** DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.

Try replacing all this:

<span class="separator"><xsl:text> | </xsl:text></span>

with this:


Joel Coehoorn
Director of Information Technology
York University
Office: 402-363-5603 | jcoehoorn at york.edu<mailto:jcoehoorn at york.edu> | york.edu<https://york.edu>

On Wed, Feb 22, 2023 at 5:05 PM King, Fred <Fred.King at medstar.net<mailto:Fred.King at medstar.net>> wrote:
Hi everyone,

I have another XLST question that I haven't been able to figure out: I'm using the 700 field for authors, and I want to start additional authors on a new line instead of separating them by |.

This is what I have now:

    <!-- arthurs -->
<xsl:if test="marc:datafield[@tag=700]">
           <span class="results_summary authors">
               <xsl:if test="marc:datafield[@tag=700]/@ind1=' '">
                   <span class="label">MedStar authors: </span>
               <xsl:for-each select="marc:datafield[@tag=700]">
                  <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au<http://opac-search.pl?q=au>:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute><xsl:value-of select="marc:subfield[@code='a']"/></a>
                  <xsl:if test="marc:subfield[@code='b']"><a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au<http://opac-search.pl?q=au>:"<xsl:value-of select="marc:subfield[@code='b']"/>"</xsl:attribute><xsl:text>, </xsl:text><xsl:value-of select="marc:subfield[@code='b']"/></a></xsl:if>
                  <xsl:if test="marc:subfield[@code='c']"><a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au<http://opac-search.pl?q=au>:"<xsl:value-of select="marc:subfield[@code='c']"/>"</xsl:attribute><xsl:text>, </xsl:text><xsl:value-of select="marc:subfield[@code='c']"/></a></xsl:if>
                             <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>

And it shows on the OPAC details page the way it should:
   Arthur, King, field_b, field_c | Doyle, Arthur Conan | Arthur, Chester Alan, field_b | Murray, Arthur, field_c

But what I'd really like is this:
   Arthur, King, field_b, field_c
   Doyle, Arthur Conan
   Arthur, Chester Alan, field_b
  Murray, Arthur, field_c

Nothing I've tried so far has worked. Any suggestions?



Fred King, MSLS, AHIP
Medical Librarian, MedStar Washington Hospital Center
fred.king at medstar.net<mailto:fred.king at medstar.net>
ORCID 0000-0001-5266-0279
MedStar Authors Catalog: http://medstarauthors.org

You know it's cold outside when you go outside and it's cold.
--NPS Twitter

MedStar Health is a not-for-profit, integrated healthcare delivery system, the largest in Maryland and the Washington, D.C., region. Nationally recognized for clinical quality in heart, orthopedics, cancer and GI.

IMPORTANT: This e-mail (including any attachments) may contain information that is private, confidential, or protected by attorney-client or other privilege. If you received this e-mail in error, please delete it from your system without copying it and notify sender by reply e-mail, so that our records can be corrected... Thank you.

Help conserve valuable resources - only print this email if necessary.


Koha mailing list  http://koha-community.org
Koha at lists.katipo.co.nz<mailto:Koha at lists.katipo.co.nz>
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha

More information about the Koha mailing list