1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Id: zeerex2index.xsl,v 1.1 2006-04-13 14:53:18 mike Exp $ -->
3 <!-- See the ZeeRex profile at http://srw.cheshire3.org/profiles/ZeeRex/ -->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:z="http://indexdata.dk/zebra/xslt/1"
6 xmlns:e="http://explain.z3950.org/dtd/2.0/"
8 <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
9 <!-- disable all default text node output -->
10 <xsl:template match="text()"/>
11 <!-- match on alvis xml record -->
12 <xsl:template match="//e:explain">
13 <z:record id="{concat(
14 e:serverInfo/e:host, ':',
15 e:serverInfo/e:port, '/',
16 e:serverInfo/e:database)}"
18 <z:index name="rec:id" type="0">
19 <xsl:value-of select="concat(
20 e:serverInfo/e:host, ':',
21 e:serverInfo/e:port, '/',
22 e:serverInfo/e:database)"/>
24 <z:index name="net:protocol" type="w">
25 <xsl:value-of select="e:serverInfo/@protocol"/>
27 <z:index name="net:version" type="0">
28 <xsl:value-of select="e:serverInfo/@version"/>
30 <z:index name="net:method" type="w">
31 <xsl:value-of select="e:serverInfo/@method"/>
33 <z:index name="net:host" type="0">
34 <xsl:value-of select="e:serverInfo/e:host"/>
36 <z:index name="net:port" type="0">
37 <xsl:value-of select="e:serverInfo/e:port"/>
39 <z:index name="net:path" type="0">
40 <xsl:value-of select="e:serverInfo/e:database"/>
42 <z:index name="dc:title" type="w">
43 <xsl:value-of select="e:databaseInfo/e:title"/>
45 <z:index name="dc:creator" type="w">
46 <xsl:value-of select="e:databaseInfo/e:author"/>