Added facility to embed metadata for the DOM filter.
[idzebra-moved-to-github.git] / test / xslt / dom-snippet.xsl
1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2   xmlns:m="http://www.loc.gov/MARC21/slim"
3   xmlns:z="http://indexdata.com/zebra-2.0"
4   exclude-result-prefixes="m z"
5   version="1.0">
6   <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
7   
8   <xsl:template match="text()"/>
9
10   <xsl:template match="/">
11     <root>
12     <z:meta element_set_name="snippet"/>
13     <xsl:apply-templates/>
14     </root>
15   </xsl:template>
16   <xsl:template match="m:datafield[@tag='245']">
17     <title>
18       <xsl:value-of select="m:subfield[@code='a']"/>
19     </title>
20   </xsl:template>
21
22 </xsl:stylesheet>