Appendix 3

ATR: Attribute Sets

(Normative)

	Each attribute set defines a set of types and for each type a set of values. An attribute list (see AttributeList in the ASN.1 for APDUs, 4.1), is constructed from an attribute set definition, is a list of attribute pairs. An attribute pair (AttributeElement in the ASN.1 for APDUs) consists of an attribute type and a value list (attributeValue within AttributeElement), where each value in the list is defined for that type. 
	When version 2 is in force, each value list is a single value and is an integer. When version 3 is in force, attributeValue (within AttributeElement) may select 'complex', allowing the value list to include multiple values (each may be integer or string) and also to specify a 'semanticAction', indicating how the target is to treat the multiple attributes. 
	When an attribute list contains any attribute pair where attributeValue selects 'complex', there must not be any attribute type within the attribute list for which there is more than a single attribute pair. 

ATR.1 Attribute Set exp-1
	This section defines the attribute-set exp-1, for use with an Explain database. The attribute set exp-1 defines a single attribute type, 'Use'.  In addition, this attribute set definition imports non-Use bib-1 attributes, i.e. those of type Relation, Position, Structure, Truncation, and Completeness. The types and values defined within the bib-1 attribute set for these attributes may be used within the exp-1 attribute set, using the object identifier for this attribute set. It is recommended that a target supporting the Explain facility support the  Relation attribute 'equal', Position attribute 'any' position in field', and Structure attribute 'key'. 
Note: If the target supports searching based on date ranges (e.g. to limit a search to records created before or after a particular date or between two dates), the target should also support one or more of the following relation attributes: 'less than', 'less than or equal', 'greater than', and 'greater or equal'. 

Table 1: Exp-1 Use Attributes | | | | |
Use | Value | Use | Value | Use | Value
ExplainCategory | 1 | HumanStringLanguage | 2 | DatabaseName | 3
TargetName | 4 | AttributeSetOID | 5 | RecordSyntaxOID | 6
TagSetOID | 7 | ExtendedServiceOID | 8 | DateAdded | 9
DateChanged | 10 | DateExpires | 11 | ElementSetName | 12
ProcessingContext | 13 | ProcessingName | 14 | TermListName | 15
SchemaOID | 16 | Producer | 17 | Supplier | 18
Availability | 19 | Proprietary | 20 | UserFee | 21
VariantSetOID | 22 | UnitSystem | 23 | Keyword | 25
ExplainDatabase | 26 | ProcessingOID | 27 | |

Notes:
  (1)	The search terms for Use attribute ExplainCategory are listed in table 2.
  (2)	The search term when the Use attribute is HumanStringLanguage is the three-character language code from ANSI/NISO Z39.53-1994 -- Codes for the Representation of Languages for Information Interchange.
  (3)	The search terms when the Use attribute is ProcessingContext are listed in table 3.
  (4)	Where the search term is an object identifier (where the name of the Use attribute ends with "OID"): for version 2, it is recommended that the term be a character string representing a sequence of integers (each represented by a character string) separated by periods. For version 3, it is recommended that the term be represented as ASN.1 type OBJECT IDENTIFIER. 
  (5)	Use attribute Keyword is used when searching for DatabaseInfo records (i.e. in combination with an operand where Use is ExplainCategory and term is DatabaseInfo). Its use is to search in the keyword element, for terms that match one of the query terms. 
  (6)	Use attribute ExplainDatabase is used when searching for DatabaseInfo records (i.e. in combination with an operand where Use is ExplainCategory and term is DatabaseInfo). The term should be NULL, for version 3, or otherwise ignored by the target. The Relation attribute either should be omitted or should be AlwaysMatches.

(7)	ab	Use attributes DateAdded, DateChanged, DateExpires" correspond to elements in the CommonInfo for every Explain record, respectively, dateAdded,  dateChanged, and expiryDate. These elements pertain to the Explain record itself: when it was first added to the Explain database, when it was last updated, and when it should be thrown away from any caches. 

	Table 2: Search terms associated with use attribute ExplainCategory

TargetInfo
DatabaseInfo
SchemaInfo
TagSetInfo
RecordSyntaxInfo
AttributeSetInfo

TermListInfo
extendedServicesInfo
AttributeDetails
TermListDetails
ElementSetDetails
RetrievalRecordDetails

SortDetails
Processing
CategoryList
VariantSetInfo
UnitInfo

	Table-3: Search terms associated with use attribute ProcessingContext 

Access
Search

Retrieval
RecordPresentation

RecordHandling

ATR.2 Attribute Set ext-1
	This section defines the attribute-set ext-1, for use with an Extended Services database (see Tables A-3-10 and A-3-11).  Two types are defined:

Attribute Type				Value	
Use					1
Permissions				2

	Additional attributes (types and/or values) may be defined within a specific Extended Service definition. The attribute set id to be used to identify those attributes is the ObjectIdentifier that identifies the specific Extended Service.

Table 4: Ext-1 Use Attributes | | | | |
Use | Value | Use | Value | Use | Value
UserId | 1 | PackageName | 2 | CreationDatetime | 3
TaskStatus | 4 | PackageType | 5 | RetentionTime | 6
TargetReference | 7 | | | |

Table 5: Ext-1 Permission Attributes | | | | |
Use | Value | Use | Value | Use | Value
delete | 1 | modify | 2 | ModifyPermissions | 3
Present | 4 | Invoke | 5 | Any | 6

Note: The Permission attribute is for use only when the value of the Use attribute is UserId, in which case the purpose is to search for task packages for which the specified user has the specified permission.