Support new "irspy_data" log-level to register information written to
[irspy-moved-to-github.git] / zebra / zeerex2dc.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                 xmlns:z="http://indexdata.dk/zebra/xslt/1"
4                 xmlns:e="http://explain.z3950.org/dtd/2.0/"
5                 version="1.0">
6
7  <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
8  <!-- Disable all default text node output -->
9  <xsl:template match="text()"/>
10  <!-- Match on ZeeRex XML record -->
11
12  <xsl:template match="//e:explain">
13   <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
14         z:id="{concat(e:serverInfo/@protocol, ':',
15                       e:serverInfo/e:host, ':',
16                       e:serverInfo/e:port, '/',
17                       e:serverInfo/e:database)}">
18    <dc:title>
19     <xsl:value-of select="e:databaseInfo/e:title"/>
20    </dc:title>
21    <dc:creator>
22     <xsl:value-of select="e:databaseInfo/e:author"/>
23    </dc:creator>
24    <!-- Subject -->
25    <dc:description>
26     <xsl:value-of select="e:databaseInfo/e:description"/>
27    </dc:description>
28    <!-- Publisher -->
29    <!-- Contributor -->
30    <dc:date>
31     <xsl:value-of select="e:serverInfo/e:database/@lastUpdate"/>
32    </dc:date>
33    <dc:type>Service</dc:type>
34    <!-- Format -->
35    <dc:identifier>
36     <xsl:value-of select="concat(
37                           e:serverInfo/e:host, ':',
38                           e:serverInfo/e:port, '/',
39                           e:serverInfo/e:database)"/>
40    </dc:identifier>
41    <!-- Source -->
42    <dc:language>
43     <xsl:value-of select="e:databaseInfo/e:langUsage"/>
44    </dc:language>
45    <!-- Relation -->
46    <!-- Coverage -->
47    <!-- Rights -->
48   </metadata>
49  </xsl:template>
50 </xsl:stylesheet>