Added support for Tcl8.0/Tk8.0.
[ir-tcl-moved-to-github.git] / doc / ir-tcl.sgml
index d15c523..e053776 100644 (file)
@@ -1,14 +1,14 @@
 <!doctype linuxdoc system>
 
 <!--
-  $Id: ir-tcl.sgml,v 1.15 1996-01-10 11:15:41 adam Exp $
+  $Id: ir-tcl.sgml,v 1.23 1997-04-13 19:01:45 adam Exp $
 -->
 
 <article>
-<title>IrTcl User's Guide and Reference
-<author><htmlurl url="http://130.225.252.168/" name="Index Data">,
+<title>IrTcl User's Guide and Reference 
+<author><htmlurl url="http://www.indexdata.dk/" name="Index Data">,
 <tt><htmlurl url="mailto:info@index.ping.dk" name="info@index.ping.dk"></tt>
-<date>$Revision: 1.15 $
+<date>$Revision: 1.23 $
 <abstract>
 This document describes IrTcl -- an information retrieval toolkit for
 Tcl and Tk that provides access to the Z39.50/SR protocol.
@@ -53,8 +53,8 @@ In order to compile you need:
 <item> An ANSI C compiler such as GNU C.
 <item> <htmlurl url="http://www.sunlabs.com/research/tcl/" name="Tcl">.
  Version 7.3, 7.4 and 7.5 has been tested.
-<item> <htmlurl url="http://130.225.252.168/yaz.html" name="Yaz">
- version 1.0 patch level 3 or higher.
+<item> <htmlurl url="http://www.indexdata.dk/yaz.html" name="YAZ">
+ version 1.2 or higher.
 </itemize>
 
 As an option you may want:
@@ -96,6 +96,11 @@ To install the programs and support files type:
 $ make install
 </verb></tscreen>
 
+If you wish to install man pages type:
+<tscreen><verb>
+$ make install.man
+</verb></tscreen>
+
 Summary of files installed (the names refer to the Makefile variables):
 
 <descrip>
@@ -591,6 +596,9 @@ operators. They are:
  Proximity operation on op1 and op2. Not implemented yet.
 <tag><tt>@set </tt><em>name</em></tag>
  Result set reference
+<tag><tt>@attrset </tt><em>set</em></tag>
+ Whole query uses the specified attribute <em>set</em>. If this operator is
+ used it must be defined at the beginning of the query.
 </descrip>
 
 It is simple to build RPN queries in <sf/IrTcl/. Search terms
@@ -622,6 +630,12 @@ term is right truncated:
    @attr 1=4 @and @attr 5=1 tech beta
 </verb></tscreen>
 
+To search for the DatabaseInfo records from an Explain server, we 
+could use
+<tscreen><verb>
+   @attrset exp1 @attr 1=1 DatabaseInfo
+</verb></tscreen>
+
 <sect1>Search
 
 <p>
@@ -639,7 +653,7 @@ The settings that affect the search are listed below:
 <tag><tt>replaceIndicator </tt><em>boolean</em></tag>
  Replace-indicator. Default true (1).
 <tag><tt>setName </tt><em>string</em></tag>
- Name of result set.
+ Name of result set. Default name of set is <tt/default/.
 <tag><tt>queryType rpn|ccl</tt></tag>
  Query type-1 or query type-2. Default rpn (type-1).
 <tag><tt>preferredRecordSyntax </tt><em>string</em></tag>
@@ -1050,6 +1064,99 @@ record.
 In <sf/IrTcl/ a SUTRS record is treated as one single string. To retrieve
 a SUTRS record use the <tt>getSutrs</tt> followed by an index.
 
