try this : <xsl:for-each select="marc:datafield[@tag='650']"> <xsl:if test="marc:subfield[@code='x'] = 'x' or marc:subfield[@code='x'] = 'y'"> <xsl:value-of test="marc:subfield[@code='a']"> </xsl:if> </xsl:for-each> Le 02/03/2021 à 13:22, Magnus Enger a écrit :
Kia ora!
I want to display most keywords as usual, but with an exception for those from the 650 field. Specifically, I want to display only those keywords that has the value "x" or "y" in subfield $2, and hide the other 650-keywords. Any hints on how to this in XSLT would be infinitely appreciated, and added to the wiki, so others can benefit from the solution.
Here is an example:
<datafield tag="650" ind1=" " ind2="0"> <subfield code="a">A</subfield> <subfield code="2">x</subfield> </datafield> <datafield tag="650" ind1=" " ind2="0"> <subfield code="a">B</subfield> <subfield code="2">y</subfield> </datafield> <datafield tag="650" ind1=" " ind2="0"> <subfield code="a">C</subfield> <subfield code="2">z</subfield> </datafield> <datafield tag="653" ind1=" " ind2="0"> <subfield code="a">D</subfield> </datafield>
I want to display A and B (because they have $2 = x or y), and D (because it is not 650), but not C (because it is 650 and $2 is neither x nor y).
Best regards, Magnus Libriotech _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
-- Fridolin SOMERS <fridolin.somers@biblibre.com> Software and system maintainer 🦄 BibLibre, France