Hi all,

another way to add line breaks with CSS can be to set the element to  {
display:block }. This might help avoid some XSLT changes.

For the subjects in the OPAC that should put each on a separate line and
remove the | separator:

.subjects li {
  display:block;
  padding-left: 10px;
}

.subjects li:after {
  content: "";
}

Hope that helps,

Katrin


On 02.03.23 11:52, Bruns, Anke wrote:
Hi,

as I have a similar issue, I've been trying any versions of a line break I - and the internet - could come up with 
(<br>, <br/>, <br />,  \A and several codes between a "&" and a ";". None of 
them worked, when written in the xsl file directly; but I may have done something wrong there.

What works well is to define a CSS class within the xsl (if not already 
existent) and then add the line break with a CSS statement in the OPACUserCSS 
or IntranetUserCSS, like this:

.sub_title::before {
   content: "\A";
   white-space: pre;
   }

... sub_title being the CSS class we added for tag 245$b. It also worked with 
an already existent class like holdings_note_data (tag 866).

Hope this helps.

Best regards,
Anke



--
Anke Bruns M.A. (LIS)
Arbeitsgruppe "Anwendungs- und Informationssysteme"
E-Mail: anke.br...@gwdg.de
---------------------------------------
Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen (GWDG)
Burckhardtweg 4, 37077 Göttingen, URL: https://gwdg.de

Support: Tel.: +49 551 39-30000, URL: https://gwdg.de/support
Sekretariat: Tel.: +49 551 39-30001, E-Mail: g...@gwdg.de

Geschäftsführer: Prof. Dr. Ramin Yahyapour
Aufsichtsratsvorsitzender: Prof. Dr. Christian Griesinger
Sitz der Gesellschaft: Göttingen
Registergericht: Göttingen, Handelsregister-Nr. B 598
---------------------------------------
Zertifiziert nach ISO 9001
---------------------------------------



-----Ursprüngliche Nachricht-----
Von: Koha <koha-boun...@lists.katipo.co.nz> Im Auftrag von Fridolin SOMERS
Gesendet: Donnerstag, 2. März 2023 06:25
An: koha@lists.katipo.co.nz
Betreff: Re: [Koha] [EXTERNAL] Re: Another XSLT question: adding a line break
between multiple names

Note the ending /
Tags generated by XSLT must be XTML so no <br> alone, <br/>
Otherwise you may do this with <div> tags and some CSS

Best regards,

Le 24/02/2023 à 08:01, King, Fred a écrit :
Yep, that worked. I probably just *thought* I’d tried that.

Thanks,

--Fred

From: Coehoorn, Joel <jcoeho...@york.edu>
Sent: Thursday, February 23, 2023 12:02 PM
To: King, Fred <fred.k...@medstar.net>
Cc: koha-US list <koha...@koha-us.org>; koha <koha@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:

<br/>

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

On Wed, Feb 22, 2023 at 5:05 PM King, Fred
<fred.k...@medstar.net<mailto:fred.k...@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:if>
                 <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>:<http://opac-search.pl?q=au%3e:>"<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>
                 </xsl:for-each>
             </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?

Thanks!

--Fred

Fred King, MSLS, AHIP
Medical Librarian, MedStar Washington Hospital Center
fred.k...@medstar.net<mailto:fred.k...@medstar.net>
202-877-6670
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@lists.katipo.co.nz<mailto:Koha@lists.katipo.co.nz>
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
--
Fridolin SOMERS <fridolin.som...@biblibre.com>
Software and system maintainer 🦄
BibLibre, France
_______________________________________________

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to