+<sect1>GRS-1
+<p>
+To be written.
+
+<sect1>Explain
+<p>
+Explain records are retrieved like other records. The method,
+<tt>getExplain</tt> is followed by an index and, and an optional
+Explain record pattern.
+
+The returned record is a canonical representation of the Explain record.
+An ASN.1 sequence is represented as a list. Each item in the list
+consists of the name of the element, followed by its value if the value
+is supplied.
+
+The optional pattern that follows the index after <tt>getExplain</tt>
+consists of one or more elements, that is matched against the elements
+of the actual record.
+
+<bf/Example/
+
+One of the few targets that support explain is the ATT research server
+at <tt>z3950.research.att.com</tt>.
+
+The targetInfo record was returned by the target and it's stored in
+position 1 in the result set, <tt>z.1</tt>. To retrieve the whole
+record we must use
+<tscreen><verb>
+z.1 getExplain 1
+</verb></tscreen>
+
+and we get in return
+
+<tscreen><verb>
+{targetInfo commonInfo {name {Lucent Technologies Research Server}}
+recentNews icon {namedResultSets 1} {multipleDBsearch 0}
+{maxResultSets 100} {maxResultSize 600000} maxTerms timeoutInterval
+{welcomeMessage {strings { {language eng}
+{text
+{Salutations - this is Lucent Technologies experimental Z39.50 server.
+No guarentees, but free and unlimited access!}} } } }
+{contactInfo {name {Robert Waldstein}} {description {strings
+{ {language eng}
+{text {Librarian system designer - no legal anythings}} } } }
+{address {strings { {language eng} {text {Room 3D-591
+600 Mountain Ave
+Murray Hill
+N.J. USA 07974}} } } } {email wald@lucent.com} {phone {908 582-6171}} }
+description nicknames {usageRest {strings { {language eng}
+{text {None - as long as nonProfit research}} } } } paymentAddr
+{hours {strings { {language eng} {text {Should never be down}} } } }
+dbCombinations addresses commonAccessInfo } 
+</verb></tscreen>
+
+The <tt>targetInfo</tt> above indicates the the record is really a
+<tt>targetInfo</tt> record. The <tt>commonInfo</tt>, which is optional, is
+not supplied by this server. The <tt>name</tt>, however is supplied,
+with the value <tt>Lucent Technologies Research Server</tt>.
+
+To retrieve the <tt>contactInfo</tt> from the record above we can
+extract the element from the record by using Tcl's list manipulation
+facilities, for example by doing
+<tscreen><verb>
+set ti [z.1 getExplain 1]
+lindex [lindex $ti 0] 12 
+</verb></tscreen>
+which will return
+<tscreen><verb>
+contactInfo {name {Robert Waldstein}} {description {strings
+{ {language eng}
+{text {Librarian system designer - no legal anythings}} }
+} } {address {strings { {language eng} {text {Room 3D-591
+600 Mountain Ave
+Murray Hill
+N.J. USA 07974}} } } } {email wald@lucent.com} {phone {908 582-6171}}
+</verb></tscreen>
+
+We can also extract almost the same by doing
+<tscreen><verb>
+z.1 getExplain 1 targetInfo contactInfo
+</verb></tscreen>
+which will return
+<tscreen><verb>
+{name {Robert Waldstein}} {description {strings { {language eng}
+{text {Librarian system designer - no legal anythings}} } } }
+{address {strings { {language eng} {text {Room 3D-591
+600 Mountain Ave
+Murray Hill
+N.J. USA 07974}} } } } {email wald@lucent.com} {phone {908 582-6171}}
+</verb></tscreen>
+
+<bf/End of example/
+
 <sect>Scan
 
 <p>
@@ -1141,7 +1248,7 @@ been created.
 <sect>License
 
 <p>
-Copyright &copy; 1995, Index Data.
+Copyright &copy; 1995-1996, Index Data.
 
 Permission to use, copy, modify, distribute, and sell this software and
 its documentation, in whole or in part, for any purpose, is hereby granted,
@@ -1208,8 +1315,9 @@ Tcl and the Tk Toolkit. Addison-Wesley Company Inc (ISBN
  name="http://www.sunlabs.com/research/tcl"></tt>.
 The primary ftp site is <tt><htmlurl url="ftp://ftp.smli.com/pub/tcl/"
 name="ftp://ftp.smli.com/pub/tcl/"></tt>.
-A mirror site can be found at <tt><htmlurl url="ftp://ftp.aud.alcatel.com/tcl/"
-name="ftp://ftp.aud.alcatel.com/tcl/"></tt>.
+A mirror site can be found at <tt>
+<htmlurl url="ftp://ftp.neosoft.com/pub/tcl/mirror/ftp.smli.com"
+name="ftp://ftp.neosoft.com/pub/tcl/mirror/ftp.smli.com"></tt>.
 <tag>2 Furniss, Peter:</tag>
 RFC 1698: Octet Sequences for Upper-Layer OSI to Support
 Basic Communications Applications.