Element Specification eSpec-1

April 21, 1998

{Z39-50-elementSpec eSpec-1 (1)} DEFINITIONS ::=
IMPORTS Variant FROM RecordSyntax-generic
StringOrNumeric, InternationalString FROM Z39-50-APDU-1995;
Espec-1 ::= SEQUENCE{
  elementSetNames        [1] IMPLICIT SEQUENCE OF 
				InternationalString OPTIONAL,
                  -- Origin may include one or 
                  -- more element set names, each
                  -- specifying a set of elements. 
                  -- Each of the elements is to be
                  -- treated as an elementRequest 
                  -- in the form of simpleElement,
                  -- where occurrence is 1. 
  defaultVariantSetId     [2] IMPLICIT 
                  -- If supplied, applies 
                  -- whenever variantRequest 
                  -- does not include variantSetId. 
  defaultVariantRequest   [3] IMPLICIT Variant OPTIONAL,
                  -- If supplied, then for each simple 
                  -- elementRequest that does not
                   -- include a variantRequest, the 
                  -- defaultVariantRequest applies.
                  -- (defaultVariantRequest does 
                  -- not apply to a compositeRequest.)
  defaultTagType             [4] IMPLICIT INTEGER OPTIONAL,
                  -- If supplied, applies whenever 
                  -- 'tagType' (within 'tag' within TagPath) 
                  -- is omitted.
  elements                     [5] IMPLICIT SEQUENCE OF 
			    ElementRequest OPTIONAL}

ElementRequest::= CHOICE{
  simpleElement    	[1]   IMPLICIT SimpleElement,
  compositeElement  	[2] IMPLICIT SEQUENCE{
            elementList             [1] CHOICE{
                  primitives              [1] IMPLICIT SEQUENCE 
                                                  OF InternationalString,
                                             -- Origin may specify 
                                             -- one or more element
                                             -- set names, each identifying 
                                             -- a set of elements,
                                             -- and the composite 
                                             -- element is the union.
                  specs      	         [2] IMPLICIT SEQUENCE OF 
            deliveryTag    	   [2] IMPLICIT TagPath,
                  -- DeliveryTag tagPath for compositeElement may not
                  -- include wildThing or wildPath.
            variantRequest  	  [3] IMPLICIT Variant OPTIONAL}}

SimpleElement ::= SEQUENCE{
      path        		[1] IMPLICIT TagPath,
      variantRequest  	[2] IMPLICIT Variant OPTIONAL}

  specificTag  [1] IMPLICIT SEQUENCE{

The following line, schemaId, as well as the comments immediately following, was added following 1/98 ZIG Meeting, as an amendment to Z39.50-1995. See Amendment AM0002: Add Schema Identifier to Qualify tagType in eSpec

                      schemaId [0] IMPLICIT OBJECT 
			-- SchemaId occurs only if the tagType 
			-- in specificTag is to be interpreted 
			-- according to some schema other
			-- than that which was specified in 
			-- CompSpec (which is what references 
			-- eSpec-1). The optional schema id is
			-- attached at the tag level.  Its purpose 
			-- is to qualify the tagType only.

            tagType            [1] IMPLICIT INTEGER OPTIONAL,
                	-- If omitted, then 'defaultTagType' 
                	-- (above) applies, if supplied, and
                	-- if not supplied, then default listed 
                	-- in schema applies.
            tagValue           [2] StringOrNumeric,
             occurrence         [3] Occurrences OPTIONAL 
                  -- default is "first occurrence"
  wildThing  [2] Occurrences,
              -- Get Nth "thing" at this level, 
            -- regardless of tag, for each N specified by
            -- "Occurrences" (which may be 'all' 
            -- meaning match every element at this level).
            -- E.g., if "Occurrences" is 3, get third 
            -- element regardless of its tag or the tag of
            -- the first two elements.
  wildPath  [3] IMPLICIT NULL
              -- Match any tag, at this level or below, 
            -- that is on a path for which next tag in this 
              -- TagPath sequence occurs. WildPath 
            -- may not be last member of the TagPath
            -- sequence.

Occurrences ::= CHOICE{
  all    		[1] IMPLICIT NULL,
  last    		[2] IMPLICIT NULL,
  values                [3] IMPLICIT SEQUENCE{
          start    		[1] IMPLICIT INTEGER,
                  	-- if 'start' alone is included, 
                  	-- then single occurrence is requested
          howMany              [2] IMPLICIT INTEGER OPTIONAL
                 	 -- For example, if 'start' is 5 and 
                  	-- 'howMany' is 6, then request is for
                  	-- "occurrences 5 through 10."