--- /dev/null
+$Id: Changes,v 1.1 2006-04-13 14:53:17 mike Exp $
+
+Revision history for Perl extension Net::Z3950::IRSpy.
+
+0.02 [IN PROGRESS]
+
+0.01 Wed Apr 5 15:53:47 2006
+ - original version; created by h2xs 1.23 with options
+ -X --name=Net::Z3950::IRSpy --compat-version=5.8.0 --omit-constant --skip-exporter --skip-ppport
+
--- /dev/null
+Changes
+Makefile.PL
+MANIFEST
+README
+t/Net-Z3950-IRSpy.t
+lib/Net/Z3950/IRSpy.pm
+META.yml Module meta-data (added by MakeMaker)
+MANIFEST.SKIP
--- /dev/null
+# $Id: META.yml,v 1.1 2006-04-13 14:53:17 mike Exp $
+
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: Net-Z3950-IRSpy
+version: 0.01
+version_from: lib/Net/Z3950/IRSpy.pm
+installdirs: site
+requires:
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.17
--- /dev/null
+# $Id: Makefile.PL,v 1.1 2006-04-13 14:53:17 mike Exp $
+
+use 5.008;
+use ExtUtils::MakeMaker;
+# See lib/ExtUtils/MakeMaker.pm for details of how to influence
+# the contents of the Makefile that is written.
+WriteMakefile(
+ NAME => 'Net::Z3950::IRSpy',
+ VERSION_FROM => 'lib/Net/Z3950/IRSpy.pm', # finds $VERSION
+ PREREQ_PM => {
+ Net::Z3950::ZOOM => 1.04,
+ },
+ ($] >= 5.005 ? ## Add these new keywords supported since 5.005
+ (ABSTRACT_FROM => 'lib/Net/Z3950/IRSpy.pm', # retrieve abstract from module
+ AUTHOR => 'Mike Taylor <mike@indexdata.com>') : ()),
+);
--- /dev/null
+$Id: README,v 1.1 2006-04-13 14:53:17 mike Exp $
+
+Net-Z3950-IRSpy
+===============
+
+This module exists to implement the IRspy program, which discovers,
+analyses and monitors IR servers implementing the Z39.50 and SRU/W
+protocols. It is a successor to the ZSpy program.
+
+INSTALLATION
+
+To install this module type the following:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+DEPENDENCIES
+
+This module requires these other modules and libraries, in addition to
+those specified in Makefile.PL:
+
+ Zebra, release 1.4.0 or later: see http://indexdata.com/zebra/
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2006 by Index Data ApS.
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself, either Perl version 5.8.7 or,
+at your option, any later version of Perl 5 you may have available.
+
+
--- /dev/null
+# $Id: Net-Z3950-IRSpy.t,v 1.1 2006-04-13 14:53:17 mike Exp $
+
+# change 'tests => 1' to 'tests => last_test_to_print';
+use Test::More tests => 1;
+BEGIN { use_ok('Net::Z3950::IRSpy') };
+
+#########################
+
+# Insert your test code below, the Test::More module is use()ed here so read
+# its man page ( perldoc Test::More ) for help writing this test script.
+
--- /dev/null
+$Id: README,v 1.1 2006-04-13 14:53:18 mike Exp $
+
+What's what in this directory:
+
+README -- This file
+
+yazserver.xml -- The primary configuration file that controls how
+ Zebra runs (as a YAZ GFS application) in order to serve the
+ ZeeRex database. This specifies where to find this database's
+ own ZeeRex record (zeerex.xml), the configuration for
+ translating CQL queries into Z39.50 Type-1 (pqf.properties),
+ and the Zebra-specific configuration (zebra.cfg).
+
+zeerex.xml -- The static ZeeRex record for this database of ZeeRex
+ records. It describes what a ZeeRex database looks like, and
+ how it behaves. (Life would be better if Zebra could at least
+ partially work this out for itself, but for now we have to go
+ the long way round.)
+
+zeerex-2.0.xsd -- The XML Schema describing ZeeRex records, as
+ downloaded from the official ZeeRex site at:
+ http://explain.z3950.org/dtd/zeerex-2.0.xsd
+ This can be used to validate both our own static ZeeRex record
+ and the records created by IRSpy.
+
+pqf.properties -- The specification for how CQL queries are translated
+ into 39.50 Type-1 queries. This file is identical to the one
+ supplied in the YAZ distribution: we'd just use that if there
+ was a reliable way to discover where it is.
+
+zebra.cfg -- Zebra-specific configuration, including the location of
+ the register files, the location of the XSLT filter
+ configuration (filterconf.xml), etc.
+
+filterconf.xml -- Configuration of Zebra's XSLT filter, which uses
+ XSLT stylesheets to identify the indexable data in incoming
+ files and to transform records for presentation.
+
+zeerex2index.xsl -- The indexing stylesheet for ZeeRex records.
+
+zeerex2zeerex.xsl -- The "no-op" stylesheet for presenting ZeeRex
+ records.
+
+db -- A subdirectory containing the actual database: register files,
+ dictionaries and suchlike.
+
+--
+
+To create the database and start the server:
+
+xmllint --noout --schema zeerex-2.0.xsd zeerex.xml # Verify
+xsltproc zeerex2index.xsl zeerex.xml # Check what indexer will see
+zebraidx -c zebra.cfg init # Remove any existing database records
+zebraidx -c zebra.cfg update zeerex.xml # Our only record!
+zebraidx -c zebra.cfg commit
+zebrasrv -f yazserver.xml
+
+Then interrogate the database with SRU URLs such as:
+ http://localhost:1313/IR-Explain--1?version=1.1&operation=searchRetrieve&x-pquery=@attr%201=net:host%20localhost
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: filterconf.xml,v 1.1 2006-04-13 14:53:18 mike Exp $ -->
+<schemaInfo>
+ <schema name="index" stylesheet="zeerex2index.xsl"
+ identifier="http://indexdata.dk/zebra/xslt/1"/>
+ <schema name="zeerex" stylesheet="zeerex2zeerex.xsl"/>
+</schemaInfo>
--- /dev/null
+# $Id: pqf.properties,v 1.1 2006-04-13 14:53:18 mike Exp $
+#
+# Propeties file to drive org.z3950.zing.cql.CQLNode's toPQF()
+# back-end and the YAZ CQL-to-PQF converter. This specifies the
+# interpretation of various CQL indexes, relations, etc. in terms
+# of Type-1 query attributes.
+#
+# This configuration file generates queries using BIB-1 attributes.
+# See http://www.loc.gov/z3950/agency/zing/cql/dc-indexes.html
+# for the Maintenance Agency's work-in-progress mapping of Dublin Core
+# indexes to Attribute Architecture (util, XD and BIB-2)
+# attributes.
+
+# Identifiers for prefixes used in this file. (index.*)
+set.cql = info:srw/cql-context-set/1/cql-v1.1
+set.rec = info:srw/cql-context-set/2/rec-1.0
+set.dc = info:srw/cql-context-set/1/dc-v1.1
+set.bath = http://zing.z3950.org/cql/bath/2.0/
+
+# default set (in query)
+set = info:srw/cql-context-set/1/dc-v1.1
+
+# The default access point and result-set references
+index.cql.serverChoice = 1=1016
+ # srw.serverChoice is deprecated in favour of cql.serverChoice
+ # BIB-1 "any"
+
+index.rec.id = 1=12
+
+index.dc.title = 1=4
+index.dc.subject = 1=21
+index.dc.creator = 1=1003
+index.dc.author = 1=1003
+ ### Unofficial synonym for "creator"
+index.dc.editor = 1=1020
+index.dc.publisher = 1=1018
+index.dc.description = 1=62
+ # "abstract"
+index.dc.date = 1=30
+index.dc.resourceType = 1=1031
+ # guesswork: "Material-type"
+index.dc.format = 1=1034
+ # guesswork: "Content-type"
+index.dc.resourceIdentifier = 1=12
+ # "Local number"
+index.dc.source = 1=1019
+ # "Record-source"
+index.dc.language = 1=54
+ # "Code--language"
+index.dc.relation = 1=?
+ ### No idea how to represent this
+index.dc.coverage = 1=?
+ ### No idea how to represent this
+index.dc.rights = 1=?
+ ### No idea how to represent this
+
+# Relation attributes are selected according to the CQL relation by
+# looking up the "relation.<relation>" property:
+#
+relation.< = 2=1
+relation.le = 2=2
+relation.eq = 2=3
+relation.exact = 2=3
+relation.ge = 2=4
+relation.> = 2=5
+relation.<> = 2=6
+
+### These two are not really right:
+relation.all = 2=3
+relation.any = 2=3
+
+# BIB-1 doesn't have a server choice relation, so we just make the
+# choice here, and use equality (which is clearly correct).
+relation.scr = 2=3
+
+# Relation modifiers.
+#
+relationModifier.relevant = 2=102
+relationModifier.fuzzy = 5=102
+ ### truncation=regExpr-2 (5=102) in Zebra is "fuzzy matching"
+relationModifier.stem = 2=101
+relationModifier.phonetic = 2=100
+
+# Position attributes may be specified for anchored terms (those
+# beginning with "^", which is stripped) and unanchored (those not
+# beginning with "^"). This may change when we get a BIB-1 truncation
+# attribute that says "do what CQL does".
+#
+position.first = 3=1 6=1
+ # "first in field"
+position.any = 3=3 6=1
+ # "any position in field"
+position.last = 3=4 6=1
+ # not a standard BIB-1 attribute
+position.firstAndLast = 3=3 6=3
+ # search term is anchored to be complete field
+
+# Structure attributes may be specified for individual relations; a
+# default structure attribute my be specified by the pseudo-relation
+# "*", to be used whenever a relation not listed here occurs.
+#
+structure.exact = 4=108
+ # string
+structure.all = 4=2
+structure.any = 4=2
+structure.* = 4=1
+ # phrase
+
+# Truncation attributes used to implement CQL wildcard patterns. The
+# simpler forms, left, right- and both-truncation will be used for the
+# simplest patterns, so that we produce PQF queries that conform more
+# closely to the Bath Profile. However, when a more complex pattern
+# such as "foo*bar" is used, we fall back on Z39.58-style masking.
+#
+truncation.right = 5=1
+truncation.left = 5=2
+truncation.both = 5=3
+truncation.none = 5=100
+truncation.z3958 = 5=104
+
+# Finally, any additional attributes that should always be included
+# with each term can be specified in the "always" property.
+#
+always = 6=1
+# 6=1: completeness = incomplete subfield
+
+
+# Bath Profile support, added Thu Dec 18 13:06:20 GMT 2003
+# See the Bath Profile for SRW at
+# http://zing.z3950.org/cql/bath.html
+# including the Bath Context Set defined within that document.
+#
+# In this file, we only map index-names to BIB-1 use attributes, doing
+# so in accordance with the specifications of the Z39.50 Bath Profile,
+# and leaving the relations, wildcards, etc. to fend for themselves.
+
+index.bath.keyTitle = 1=33
+index.bath.possessingInstitution = 1=1044
+index.bath.name = 1=1002
+index.bath.personalName = 1=1
+index.bath.corporateName = 1=2
+index.bath.conferenceName = 1=3
+index.bath.uniformTitle = 1=6
+index.bath.isbn = 1=7
+index.bath.issn = 1=8
+index.bath.geographicName = 1=58
+index.bath.notes = 1=63
+index.bath.topicalSubject = 1=1079
+index.bath.genreForm = 1=1075
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: yazserver.xml,v 1.1 2006-04-13 14:53:17 mike Exp $ -->
+<yazgfs>
+ <listen id="tcp1313">tcp:@:1313</listen>
+ <server id="alvis" listenref="tcp1313">
+ <directory>./</directory>
+ <config>zebra.cfg</config>
+ <cql2rpn>pqf.properties</cql2rpn>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="explain.xml">
+ <xi:fallback>
+ <explain xmlns="http://explain.z3950.org/dtd/2.0/">
+ <serverInfo>
+ <host>localhost</host>
+ <port>1313</port>
+ <database>IR-Explain---1</database>
+ </serverInfo>
+ </explain>
+ </xi:fallback>
+ </xi:include>
+ </server>
+</yazgfs>
--- /dev/null
+# $Id: zebra.cfg,v 1.1 2006-04-13 14:53:17 mike Exp $
+
+# Where to look for config files
+#profilePath: /usr/local/share/idzebra/tab:/usr/share/idzebra/tab
+
+# Where to look for loadable zebra modules
+#modulePath: zebra/lib/
+
+# store records and record keys internally
+storeData: 1
+storeKeys: 1
+
+# Use the "xslt" filter with config file filter_alvis_conf.xml
+recordtype: xslt.filterconf.xml
+
+database: IR-Explain---1
+
+# where to put registers, and other var content, and how large they may be
+register: db/register:100G
+shadow: db/shadow:100G
+lockdir: db/lock
+tmpdir: db/tmp
+keytmpdir: db/tmp
--- /dev/null
+<schema
+ xmlns='http://www.w3.org/2001/XMLSchema'
+ targetNamespace='http://explain.z3950.org/dtd/2.0/'
+ xmlns:explain='http://explain.z3950.org/dtd/2.0/'>
+
+ <element name='explain'>
+ <complexType>
+ <sequence>
+ <element ref='explain:serverInfo'/>
+ <element ref='explain:databaseInfo' minOccurs='0' maxOccurs='1'/>
+ <element ref='explain:metaInfo' minOccurs='0' maxOccurs='1'/>
+ <element ref='explain:indexInfo' minOccurs='0' maxOccurs='1'/>
+ <choice minOccurs='0' maxOccurs='1'>
+ <element ref='explain:recordInfo'/>
+ <element ref='explain:schemaInfo'/>
+ </choice>
+ <element ref='explain:configInfo' minOccurs='0' maxOccurs='1'/>
+ </sequence>
+ <attribute name='authoritative' use='optional' default='false'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='id' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='serverInfo'>
+ <complexType>
+ <sequence>
+ <element ref='explain:host'/>
+ <element ref='explain:port'/>
+ <element ref='explain:database'/>
+ <element ref='explain:authentication' minOccurs='0' maxOccurs='1'/>
+ </sequence>
+ <attribute name='protocol' type='string' use='optional' default='Z39.50'/>
+ <attribute name='version' type='string' use='optional' default='3'/>
+ <attribute name='transport' type='string' use='optional' default='http'/>
+ <!-- ### The next line is not in the official schema. I need 2.1 -->
+ <attribute name='method' type='string' use='optional' default='get'/>
+ <attribute name='wsdl' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='host'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='port'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='database'>
+ <complexType mixed='true'>
+ <attribute name='numRecs' type='string' use='optional'/>
+ <attribute name='lastUpdate' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='authentication'>
+ <complexType>
+ <choice>
+ <element ref='explain:open'/>
+ <sequence>
+ <element ref='explain:user' minOccurs='0' maxOccurs='1'/>
+ <element ref='explain:group' minOccurs='0' maxOccurs='1'/>
+ <element ref='explain:password' minOccurs='0' maxOccurs='1'/>
+ </sequence>
+ </choice>
+ <attribute name='required' use='optional' default='true'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name='open'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='user'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='group'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='password'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='databaseInfo'>
+ <complexType>
+ <sequence>
+ <element ref='explain:title' minOccurs='0' maxOccurs='unbounded'/>
+ <element ref='explain:description' minOccurs='0' maxOccurs='unbounded'/>
+ <choice minOccurs='0' maxOccurs='unbounded'>
+ <element ref='explain:author'/>
+ <element ref='explain:contact'/>
+ <element ref='explain:extent'/>
+ <element ref='explain:history'/>
+ <element ref='explain:langUsage'/>
+ <element ref='explain:restrictions'/>
+ <element ref='explain:subjects'/>
+ <element ref='explain:links'/>
+ <element ref='explain:implementation'/>
+ </choice>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name='title'>
+ <complexType mixed='true'>
+ <attribute name='primary' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='lang' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='description'>
+ <complexType mixed='true'>
+ <attribute name='primary' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='lang' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='author'>
+ <complexType mixed='true'>
+ <attribute name='primary' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='lang' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='contact'>
+ <complexType mixed='true'>
+ <attribute name='primary' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='lang' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='extent'>
+ <complexType mixed='true'>
+ <attribute name='primary' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='lang' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='history'>
+ <complexType mixed='true'>
+ <attribute name='primary' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='lang' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='langUsage'>
+ <complexType mixed='true'>
+ <attribute name='codes' type='string' use='optional'/>
+ <attribute name='primary' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='lang' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='restrictions'>
+ <complexType mixed='true'>
+ <attribute name='primary' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='lang' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='subjects'>
+ <complexType>
+ <sequence>
+ <element ref='explain:subject' maxOccurs='unbounded'/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name='subject'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='links'>
+ <complexType>
+ <sequence>
+ <element ref='explain:link' maxOccurs='unbounded'/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name='link'>
+ <complexType mixed='true'>
+ <attribute name='type' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='implementation'>
+ <complexType>
+ <sequence>
+ <element ref='explain:title' minOccurs='0' maxOccurs='unbounded'/>
+ </sequence>
+ <attribute name='identifier' type='string' use='optional'/>
+ <attribute name='version' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='metaInfo'>
+ <complexType>
+ <sequence>
+ <element ref='explain:dateModified'/>
+ <sequence minOccurs='0' maxOccurs='1'>
+ <element ref='explain:aggregatedFrom'/>
+ <element ref='explain:dateAggregated'/>
+ </sequence>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name='dateModified'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='aggregatedFrom'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='dateAggregated'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='indexInfo'>
+ <complexType>
+ <choice maxOccurs='unbounded'>
+ <element ref='explain:set'/>
+ <element ref='explain:index'/>
+ <element ref='explain:sortKeyword'/>
+ </choice>
+ </complexType>
+ </element>
+
+ <element name='set'>
+ <complexType>
+ <sequence>
+ <element ref='explain:title' minOccurs='0' maxOccurs='unbounded'/>
+ </sequence>
+ <attribute name='name' type='string' use='required'/>
+ <attribute name='identifier' type='string' use='required'/>
+ </complexType>
+ </element>
+
+ <element name='index'>
+ <complexType>
+ <sequence>
+ <element ref='explain:title' minOccurs='0' maxOccurs='unbounded'/>
+ <element ref='explain:map' maxOccurs='unbounded'/>
+ <element ref='explain:configInfo' minOccurs='0' maxOccurs='1'/>
+ </sequence>
+ <attribute name='id' type='string' use='optional'/>
+ <attribute name='search' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='scan' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='sort' use='optional'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name='sortKeyword'>
+ <complexType mixed='true'>
+ </complexType>
+ </element>
+
+ <element name='map'>
+ <complexType>
+ <choice>
+ <sequence>
+ <element ref='explain:attr' maxOccurs='unbounded'/>
+ </sequence>
+ <element ref='explain:name'/>
+ </choice>
+ <attribute name='primary' use='optional' default='false'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name='name'>
+ <complexType mixed='true'>
+ <attribute name='set' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='attr'>
+ <complexType mixed='true'>
+ <attribute name='type' type='string' use='required'/>
+ <attribute name='set' type='string' use='optional' default='1.2.840.10003.3.1'/>
+ </complexType>
+ </element>
+
+ <element name='recordInfo'>
+ <complexType>
+ <sequence>
+ <element ref='explain:recordSyntax' maxOccurs='unbounded'/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name='recordSyntax'>
+ <complexType>
+ <sequence>
+ <element ref='explain:elementSet' maxOccurs='unbounded'/>
+ </sequence>
+ <attribute name='name' type='string' use='optional'/>
+ <attribute name='identifier' type='string' use='optional'/>
+ </complexType>
+ </element>
+
+ <element name='elementSet'>
+ <complexType>
+ <sequence>
+ <element ref='explain:title' minOccurs='0' maxOccurs='unbounded'/>
+ </sequence>
+ <attribute name='name' type='string' use='required'/>
+ </complexType>
+ </element>
+
+ <element name='schemaInfo'>
+ <complexType>
+ <sequence>
+ <element ref='explain:schema' maxOccurs='unbounded'/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name='schema'>
+ <complexType>
+ <sequence>
+ <element ref='explain:title' minOccurs='0' maxOccurs='unbounded'/>
+ </sequence>
+ <attribute name='identifier' type='string' use='required'/>
+ <attribute name='name' type='string' use='required'/>
+ <attribute name='location' type='string' use='optional'/>
+ <attribute name='sort' use='optional' default='false'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name='retrieve' use='optional' default='true'>
+ <simpleType>
+ <restriction base='string'>
+ <enumeration value='true'/>
+ <enumeration value='false'/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name='configInfo'>
+ <complexType>
+ <choice minOccurs='0' maxOccurs='unbounded'>
+ <element ref='explain:default'/>
+ <element ref='explain:setting'/>
+ <element ref='explain:supports'/>
+ </choice>
+ </complexType>
+ </element>
+
+ <element name='default'>
+ <complexType mixed='true'>
+ <attribute name='type' type='string' use='required'/>
+ </complexType>
+ </element>
+
+ <element name='setting'>
+ <complexType mixed='true'>
+ <attribute name='type' type='string' use='required'/>
+ </complexType>
+ </element>
+
+ <element name='supports'>
+ <complexType mixed='true'>
+ <attribute name='type' type='string' use='required'/>
+ </complexType>
+ </element>
+</schema>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: zeerex.xml,v 1.1 2006-04-13 14:53:17 mike Exp $ -->
+<explain xmlns="http://explain.z3950.org/dtd/2.0/">
+ <serverInfo protocol="SRW/SRU/Z39.50" version="1.1" method="GET/POST">
+ <host>localhost</host>
+ <port>1313</port>
+ <database>Default</database>
+ </serverInfo>
+ <databaseInfo>
+ <title lang="en" primary="true">IRSpy database of ZeeRex records</title>
+ <author>Mike Taylor, Index Data Aps, http://www.indexdata.com</author>
+ <contact>mike@indexdata.com</contact>
+ </databaseInfo>
+ <!-- ### Much, much more to be added -->
+</explain>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: zeerex2index.xsl,v 1.1 2006-04-13 14:53:18 mike Exp $ -->
+<!-- See the ZeeRex profile at http://srw.cheshire3.org/profiles/ZeeRex/ -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:z="http://indexdata.dk/zebra/xslt/1"
+ xmlns:e="http://explain.z3950.org/dtd/2.0/"
+ version="1.0">
+ <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+ <!-- disable all default text node output -->
+ <xsl:template match="text()"/>
+ <!-- match on alvis xml record -->
+ <xsl:template match="//e:explain">
+ <z:record id="{concat(
+ e:serverInfo/e:host, ':',
+ e:serverInfo/e:port, '/',
+ e:serverInfo/e:database)}"
+ type="update">
+ <z:index name="rec:id" type="0">
+ <xsl:value-of select="concat(
+ e:serverInfo/e:host, ':',
+ e:serverInfo/e:port, '/',
+ e:serverInfo/e:database)"/>
+ </z:index>
+ <z:index name="net:protocol" type="w">
+ <xsl:value-of select="e:serverInfo/@protocol"/>
+ </z:index>
+ <z:index name="net:version" type="0">
+ <xsl:value-of select="e:serverInfo/@version"/>
+ </z:index>
+ <z:index name="net:method" type="w">
+ <xsl:value-of select="e:serverInfo/@method"/>
+ </z:index>
+ <z:index name="net:host" type="0">
+ <xsl:value-of select="e:serverInfo/e:host"/>
+ </z:index>
+ <z:index name="net:port" type="0">
+ <xsl:value-of select="e:serverInfo/e:port"/>
+ </z:index>
+ <z:index name="net:path" type="0">
+ <xsl:value-of select="e:serverInfo/e:database"/>
+ </z:index>
+ <z:index name="dc:title" type="w">
+ <xsl:value-of select="e:databaseInfo/e:title"/>
+ </z:index>
+ <z:index name="dc:creator" type="w">
+ <xsl:value-of select="e:databaseInfo/e:author"/>
+ </z:index>
+ </z:record>
+ </xsl:template>
+</xsl:stylesheet>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: zeerex2zeerex.xsl,v 1.1 2006-04-13 14:53:18 mike Exp $ -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+ <xsl:template match="/">
+ <xsl:copy-of select="/"/>
+ </xsl:template>
+</xsl:stylesheet>