[Koha] XSLT question

Michael Kuhn mik at adminkuhn.ch
Thu Dec 6 09:18:35 NZDT 2018


Hi

I've got the following content in MARC 245:

245 00 _aTitle
        _pPart
        _nVolume

I'm using the following XSL code in file "MARC21slim2OPACDetail.xsl":

  <xsl:if test="marc:datafield[@tag=245]">
  <xsl:for-each select="marc:datafield[@tag=245]">
  <xsl:call-template name="subfieldSelect">
  <xsl:with-param name="codes">a</xsl:with-param>
  </xsl:call-template>
  <xsl:text></xsl:text>
  <xsl:for-each select="marc:subfield[contains('np', @code)]">
  <xsl:choose>
  <xsl:when test="@code='n'">
  <br/>
  <span class="title_medium"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@code='p'">
  <xsl:text> : </xsl:text><span 
class="title_medium"><xsl:apply-templates/></span>
  </xsl:when>
  </xsl:choose>
  </xsl:for-each>
  </xsl:for-each>
  </xsl:if>

I'm expecting the following two lines:

Title
Volume : Part

But in fact I'm getting these lines:

Title : Part
Volume

It seems like I can't get 245$n to precede 245$p ... What am I doing 
wrong, can please someone explain?

Best wishes: Michael
-- 
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E mik at adminkuhn.ch · W www.adminkuhn.ch


More information about the Koha mailing list