Koha/t/db_dependent/XSLT_Handler/test01.xsl
Marcel de Rooy aedb3e3df8 Bug 6536: QA Follow-up: Add some unit tests for Z3950Search in Breeding.pm
This patch may serve as a starting point for more unit tests in this part
of the code.
In this patch most internal subroutines of Z3950Search are covered.
In the XSLT part we reuse a XSL template from the XSLT_Handler.t test.
It needed a little tweaking for namespaces. And added the indicators on
the 990 field.

Test plan:
Run both Breeding.t and XSLT_Handler.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-01 10:09:17 -03:00

24 lines
654 B
XML

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:marc="http://www.loc.gov/MARC21/slim"
>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="record|marc:record">
<record>
<xsl:apply-templates/>
<datafield tag="990" ind1='' ind2=''>
<subfield code="a">
<xsl:text>I saw you</xsl:text>
</subfield>
</datafield>
</record>
</xsl:template>
<xsl:template match="node()">
<xsl:copy select=".">
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>