1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Id: zeerex2index.xsl,v 1.2 2006-05-12 22:04:34 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)}"
19 <z:index name="rec:id" type="0">
20 <xsl:value-of select="concat(
21 e:serverInfo/e:host, ':',
22 e:serverInfo/e:port, '/',
23 e:serverInfo/e:database)"/>
25 <z:index name="net:protocol" type="w">
26 <xsl:value-of select="e:serverInfo/@protocol"/>
28 <z:index name="net:version" type="0">
29 <xsl:value-of select="e:serverInfo/@version"/>
31 <z:index name="net:method" type="w">
32 <xsl:value-of select="e:serverInfo/@method"/>
34 <z:index name="net:host" type="0">
35 <xsl:value-of select="e:serverInfo/e:host"/>
37 <z:index name="net:port" type="0">
38 <xsl:value-of select="e:serverInfo/e:port"/>
40 <z:index name="net:path" type="0">
41 <xsl:value-of select="e:serverInfo/e:database"/>
44 <z:index name="dc:title" type="w">
45 <xsl:value-of select="e:databaseInfo/e:title"/>
47 <z:index name="dc:creator" type="w">
48 <xsl:value-of select="e:databaseInfo/e:author"/>
51 <!-- ### index-name will be wrong -->
52 <z:index name="rec:date-modified" type="d">
53 <!-- ### Can Zebra handle this ISO-format date? -->
54 <xsl:value-of select="e:metaInfo/e:dateModified"/>
59 <!-- ### index-name will be wrong -->
60 <z:index name="zeerex:recordSyntax" type="0">
61 <xsl:value-of select="e:recordInfo/recordSyntax/@name"/>
65 <!-- ### supportsInfo -->