New
[irspy-moved-to-github.git] / zebra / dom-filter / zeerex2index.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.com/zebra-2.0"
4                 xmlns:e="http://explain.z3950.org/dtd/2.0/"
5                 xmlns:i="http://indexdata.com/irspy/1.0"
6                 version="1.0">
7  <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
8  <xsl:template match="text()"/>
9  <xsl:template match="//e:explain">
10   <xsl:variable name="id"><xsl:value-of select="concat(
11         e:serverInfo/@protocol, ':',
12         e:serverInfo/e:host, ':',
13         e:serverInfo/e:port, '/',
14         e:serverInfo/e:database)"/></xsl:variable>
15   <z:record z:id="{$id}" type="update">
16    <z:index name="dc:title:w">
17     <xsl:value-of select="e:databaseInfo/e:title"/>
18    </z:index>
19   </z:record>
20  </xsl:template>
21 </xsl:stylesheet>