Improved installation. Moved header files to include/yaz.
[yaz-moved-to-github.git] / z39.50 / z3950v3.asn
1 Z39-50-APDU-1995 -- OID for this definition, assigned in OID.3.1, is {Z39-50 2 1} 
2 DEFINITIONS ::=  
3 BEGIN   -- Z39.50 Maintenance Agency Official Text for ANSI/NISO Z39.50-1995 - July 1995
4 --
5 EXPORTS OtherInformation, Term, AttributeSetId, AttributeList, AttributeElement, ElementSetName, SortElement, DatabaseName,
6 CompSpec, Specification, Permissions, InternationalString, IntUnit, Unit, StringOrNumeric, Query, Records, ResultSetId,
7 DefaultDiagFormat, DiagRec;
8 --
9
10 PDU ::= CHOICE{
11  initRequest        [20] IMPLICIT InitializeRequest,
12  initResponse      [21] IMPLICIT InitializeResponse,
13  searchRequest      [22] IMPLICIT SearchRequest,
14  searchResponse      [23] IMPLICIT SearchResponse,
15  presentRequest      [24] IMPLICIT PresentRequest,
16  presentResponse      [25] IMPLICIT PresentResponse,
17  deleteResultSetRequest    [26] IMPLICIT DeleteResultSetRequest,
18  deleteResultSetResponse    [27] IMPLICIT DeleteResultSetResponse,
19  accessControlRequest    [28] IMPLICIT AccessControlRequest,
20  accessControlResponse    [29] IMPLICIT AccessControlResponse,
21  resourceControlRequest         [30] IMPLICIT ResourceControlRequest,
22  resourceControlResponse    [31] IMPLICIT ResourceControlResponse,
23  triggerResourceControlRequest  [32] IMPLICIT TriggerResourceControlRequest,
24  resourceReportRequest          [33] IMPLICIT ResourceReportRequest,
25  resourceReportResponse    [34] IMPLICIT ResourceReportResponse,
26  scanRequest         [35] IMPLICIT ScanRequest,
27  scanResponse      [36] IMPLICIT ScanResponse,
28               -- [37] through [42] reserved
29  sortRequest        [43] IMPLICIT SortRequest,
30  sortResponse      [44] IMPLICIT SortResponse,
31  segmentRequest      [45] IMPLICIT Segment,
32  extendedServicesRequest    [46] IMPLICIT ExtendedServicesRequest,
33  extendedServicesResponse    [47] IMPLICIT ExtendedServicesResponse,
34  close          [48] IMPLICIT Close}
35
36
37 -- Initialize APDUs
38 --
39   InitializeRequest ::= SEQUENCE{
40   referenceId        ReferenceId OPTIONAL,
41   protocolVersion      ProtocolVersion,
42   options        Options,
43   preferredMessageSize  [5]  IMPLICIT INTEGER,
44    exceptionalRecordSize  [6]  IMPLICIT INTEGER,
45    idAuthentication    [7]    IdAuthentication OPTIONAL, -- see note below
46   implementationId    [110]  IMPLICIT InternationalString OPTIONAL,
47   implementationName  [111]  IMPLICIT InternationalString OPTIONAL,
48    implementationVersion  [112]  IMPLICIT InternationalString OPTIONAL,   
49   userInformationField  [11]  EXTERNAL OPTIONAL,
50   otherInfo        OtherInformation OPTIONAL}
51 --Note:
52 -- For idAuthentication, the type ANY is retained for compatibility with earlier versions. 
53 -- For interoperability, the following is recommended:
54 IdAuthentication ::=
55    CHOICE{
56       open   VisibleString,
57       idPass  SEQUENCE {
58       groupId  [0]  IMPLICIT InternationalString OPTIONAL,
59       userId   [1]  IMPLICIT InternationalString OPTIONAL,
60       password  [2]  IMPLICIT InternationalString OPTIONAL },
61       anonymous  NULL,
62       other    EXTERNAL
63    }
64 -- May use access control formats for 'other'.  See Appendix 7 ACC.
65 --
66   InitializeResponse ::= SEQUENCE{
67   referenceId        ReferenceId OPTIONAL,
68    protocolVersion                ProtocolVersion,
69   options              Options,
70   preferredMessageSize  [5]  IMPLICIT INTEGER,
71    exceptionalRecordSize  [6]  IMPLICIT INTEGER,
72   result        [12]  IMPLICIT BOOLEAN,    -- reject = FALSE; Accept = TRUE
73   implementationId    [110]  IMPLICIT InternationalString OPTIONAL,
74   implementationName  [111]  IMPLICIT InternationalString OPTIONAL,
75    implementationVersion  [112]  IMPLICIT InternationalString OPTIONAL,   
76   userInformationField  [11]  EXTERNAL OPTIONAL,
77   otherInfo        OtherInformation OPTIONAL}
78 -- Begin auxiliary definitions for Init PDUs
79   ProtocolVersion  ::=  [3]   IMPLICIT BIT STRING{
80     version-1      (0),       -- This bit should always be set, but does not
81               -- correspond to any Z39.50 version.
82     version-2      (1),              -- "Version 2 supported."
83               -- This bit should always be set.
84     version-3      (2)        -- "Version 3 supported."
85 -- Values higher than 'version-3' should be ignored. Both the Initialize request and Initialize Response APDUs
86 -- include a value string corresponding to the supported versions. The highest common version is selected
87 -- for use. If there are no versions in common, "Result" in the Init Response should indicate "reject."
88 -- Note: Versions 1 and 2 are identical. Systems supporting version 2 should indicate support for version
89 -- 1 as well, for interoperability with systems that indicate support for version 1 only (e.g. ISO 10163-1991
90 -- implementations).  
91   }
92   Options  ::= [4] IMPLICIT BIT STRING{ 
93       search        (0), 
94       present       (1), 
95       delSet        (2),
96        resourceReport    (3),
97       triggerResourceCtrl    (4),
98       resourceCtrl       (5), 
99       accessCtrl       (6),
100       scan         (7),
101       sort        (8), 
102       --        (9) (reserved)
103       extendedServices    (10),
104       level-1Segmentation    (11),
105       level-2Segmentation    (12),
106       concurrentOperations  (13),
107       namedResultSets    (14)}
108 -- end auxiliary definitions for Init PDUs
109
110
111 --Search APDUs
112   SearchRequest ::= SEQUENCE{
113   referenceId          ReferenceId OPTIONAL,
114       smallSetUpperBound    [13]  IMPLICIT INTEGER,
115   largeSetLowerBound    [14]  IMPLICIT INTEGER,
116   mediumSetPresentNumber    [15]  IMPLICIT INTEGER,
117   replaceIndicator      [16]  IMPLICIT BOOLEAN,
118   resultSetName      [17]  IMPLICIT InternationalString,
119    databaseNames      [18]   IMPLICIT SEQUENCE OF DatabaseName,
120    smallSetElementSetNames    [100]  ElementSetNames OPTIONAL,
121     mediumSetElementSetNames  [101]  ElementSetNames OPTIONAL,
122   preferredRecordSyntax    [104]  IMPLICIT OBJECT IDENTIFIER OPTIONAL,
123   query          [21]  Query,
124     -- Following two parameters may be used only if version 3 is in force.
125    additionalSearchInfo    [203]  IMPLICIT OtherInformation OPTIONAL,
126   otherInfo          OtherInformation OPTIONAL}
127
128
129 -- Query Definitions
130   Query  ::=  CHOICE{
131       type-0  [0]  ANY,  
132         type-1    [1]  IMPLICIT RPNQuery,
133         type-2      [2]  OCTET STRING,
134         type-100  [100]  OCTET STRING,
135         type-101  [101]  IMPLICIT RPNQuery,
136        type-102  [102]  OCTET STRING}
137 --
138 -- Definitions for RPN query
139      RPNQuery ::= SEQUENCE{
140       attributeSet    AttributeSetId,
141       rpn      RPNStructure}
142 --
143   RPNStructure ::= CHOICE{
144     op    [0] Operand, 
145      rpnRpnOp  [1] IMPLICIT SEQUENCE{
146           rpn1    RPNStructure,
147                 rpn2    RPNStructure,
148                 op    Operator }} 
149   Operand ::= CHOICE{
150     attrTerm  AttributesPlusTerm, 
151     resultSet  ResultSetId, 
152           -- If version 2 is in force: 
153           --   - If query type is 1, one of the above two must be chosen; 
154           --   - resultAttr (below) may be used only if query type is 101. 
155     resultAttr  ResultSetPlusAttributes}
156
157   AttributesPlusTerm ::= [102] IMPLICIT SEQUENCE{
158          attributes  AttributeList, 
159         term    Term}
160   ResultSetPlusAttributes ::= [214] IMPLICIT SEQUENCE{
161         resultSet  ResultSetId,
162         attributes  AttributeList}
163   AttributeList ::=    [44]  IMPLICIT SEQUENCE OF AttributeElement
164 --
165   Term ::= CHOICE{
166     general      [45]  IMPLICIT OCTET STRING,
167               -- values below may be used only if version 3 is in force
168     numeric      [215]  IMPLICIT INTEGER,
169     characterString    [216]  IMPLICIT InternationalString,
170     oid        [217]  IMPLICIT OBJECT IDENTIFIER,
171     dateTime      [218]  IMPLICIT GeneralizedTime,
172     external      [219]  IMPLICIT EXTERNAL,
173     integerAndUnit    [220] IMPLICIT IntUnit,
174     null        [221] IMPLICIT NULL}   
175
176   Operator ::= [46] CHOICE{
177          and    [0] IMPLICIT NULL,
178             or    [1] IMPLICIT NULL,
179                 and-not  [2] IMPLICIT NULL,
180               -- If version 2 is in force: 
181               --  - For query type 1, one of the above three must be chosen;
182               --  - prox (below) may be used only if query type is 101. 
183         prox    [3] IMPLICIT ProximityOperator}
184   AttributeElement  ::=  SEQUENCE{
185     attributeSet    [1]    IMPLICIT AttributeSetId OPTIONAL,
186                 -- Must be omitted if version 2 is in force.
187                 -- If included, overrides value of attributeSet
188                 -- in RPNQuery above, but only for this attribute.
189     attributeType  [120]  IMPLICIT INTEGER,
190     attributeValue    CHOICE{
191               numeric  [121]   IMPLICIT INTEGER,
192                   -- If version 2 is in force, 
193                   -- Must select 'numeric' for attributeValue.
194
195       complex  [224] IMPLICIT SEQUENCE{ 
196                list      [1] IMPLICIT SEQUENCE OF StringOrNumeric,
197                     semanticAction  [2] IMPLICIT SEQUENCE OF INTEGER OPTIONAL}}}
198                        
199
200   ProximityOperator ::= SEQUENCE{
201     exclusion      [1] IMPLICIT BOOLEAN OPTIONAL,
202     distance      [2] IMPLICIT INTEGER,
203     ordered      [3] IMPLICIT BOOLEAN,
204     relationType      [4] IMPLICIT INTEGER{
205               lessThan      (1),
206               lessThanOrEqual    (2),
207               equal        (3),
208               greaterThanOrEqual    (4),
209               greaterThan      (5),
210               notEqual      (6)},
211     proximityUnitCode    [5] CHOICE{
212               known  [1] IMPLICIT KnownProximityUnit,
213               private  [2] IMPLICIT INTEGER}}
214 --
215     KnownProximityUnit ::= INTEGER{
216           character  (1),
217           word     (2),
218           sentence   (3),
219           paragraph   (4),
220           section   (5),
221           chapter   (6),
222           document   (7),
223           element  (8),
224           subelement  (9),
225           elementType  (10),
226            byte    (11) -- Version 3 only
227           }
228 -- End definitions for RPN Query
229
230
231 SearchResponse ::= SEQUENCE{
232   referenceId        ReferenceId OPTIONAL,
233   resultCount       [23]  IMPLICIT INTEGER,
234   numberOfRecordsReturned  [24]  IMPLICIT INTEGER,
235   nextResultSetPosition  [25]  IMPLICIT INTEGER,
236   searchStatus      [22]  IMPLICIT BOOLEAN,
237   resultSetStatus    [26]  IMPLICIT INTEGER{
238               subset    (1),
239                  interim  (2), 
240                none    (3)} OPTIONAL,
241   presentStatus        PresentStatus  OPTIONAL,
242     records        Records OPTIONAL,
243     -- Following two parameters may be used only if version 3 is in force.
244   additionalSearchInfo  [203]  IMPLICIT OtherInformation OPTIONAL,
245   otherInfo        OtherInformation OPTIONAL}
246 --Retrieval APDUs 
247   PresentRequest ::= SEQUENCE{
248   referenceId          ReferenceId OPTIONAL,
249       resultSetId          ResultSetId,
250   resultSetStartPoint      [30]  IMPLICIT INTEGER,
251   numberOfRecordsRequested  [29]  IMPLICIT INTEGER,
252   additionalRanges      [212]  IMPLICIT SEQUENCE OF Range OPTIONAL,
253       -- additionalRanges may be included only if version 3 is in force.
254   recordComposition      CHOICE{
255                 simple  [19]         ElementSetNames,
256                 -- must choose 'simple' if version 2 is in force
257                 complex  [209]               IMPLICIT CompSpec} OPTIONAL,
258   preferredRecordSyntax    [104]  IMPLICIT OBJECT IDENTIFIER OPTIONAL,
259   maxSegmentCount      [204]  IMPLICIT INTEGER OPTIONAL, -- level 1 or 2
260   maxRecordSize      [206]  IMPLICIT INTEGER OPTIONAL, -- level 2 only
261   maxSegmentSize      [207]  IMPLICIT INTEGER OPTIONAL, -- level 2 only
262   otherInfo          OtherInformation OPTIONAL}
263 --
264   Segment ::= SEQUENCE{
265       -- Segment PDU may only be used when version 3 is in force, 
266       -- and only when segmentation is in effect.
267    referenceId          ReferenceId OPTIONAL,
268      numberOfRecordsReturned    [24]  IMPLICIT INTEGER,
269   segmentRecords      [0]  IMPLICIT SEQUENCE OF NamePlusRecord,
270   otherInfo          OtherInformation OPTIONAL}
271 --
272   PresentResponse ::= SEQUENCE{
273   referenceId          ReferenceId OPTIONAL,
274   numberOfRecordsReturned    [24]  IMPLICIT INTEGER,
275    nextResultSetPosition    [25]  IMPLICIT INTEGER,
276     presentStatus          PresentStatus,
277   records          Records OPTIONAL,
278   otherInfo          OtherInformation OPTIONAL} 
279 -- begin auxiliary definitions for Search and Present APDUs
280
281 -- begin definition of records
282   Records ::= CHOICE{
283   responseRecords      [28]  IMPLICIT SEQUENCE OF NamePlusRecord,
284   nonSurrogateDiagnostic     [130]  IMPLICIT DefaultDiagFormat,
285   multipleNonSurDiagnostics   [205]  IMPLICIT SEQUENCE OF DiagRec} 
286 --
287   NamePlusRecord  ::=  SEQUENCE{
288   name    [0] IMPLICIT DatabaseName OPTIONAL,
289   record  [1] CHOICE{
290         retrievalRecord        [1] EXTERNAL,
291         surrogateDiagnostic    [2] DiagRec, 
292           -- Must select one of the above two, retrievalRecord or
293           -- surrogateDiagnostic, unless 'level 2 segmentation' is in effect.
294         startingFragment    [3] FragmentSyntax,
295         intermediateFragment  [4] FragmentSyntax,
296         finalFragment    [5] FragmentSyntax}}
297   FragmentSyntax ::= CHOICE{
298     externallyTagged    EXTERNAL,
299     notExternallyTagged  OCTET STRING}
300
301   DiagRec ::= CHOICE{
302       defaultFormat    DefaultDiagFormat,
303                 -- Must choose defaultFormat if version 2 is in effect.
304       externallyDefined    EXTERNAL}
305
306   DefaultDiagFormat::= SEQUENCE{ 
307   diagnosticSetId  OBJECT IDENTIFIER,
308   condition    INTEGER,
309   addinfo      CHOICE{
310            v2Addinfo  VisibleString,  -- version 2
311            v3Addinfo  InternationalString  -- version 3
312             }}
313   -- end definition of records
314   Range  ::= SEQUENCE{
315     startingPosition    [1] IMPLICIT INTEGER,
316     numberOfRecords    [2] IMPLICIT INTEGER} 
317 --
318   ElementSetNames ::= CHOICE {
319     genericElementSetName  [0] IMPLICIT InternationalString,
320     databaseSpecific    [1] IMPLICIT SEQUENCE OF SEQUENCE{
321               dbName  DatabaseName,
322               esn    ElementSetName}}
323
324   PresentStatus   ::=    [27]  IMPLICIT INTEGER{
325                             success  (0),
326                              partial-1   (1),
327                               partial-2   (2),
328               partial-3   (3),
329                                       partial-4   (4),
330                                failure    (5)}
331
332 -- begin definition of composition specification
333   CompSpec ::= SEQUENCE{
334   selectAlternativeSyntax  [1] IMPLICIT BOOLEAN,
335             -- See comment for recordSyntax, below.
336   generic             [2] IMPLICIT Specification OPTIONAL,
337   dbSpecific      [3] IMPLICIT SEQUENCE OF SEQUENCE{
338                 db  [1] DatabaseName,
339                 spec  [2] IMPLICIT Specification} OPTIONAL,
340     -- At least one of generic and dbSpecific must occur, and both may occur. If both, then for
341      -- any record not in the list of databases within dbSpecific, generic applies.
342    recordSyntax               [4] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL
343                -- For each record, the target selects the first record syntax
344                -- in this list that it can support.  If the list is exhausted, the
345                -- target may select an alternative syntax if
346                -- selectAlternativeSyntax is 'true'.
347         }
348   Specification ::= SEQUENCE{
349   schema    [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
350   elementSpec    [2] CHOICE{
351               elementSetName   [1] IMPLICIT InternationalString,
352           externalEspec  [2] IMPLICIT EXTERNAL} OPTIONAL}
353 -- end definition of composition specification
354 -- end auxiliary definitions for search and response APDUs
355
356 -- Delete APDUs
357   DeleteResultSetRequest ::= SEQUENCE{
358   referenceId          ReferenceId OPTIONAL,
359       deleteFunction      [32]  IMPLICIT INTEGER{
360                     list   (0),
361                     all   (1)},
362    resultSetList          SEQUENCE OF ResultSetId OPTIONAL,
363   otherInfo          OtherInformation OPTIONAL} 
364 --
365   DeleteResultSetResponse ::= SEQUENCE{
366   referenceId          ReferenceId OPTIONAL,
367     deleteOperationStatus    [0]  IMPLICIT DeleteSetStatus,
368   deleteListStatuses      [1]  IMPLICIT ListStatuses OPTIONAL,
369   numberNotDeleted       [34]  IMPLICIT INTEGER OPTIONAL,
370      bulkStatuses        [35]   IMPLICIT ListStatuses OPTIONAL,
371    deleteMessage      [36]  IMPLICIT InternationalString OPTIONAL,
372   otherInfo          OtherInformation OPTIONAL}
373   ListStatuses ::= SEQUENCE OF SEQUENCE{ 
374         id  ResultSetId, 
375         status  DeleteSetStatus}
376
377   DeleteSetStatus ::= [33] IMPLICIT INTEGER{
378                   success          (0),
379                    resultSetDidNotExist      (1),
380                     previouslyDeletedByTarget      (2),
381                      systemProblemAtTarget      (3),
382                    accessNotAllowed        (4),
383       resourceControlAtOrigin      (5),
384                    resourceControlAtTarget      (6),
385                     bulkDeleteNotSupported      (7),
386                    notAllRsltSetsDeletedOnBulkDlte    (8),
387       notAllRequestedResultSetsDeleted    (9),
388       resultSetInUse        (10)}
389 --
390
391 --Access- and Resource-control APDUs
392 --
393   AccessControlRequest ::= SEQUENCE{
394   referenceId        ReferenceId OPTIONAL,
395   securityChallenge      CHOICE{
396               simpleForm      [37] IMPLICIT OCTET STRING,
397                externallyDefined    [0]  EXTERNAL},
398   otherInfo        OtherInformation OPTIONAL}
399
400   AccessControlResponse ::= SEQUENCE{
401   referenceId        ReferenceId OPTIONAL,
402   securityChallengeResponse  CHOICE{
403               simpleForm      [38]   IMPLICIT OCTET STRING,
404                externallyDefined    [0]  EXTERNAL} OPTIONAL,
405               -- Optional only in version 3; mandatory in version 2. If
406               -- omitted (in version 3) then diagnostic must occur.
407   diagnostic    [223]    DiagRec OPTIONAL, -- Version 3 only.
408   otherInfo        OtherInformation OPTIONAL}
409
410
411
412   ResourceControlRequest ::= SEQUENCE{
413   referenceId          ReferenceId OPTIONAL,
414   suspendedFlag      [39]  IMPLICIT BOOLEAN OPTIONAL,
415   resourceReport      [40]  ResourceReport OPTIONAL,
416   partialResultsAvailable    [41]  IMPLICIT INTEGER{
417                 subset    (1),
418                 interim  (2),
419                 none    (3)} OPTIONAL,
420   responseRequired      [42]   IMPLICIT BOOLEAN, 
421   triggeredRequestFlag    [43]   IMPLICIT BOOLEAN OPTIONAL,
422   otherInfo          OtherInformation OPTIONAL}
423
424
425   ResourceControlResponse ::= SEQUENCE{
426      referenceId          ReferenceId OPTIONAL,
427     continueFlag       [44]   IMPLICIT BOOLEAN, 
428   resultSetWanted      [45]  IMPLICIT BOOLEAN OPTIONAL,
429   otherInfo          OtherInformation OPTIONAL}
430
431
432
433   TriggerResourceControlRequest ::= SEQUENCE{
434      referenceId          ReferenceId OPTIONAL,
435   requestedAction      [46]  IMPLICIT INTEGER{
436                 resourceReport  (1),
437                 resourceControl  (2),
438                 cancel      (3)}, 
439   prefResourceReportFormat    [47]   IMPLICIT ResourceReportId OPTIONAL,
440   resultSetWanted      [48]   IMPLICIT BOOLEAN OPTIONAL,
441   otherInfo          OtherInformation OPTIONAL}
442
443
444
445   ResourceReportRequest ::= SEQUENCE{
446      referenceId          ReferenceId OPTIONAL,
447   opId          [210]  IMPLICIT ReferenceId OPTIONAL,
448   prefResourceReportFormat    [49]   IMPLICIT ResourceReportId OPTIONAL,
449   otherInfo          OtherInformation OPTIONAL}
450 --
451   ResourceReportResponse ::= SEQUENCE{
452      referenceId          ReferenceId OPTIONAL,
453   resourceReportStatus    [50]   IMPLICIT INTEGER{
454                 success    (0),
455                 partial    (1),
456                 failure-1    (2),
457                 failure-2    (3),
458                 failure-3    (4),
459                 failure-4    (5),
460                 failure-5    (6),
461                 failure-6    (7)},
462   resourceReport               [51]   ResourceReport OPTIONAL,
463   otherInfo          OtherInformation OPTIONAL}
464 --
465    ResourceReport     ::=   EXTERNAL
466   ResourceReportId    ::=    OBJECT IDENTIFIER
467
468 --Scan APDUs
469   ScanRequest ::= SEQUENCE{
470   referenceId              ReferenceId OPTIONAL,
471     databaseNames        [3]  IMPLICIT SEQUENCE OF DatabaseName,
472     attributeSet            AttributeSetId OPTIONAL,
473     termListAndStartPoint        AttributesPlusTerm,
474     stepSize           [5]   IMPLICIT INTEGER OPTIONAL,
475     numberOfTermsRequested         [6]   IMPLICIT INTEGER,
476     preferredPositionInResponse      [7]   IMPLICIT INTEGER OPTIONAL,
477     otherInfo            OtherInformation OPTIONAL}
478
479   ScanResponse ::= SEQUENCE{
480    referenceId              ReferenceId OPTIONAL,
481    stepSize           [3]  IMPLICIT INTEGER OPTIONAL,
482    scanStatus           [4]  IMPLICIT INTEGER {
483                                 success   (0),
484                                 partial-1   (1),
485                                 partial-2   (2),
486                                 partial-3   (3),
487                                 partial-4   (4),
488                                 partial-5   (5),
489                                 failure  (6) },
490    numberOfEntriesReturned       [5]  IMPLICIT INTEGER,
491    positionOfTerm         [6]  IMPLICIT INTEGER OPTIONAL,
492    entries           [7]  IMPLICIT ListEntries  OPTIONAL,  
493    attributeSet          [8]  IMPLICIT AttributeSetId OPTIONAL,
494    otherInfo            OtherInformation OPTIONAL}
495
496 -- begin auxiliary definitions for Scan
497   ListEntries ::= SEQUENCE{
498   entries        [1]   IMPLICIT SEQUENCE OF Entry OPTIONAL,
499     nonsurrogateDiagnostics    [2]  IMPLICIT SEQUENCE OF DiagRec OPTIONAL
500     -- At least one of entries and nonsurrogateDiagnostics must occur
501           }
502
503   Entry  ::= CHOICE {
504      termInfo               [1]   IMPLICIT TermInfo,
505      surrogateDiagnostic    [2]   DiagRec}
506 --
507   TermInfo ::= SEQUENCE {
508    term                    Term,
509      displayTerm      [0]   IMPLICIT InternationalString OPTIONAL,
510                                      -- Presence of displayTerm means that term is not considered by
511               -- the target to be suitable for display, and displayTerm should
512               -- instead be displayed. 'term' is the actual term in the term list;
513                -- 'displayTerm' is for display purposes only, and is not an actual
514               -- term in the term list.
515   suggestedAttributes            AttributeList OPTIONAL,
516      alternativeTerm    [4]  IMPLICIT SEQUENCE OF AttributesPlusTerm OPTIONAL, 
517      globalOccurrences    [2]  IMPLICIT INTEGER OPTIONAL,
518      byAttributes      [3]  IMPLICIT OccurrenceByAttributes OPTIONAL,
519      otherTermInfo      OtherInformation OPTIONAL} 
520
521   OccurrenceByAttributes ::= SEQUENCE OF SEQUENCE{
522      attributes    [1]  AttributeList, 
523      occurrences       CHOICE{
524                global    [2] INTEGER,
525             byDatabase  [3] IMPLICIT SEQUENCE OF SEQUENCE{ 
526               db      DatabaseName,
527               num     [1]  IMPLICIT INTEGER OPTIONAL,
528               otherDbInfo    OtherInformation OPTIONAL}} OPTIONAL,
529      otherOccurInfo    OtherInformation OPTIONAL} 
530 -- end auxiliary definitions for Scan
531
532 -- Sort APDUs
533 SortRequest  ::= SEQUENCE{
534   referenceId              ReferenceId OPTIONAL,
535   inputResultSetNames  [3]  IMPLICIT SEQUENCE OF InternationalString,
536   sortedResultSetName  [4]    IMPLICIT InternationalString,
537   sortSequence     [5]  IMPLICIT SEQUENCE OF SortKeySpec,
538               -- order of occurrence is from major to minor
539   otherInfo        OtherInformation OPTIONAL}
540
541 SortResponse  ::= SEQUENCE{
542   referenceId          ReferenceId OPTIONAL,
543   sortStatus         [3]  IMPLICIT INTEGER{
544                             success  (0), 
545               partial-1  (1),
546               failure  (2)},
547   resultSetStatus    [4]  IMPLICIT INTEGER{
548               empty    (1), 
549                   interim  (2), 
550                   unchanged  (3),
551               none    (4)} OPTIONAL,
552   diagnostics        [5]             IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
553   otherInfo        OtherInformation OPTIONAL}
554
555 -- begin auxiliary definitions for Sort
556   SortKeySpec ::= SEQUENCE{
557     sortElement      SortElement, 
558        sortRelation    [1]  IMPLICIT INTEGER{
559                                 ascending      (0),
560               descending      (1),
561               ascendingByFrequency    (3),
562               descendingByfrequency  (4)},
563       caseSensitivity    [2]   IMPLICIT INTEGER{
564                                  caseSensitive      (0), 
565               caseInsensitive    (1)},
566       missingValueAction    [3]   CHOICE{
567                                      abort    [1] IMPLICIT NULL,
568                                      null      [2] IMPLICIT NULL,
569                     --supply a null value for missing value
570           missingValueData  [3] IMPLICIT OCTET STRING} OPTIONAL}
571
572   SortElement ::=   CHOICE{
573     generic        [1] SortKey,
574        datbaseSpecific    [2] IMPLICIT SEQUENCE OF SEQUENCE{
575                        databaseName  DatabaseName,
576                        dbSort    SortKey}} 
577
578   SortKey ::= CHOICE{
579     sortfield       [0]  IMPLICIT InternationalString,
580                   -- An element, element-group-tag, or alias supported by the target
581                -- and denoting a set of elements associated with each record.
582      elementSpec    [1]  IMPLICIT Specification,
583         sortAttributes    [2]  IMPLICIT SEQUENCE{
584               id  AttributeSetId,
585               list  AttributeList}}
586 -- end auxiliary definitions for sort
587
588
589
590 -- Extended Service APDUs
591   ExtendedServicesRequest  ::= SEQUENCE{
592   referenceId              ReferenceId OPTIONAL,
593   function      [3]  IMPLICIT INTEGER {
594               create    (1),
595               delete    (2),
596               modify  (3)},
597   packageType      [4]  IMPLICIT OBJECT IDENTIFIER,
598   packageName    [5]  IMPLICIT InternationalString OPTIONAL,
599               -- PackageName mandatory for 'modify' or 'delete'; optional for
600               -- 'create'. Following four parameters mandatory for 'create'; should
601               -- be included on 'modify' if being modified; not needed on 'delete'.
602   userId        [6]   IMPLICIT InternationalString OPTIONAL,
603   retentionTime    [7]   IMPLICIT IntUnit OPTIONAL,
604   permissions      [8]   IMPLICIT Permissions OPTIONAL,
605   description      [9]   IMPLICIT InternationalString OPTIONAL,
606
607 -- (ExtendedServiceRequest APDU continued)
608   taskSpecificParameters  [10]  IMPLICIT EXTERNAL OPTIONAL, 
609               -- Mandatory for 'create'; included on 'modify' if specific
610               -- parameters being modified; not necessary on 'delete'. For the
611               -- 'EXTERNAL,' use OID of specific ES definition and select
612               --  CHOICE [1]: 'esRequest'.
613   waitAction      [11]  IMPLICIT INTEGER{
614               wait      (1),
615               waitIfPossible  (2),
616               dontWait    (3),
617               dontReturnPackage  (4)},
618   elements          ElementSetName OPTIONAL,
619   otherInfo          OtherInformation OPTIONAL}
620 --
621
622 ExtendedServicesResponse ::= SEQUENCE{
623   referenceId                ReferenceId OPTIONAL,
624   operationStatus    [3]    IMPLICIT INTEGER{
625                 done      (1),
626                 accepted    (2),  
627                 failure    (3)},
628   diagnostics      [4]    IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
629   taskPackage      [5]    IMPLICIT EXTERNAL OPTIONAL,
630                 -- Use OID: {Z39-50-recordSyntax (106)} and corresponding
631                 -- syntax. For the EXTERNAL, 'taskSpecific,' within that
632                 -- definition, use OID of the specific es, and choose [2],
633                 -- 'taskPackage'.
634   otherInfo          OtherInformation OPTIONAL}
635
636  Permissions ::= SEQUENCE OF SEQUENCE{
637   userId      [1] IMPLICIT InternationalString,
638   allowableFunctions  [2] IMPLICIT SEQUENCE OF INTEGER{
639               delete      (1),
640               modifyContents  (2),
641               modifyPermissions  (3),
642               present    (4),
643                  invoke    (5)}} 
644
645 Close ::= SEQUENCE{
646   referenceId          ReferenceId OPTIONAL,  -- See 3.2.11.1.5.
647   closeReason          CloseReason,
648   diagnosticInformation    [3]  IMPLICIT InternationalString OPTIONAL,
649   resourceReportFormat    [4]  IMPLICIT ResourceReportId OPTIONAL, 
650                 -- For use by origin only, and only on Close request;
651                 -- origin requests target to include report in response.
652    resourceReport      [5]  ResourceReport OPTIONAL,
653                 -- For use by target only, unilaterally on Close request;
654                 -- on Close response may be unilateral or in response
655                 -- to origin request.
656   otherInfo          OtherInformation OPTIONAL}
657
658   CloseReason ::=  [211]  IMPLICIT INTEGER{
659             finished      (0),
660             shutdown      (1),
661             systemProblem    (2),
662             costLimit      (3),
663             resources      (4),
664             securityViolation    (5),
665             protocolError    (6),
666             lackOfActivity    (7),
667             peerAbort      (8),
668             unspecified      (9)}
669
670
671 -- Global auxiliary definitions
672   ReferenceId       ::=      [2]  IMPLICIT OCTET STRING
673   ResultSetId        ::=      [31]    IMPLICIT InternationalString
674   ElementSetName     ::=     [103]   IMPLICIT InternationalString
675   DatabaseName     ::=    [105]   IMPLICIT InternationalString
676   AttributeSetId     ::=       OBJECT IDENTIFIER
677
678
679 -- OtherInformation
680   OtherInformation   ::= [201] IMPLICIT SEQUENCE OF SEQUENCE{
681     category            [1]   IMPLICIT InfoCategory OPTIONAL, 
682     information        CHOICE{
683       characterInfo        [2]  IMPLICIT InternationalString,
684       binaryInfo        [3]  IMPLICIT OCTET STRING,
685       externallyDefinedInfo    [4]  IMPLICIT EXTERNAL,
686       oid          [5]  IMPLICIT OBJECT IDENTIFIER}}
687 --
688   InfoCategory ::= SEQUENCE{
689       categoryTypeId  [1]   IMPLICIT OBJECT IDENTIFIER OPTIONAL,
690       categoryValue  [2]   IMPLICIT INTEGER}
691
692
693 -- Units
694   -- IntUnit is used when value and unit are supplied together. Unit, alone, is used when just
695   -- specifying a unit (without a value).  For example, IntUnit is used in Term, in an RPNQuery, or
696   -- it can be the datatype of an element within a retrieval record. Unit (alone) would be used in an
697   -- element request, when requesting data be returned according to a particular unit.
698
699   IntUnit ::= SEQUENCE{
700     value    [1] IMPLICIT INTEGER,
701     unitUsed  [2] IMPLICIT Unit}
702 --
703   Unit ::= SEQUENCE{
704     unitSystem    [1] InternationalString OPTIONAL,    -- e.g. 'SI'
705     unitType    [2] StringOrNumeric OPTIONAL,    -- e.g. 'mass'
706     unit      [3] StringOrNumeric OPTIONAL,    -- e.g. 'kilograms'
707     scaleFactor    [4] IMPLICIT INTEGER OPTIONAL    -- e.g. 9 means 10**9
708         }
709
710 --CharacterString
711   InternationalString ::= GeneralString
712     -- When version 2 is in force, this collapses to VisibleString. That is, only characters in the
713     -- visibleString repertoire may be used. (Datatype compatibility with version 2 is not affected,
714      -- because references are IMPLICIT.)  When version 3 is in force, the semantics of the
715     -- GeneralString content may be altered by negotiation during initialization. If no such
716     -- negotiation is in effect, then GeneralString semantics are in force.
717
718 StringOrNumeric ::= CHOICE{
719   string    [1] IMPLICIT InternationalString,
720   numeric  [2] IMPLICIT INTEGER}
721
722 END -- IR DEFINITIONS
723
724
725
726 DiagnosticFormatDiag1 
727 {Z39-50-diagnosticFormat diag-1 (2)} DEFINITIONS ::=
728 BEGIN
729 IMPORTS Term, Specification, AttributeList, SortElement, DatabaseName, 
730 DefaultDiagFormat, InternationalString FROM Z39-50-APDU-1995;
731
732
733 DiagnosticFormat ::=  SEQUENCE OF SEQUENCE{ 
734   diagnostic  [1] CHOICE{
735               defaultDiagRec    [1]  IMPLICIT DefaultDiagFormat,
736               explicitDiagnostic    [2]  DiagFormat} OPTIONAL, 
737   message  [2] IMPLICIT InternationalString OPTIONAL} 
738
739
740 DiagFormat ::= CHOICE{
741
742 tooMany  [1000]   IMPLICIT SEQUENCE{
743                 tooManyWhat   [1]  IMPLICIT INTEGER{
744                                   argumentWords        (1), 
745                                   truncatedWords        (2), 
746                                   booleanOperators      (3),
747                                   incompleteSubfields    (4), 
748                                   characters          (5),
749                                   recordsRetrieved      (6), 
750                                   dataBasesSpecified      (7),
751                                   resultSetsCreated      (8), 
752                                   indexTermsProcessed    (9)},
753                 max        [2]  IMPLICIT INTEGER OPTIONAL},
754
755
756
757
758
759
760
761 badSpec    [1001]  IMPLICIT SEQUENCE{  -- element set name or specification
762                 spec        [1] IMPLICIT Specification, -- esn or element spec not supported
763                 db        [2] IMPLICIT DatabaseName OPTIONAL,
764                             -- if db specified, above spec not supported for db; otherwise,
765                             -- spec not supported period.
766                 goodOnes    [3] IMPLICIT SEQUENCE OF Specification OPTIONAL  
767                             -- target supplies ones that are supported
768                             },
769
770
771 dbUnavail  [1002]  IMPLICIT SEQUENCE{ -- database unavailable
772                 db  [1] IMPLICIT DatabaseName,
773                 why  [2] IMPLICIT SEQUENCE{
774                         reasonCode  [1] IMPLICIT INTEGER{
775                                       doesNotExist    (0),
776                                       existsButUnavail  (1),
777                                       locked      (2),
778                                       accessDenied    (3)} OPTIONAL,
779                         message    [2] IMPLICIT InternationalString OPTIONAL}},
780
781
782 unSupOp  [1003]  IMPLICIT INTEGER{  -- unsupported operator
783                 and     (0),
784                 or      (1),
785                 and-not  (2),
786                 prox    (3)},
787
788
789 attribute    [1004]  IMPLICIT SEQUENCE{
790                     -- Applies for unsupported attribute set, attribute type, 
791                     -- attribute value, or term (for a given attribute type or value).
792
793                 id      [1]  IMPLICIT OBJECT IDENTIFIER,
794                    -- if only "id" occurs, then attribute set is not supported
795                 type    [2]  IMPLICIT INTEGER OPTIONAL,
796                    -- must occur if value occurs.
797                 value    [3]   IMPLICIT INTEGER OPTIONAL,
798                     -- if omitted, and Type occurs, then Type is what is unsupported
799                 term    [4]  Term OPTIONAL
800                     -- If occurs, term is illegal or not supported, for attribute value,
801                     -- if value occurs; otherwise, for type.
802                                 },
803
804
805 attCombo  [1005]  IMPLICIT SEQUENCE{ -- attribute combination not supported
806               unsupportedCombination  [1] IMPLICIT AttributeList, 
807               recommendedAlternatives  [2] IMPLICIT SEQUENCE OF AttributeList OPTIONAL}, 
808
809
810
811
812 term      [1006]  IMPLICIT SEQUENCE{
813                 problem    [1] IMPLICIT INTEGER{
814                             codedValue  (1),
815                             unparsable  (2),
816                             tooShort    (3),
817                             type      (4)} OPTIONAL,
818                 term      [2] Term},
819
820
821 proximity  [1007] CHOICE{        -- proximity diagnostics:
822                resultSets  [1]    IMPLICIT NULL,         -- proximity between sets not supported
823               badSet    [2]    IMPLICIT InternationalString,  -- bad result set specified
824                  relation    [3]   IMPLICIT INTEGER,      -- 1 to 6 ; relation not supported
825               unit      [4]  IMPLICIT INTEGER,      -- unsupported unit code
826               distance    [5]  IMPLICIT INTEGER,      -- unsupported distance
827               attributes  [6]  AttributeList,             --  proximity not supported with specified
828                                                    -- attribute combination
829               ordered    [7]  IMPLICIT NULL,        -- ordered flag not supported
830               exclusion  [8]  IMPLICIT NULL          -- exclusion flag not supported
831                     },
832
833
834
835
836
837 scan     [1008] CHOICE{      -- scan diagnostics:
838               nonZeroStepSize  [0] IMPLICIT NULL,  -- only zero step size supported
839               specifiedStepSize  [1] IMPLICIT NULL,  -- specified step size not supported
840               termList1      [3] IMPLICIT NULL,  -- term list not supported (no alternative supplied)
841               termList2      [4] IMPLICIT SEQUENCE OF AttributeList,
842                                           -- term list not supported (alternatives supplied)
843               posInResponse    [5] IMPLICIT INTEGER{  --value of positionInResponse not supported
844                               mustBeOne        (1),
845                               mustBePositive    (2),
846                               mustBeNonNegative  (3),
847                               other            (4)},
848               resources      [6] IMPLICIT NULL,   -- resources exhausted looking for satisfying terms
849               endOfList      [7] IMPLICIT NULL  -- beginning or end of term list
850                 },
851
852
853 sort       [1009] CHOICE{
854               sequence    [0]  IMPLICIT NULL,        -- cannot sort according to sequence
855               noRsName    [1]  IMPLICIT NULL,        -- no result set name supplied
856               tooMany    [2]  IMPLICIT INTEGER,      --  Too many input result sets,
857                                                 --  maximum supplied.
858               incompatible  [3]  IMPLICIT NULL,        -- records with different formats
859                                                  -- not compatible for sorting
860               generic      [4]  IMPLICIT NULL,        -- generic sort not supported 
861                                                 -- (db specific only)
862               dbSpecific    [5]  IMPLICIT NULL,        -- db specific sort not supported
863               sortElement    [6]  SortElement,
864               key        [7]  IMPLICIT INTEGER{
865                               tooMany  (1),    -- too many sort keys
866                               duplicate  (2)},    -- duplicate sort keys
867               action      [8]  IMPLICIT NULL,  -- unsupported missing data action
868               illegal      [9]  IMPLICIT INTEGER{
869                               relation  (1),  -- illegal sort relation
870                               case    (2),  -- illegal case value
871                               action  (3),   -- illegal missing data action
872                               sort    (4)},  -- illegal sort
873             inputTooLarge    [10]  IMPLICIT SEQUENCE OF InternationalString,
874                                       --   one or more of the input result sets too large to sort
875           aggregateTooLarge  [11]  IMPLICIT NULL  --  aggregate result set too large
876                           },
877
878 segmentation  [1010]  CHOICE{
879                 segmentCount  [0]    IMPLICIT NULL,
880                                   -- Cannot guarantee record will fit within max segments. Target
881                                   -- suggests that origin try again to retrieve record, without
882                                   -- including max-segment-count.
883                 segmentSize  [1]    IMPLICIT INTEGER
884                                 -- record cannot be segmented into fragments such that the largest
885                                 -- will fit within max segment size specified. Target supplies (in
886                                 -- bytes) the smallest acceptable value of Max-segment-size to
887                                 -- retrieve the record.
888                           },
889
890
891 extServices  [1011] CHOICE{
892                 req        [1] IMPLICIT INTEGER{   -- bad request
893                             nameInUse    (1),  -- package name already in use
894                             noSuchName  (2),  -- no such package, on modify/delete
895                             quota        (3),  -- quota exceeded
896                             type        (4)},  -- extended service type not supported
897                 permission  [2] IMPLICIT INTEGER{ -- permission denied on ES, because: 
898                             id         (1),    --   id not authorized, or
899                             modifyDelete  (2)},    -- cannot modify or delete
900                 immediate  [3] IMPLICIT INTEGER{ -- immediate execution:
901                             failed      (1),    -- failed, 
902                             service      (2),    -- not supported for this service, or
903                             parameters    (3)    -- for these parameters.
904                                 }},
905
906
907 accessCtrl    [1012] CHOICE{
908                 noUser    [1] IMPLICIT NULL,    -- no user to display challenge to
909                 refused    [2] IMPLICIT NULL,    -- access control information refused by user
910                 simple    [3] IMPLICIT NULL,    -- only simple form supported (target used
911                                           -- externally defined)
912                 oid      [4] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER,
913                                           -- oid not supported (origin supplies alternative
914                                           -- suggested oids)
915                 alternative  [5] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER,
916                                           -- origin insists that target use an alternative
917                                           -- challenge for this data (e.g. stronger                                     
918    
919                                           -- authentication or stronger Access control). The                            
920               -- origin supplies suggested alternative oids.
921                 pwdInv    [6] IMPLICIT NULL,    -- password invalid
922                 pwdExp    [7] IMPLICIT NULL      -- password expired
923                     },
924
925
926 recordSyntax  [1013] IMPLICIT SEQUENCE{ -- record cannot be transferred in requested syntax
927               unsupportedSyntax    [1] IMPLICIT OBJECT IDENTIFIER, 
928               suggestedAlternatives  [2] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL}
929 }
930
931 END
932
933
934
935
936
937 RecordSyntax-explain 
938 {Z39-50-recordSyntax explain (100)} DEFINITIONS ::=
939
940 BEGIN 
941 IMPORTS AttributeSetId, Term, OtherInformation, DatabaseName, ElementSetName, IntUnit, Unit,
942  StringOrNumeric, Specification, InternationalString, AttributeList, AttributeElement FROM Z39-50-APDU-1995;
943
944 Explain-Record ::= CHOICE{
945   -- Each of these may be used as search term  when Use attribute is 'explain-category'.
946   targetInfo         [0]    IMPLICIT TargetInfo,
947   databaseInfo      [1]    IMPLICIT DatabaseInfo,
948   schemaInfo        [2]    IMPLICIT SchemaInfo,
949   tagSetInfo         [3]    IMPLICIT TagSetInfo,
950   recordSyntaxInfo    [4]    IMPLICIT RecordSyntaxInfo,
951   attributeSetInfo    [5]    IMPLICIT AttributeSetInfo,
952   termListInfo      [6]    IMPLICIT TermListInfo,
953   extendedServicesInfo  [7]    IMPLICIT ExtendedServicesInfo,
954   attributeDetails      [8]    IMPLICIT AttributeDetails,
955   termListDetails    [9]    IMPLICIT TermListDetails,
956   elementSetDetails    [10]  IMPLICIT ElementSetDetails,
957   retrievalRecordDetails  [11]   IMPLICIT RetrievalRecordDetails,
958   sortDetails             [12]   IMPLICIT SortDetails,
959   processing           [13]  IMPLICIT ProcessingInformation,
960   variants          [14]  IMPLICIT VariantSetInfo,
961   units          [15]    IMPLICIT UnitInfo,
962   categoryList            [100]  IMPLICIT CategoryList}
963
964 -- Element set name 'B' (brief)  retrieves:
965 --  -  'commonInfo' (except for otherInfo within commonInfo)
966 --  -  key elements
967 --  -  other elements designated as 'non-key brief elements'
968 -- Esn 'description' retrieves brief elements as well as 'description', and specific additional descriptive
969 -- elements if designated.  
970 -- Element set name 'F' (full) retrieves all of the above, as well as those designated as "non-brief elements". Some
971 -- elements designated as OPTIONAL may be mandatory in full records, and are so identified. (Note that all elements
972 -- that are not part of the brief element set must be designated as OPTIONAL in the ASN.1, otherwise it would be
973 -- illegal to omit them.)
974 -- Other esns are defined (below) as needed.
975
976 -- - - - - - - - - - - - -   Info Records
977   -- Info records are mainly for software consumption
978   -- They describe individual entities within the target system:
979   --   The target itself
980   --   Individual databases
981   --   Schemas
982   --   Tag sets
983   --   Record syntaxes
984   --   Attribute sets
985   --   Term lists
986   --   Extended services
987  --     The information about each Schema, Tag Set, Record Syntax and Attribute Set should
988   -- match the universal definitions of these items. The only exception is that a target may omit any
989   -- items it doesn't support, for example the description of the bib-1 attribute set may omit attributes
990   -- that the target does not support under any circumstances.
991   --      Databases that may be searched together can be listed in the dbCominations element of the TargetInfo record.  
992 TargetInfo ::= SEQUENCE {
993   commonInfo      [0]    IMPLICIT CommonInfo OPTIONAL,
994     -- Key elements follow:
995   name          [1]    IMPLICIT InternationalString,
996     -- Non-key brief elements follow:
997   recent-news      [2]    IMPLICIT HumanString OPTIONAL,
998   icon          [3]    IMPLICIT IconObject OPTIONAL,
999   namedResultSets    [4]    IMPLICIT BOOLEAN,
1000   multipleDBsearch    [5]    IMPLICIT BOOLEAN,
1001   maxResultSets      [6]    IMPLICIT INTEGER OPTIONAL,
1002   maxResultSize      [7]    IMPLICIT INTEGER OPTIONAL,
1003   maxTerms        [8]    IMPLICIT INTEGER OPTIONAL,
1004   timeoutInterval      [9]    IMPLICIT IntUnit OPTIONAL,
1005   welcomeMessage    [10]  IMPLICIT HumanString OPTIONAL,
1006     -- non-brief elements follow:
1007   -- 'description' esn retrieves the following two (as well as brief):
1008   contactInfo      [11]  IMPLICIT ContactInfo OPTIONAL,
1009   description      [12]  IMPLICIT HumanString OPTIONAL,
1010   nicknames        [13]  IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1011   usage-restrictions    [14]  IMPLICIT HumanString OPTIONAL,
1012   paymentAddr      [15]  IMPLICIT HumanString OPTIONAL,
1013   hours          [16]  IMPLICIT HumanString OPTIONAL,
1014   dbCombinations    [17]  IMPLICIT SEQUENCE OF DatabaseList OPTIONAL,
1015   addresses        [18]  IMPLICIT SEQUENCE OF NetworkAddress OPTIONAL,
1016   languages        [101]  IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1017                   -- Languages supported for message strings.  Each is a three-character
1018                   -- language code from Z39.53-1994.
1019 -- characterSets      [102]  this tag reserved for "character sets supported for name and message strings".
1020   -- commonAccessInfo elements list objects the target supports. All objects listed in
1021   -- AccessInfo for any individual database should also be listed here.
1022   commonAccessInfo  [19]  IMPLICIT AccessInfo OPTIONAL}
1023
1024
1025 DatabaseInfo ::= SEQUENCE {
1026       -- A target may provide "virtual databases" that are combinations of individual database. These
1027       -- databases are indicated by the presence of subDbs in the combination database's DatabaseDescription.
1028   commonInfo        [0]    IMPLICIT CommonInfo OPTIONAL,
1029     -- Key elements follow:
1030   name            [1]    IMPLICIT DatabaseName,
1031     -- Non-key brief elements follow:
1032   explainDatabase      [2]             IMPLICIT NULL OPTIONAL,
1033                        -- If present, this database is the Explain database, or an Explain database
1034                     -- for a different server, possibly on a different host. The means by which
1035                     -- that server may be accessed is not addressed by this standard. One
1036                     -- suggested possibility is an implementor agreement whereby the
1037                     -- database name is a url which may be used to connect to the server.
1038   nicknames          [3]    IMPLICIT SEQUENCE OF DatabaseName OPTIONAL,
1039   icon            [4]    IMPLICIT IconObject OPTIONAL,
1040   user-fee          [5]    IMPLICIT BOOLEAN,
1041   available          [6]    IMPLICIT BOOLEAN,
1042   titleString          [7]    IMPLICIT HumanString OPTIONAL,
1043     -- Non-brief elements follow:
1044   keywords          [8]    IMPLICIT SEQUENCE OF HumanString OPTIONAL,
1045   description        [9]    IMPLICIT HumanString OPTIONAL,
1046   associatedDbs        [10]  IMPLICIT DatabaseList OPTIONAL,
1047                     -- databases that may be searched in combination with this one 
1048
1049   subDbs          [11]  IMPLICIT DatabaseList OPTIONAL,
1050                         -- When present, this database is a composite representing the combined
1051                      -- databases 'subDbs'. The individual subDbs are also available.
1052   disclaimers        [12]  IMPLICIT HumanString OPTIONAL,
1053   news            [13]  IMPLICIT HumanString OPTIONAL,
1054   recordCount           [14]    CHOICE {
1055                                    actualNumber  [0] IMPLICIT INTEGER,
1056                                     approxNumber  [1] IMPLICIT INTEGER} OPTIONAL,
1057   defaultOrder        [15]  IMPLICIT HumanString OPTIONAL,
1058   avRecordSize        [16]  IMPLICIT INTEGER OPTIONAL,
1059   maxRecordSize      [17]  IMPLICIT INTEGER OPTIONAL,
1060   hours            [18]  IMPLICIT HumanString OPTIONAL,
1061   bestTime          [19]  IMPLICIT HumanString OPTIONAL,
1062   lastUpdate          [20]  IMPLICIT GeneralizedTime OPTIONAL,
1063   updateInterval        [21]  IMPLICIT IntUnit OPTIONAL,
1064   coverage          [22]  IMPLICIT HumanString OPTIONAL,
1065   proprietary        [23]  IMPLICIT BOOLEAN OPTIONAL, -- mandatory in full record
1066   copyrightText        [24]  IMPLICIT HumanString OPTIONAL,
1067   copyrightNotice      [25]  IMPLICIT HumanString OPTIONAL,
1068   producerContactInfo    [26]  IMPLICIT ContactInfo OPTIONAL,
1069   supplierContactInfo      [27]  IMPLICIT ContactInfo OPTIONAL,
1070   submissionContactInfo    [28]  IMPLICIT ContactInfo OPTIONAL,
1071     -- accessInfo lists items connected with the database. All listed items should be in the target's AccessInfo.
1072   accessInfo                [29]  IMPLICIT AccessInfo OPTIONAL}
1073
1074
1075 SchemaInfo ::= SEQUENCE {
1076   commonInfo    [0]  IMPLICIT CommonInfo OPTIONAL,
1077     -- Key elements follow:
1078   schema      [1]  IMPLICIT OBJECT IDENTIFIER,
1079     -- Non-key brief elements follow:
1080   name        [2]  IMPLICIT InternationalString,
1081     -- Non-brief elements follow:
1082   description    [3]  IMPLICIT HumanString OPTIONAL,
1083   tagTypeMapping  [4]  IMPLICIT SEQUENCE OF SEQUENCE {
1084               tagType    [0] IMPLICIT INTEGER,
1085               tagSet       [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
1086                 -- If tagSet is omitted, then this tagType is for a tagSet locally defined
1087                 -- within the schema that cannot be referenced by another schema.
1088               defaultTagType  [2] IMPLICIT NULL OPTIONAL
1089                         } OPTIONAL,
1090   recordStructure  [5]  IMPLICIT SEQUENCE OF ElementInfo OPTIONAL}
1091
1092
1093   --  ElementInfo referenced in SchemaInfo and RecordSyntaxInfo
1094     ElementInfo ::= SEQUENCE {
1095       elementName  [1] IMPLICIT InternationalString,
1096       elementTagPath  [2] IMPLICIT Path,
1097       dataType      [3] ElementDataType OPTIONAL, -- If omitted, not specified. 
1098        required         [4] IMPLICIT BOOLEAN,
1099       repeatable     [5] IMPLICIT BOOLEAN,
1100        description    [6] IMPLICIT HumanString OPTIONAL}
1101
1102
1103   -- Path is referenced by ElementInfo as well as PerElementDetails
1104              Path ::= SEQUENCE OF SEQUENCE{
1105               tagType  [1] IMPLICIT INTEGER,
1106               tagValue     [2] StringOrNumeric}
1107       ElementDataType ::= CHOICE{
1108             primitive  [0] IMPLICIT PrimitiveDataType,
1109            structured  [1] IMPLICIT SEQUENCE OF ElementInfo}
1110       PrimitiveDataType ::= INTEGER{
1111             octetString        (0),
1112             numeric           (1),
1113             date            (2),
1114             external        (3),
1115             string          (4),
1116             trueOrFalse       (5),
1117             oid         (6),
1118             intUnit        (7),
1119         empty        (8),
1120             noneOfTheAbove  (100) -- see 'description'
1121             }
1122
1123
1124 TagSetInfo ::= SEQUENCE {
1125   commonInfo  [0]  IMPLICIT CommonInfo OPTIONAL,
1126     -- Key elements follow:
1127   tagSet      [1]  IMPLICIT OBJECT IDENTIFIER,
1128     -- non-key brief elements follow:
1129   name      [2]  IMPLICIT InternationalString,
1130     -- non-brief elements follow:
1131   description  [3]  IMPLICIT HumanString OPTIONAL,
1132   elements    [4]  IMPLICIT SEQUENCE OF SEQUENCE {
1133               elementname  [1]  IMPLICIT InternationalString,
1134                nicknames    [2]  IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1135               elementTag     [3]  StringOrNumeric, 
1136               description    [4]  IMPLICIT HumanString OPTIONAL, 
1137             dataType       [5]  PrimitiveDataType OPTIONAL,
1138               -- If the data type is expected to be structured, that is described in the schema info,
1139               -- and datatype is omitted here.
1140              otherTagInfo       OtherInformation OPTIONAL} OPTIONAL}
1141
1142 RecordSyntaxInfo ::= SEQUENCE {
1143   commonInfo    [0]  IMPLICIT CommonInfo OPTIONAL,
1144     -- Key elements follow:
1145   recordSyntax    [1]  IMPLICIT OBJECT IDENTIFIER,
1146     -- Non-key brief elements follow:
1147   name        [2]  IMPLICIT InternationalString,
1148     -- non-brief elements follow:
1149   transferSyntaxes  [3]  IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1150   description    [4]  IMPLICIT HumanString OPTIONAL,
1151   asn1Module    [5]  IMPLICIT InternationalString OPTIONAL,
1152   abstractStructure  [6]  IMPLICIT SEQUENCE OF ElementInfo OPTIONAL
1153                -- Omitting abstractStructure only means target isn't using
1154                  -- Explain to describe the structure, not that there is no structure.
1155               }
1156
1157 AttributeSetInfo ::= SEQUENCE {
1158   commonInfo  [0]  IMPLICIT CommonInfo OPTIONAL,
1159     -- Key elements follow:
1160   attributeSet  [1]  IMPLICIT AttributeSetId,
1161     -- non-key brief elements follow:
1162   name      [2]  IMPLICIT InternationalString,
1163     -- non-brief elements follow:
1164   attributes    [3]  IMPLICIT SEQUENCE OF AttributeType OPTIONAL,
1165             -- mandatory in full record
1166   description   [4] IMPLICIT HumanString OPTIONAL}
1167 -- AttributeType referenced in AttributeSetInfo
1168   AttributeType ::= SEQUENCE {
1169       name             [0] IMPLICIT InternationalString OPTIONAL,
1170       description      [1] IMPLICIT HumanString OPTIONAL,
1171        attributeType    [2] IMPLICIT INTEGER,
1172       attributeValues  [3] IMPLICIT SEQUENCE OF AttributeDescription}
1173     AttributeDescription ::= SEQUENCE {
1174         name                 [0] IMPLICIT InternationalString OPTIONAL,
1175         description          [1] IMPLICIT HumanString OPTIONAL,
1176         attributeValue       [2] StringOrNumeric,
1177         equivalentAttributes  [3]  IMPLICIT SEQUENCE OF StringOrNumeric OPTIONAL
1178                   -- each is an occurrence of 'attributeValue' from AttributeDescription for a
1179                   -- different attribute. Equivalences listed here should be derived from the 
1180                   -- attribute set definition, not from a particular server's behavior.  
1181                     }
1182
1183
1184 TermListInfo ::= SEQUENCE{
1185   commonInfo    [0]  IMPLICIT CommonInfo OPTIONAL,
1186     -- Key elements follow:
1187   databaseName  [1]  IMPLICIT DatabaseName,
1188     -- Non-key brief elements follow:
1189   termLists      [2] IMPLICIT SEQUENCE OF SEQUENCE{
1190             name    [1] IMPLICIT InternationalString,
1191             title    [2] IMPLICIT HumanString OPTIONAL,
1192                                             -- Title is for users to see and can differ by language. Name, on the
1193                       -- other hand is typically a short string not necessarily meant to be
1194                        -- human-readable, and not variable by language.
1195             searchCost   [3]   IMPLICIT INTEGER {
1196                   optimized  (0),    -- The attribute (or combination) associated
1197                             -- with this   list will do fast searches. 
1198                       normal      (1),    -- The attribute (combination) will work as
1199                             -- expected. So there's probably an index for the
1200                             -- attribute (combination) or some similar
1201                              -- mechanism.
1202                       expensive   (2),    -- Can use the attribute (combination), but it
1203                             -- might not provide satisfactory results.
1204                             -- Probably there is no index, or post-
1205                             -- processing of records is required.
1206                       filter      (3)    -- can't search with this attribute (combination) alone.
1207                          } OPTIONAL,
1208               scanable  [4]  IMPLICIT BOOLEAN, -- 'true' means this list can be scanned.
1209                broader    [5] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1210                narrower  [6] IMPLICIT SEQUENCE OF InternationalString OPTIONAL
1211                        -- broader and narrower list alternative term lists related to this one.
1212                        -- The term lists so listed should also be in this termLists structure.
1213                           }
1214   -- no non-brief elements
1215             }
1216
1217
1218 ExtendedServicesInfo ::= SEQUENCE {
1219   commonInfo          [0]  IMPLICIT CommonInfo OPTIONAL,
1220     -- Key elements follow:
1221   type          [1]  IMPLICIT OBJECT IDENTIFIER,
1222     -- Non-key brief elements follow:
1223   name                [2]  IMPLICIT InternationalString OPTIONAL,
1224                 -- should be supplied if privateType is 'true'
1225   privateType      [3]  IMPLICIT BOOLEAN,
1226   restrictionsApply    [5]  IMPLICIT BOOLEAN,  -- if 'true' see 'description'
1227   feeApply              [6]  IMPLICIT BOOLEAN,  -- if 'true' see 'description'
1228   available             [7]  IMPLICIT BOOLEAN,
1229   retentionSupported    [8]  IMPLICIT BOOLEAN,
1230   waitAction      [9]  IMPLICIT INTEGER{
1231                 waitSupported    (1),
1232                 waitAlways      (2),
1233                 waitNotSupported  (3),
1234                 depends      (4),
1235                 notSaying      (5)},
1236   -- non-brief elements follow:
1237     -- To get brief plus 'description' use esn 'description'
1238   description           [10]  IMPLICIT HumanString OPTIONAL,
1239       -- to get above elements and 'specificExplain' use esn 'specificExplain'
1240   specificExplain    [11]  IMPLICIT EXTERNAL OPTIONAL,
1241                   -- Use oid of specific ES, and select choice [3] 'explain'. Format
1242                   -- to be developed in conjunction with the specific ES definition.
1243     -- to get all elements except 'specificExplain', use esn 'asn'
1244   esASN          [12]  IMPLICIT InternationalString OPTIONAL -- the ASN.1 for this ES
1245                 }
1246
1247 -- - - - - - - - - - - - - Detail records
1248  -- The detail records describe relationships among entities supported by the target. RetrievalRecordDetails describes
1249  -- the way that schema elements are mapped into record elements. This mapping may be different for each
1250  -- combination of database, schema, record syntax. The per-element details describe the default mapping.
1251  -- Origin-request re-tagging can change that mapping. When multiple databases are listed in a databaseNames
1252  -- element, the record applies equally to all of the listed databases.  This is unrelated to searching the databases
1253  -- together. AttributeDetails describes how databases can be searched. Each supported attribute is listed, and the
1254  -- allowable combinations can be described.
1255
1256
1257 AttributeDetails ::= SEQUENCE {
1258   commonInfo        [0]  IMPLICIT CommonInfo OPTIONAL,
1259     -- Key elements follow:
1260   databaseName        [1]  IMPLICIT DatabaseName,
1261     -- Non-brief elements follow:
1262   attributesBySet        [2]  IMPLICIT SEQUENCE OF AttributeSetDetails OPTIONAL, 
1263                   -- mandatory in full record
1264   attributeCombinations    [3]  IMPLICIT AttributeCombinations OPTIONAL}
1265
1266
1267
1268
1269 -- AttributeSetDetails referenced by AttributeDetails
1270   AttributeSetDetails ::= SEQUENCE {
1271         attributeSet      [0] IMPLICIT AttributeSetId,
1272           attributesByType  [1] IMPLICIT SEQUENCE OF AttributeTypeDetails }
1273     AttributeTypeDetails ::= SEQUENCE {
1274          attributeType     [0] IMPLICIT INTEGER,
1275           defaultIfOmitted    [1] IMPLICIT OmittedAttributeInterpretation OPTIONAL,
1276           attributeValues    [2] IMPLICIT SEQUENCE OF AttributeValue OPTIONAL }
1277                           -- If no attributeValues are supplied, all values of this type are fully
1278                     -- supported, and the descriptions in AttributeSetInfo are adequate.
1279
1280     OmittedAttributeInterpretation ::= SEQUENCE {
1281         defaultValue           [0] StringOrNumeric OPTIONAL,
1282                                 -- A default value is listed if that's how the server works
1283         defaultDescription  [1] IMPLICIT HumanString OPTIONAL }
1284                           -- The human-readable description should generally be provided.
1285                     -- It is legal for both default elements to be missing, which
1286                     -- means that the target will allow the attribute type to be
1287                     -- omitted, but isn't saying what it will do.
1288
1289     AttributeValue ::= SEQUENCE {
1290         value              [0]  StringOrNumeric,
1291         description        [1]  IMPLICIT HumanString OPTIONAL,
1292         subAttributes     [2]  IMPLICIT SEQUENCE OF StringOrNumeric OPTIONAL,
1293         superAttributes    [3]  IMPLICIT SEQUENCE OF StringOrNumeric OPTIONAL,
1294         partialSupport    [4]  IMPLICIT NULL OPTIONAL }
1295         -- partialSupport indicates that an attributeValue is accepted, but may not be processed in the
1296         -- "expected" way. One important reason for this is composite databases: in this case partialSupport
1297         -- may indicate that only some of the subDbs support the attribute, and others ignore it.
1298
1299
1300
1301 TermListDetails ::= SEQUENCE{  -- one for each termList in TermListInfo
1302   commonInfo    [0]  IMPLICIT CommonInfo OPTIONAL,
1303     -- Key elements follow:
1304   termListName    [1]  IMPLICIT InternationalString,
1305     -- Non-key elements (all non-brief) follow:
1306   description    [2]  IMPLICIT HumanString OPTIONAL,
1307   attributes      [3]  IMPLICIT AttributeCombinations OPTIONAL,
1308                           -- Pattern for attributes that hit this list. Mandatory in full record
1309   scanInfo      [4]  IMPLICIT SEQUENCE {
1310                 maxStepSize         [0] IMPLICIT INTEGER OPTIONAL,
1311                 collatingSequence  [1] IMPLICIT HumanString OPTIONAL,
1312                 increasing            [2] IMPLICIT BOOLEAN OPTIONAL} OPTIONAL,
1313             -- Occurs only if list is scanable. If list is scanable and if scanInfo is omitted, 
1314             -- target doesn't consider these important.
1315   estNumberTerms  [5]  IMPLICIT INTEGER OPTIONAL,
1316   sampleTerms    [6]  IMPLICIT SEQUENCE OF Term OPTIONAL}
1317
1318
1319
1320 ElementSetDetails ::= SEQUENCE {
1321   -- ElementSetDetails describes the way that database records are mapped to record elements. This
1322   -- mapping may be different for each combination of database name and element set. The database record
1323    -- description is a schema, which may be private to the target. The schema's abstract record structure
1324   -- and tag sets provide the vocabulary for discussing record content; their presence in the Explain
1325   -- database does not imply support for complex retrieval specification.
1326   commonInfo      [0]  IMPLICIT CommonInfo OPTIONAL,
1327     -- Key elements follow:
1328   databaseName      [1]  IMPLICIT DatabaseName,
1329   elementSetName    [2]  IMPLICIT ElementSetName,
1330   recordSyntax      [3]  IMPLICIT OBJECT IDENTIFIER,
1331     -- Non-key Brief elements follow:
1332   schema        [4]  IMPLICIT OBJECT IDENTIFIER,
1333     -- Non-brief elements follow:
1334   description      [5]  IMPLICIT HumanString OPTIONAL,
1335   detailsPerElement    [6]  IMPLICIT SEQUENCE OF PerElementDetails OPTIONAL -- mandatory in full record
1336               }
1337
1338
1339 RetrievalRecordDetails ::= SEQUENCE {
1340   commonInfo      [0]  IMPLICIT CommonInfo OPTIONAL,
1341     -- Key elements follow:
1342   databaseName      [1]  IMPLICIT DatabaseName,
1343   schema        [2]  IMPLICIT OBJECT IDENTIFIER,
1344   recordSyntax      [3]  IMPLICIT OBJECT IDENTIFIER,
1345     -- Non-brief elements follow:
1346   description      [4]  IMPLICIT HumanString OPTIONAL,
1347   detailsPerElement    [5]  IMPLICIT SEQUENCE OF PerElementDetails OPTIONAL
1348                 -- mandatory in full record
1349             }
1350
1351 -- PerElementDetails is referenced in RetrievalRecordDetails and ElementSetDetails.
1352   PerElementDetails ::= SEQUENCE {
1353       name      [0]    IMPLICIT InternationalString OPTIONAL,
1354                    -- If the name is omitted, the record syntax's name for this element
1355                   -- is appropriate.
1356       recordTag    [1]    IMPLICIT RecordTag OPTIONAL,
1357                    -- The record tag may be omitted if tags are inappropriate for the record
1358                   -- syntax, or if the origin can be expected to know it for some other reason.
1359       schemaTags    [2]    IMPLICIT SEQUENCE OF Path OPTIONAL,
1360                       -- The information from the listed schema elements is combined
1361                   -- in some way to produce the data sent in the listed record tag. The
1362                   -- 'contents' element below may describe the logic used.
1363       maxSize    [3]    IMPLICIT INTEGER OPTIONAL,
1364       minSize    [4]    IMPLICIT INTEGER OPTIONAL,
1365       avgSize      [5]    IMPLICIT INTEGER OPTIONAL,
1366       fixedSize    [6]    IMPLICIT INTEGER OPTIONAL,
1367       repeatable    [8]    IMPLICIT BOOLEAN,
1368       required    [9]    IMPLICIT BOOLEAN, 
1369                   -- 'required' really means that target will always supply the element.
1370       description    [12]  IMPLICIT HumanString OPTIONAL,
1371       contents    [13]  IMPLICIT HumanString OPTIONAL,
1372       billingInfo    [14]  IMPLICIT HumanString OPTIONAL,
1373       restrictions    [15]  IMPLICIT HumanString OPTIONAL,
1374       alternateNames  [16]  IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1375       genericNames  [17]  IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
1376       searchAccess  [18]  IMPLICIT AttributeCombinations OPTIONAL }
1377       -- RecordTag referenced in PerElementDetails above
1378         RecordTag ::= SEQUENCE {
1379               qualifier  [0] StringOrNumeric OPTIONAL,
1380                     -- E.g. tag set for GRS-1
1381               tagValue  [1] StringOrNumeric}
1382
1383 SortDetails ::= SEQUENCE {
1384   commonInfo    [0]  IMPLICIT CommonInfo OPTIONAL,
1385   -- Key elements follow:
1386   databaseName    [1]  IMPLICIT DatabaseName,
1387     -- No non-key brief elements
1388     -- Non-brief elements follow:
1389   sortKeys      [2]  IMPLICIT SEQUENCE OF SortKeyDetails OPTIONAL
1390               -- mandatory in full record
1391           }
1392   SortKeyDetails ::= SEQUENCE {
1393       description        [0]  IMPLICIT HumanString OPTIONAL,
1394       elementSpecifications  [1]  IMPLICIT SEQUENCE OF Specification OPTIONAL,
1395                       -- each specification is a way of specifying this same sort key
1396       attributeSpecifications  [2]  IMPLICIT AttributeCombinations OPTIONAL,
1397                       -- each combination is a way of specifying this same sort key
1398       sortType                   [3]  CHOICE {
1399                     character    [0]  IMPLICIT NULL,
1400                     numeric    [1]  IMPLICIT NULL,
1401                     structured    [2]  IMPLICIT HumanString} OPTIONAL,
1402       caseSensitivity      [4]  IMPLICIT INTEGER {
1403                       always    (0),  -- always case-sensitive
1404                     never    (1),            -- never case-sensitive
1405                     default-yes  (2),               -- case-sensitivity is as specified on request, and if not
1406                             -- specified, case-sensitive.
1407                     default-no  (3)} -- case-sensitivity is as specified on request, and if not
1408                             -- specified, not case-sensitive.
1409                           OPTIONAL}
1410
1411 ProcessingInformation ::= SEQUENCE{
1412   commonInfo      [0]  IMPLICIT CommonInfo OPTIONAL,
1413     -- Key elements follow:
1414   databaseName      [1]  IMPLICIT DatabaseName,
1415   processingContext    [2]  IMPLICIT INTEGER {
1416                   access        (0),   -- e.g. choosing databases
1417                   search        (1),   -- e.g. "search strategies" or search forms 
1418                   retrieval      (2),   -- e.g. recommended element combinations 
1419                   record-presentation  (3),    -- display of retrieved records
1420                   record-handling    (4)    -- handling (e.g. saving) of retrieved records
1421         },
1422   name          [3]  IMPLICIT InternationalString,
1423   oid          [4]  IMPLICIT OBJECT IDENTIFIER,
1424     -- No non-key brief elements
1425     -- Non-brief elements follow:
1426   description      [5]  IMPLICIT HumanString OPTIONAL,
1427                 -- use element set name 'description' to retrieve all except instructions.
1428   instructions      [6]  IMPLICIT EXTERNAL OPTIONAL -- mandatory in full record
1429               }
1430
1431
1432 VariantSetInfo ::= SEQUENCE {
1433     -- A record in this category describes a variant set definition, i.e., classes, types, and values, for a specific
1434     -- variant set definition supported by the target. Support by the target of a particular variant set definition
1435     -- does not imply that the definition is supported for any specific database or element. 
1436   commonInfo    [0] IMPLICIT CommonInfo OPTIONAL,
1437   -- Key elements follow:
1438   variantSet    [1] IMPLICIT OBJECT IDENTIFIER,
1439   -- Non-key brief elements follow:
1440   name      [2] IMPLICIT InternationalString,
1441   -- Non-brief elements follow:
1442   variants    [3] IMPLICIT SEQUENCE OF VariantClass OPTIONAL
1443                    -- mandatory in full record
1444            }
1445
1446   -- Subsidiary structures for VariantSetInfo
1447     VariantClass ::= SEQUENCE {
1448           name        [0] IMPLICIT InternationalString OPTIONAL,
1449           description    [1] IMPLICIT HumanString OPTIONAL,
1450           variantClass    [2] IMPLICIT INTEGER,
1451           variantTypes  [3] IMPLICIT SEQUENCE OF VariantType}
1452     VariantType ::= SEQUENCE {
1453           name            [0] IMPLICIT InternationalString OPTIONAL,
1454           description     [1] IMPLICIT HumanString OPTIONAL,
1455           variantType    [2] IMPLICIT INTEGER,
1456           variantValue  [3] IMPLICIT VariantValue OPTIONAL}
1457     VariantValue ::= SEQUENCE {
1458           dataType     [0] PrimitiveDataType,
1459           values        [1] ValueSet OPTIONAL }
1460     ValueSet ::= CHOICE {
1461           range       [0] IMPLICIT ValueRange,
1462           enumerated  [1] IMPLICIT SEQUENCE OF ValueDescription }
1463     ValueRange ::= SEQUENCE {
1464             -- At last one the following must be supplied, both may be supplied.
1465           lower      [0] ValueDescription OPTIONAL,
1466           upper     [1] ValueDescription OPTIONAL }
1467     ValueDescription ::= CHOICE{
1468       integer             INTEGER,
1469           string              InternationalString,
1470           octets              OCTET STRING,
1471           oid                 OBJECT IDENTIFIER,
1472           unit               [1]  IMPLICIT Unit,
1473           valueAndUnit   [2]  IMPLICIT IntUnit 
1474             -- oid and unit can't be used in a ValueRange
1475             }
1476
1477
1478
1479 UnitInfo ::= SEQUENCE {
1480   commonInfo  [0] IMPLICIT CommonInfo OPTIONAL,
1481   -- Key elements follow:
1482   unitSystem   [1] IMPLICIT InternationalString,
1483    -- No non-key brief elements
1484    -- Non-brief elements follow:
1485   description   [2] IMPLICIT HumanString OPTIONAL,
1486   units      [3] IMPLICIT SEQUENCE OF UnitType OPTIONAL
1487                          -- mandatory in full record
1488            }
1489
1490   -- Subsidiary structures for UnitInfo
1491     UnitType ::= SEQUENCE {
1492       name    [0] IMPLICIT InternationalString OPTIONAL,
1493       description  [1] IMPLICIT HumanString OPTIONAL,
1494       unitType  [2] StringOrNumeric,
1495       units     [3] IMPLICIT SEQUENCE OF Units}
1496
1497     Units ::= SEQUENCE {
1498       name     [0] IMPLICIT InternationalString OPTIONAL,
1499       description  [1] IMPLICIT HumanString OPTIONAL,
1500       unit      [2] StringOrNumeric}
1501
1502 CategoryList ::= SEQUENCE {
1503   commonInfo      [0] IMPLICIT CommonInfo OPTIONAL,
1504     -- Only one record expected per Explain database. All elements appear in brief presentation.
1505   categories      [1] IMPLICIT SEQUENCE OF CategoryInfo }
1506     CategoryInfo ::= SEQUENCE {
1507            category          [1] IMPLICIT InternationalString,
1508             originalCategory    [2] IMPLICIT InternationalString OPTIONAL,
1509           description         [3] IMPLICIT HumanString OPTIONAL,
1510          asn1Module      [4] IMPLICIT InternationalString OPTIONAL}
1511
1512
1513 -- - - - - - - - - - - - - - Subsidiary definitions
1514
1515 CommonInfo ::= SEQUENCE {
1516   dateAdded         [0] IMPLICIT GeneralizedTime OPTIONAL,
1517   dateChanged       [1] IMPLICIT GeneralizedTime OPTIONAL,
1518   expiry                [2] IMPLICIT GeneralizedTime OPTIONAL,
1519   humanString-Language  [3] IMPLICIT LanguageCode OPTIONAL,
1520   -- following not to occur for brief:
1521   otherInfo          OtherInformation OPTIONAL}
1522
1523
1524 HumanString ::= SEQUENCE OF SEQUENCE {
1525           language  [0] IMPLICIT LanguageCode OPTIONAL,
1526         text        [1] IMPLICIT InternationalString}
1527
1528 IconObject ::= SEQUENCE OF SEQUENCE{
1529       -- Note that the "SEQUENCE OF" is to allow alternative representations of the same Icon; it is not
1530       -- intended to allow multiple icons.
1531   bodyType [1] CHOICE{
1532            ianaType  [1] IMPLICIT InternationalString,
1533           z3950type  [2] IMPLICIT InternationalString,
1534            otherType  [3] IMPLICIT InternationalString},
1535   content  [2] IMPLICIT OCTET STRING}
1536
1537
1538 LanguageCode ::= InternationalString  -- from ANSI/NISO Z39.53-1994 
1539
1540 ContactInfo ::= SEQUENCE {
1541   name           [0] IMPLICIT InternationalString OPTIONAL,
1542   description  [1] IMPLICIT HumanString OPTIONAL,
1543   address        [2] IMPLICIT HumanString OPTIONAL,
1544   email         [3] IMPLICIT InternationalString OPTIONAL,
1545   phone         [4] IMPLICIT InternationalString OPTIONAL}
1546
1547 NetworkAddress ::= CHOICE {
1548   internetAddress      [0] IMPLICIT SEQUENCE {
1549                   hostAddress    [0]  IMPLICIT InternationalString,
1550                   port       [1]  IMPLICIT INTEGER},
1551   osiPresentationAddress    [1] IMPLICIT SEQUENCE { 
1552                     pSel         [0] IMPLICIT InternationalString,  
1553                     sSel         [1] IMPLICIT InternationalString OPTIONAL,  
1554                     tSel        [2] IMPLICIT InternationalString OPTIONAL,  
1555                     nSap      [3] IMPLICIT InternationalString},
1556   other            [2] IMPLICIT SEQUENCE {  
1557                       type        [0] IMPLICIT InternationalString,
1558                 address    [1] IMPLICIT InternationalString}}
1559
1560 AccessInfo ::= SEQUENCE {
1561     -- AccessInfo contains the fundamental information about what facilities are required to use this target
1562     -- or server. For example, if an origin can handle none of the record syntaxes a database can provide, 
1563     -- it might choose not to access the database.
1564   queryTypesSupported  [0]    IMPLICIT SEQUENCE OF QueryTypeDetails OPTIONAL,
1565   diagnosticsSets        [1]    IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1566   attributeSetIds          [2]    IMPLICIT SEQUENCE OF AttributeSetId OPTIONAL,
1567   schemas                [3]    IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1568   recordSyntaxes         [4]    IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1569   resourceChallenges    [5]    IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1570   restrictedAccess       [6]    IMPLICIT AccessRestrictions OPTIONAL,
1571   costInfo                 [8]    IMPLICIT Costs OPTIONAL,
1572   variantSets       [9]    IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
1573   elementSetNames    [10]  IMPLICIT SEQUENCE OF ElementSetName OPTIONAL,
1574   unitSystems      [11]  IMPLICIT SEQUENCE OF InternationalString}
1575
1576 -- begin auxiliary definitions for AccessInfo
1577 -- Begin Query Details
1578 QueryTypeDetails ::= CHOICE {
1579   private       [0]    IMPLICIT PrivateCapabilities,
1580   rpn            [1]    IMPLICIT RpnCapabilities,
1581   iso8777          [2]    IMPLICIT Iso8777Capabilities,
1582   z39-58      [100]  IMPLICIT HumanString,
1583   erpn        [101]  IMPLICIT RpnCapabilities,
1584   rankedList      [102]  IMPLICIT HumanString}
1585
1586 PrivateCapabilities ::= SEQUENCE {
1587   operators       [0]  IMPLICIT SEQUENCE OF SEQUENCE {
1588               operator  [0] IMPLICIT InternationalString,
1589               description  [1] IMPLICIT HumanString OPTIONAL } OPTIONAL,
1590   searchKeys    [1]  IMPLICIT SEQUENCE OF SearchKey OPTIONAL,  -- field names that can be searched
1591   description    [2]  IMPLICIT SEQUENCE OF HumanString OPTIONAL }
1592
1593 RpnCapabilities ::= SEQUENCE {
1594   operators                    [0] IMPLICIT SEQUENCE OF INTEGER OPTIONAL,
1595                                         -- Omitted means all operators are supported.
1596   resultSetAsOperandSupported  [1] IMPLICIT BOOLEAN,
1597   restrictionOperandSupported    [2] IMPLICIT BOOLEAN,
1598   proximity                    [3] IMPLICIT ProximitySupport OPTIONAL}
1599
1600 Iso8777Capabilities ::= SEQUENCE {
1601   searchKeys  [0]  IMPLICIT SEQUENCE OF SearchKey,  -- field names that may be searched
1602   restrictions   [1]  IMPLICIT HumanString OPTIONAL 
1603             -- Omitted means supported, not specifying units.
1604               }
1605
1606 ProximitySupport ::= SEQUENCE {
1607   anySupport      [0]   IMPLICIT BOOLEAN,
1608           -- 'false' means no proximity support, in which case unitsSupported not supplied.
1609   unitsSupported  [1]   IMPLICIT SEQUENCE OF CHOICE{  
1610              known  [1] IMPLICIT INTEGER, -- values from KnownProximityUnit
1611           private  [2] IMPLICIT SEQUENCE{  
1612                       unit    [0] IMPLICIT INTEGER,  
1613                 description  [1] HumanString OPTIONAL}} OPTIONAL}
1614
1615 SearchKey ::= SEQUENCE {
1616   searchKey     [0]  IMPLICIT InternationalString,
1617   description     [1]  IMPLICIT HumanString OPTIONAL }
1618 -- End Query details
1619 AccessRestrictions ::= SEQUENCE OF SEQUENCE {
1620   accessType      [0] INTEGER {
1621                   any         (0),
1622                   search         (1),
1623                   present         (2),
1624                   specific-elements  (3),
1625                   extended-services  (4),
1626             by-database      (5)},
1627   accessText         [1]  IMPLICIT HumanString OPTIONAL,
1628   accessChallenges  [2]  IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL}
1629
1630 Costs ::= SEQUENCE {
1631   connectCharge    [0] IMPLICIT Charge OPTIONAL,    -- Per-connection charge
1632   connectTime    [1] IMPLICIT Charge OPTIONAL,    -- Time-based charge
1633   displayCharge     [2] IMPLICIT Charge OPTIONAL,    -- Per-record charge
1634   searchCharge     [3] IMPLICIT Charge OPTIONAL,    -- Per-search charge
1635   subscriptCharge  [4]  IMPLICIT Charge OPTIONAL,  -- Subscription charges
1636   otherCharges    [5] IMPLICIT SEQUENCE OF SEQUENCE{   -- Other charges
1637             forWhat  [1]  IMPLICIT HumanString,
1638             charge    [2]  IMPLICIT Charge} OPTIONAL} 
1639     Charge ::= SEQUENCE{
1640         cost          [1] IMPLICIT IntUnit,
1641         perWhat  [2] IMPLICIT Unit OPTIONAL,
1642                       -- e.g. "second," "minute," "line," "record"...
1643         text          [3] IMPLICIT HumanString OPTIONAL} 
1644 -- End Auxiliary definitions for AccessInfo
1645
1646 DatabaseList ::= SEQUENCE OF DatabaseName
1647
1648 AttributeCombinations ::= SEQUENCE {
1649   defaultAttributeSet  [0] IMPLICIT AttributeSetId,
1650                  -- Default for the combinations. Also probably a good choice for the default
1651               -- in searches, but that isn't required.
1652   legalCombinations  [1] IMPLICIT SEQUENCE OF AttributeCombination }
1653
1654
1655 AttributeCombination ::= SEQUENCE OF AttributeOccurrence
1656             -- An AttributeCombination is a pattern for legal combination of attributes
1657
1658
1659 AttributeOccurrence ::= SEQUENCE {   
1660       -- An AttributeOccurrence lists the legal values for a specific attribute type in a combination.
1661        attributeSet       [0]  IMPLICIT AttributeSetId OPTIONAL,
1662        attributeType      [1]  IMPLICIT INTEGER,
1663        mustBeSupplied  [2]  IMPLICIT NULL OPTIONAL,
1664        attributeValues    CHOICE {
1665                       any-or-none  [3] IMPLICIT NULL, -- All supported values are OK 
1666                       specific    [4] IMPLICIT SEQUENCE OF StringOrNumeric}}
1667                                                   -- Only these values allowed
1668 END
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678 RecordSyntax-SUTRS
1679 {Z39-50-recordSyntax SUTRS (101)} DEFINITIONS ::=
1680 BEGIN 
1681 IMPORTS InternationalString  FROM Z39-50-APDU-1995;
1682         SutrsRecord ::=  InternationalString
1683 -- Line terminator is ASCII LF (X'0A').
1684 -- Recommended maximum line length is 72 characters.
1685 END
1686
1687
1688
1689
1690
1691 RecordSyntax-opac
1692 {Z39-50-recordSyntax opac (102)} DEFINITIONS ::=
1693 BEGIN 
1694 IMPORTS InternationalString  FROM Z39-50-APDU-1995;
1695 OPACRecord ::= SEQUENCE {
1696   bibliographicRecord   [1]   IMPLICIT EXTERNAL OPTIONAL,
1697   holdingsData     [2]   IMPLICIT SEQUENCE OF HoldingsRecord OPTIONAL}
1698 HoldingsRecord ::=  CHOICE {
1699   marcHoldingsRecord  [1]   IMPLICIT EXTERNAL,
1700   holdingsAndCirc  [2]  IMPLICIT HoldingsAndCircData}
1701 HoldingsAndCircData ::=  SEQUENCE {
1702 -- the following elements are required to display holdings in conformance with NISO standards.
1703   typeOfRecord    [1]   IMPLICIT InternationalString OPTIONAL, -- LDR 06
1704   encodingLevel    [2]   IMPLICIT InternationalString OPTIONAL, -- LDR 017
1705   format      [3]   IMPLICIT InternationalString OPTIONAL, -- 007 00-01
1706   receiptAcqStatus    [4]   IMPLICIT InternationalString OPTIONAL, -- 008 06
1707   generalRetention    [5]   IMPLICIT InternationalString OPTIONAL, -- 008 12
1708   completeness    [6]   IMPLICIT InternationalString OPTIONAL, -- 008 16
1709        dateOfReport     [7]   IMPLICIT InternationalString OPTIONAL, -- 008 26-31
1710   nucCode    [8]   IMPLICIT InternationalString OPTIONAL, -- 852 $a
1711   localLocation    [9]   IMPLICIT InternationalString OPTIONAL, -- 852 $b
1712   shelvingLocation  [10]   IMPLICIT InternationalString OPTIONAL, -- 852 $c
1713   callNumber    [11]   IMPLICIT InternationalString OPTIONAL, -- 852 $h and $i
1714   shelvingData     [12]   IMPLICIT InternationalString OPTIONAL, -- 852 $j thru $m
1715   copyNumber    [13]   IMPLICIT InternationalString OPTIONAL, -- 852 $t
1716   publicNote    [14]   IMPLICIT InternationalString OPTIONAL, -- 852 $z
1717   reproductionNote  [15]   IMPLICIT InternationalString OPTIONAL, -- 843
1718   termsUseRepro     [16]   IMPLICIT InternationalString OPTIONAL, -- 845
1719   enumAndChron    [17]   IMPLICIT InternationalString OPTIONAL, -- all 85x, 86x
1720   volumes     [18]   IMPLICIT SEQUENCE OF Volume OPTIONAL, 
1721             -- repeats for each volume held
1722   circulationData    [19]   IMPLICIT SEQUENCE OF CircRecord OPTIONAL 
1723             -- repeats for each circulating item.
1724             }
1725 Volume ::=  SEQUENCE {
1726   enumeration    [1]   IMPLICIT InternationalString OPTIONAL,
1727   chronology     [2]   IMPLICIT InternationalString OPTIONAL,
1728   enumAndChron    [3]   IMPLICIT InternationalString OPTIONAL }
1729 CircRecord ::=  SEQUENCE {
1730   availableNow    [1]   IMPLICIT BOOLEAN,
1731   availablityDate    [2]   IMPLICIT InternationalString OPTIONAL,
1732   availableThru      [3]   IMPLICIT InternationalString OPTIONAL,
1733   restrictions     [4]   IMPLICIT InternationalString OPTIONAL,
1734   itemId        [5]   IMPLICIT InternationalString OPTIONAL,
1735   renewable        [6]   IMPLICIT BOOLEAN,
1736   onHold        [7]   IMPLICIT BOOLEAN,
1737   enumAndChron     [8]   IMPLICIT InternationalString OPTIONAL,
1738   midspine    [9]   IMPLICIT InternationalString OPTIONAL,
1739   temporaryLocation  [10]   IMPLICIT InternationalString OPTIONAL}
1740 END
1741
1742
1743
1744 RecordSyntax-summary
1745
1746 {Z39-50-recordSyntax summary (103)} DEFINITIONS ::=
1747 BEGIN 
1748 IMPORTS OtherInformation, InternationalString  FROM Z39-50-APDU-1995;
1749 BriefBib ::= SEQUENCE {
1750   title           [1]   IMPLICIT InternationalString,
1751   author            [2]   IMPLICIT InternationalString OPTIONAL,
1752   callNumber         [3]   IMPLICIT InternationalString OPTIONAL,
1753   recordType      [4]   IMPLICIT InternationalString OPTIONAL,
1754   bibliographicLevel  [5]   IMPLICIT InternationalString OPTIONAL,
1755   format        [6]   IMPLICIT SEQUENCE OF FormatSpec OPTIONAL,
1756   publicationPlace    [7]   IMPLICIT InternationalString OPTIONAL,
1757   publicationDate     [8]   IMPLICIT InternationalString OPTIONAL,
1758   targetSystemKey   [9]   IMPLICIT InternationalString OPTIONAL,
1759   satisfyingElement  [10]   IMPLICIT InternationalString OPTIONAL,
1760   rank         [11]   IMPLICIT INTEGER OPTIONAL,
1761   documentId     [12]   IMPLICIT InternationalString OPTIONAL,
1762   abstract       [13]   IMPLICIT InternationalString OPTIONAL,
1763   otherInfo        OtherInformation OPTIONAL}
1764
1765 FormatSpec     ::=  SEQUENCE {
1766   type         [1]   IMPLICIT InternationalString,
1767   size      [2]   IMPLICIT INTEGER OPTIONAL,
1768   bestPosn     [3]   IMPLICIT INTEGER OPTIONAL}
1769 END
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780 RecordSyntax-generic  -- For detailed semantics, see Appendix RET.
1781 {Z39-50-recordSyntax GRS-1 (105)} DEFINITIONS ::=
1782 BEGIN 
1783 EXPORTS Variant;
1784 IMPORTS IntUnit, Unit, InternationalString, StringOrNumeric, Term FROM Z39-50-APDU-1995;
1785
1786 GenericRecord ::= SEQUENCE OF TaggedElement  
1787 TaggedElement ::= SEQUENCE {
1788   tagType    [1] IMPLICIT INTEGER OPTIONAL,
1789               -- If omitted, default should be supplied dynamically by tagSet-M; 
1790               -- otherwise it should be statically specified by the schema.
1791   tagValue    [2] StringOrNumeric,
1792   tagOccurrence  [3] IMPLICIT INTEGER OPTIONAL,
1793                              -- Occurrence within the database record, and relative to the parent. No
1794               -- default; if omitted, target not telling or it is irrelevant.
1795   content      [4] ElementData,
1796   metaData    [5] IMPLICIT ElementMetaData OPTIONAL,
1797   appliedVariant  [6] IMPLICIT Variant OPTIONAL}
1798
1799 ElementData ::= CHOICE{
1800   octets      OCTET STRING,
1801   numeric    INTEGER,
1802   date      GeneralizedTime,
1803   ext        EXTERNAL,
1804   string      InternationalString,
1805   trueOrFalse    BOOLEAN,
1806   oid        OBJECT IDENTIFIER,
1807   intUnit          [1]  IMPLICIT IntUnit,
1808    elementNotThere    [2] IMPLICIT NULL,  -- element requested but not there
1809   elementEmpty      [3] IMPLICIT NULL,  -- element there, but empty
1810   noDataRequested    [4] IMPLICIT NULL,  -- variant request said 'no data'
1811   diagnostic        [5] IMPLICIT EXTERNAL,
1812   subtree          [6] SEQUENCE OF TaggedElement -- recursive, for nested tags
1813               }
1814
1815
1816 ElementMetaData ::= SEQUENCE{
1817   seriesOrder        [1]   IMPLICIT Order OPTIONAL, -- only for a non-leaf node
1818   usageRight        [2]   IMPLICIT Usage OPTIONAL,
1819   hits            [3]    IMPLICIT SEQUENCE OF HitVector OPTIONAL,
1820   displayName      [4]    IMPLICIT InternationalString OPTIONAL, 
1821                     -- name for element that origin can use for display
1822   supportedVariants    [5]   IMPLICIT SEQUENCE OF Variant OPTIONAL,
1823   message        [6]    IMPLICIT InternationalString OPTIONAL,
1824   elementDescriptor    [7]   IMPLICIT OCTET STRING OPTIONAL,
1825   surrogateFor      [8]   IMPLICIT TagPath OPTIONAL,  
1826                     -- the retrieved element is a surrogate for the element given by this path  
1827   surrogateElement    [9]   IMPLICIT TagPath OPTIONAL,
1828                     -- the element given by this path is a surrogate for the retrieved element
1829     other          [99]  IMPLICIT EXTERNAL OPTIONAL}
1830
1831         TagPath ::= SEQUENCE  OF SEQUENCE{
1832           tagType      [1]  IMPLICIT INTEGER OPTIONAL,
1833             tagValue      [2]  StringOrNumeric,
1834             tagOccurrence    [3]  IMPLICIT INTEGER OPTIONAL}
1835
1836
1837
1838 Order ::= SEQUENCE{
1839   ascending    [1] IMPLICIT BOOLEAN,
1840               -- "true" means monotonically increasing (i.e. non-decreasing); 
1841               -- "false" means monotonically decreasing (i.e. non-increasing).
1842   order      [2] IMPLICIT INTEGER
1843               -- Same as defined by 'elementOrdering' in tagSet-M, though this may be
1844               -- overridden by schema.
1845           }
1846
1847
1848
1849 Usage ::= SEQUENCE  {
1850   type        [1] IMPLICIT INTEGER{
1851               redistributable    (1),   -- Element is freely redistributable.
1852               restricted      (2),   -- Restriction contains statement.
1853               licensePointer    (3)   -- Restriction contains license pointer.
1854               },
1855   restriction    [2] IMPLICIT InternationalString OPTIONAL}
1856
1857
1858
1859 HitVector ::= SEQUENCE{ 
1860     -- Each hit vector points to a fragment within the element, via location and/or token.
1861   satisfier            Term OPTIONAL, -- sourceword, etc.
1862   offsetIntoElement    [1] IMPLICIT IntUnit OPTIONAL,
1863   length          [2] IMPLICIT IntUnit OPTIONAL,
1864   hitRank          [3] IMPLICIT INTEGER OPTIONAL,
1865   targetToken        [4] IMPLICIT OCTET STRING OPTIONAL
1866                   -- Origin may use token subsequently within a variantRequest (in
1867                   --  an elementRequest) to retrieve (or to refer to) the fragment.  
1868               }
1869
1870
1871
1872
1873 Variant ::= SEQUENCE{
1874     globalVariantSetId    [1] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
1875                   -- Applies to the triples below, when variantSetId omitted. If
1876                   -- globalVariantSetId omitted, default applies. Default may be provided by
1877                   -- the tagSet-M element defaultVariantSetId.
1878
1879
1880
1881
1882   triples          [2]  IMPLICIT SEQUENCE OF SEQUENCE{
1883                   variantSetId  [0]  IMPLICIT OBJECT IDENTIFIER OPTIONAL,
1884                               -- If omitted, globalVariantSetId (above)
1885                               -- applies, unless that too is omitted, in
1886                                -- which case, default used.
1887                   class      [1]  IMPLICIT INTEGER,
1888                   type      [2]  IMPLICIT INTEGER,
1889                   value      [3]  CHOICE{
1890                                integer INTEGER,
1891                                internationalString InternationalString,
1892                                octetString OCTET STRING,
1893                                objectIdentifier OBJECT IDENTIFIER,
1894                                boolean BOOLEAN,
1895                               null NULL,
1896                           -- Following need context tags:
1897                             unit      [1] IMPLICIT Unit, 
1898                             valueAndUnit  [2] IMPLICIT IntUnit}}}
1899 END
1900
1901
1902
1903 RecordSyntax-ESTaskPackage
1904 {Z39-50-recordSyntax ESTaskPackage (106)} DEFINITIONS ::=
1905 BEGIN 
1906 IMPORTS Permissions, InternationalString, IntUnit, DiagRec FROM Z39-50-APDU-1995;
1907
1908 TaskPackage ::= SEQUENCE{
1909   packageType      [1]   IMPLICIT OBJECT IDENTIFIER,
1910                     -- oid of specific ES definition
1911   packageName      [2]   IMPLICIT InternationalString OPTIONAL,
1912   userId          [3]   IMPLICIT InternationalString OPTIONAL,
1913   retentionTime      [4]   IMPLICIT IntUnit OPTIONAL,
1914   permissions        [5]   IMPLICIT Permissions OPTIONAL,
1915   description        [6]   IMPLICIT InternationalString OPTIONAL,
1916   targetReference      [7]   IMPLICIT OCTET STRING OPTIONAL,
1917   creationDateTime    [8]   IMPLICIT GeneralizedTime OPTIONAL,
1918   taskStatus        [9]   IMPLICIT INTEGER{
1919                       pending    (0),
1920                       active    (1),
1921                       complete  (2),
1922                       aborted    (3)},
1923   packageDiagnostics    [10]  IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
1924   taskSpecificParameters  [11]  IMPLICIT EXTERNAL
1925                     -- Use oid for specific ES definition
1926                     -- (same oid as packageType above)
1927                     -- and select [2] "taskPackage."
1928     } 
1929 END
1930
1931
1932
1933
1934 ResourceReport-Format-Resource-1
1935 {Z39-50-resourceReport resource-1 (1)} DEFINITIONS ::=
1936 BEGIN 
1937 IMPORTS InternationalString FROM Z39-50-APDU-1995;  
1938 --
1939 ResourceReport ::= SEQUENCE{
1940 estimates    [1]   IMPLICIT SEQUENCE OF Estimate,
1941 message      [2]   IMPLICIT InternationalString}
1942 --
1943 Estimate ::= SEQUENCE{
1944 type        [1]   IMPLICIT EstimateType,
1945 value        [2]   IMPLICIT INTEGER,  -- the actual estimate
1946 currency-code  [3]   IMPLICIT INTEGER OPTIONAL
1947                 -- code for representation of currencies defined in ISO 4217-1990.  
1948                 -- Applicable only to monetary estimates.
1949                               }
1950 EstimateType ::= INTEGER{
1951 currentSearchRecords    (1),         -- estimated no. records in current (incomplete) result set for search
1952 finalSearchRecords       (2),        -- estimated no. records that will be in result set if search completes
1953 currentPresentRecords    (3),        -- estimated number of records in current (incomplete) set of
1954                       -- records to be returned on Present
1955 finalPresentRecords      (4),  -- estimated number of records that will be in the set of records
1956                       -- to be returned by Present if Present completes
1957 currentOpTimeProcessing  (5),  -- processing time (in .001 CPU seconds) used by operation so far
1958 finalOpTimeProcessing    (6),                -- estimated total processing time (in .001 CPU seconds) that will
1959                               -- be used by this operation if it completes
1960 currentAssocTime      (7),  -- estimated processing time used by association (in .001 CPU sec.)
1961 currentOperationCost      (8),  -- estimated cost for this operation so far
1962 finalOperationCost      (9),  -- estimated cost for this operation if it completes
1963 currentAssocCost        (10),  -- estimated cost for this association so far
1964 finalOpTimeElapsed            (11),  -- estimated elapsed time for operation if it completes (in .001 sec.) 
1965 percentComplete         (12), -- estimated percent complete
1966 currentSearchAssocCost    (13),  -- estimated search cost for association so far
1967 currentPresentAssocCost  (14),  -- estimated present cost for this association so far
1968 currentConnectAssocCost    (15),  -- estimated connect time cost for association so far
1969 currentOtherAssocCost    (16)  -- estimated other cost (not included in 13-15) for association so far
1970                   }
1971 END
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985 ResourceReport-Format-Resource-2
1986 {Z39-50-resourceReport resource-2 (2)} DEFINITIONS ::=
1987 BEGIN 
1988 IMPORTS InternationalString, StringOrNumeric, IntUnit FROM Z39-50-APDU-1995;  
1989 --
1990 ResourceReport ::= SEQUENCE{
1991 estimates    [1]   IMPLICIT SEQUENCE OF Estimate OPTIONAL,
1992 message      [2]   IMPLICIT InternationalString OPTIONAL}
1993 --
1994 Estimate ::= SEQUENCE{
1995 type      [1]   StringOrNumeric,
1996               -- Numeric values of 1-16 are the same as used in Resource-1.
1997 value      [2]   IMPLICIT IntUnit
1998               -- When expressing currency:
1999               --    unitSystem (of Unit) is 'z3950'  (case insensitive)
2000               --    unitType is 'iso4217-1990'       (case insensitive)
2001               --    unit is currency code from ISO 4217-1990.
2002 }
2003 END
2004
2005
2006
2007
2008
2009 AccessControlFormat-prompt-1
2010 {Z39-50-accessControl prompt-1 (1)} DEFINITIONS ::=
2011 BEGIN
2012 IMPORTS InternationalString, DiagRec FROM Z39-50-APDU-1995;
2013 --
2014 PromptObject ::= CHOICE{
2015   challenge      [1] IMPLICIT Challenge,
2016    response        [2] IMPLICIT Response}
2017
2018   Challenge ::= SEQUENCE OF SEQUENCE {
2019     promptId      [1] PromptId,
2020                     -- Target supplies a number (for an enumerated prompt) or string (for a non
2021                     -- -enumerated prompt), for each prompt, and the origin returns it in response, for
2022                     -- this prompt, so target may correlate the prompt response with the prompt.
2023     defaultResponse  [2] IMPLICIT InternationalString OPTIONAL,
2024      promptInfo      [3] CHOICE{ 
2025                     character  [1] IMPLICIT InternationalString,
2026                     encrypted  [2] IMPLICIT Encryption} OPTIONAL,
2027                     -- Information corresponding to an enumerated prompt. For example if 'type', within
2028                     -- PromptId, is 'copyright', then promptInfo may contain a copyright statement.  
2029     regExpr        [4] IMPLICIT InternationalString OPTIONAL,
2030                               -- A regular expression that promptResponse should match. See IEEE 1003.2
2031                     -- Volume 1, Section 2.8 "Regular Expression Notation." For example if promptId
2032                     -- is "Year of publication," regExpr might be "19[89][0-9]|20[0-9][0-9]".
2033     responseRequired  [5] IMPLICIT NULL OPTIONAL,
2034      allowedValues    [6] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
2035                         -- e.g. promptId="Desired color"; allowed = 'red', 'blue','Green'.
2036     shouldSave      [7] IMPLICIT NULL OPTIONAL,
2037                         -- Target recommends that origin save the data that it prompts from the
2038                      -- user corresponding to this prompt, because it is likely to be requested again (so
2039                     -- origin might not have to prompt the user next time).
2040         dataType        [8] IMPLICIT INTEGER{
2041                              integer        (1),
2042                           date            (2),
2043                         float           (3),
2044                         alphaNumeric  (4),
2045                         url-urn       (5),
2046                         boolean       (6)} OPTIONAL,
2047                         -- Target telling origin type of data it wants. E.g., if "date" is specified,
2048                         -- presumably the origin will try to prompt something "date-like" from the user.
2049         diagnostic       [9] IMPLICIT EXTERNAL OPTIONAL
2050                           -- Intended for repeat requests when there is an error the origin 
2051                         -- should report to the user from previous attempt.
2052                 }
2053
2054
2055   Response ::= SEQUENCE OF SEQUENCE {
2056       promptId    [1] PromptId,
2057                   -- Corresponds to a prompt in the challenge, or may be unprompted, for
2058                   -- example "newPassword." If unprompted, should be "enumerated." 
2059                   -- If this responds to a non-enumerated prompt, then nonEnumeratedPrompt
2060                    -- should contain the prompt string from the challenge.
2061     promptResponse  [2] CHOICE{
2062                     string      [1] IMPLICIT InternationalString,
2063                     accept      [2] IMPLICIT BOOLEAN,
2064                     acknowledge  [3] IMPLICIT NULL,
2065                     diagnostic    [4] DiagRec,
2066                      encrypted    [5] IMPLICIT Encryption}}
2067
2068
2069  PromptId ::= CHOICE{
2070   enummeratedPrompt    [1] IMPLICIT SEQUENCE{
2071                       type            [1] IMPLICIT INTEGER{
2072                                       groupId    (0),
2073                                       userId     (1),
2074                                       password   (2),
2075                                       newPassword  (3),
2076                                       copyright    (4),
2077                             -- When type on Challenge is 'copyright', promptInfo has text of
2078                             -- copyright message to be displayed verbatim to the user. If
2079                             -- promptResponse indicates 'acceptance', this indicates the user has been
2080                             -- shown, and accepted, the terms of the copyright. This is not intended
2081                             -- to be legally binding, but provides a good-faith attempt on
2082                             -- the part of the target to inform the user of the copyright.
2083                                       sessionId      (5)},
2084                       suggestedString    [2] IMPLICIT InternationalString OPTIONAL},
2085    nonEnumeratedPrompt  [2] IMPLICIT InternationalString}
2086
2087
2088  Encryption ::= SEQUENCE{
2089   cryptType    [1] IMPLICIT OCTET STRING OPTIONAL, 
2090   credential    [2] IMPLICIT OCTET STRING OPTIONAL,
2091                     --random number, SALT, or other factor
2092   data        [3] IMPLICIT OCTET STRING}
2093
2094 END
2095
2096
2097
2098
2099 AccessControlFormat-des-1
2100 {Z39-50-accessControlFormat  des-1 (2)} DEFINITIONS ::=
2101 BEGIN
2102     DES-RN-Object ::= CHOICE {
2103       challenge    [1]    IMPLICIT DRNType,
2104       response      [2]    IMPLICIT DRNType}
2105     DRNType ::= SEQUENCE{
2106           userId        [1]    IMPLICIT OCTET STRING OPTIONAL,
2107           salt          [2]    IMPLICIT OCTET STRING OPTIONAL,
2108           randomNumber  [3]    IMPLICIT OCTET STRING}
2109 END
2110
2111
2112 AccessControlFormat-krb-1
2113 {Z39-50-accessControlFormat  krb-1 (3)} DEFINITIONS ::=
2114 BEGIN
2115 IMPORTS InternationalString FROM Z39-50-APDU-1995;
2116
2117      KRBObject ::= CHOICE {
2118        challenge   [1]    IMPLICIT KRBRequest,
2119        response    [2]    IMPLICIT KRBResponse}
2120      KRBRequest ::= SEQUENCE{
2121            service         [1]   IMPLICIT InternationalString,
2122            instance        [2]   IMPLICIT InternationalString OPTIONAL,
2123            realm          [3]   IMPLICIT InternationalString OPTIONAL}
2124         -- target requests a ticket for the given service, instance, and realm
2125      KRBResponse ::= SEQUENCE{
2126            userid            [1]   IMPLICIT InternationalString OPTIONAL,
2127            ticket           [2]  IMPLICIT OCTET STRING}
2128         -- origin responds with a ticket for the requested service
2129 END
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139 ESFormat-PersistentResultSet
2140 {Z39-50-extendedService PersistentResultSet (1)} DEFINITIONS ::=
2141 BEGIN
2142 IMPORTS InternationalString FROM Z39-50-APDU-1995;
2143 PersistentResultSet ::= CHOICE{
2144     esRequest    [1] IMPLICIT SEQUENCE{
2145         toKeep    [1] IMPLICIT NULL,
2146         notToKeep  [2] OriginPartNotToKeep OPTIONAL},
2147     taskPackage  [2] IMPLICIT SEQUENCE{
2148         originPart  [1] IMPLICIT NULL,
2149         targetPart  [2] TargetPart OPTIONAL}}
2150 OriginPartNotToKeep ::= SEQUENCE{
2151   originSuppliedResultSet  [1] IMPLICIT InternationalString OPTIONAL,
2152           -- name of transient result set, supplied on request, mandatory unless function is 'delete'
2153   replaceOrAppend    [2] IMPLICIT INTEGER{  -- only if function is "modify"
2154           replace    (1),
2155           append    (2)} OPTIONAL}
2156 TargetPart ::= SEQUENCE{
2157   targetSuppliedResultSet  [1] IMPLICIT InternationalString OPTIONAL, 
2158           -- Name of transient result set, supplied by target, representing the persistent result set to which
2159           -- package pertains. Meaningful only when package  is presented. (i.e. not on ES response).
2160   numberOfRecords  [2] IMPLICIT INTEGER OPTIONAL}
2161 END
2162
2163
2164 ESFormat-PersistentQuery
2165 {Z39-50-extendedService PersistentQuery (2)} DEFINITIONS ::=
2166 BEGIN
2167 IMPORTS Query, InternationalString, OtherInformation FROM Z39-50-APDU-1995;
2168 PersistentQuery ::= CHOICE{
2169     esRequest      [1] IMPLICIT SEQUENCE{
2170         toKeep    [1] OriginPartToKeep OPTIONAL,
2171         notToKeep  [2] OriginPartNotToKeep},
2172     taskPackage    [2] IMPLICIT SEQUENCE{
2173         originPart  [1] OriginPartToKeep OPTIONAL,
2174         targetPart  [2] TargetPart}}
2175 OriginPartToKeep ::= SEQUENCE{
2176   dbNames        [2] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
2177   additionalSearchInfo  [3] OtherInformation OPTIONAL}
2178 OriginPartNotToKeep ::= CHOICE{
2179   package    [1] IMPLICIT InternationalString,
2180   query    [2] Query}
2181 TargetPart ::= Query          
2182 END
2183
2184 ESFormat-PeriodicQuerySchedule
2185 {Z39-50-extendedService PeriodicQuerySchedule (3)} DEFINITIONS ::=
2186 BEGIN
2187 IMPORTS Query, InternationalString, IntUnit FROM Z39-50-APDU-1995 
2188 ExportSpecification, Destination FROM ESFormat-ExportSpecification;
2189
2190 PeriodicQuerySchedule ::= CHOICE{
2191     esRequest    [1] IMPLICIT SEQUENCE{
2192               toKeep    [1] OriginPartToKeep,
2193               notToKeep  [2] OriginPartNotToKeep},
2194     taskPackage    [2] IMPLICIT SEQUENCE{
2195               originPart  [1] OriginPartToKeep,
2196               targetPart  [2] TargetPart}}
2197
2198 OriginPartToKeep ::=SEQUENCE{
2199   activeFlag          [1] IMPLICIT BOOLEAN,
2200   databaseNames        [2] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
2201   resultSetDisposition      [3] IMPLICIT INTEGER{
2202                     replace    (1),
2203                     append    (2),
2204                     createNew  (3)  -- Only if origin and target have agreement about
2205                             -- naming convention for the resulting package,
2206                              -- and only if no result set is specified.
2207                 } OPTIONAL,   -- Mandatory on 'create' if result set is specified, in
2208                         -- which case it must be 'replace' or 'append.
2209   alertDestination        [4] Destination OPTIONAL,
2210   exportParameters      [5] CHOICE{
2211                     packageName  [1]   IMPLICIT InternationalString,
2212                     exportPackage  [2] ExportSpecification} OPTIONAL}
2213
2214 OriginPartNotToKeep ::= SEQUENCE{
2215   querySpec           [1] CHOICE{
2216                     actualQuery    [1] Query,
2217                     packageName  [2] IMPLICIT InternationalString} OPTIONAL,
2218                   -- mandatory for 'create'
2219   originSuggestedPeriod    [2] Period OPTIONAL,  -- mandatory for 'create'
2220   expiration          [3] IMPLICIT GeneralizedTime OPTIONAL,
2221   resultSetPackage        [4] IMPLICIT InternationalString OPTIONAL}
2222
2223 TargetPart ::= SEQUENCE{
2224   actualQuery        [1] Query,
2225   targetStatedPeriod    [2] Period,
2226                   -- Target supplies the period, which may be same as origin proposed.
2227   expiration        [3] IMPLICIT GeneralizedTime OPTIONAL,
2228                   -- Target supplies value for task package. It may be the same as origin
2229                   -- proposed or different from (and overrides) origin proposal, but if
2230                   -- omitted, there is no expiration.
2231   resultSetPackage      [4] IMPLICIT InternationalString OPTIONAL,
2232                   -- May be omitted only if exportParameters was supplied. Target
2233                   -- supplies same name as origin supplied, if origin did supply a name.
2234   lastQueryTime      [5] IMPLICIT GeneralizedTime,
2235   lastResultNumber    [6] IMPLICIT INTEGER,
2236   numberSinceModify    [7] IMPLICIT INTEGER OPTIONAL}
2237
2238
2239
2240
2241   Period ::= CHOICE{
2242                 unit             [1] IMPLICIT IntUnit,
2243                  businessDaily     [2] IMPLICIT NULL,
2244               continuous       [3] IMPLICIT NULL,
2245               other         [4] IMPLICIT InternationalString}
2246 END
2247
2248
2249 ESFormat-ItemOrder
2250 {Z39-50-extendedService ItemOrder (4)} DEFINITIONS ::=
2251 BEGIN
2252 IMPORTS InternationalString FROM Z39-50-APDU-1995;
2253 ItemOrder ::= CHOICE{
2254     esRequest  [1] IMPLICIT SEQUENCE{
2255               toKeep    [1] OriginPartToKeep OPTIONAL,
2256               notToKeep  [2] OriginPartNotToKeep},
2257     taskPackage  [2] IMPLICIT SEQUENCE{
2258               originPart  [1] OriginPartToKeep OPTIONAL,
2259               targetPart  [2] TargetPart}}
2260 OriginPartToKeep ::= SEQUENCE{
2261   supplDescription    [1] IMPLICIT EXTERNAL OPTIONAL,
2262   contact        [2] IMPLICIT SEQUENCE{
2263                        name  [1]   IMPLICIT InternationalString OPTIONAL,
2264                          phone  [2]   IMPLICIT InternationalString OPTIONAL,
2265                        email  [3]   IMPLICIT InternationalString OPTIONAL} OPTIONAL,
2266   addlBilling      [3] IMPLICIT SEQUENCE{
2267                 paymentMethod    [1]   CHOICE{
2268                                   billInvoice              [0] IMPLICIT NULL,
2269                                     prepay                [1] IMPLICIT NULL,
2270                                     depositAccount        [2] IMPLICIT NULL,
2271                                     creditCard          [3] IMPLICIT CreditCardInfo,
2272                     cardInfoPreviouslySupplied  [4] IMPLICIT NULL,
2273                     privateKnown        [5] IMPLICIT NULL,
2274                     privateNotKnown      [6] IMPLICIT EXTERNAL},
2275                 customerReference  [2] IMPLICIT InternationalString OPTIONAL,
2276                      customerPONumber  [3] IMPLICIT InternationalString OPTIONAL}
2277                                  OPTIONAL}
2278 CreditCardInfo   ::= SEQUENCE{
2279        nameOnCard    [1] IMPLICIT InternationalString,
2280       expirationDate    [2] IMPLICIT InternationalString,
2281     cardNumber      [3] IMPLICIT InternationalString} 
2282
2283 OriginPartNotToKeep ::= SEQUENCE{ -- Corresponds to 'requestedItem' in service definition.
2284       --  Must supply at least one, and may supply both.
2285   resultSetItem    [1]   IMPLICIT SEQUENCE{  
2286                 resultSetId    [1]   IMPLICIT InternationalString,
2287                     item      [2]   IMPLICIT INTEGER} OPTIONAL,
2288   itemRequest      [2] IMPLICIT EXTERNAL OPTIONAL
2289                 -- When itemRequest is an ILL-Request APDU, 
2290                 -- use OID {iso standard 10161 abstract-syntax (2) ill-apdus (1)}
2291               }
2292
2293 TargetPart ::= SEQUENCE{
2294   itemRequest      [1]  IMPLICIT EXTERNAL OPTIONAL,
2295     -- When itemRequest is an ILL-Request APDU, use OID 1.0.10161.2.1 (as above)
2296   statusOrErrorReport  [2] IMPLICIT EXTERNAL OPTIONAL,
2297     -- When statusOrErrorReport is an ILL Status-Or-Error-Report APDU, use OID  1.0.10161.2.1 (as above)
2298   auxiliaryStatus    [3]  IMPLICIT INTEGER{
2299                 notReceived      (1),
2300                 loanQueue      (2),
2301                 forwarded      (3),
2302                 unfilledCopyright  (4),
2303                 filledCopyright    (5)} OPTIONAL}
2304 END
2305
2306
2307
2308
2309 ESFormat-Update0
2310 {Z39-50-extendedService Update (5)} DEFINITIONS ::=
2311 BEGIN
2312 IMPORTS DiagRec, InternationalString FROM Z39-50-APDU-1995; 
2313 Update ::= CHOICE{
2314     esRequest  [1] IMPLICIT SEQUENCE{
2315               toKeep    [1] OriginPartToKeep,
2316               notToKeep  [2] OriginPartNotToKeep},
2317     taskPackage  [2] IMPLICIT SEQUENCE{
2318               originPart  [1] OriginPartToKeep,
2319               targetPart  [2] TargetPart}}
2320
2321
2322 OriginPartToKeep ::= SEQUENCE{
2323   action          [1] IMPLICIT INTEGER{
2324                    recordInsert    (1),
2325                    recordReplace  (2),
2326                   recordDelete  (3),
2327                   elementUpdate  (4)},
2328   databaseName      [2] IMPLICIT InternationalString,
2329   schema          [3] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
2330   elementSetName      [4] IMPLICIT InternationalString OPTIONAL}
2331
2332
2333 OriginPartNotToKeep ::= SuppliedRecords
2334
2335
2336 TargetPart ::= SEQUENCE{
2337   updateStatus    [1] IMPLICIT INTEGER{
2338                   success  (1),
2339                   partial  (2),
2340                   failure  (3)},
2341   globalDiagnostics  [2] IMPLICIT SEQUENCE OF DiagRec OPTIONAL,
2342                 -- These are non-surrogate diagnostics relating to the task, 
2343                 -- not to individual records.
2344   taskPackageRecords  [3] IMPLICIT SEQUENCE OF TaskPackageRecordStructure
2345                 -- There should be a TaskPackageRecordStructure for every record
2346                 -- supplied. The target should create such a structure for every
2347                       -- record immediately upon creating the task package to include
2348                 -- correlation information and status. The record itself would not
2349                 -- be included until processing for that record is complete.
2350             }
2351
2352 -- Auxiliary definitions for Update
2353 SuppliedRecords ::= SEQUENCE OF SEQUENCE{
2354   recordId    [1] CHOICE{
2355               number  [1] IMPLICIT INTEGER,
2356               string  [2] IMPLICIT InternationalString,
2357               opaque  [3]  IMPLICIT OCTET STRING} OPTIONAL,
2358   supplementalId  [2] CHOICE{
2359               timeStamp    [1] IMPLICIT GeneralizedTime,
2360               versionNumber  [2] IMPLICIT InternationalString,
2361               previousVersion  [3] IMPLICIT EXTERNAL} OPTIONAL,
2362   correlationInfo  [3] IMPLICIT CorrelationInfo OPTIONAL,
2363   record      [4] IMPLICIT EXTERNAL}
2364
2365 CorrelationInfo ::= SEQUENCE{
2366           -- origin may supply one or both for any record:
2367   note  [1] IMPLICIT InternationalString OPTIONAL,
2368   id    [2] IMPLICIT INTEGER OPTIONAL}
2369
2370 TaskPackageRecordStructure ::= SEQUENCE{
2371     recordOrSurDiag  [1] CHOICE {
2372                 record    [1] IMPLICIT EXTERNAL,
2373                         -- Choose 'record' if recordStatus is 'success', and
2374                         -- elementSetName was supplied.
2375                 diagnostic  [2] DiagRec
2376                         -- Choose 'diagnostic', if RecordStatus is failure.
2377                                 } OPTIONAL,
2378                 -- The parameter recordOrSurDiag will thus be omitted only if
2379                 -- 'elementSetName' was omitted and recordStatus is
2380                 -- 'success'; or if record status is 'queued' or in 'process'.
2381     correlationInfo    [2] IMPLICIT CorrelationInfo OPTIONAL,
2382                 -- This should be included if it was supplied by the origin.
2383     recordStatus      [3] IMPLICIT INTEGER{
2384                   success    (1),
2385                   queued    (2),
2386                   inProcess  (3),
2387                   failure    (4)}}
2388 END
2389
2390
2391 ESFormat-ExportSpecification
2392 {Z39-50-extendedService ExportSpecification (6)} DEFINITIONS ::=
2393 BEGIN
2394 EXPORTS ExportSpecification, Destination; IMPORTS CompSpec, InternationalString FROM Z39-50-APDU-1995;
2395 ExportSpecification ::= CHOICE{
2396     esRequest    [1] IMPLICIT SEQUENCE{
2397         toKeep    [1] OriginPartToKeep,
2398         notToKeep  [2] IMPLICIT NULL},
2399     taskPackage    [2] IMPLICIT SEQUENCE{
2400         originPart  [1] OriginPartToKeep,
2401         targetPart  [2] IMPLICIT NULL}}
2402 OriginPartToKeep ::= SEQUENCE{
2403   composition        [1] IMPLICIT CompSpec,
2404   exportDestination    [2] Destination}
2405
2406   Destination ::= CHOICE{
2407   phoneNumber    [1]    IMPLICIT InternationalString,
2408   faxNumber      [2]   IMPLICIT InternationalString,
2409   x400address      [3]   IMPLICIT InternationalString,
2410   emailAddress    [4]   IMPLICIT InternationalString,
2411   pagerNumber    [5]   IMPLICIT InternationalString,
2412   ftpAddress      [6]   IMPLICIT InternationalString,
2413   ftamAddress    [7]   IMPLICIT InternationalString,
2414   printerAddress    [8]   IMPLICIT InternationalString,
2415   other        [100]  IMPLICIT SEQUENCE{
2416                   vehicle      [1]  IMPLICIT InternationalString  OPTIONAL,
2417                   destination    [2] IMPLICIT InternationalString}}
2418 END
2419
2420
2421
2422
2423 ESFormat-ExportInvocation
2424 {Z39-50-extendedService ExportInvocation (7)} DEFINITIONS ::=
2425 BEGIN
2426 IMPORTS InternationalString, IntUnit FROM Z39-50-APDU-1995 
2427 ExportSpecification FROM ESFormat-ExportSpecification;
2428 ExportInvocation ::= CHOICE{
2429     esRequest    [1] IMPLICIT SEQUENCE{
2430         toKeep    [1] OriginPartToKeep,
2431         notToKeep  [2] OriginPartNotToKeep},
2432     taskPackage    [2] IMPLICIT SEQUENCE{
2433         originPart  [1] OriginPartToKeep,
2434         targetPart  [2] TargetPart OPTIONAL}}
2435
2436 OriginPartToKeep ::= SEQUENCE{
2437   exportSpec    [1] CHOICE{
2438               packageName    [1] IMPLICIT InternationalString,
2439               packageSpec    [2] ExportSpecification},
2440   numberOfCopies  [2] IMPLICIT INTEGER}
2441
2442
2443
2444
2445
2446 OriginPartNotToKeep  ::= SEQUENCE{
2447   resultSetId      [1] IMPLICIT InternationalString,
2448   records        [2] CHOICE{
2449                 all    [1] IMPLICIT NULL,
2450                 ranges  [2]   IMPLICIT SEQUENCE OF SEQUENCE{
2451                         start  [1] IMPLICIT INTEGER,
2452                         count  [2] IMPLICIT INTEGER OPTIONAL
2453                           -- Count may be omitted only on last range, to indicate
2454                           -- "all remaining records beginning with 'start'."
2455                     }}}
2456
2457 TargetPart   ::= SEQUENCE{
2458     estimatedQuantity    [1] IMPLICIT IntUnit OPTIONAL,
2459     quantitySoFar      [2] IMPLICIT IntUnit OPTIONAL,
2460     estimatedCost      [3] IMPLICIT IntUnit OPTIONAL,
2461     costSoFar        [4] IMPLICIT IntUnit OPTIONAL}
2462 END
2463
2464
2465
2466 UserInfoFormat-searchResult-1
2467 {Z39-50-userInfoFormat searchResult-1 (1)} DEFINITIONS ::=
2468 BEGIN
2469 IMPORTS DatabaseName, Term, Query, IntUnit, InternationalString FROM Z39-50-APDU-1995;
2470 SearchInfoReport ::= SEQUENCE OF SEQUENCE{
2471   subqueryId      [1] IMPLICIT InternationalString OPTIONAL, 
2472                            -- shorthand identifier of subquery
2473   fullQuery        [2] IMPLICIT BOOLEAN,     -- 'true' means this is the full query; 'false',
2474                           -- a sub-query 
2475   subqueryExpression    [3] QueryExpression OPTIONAL,  -- A subquery of the query as
2476                           -- submitted. May be whole query;
2477                           -- if so, "fullQuery" should be 'true'.
2478   subqueryInterpretation  [4] QueryExpression OPTIONAL,  -- how target interpreted subquery
2479   subqueryRecommendation  [5] QueryExpression OPTIONAL,  -- target-recommended alternative
2480   subqueryCount      [6] IMPLICIT INTEGER OPTIONAL,  -- Number of records for this
2481                           -- subQuery, across all of the specified
2482                           -- databases. (If during search, via resource
2483                            -- control, number of records so far).
2484   subqueryWeight     [7] IMPLICIT IntUnit OPTIONAL,  -- relative weight of this subquery
2485   resultsByDB          [8] IMPLICIT ResultsByDB OPTIONAL}
2486
2487 ResultsByDB ::= SEQUENCE OF SEQUENCE{
2488   databases      [1] CHOICE{
2489             all     [1] IMPLICIT NULL,
2490                   -- applies across all of the databases in Search PDU
2491             list    [2]  IMPLICIT SEQUENCE OF DatabaseName
2492                   -- applies across all databases in this list
2493               },
2494   count        [2] IMPLICIT INTEGER OPTIONAL,
2495             -- Number of records for query component (and, as above, if during search,
2496              -- via resource control, number of records so far).
2497   resultSetName    [3] IMPLICIT InternationalString OPTIONAL
2498                         -- Target-assigned result set by which subQuery is available. Should not
2499              -- be provided unless processing for this query component is concluded (i.e.,
2500             -- when this report comes during search, via resource control, as opposed
2501             -- to after search, via additionalSearchInfo).
2502               }
2503
2504 QueryExpression ::=  CHOICE {
2505                 term   [1] IMPLICIT SEQUENCE{
2506               queryTerm  [1]  Term,
2507               termComment            [2] IMPLICIT InternationalString OPTIONAL},
2508            query  [2] Query}
2509 END
2510
2511
2512
2513 ElementSpecificationFormat-eSpec-1
2514 {Z39-50-elementSpec eSpec-1 (1)} DEFINITIONS ::=
2515 BEGIN
2516 IMPORTS Variant FROM RecordSyntax-generic
2517 StringOrNumeric, InternationalString FROM Z39-50-APDU-1995;
2518 --
2519 Espec-1 ::= SEQUENCE{
2520   elementSetNames    [1] IMPLICIT SEQUENCE OF InternationalString OPTIONAL,
2521                   -- Origin may include one or more element set names, each
2522                   -- specifying a set of elements. Each of the elements is to be
2523                   -- treated as an elementRequest in the form of simpleElement,
2524                   -- where occurrence is 1. 
2525   defaultVariantSetId    [2] IMPLICIT OBJECT IDENTIFIER OPTIONAL,
2526                   -- If supplied, applies whenever variantRequest 
2527                   -- does not include variantSetId. 
2528   defaultVariantRequest  [3] IMPLICIT Variant OPTIONAL,
2529                   -- If supplied, then for each simple elementRequest that does not
2530                    -- include a variantRequest, the defaultVariantRequest applies.
2531                   -- (defaultVariantRequest does not apply to a compositeRequest.)
2532   defaultTagType      [4] IMPLICIT INTEGER OPTIONAL,
2533                   -- If supplied, applies whenever 'tagType' (within 'tag' within TagPath) 
2534                   -- is omitted.
2535   elements        [5] IMPLICIT SEQUENCE OF ElementRequest OPTIONAL}
2536 --
2537
2538 ElementRequest::= CHOICE{
2539   simpleElement    [1]   IMPLICIT SimpleElement,
2540   compositeElement  [2] IMPLICIT SEQUENCE{
2541             elementList    [1] CHOICE{
2542                   primitives    [1]   IMPLICIT SEQUENCE OF InternationalString,
2543                               -- Origin may specify one or more element
2544                               -- set names, each identifying a set of elements,
2545                               -- and the composite element is the union.
2546                   specs      [2] IMPLICIT SEQUENCE OF SimpleElement},
2547
2548             deliveryTag    [2] IMPLICIT TagPath,
2549                           -- DeliveryTag tagPath for compositeElement may not
2550                           -- include wildThing or wildPath.
2551             variantRequest  [3] IMPLICIT Variant OPTIONAL}}
2552
2553 SimpleElement ::= SEQUENCE{
2554       path        [1] IMPLICIT TagPath,
2555       variantRequest  [2] IMPLICIT Variant OPTIONAL}
2556   
2557
2558 TagPath ::= SEQUENCE OF CHOICE{  
2559   specificTag  [1] IMPLICIT SEQUENCE{
2560             tagType  [1] IMPLICIT INTEGER OPTIONAL,
2561                       -- If omitted, then 'defaultTagType' (above) applies, if supplied, and
2562                       -- if not supplied, then default listed in schema applies.
2563             tagValue  [2] StringOrNumeric,
2564              occurrence  [3] Occurrences OPTIONAL 
2565                       -- default is "first occurrence"
2566                   },
2567   wildThing  [2] Occurrences,
2568               -- Get Nth "thing" at this level, regardless of tag, for each N specified by
2569             -- "Occurrences" (which may be 'all' meaning match every element at this level).
2570             -- E.g., if "Occurrences" is 3, get third element regardless of its tag or the tag of
2571             -- the first two elements.
2572   wildPath  [3] IMPLICIT NULL
2573               -- Match any tag, at this level or below, that is on a path for which next tag in this 
2574               -- TagPath sequence occurs. WildPath may not be last member of the TagPath
2575             -- sequence.
2576                       }
2577 --
2578
2579 Occurrences ::= CHOICE{
2580   all    [1] IMPLICIT NULL,
2581   last    [2] IMPLICIT NULL,
2582   values  [3] IMPLICIT SEQUENCE{
2583           start    [1] IMPLICIT INTEGER,
2584                   -- if 'start' alone is included, then single occurrence is requested
2585           howMany  [2] IMPLICIT INTEGER OPTIONAL
2586                   -- For example, if 'start' is 5 and 'howMany' is 6, then request is for
2587                   -- "occurrences 5 through 10."
2588                   }}
2589 END
2590