Resource Definitions

A resource is an information object, of a particular class, which is available in the environment of the Presentation Process. The following classes of resources are defined or used by this International Standard:

For each class of resources, this International Standard specifies the way in which the use of the resource is invoked and the effect of the use of a resource in the processing of a document. The structure elements which are used for defining and accessing resources and the processing of those structure elements are specified in and . The semantics of the resources are defined in the clauses which specify content processing.

General

Resources may be defined as specified in this International Standard or may be made available in the environment of the Presentation Process by means of a process outside of the scope of this International Standard.

Resource Definition

Resources which are defined as specified in this International Standard are defined by RESOURCE DEFINITION structure elements. A RESOURCE DEFINITION structure element may be subordinate to either:

A RESOURCE DEFINITION which is subordinate to an ENVIRONMENT RESOURCE defines a resource for inclusion in the environment of the Presentation Process. The scope of such a RESOURCE DEFINITION is system dependent.

A RESOURCE DEFINITION which is subordinate to a DOCUMENT defines a resource for use in the processing of the document. The scope of such a RESOURCE DEFINITION is the set of all structure elements in the most immediately superior BLOCK which follow the RESOURCE DEFINITION in the sequential order and all of their subordinates.

Resource Identification

A resource in the environment of the Presentation Process is identified by a combination of:

The Environment Identifier need only be unique within a particular resource class to unambiguously identify a resource.

A RESOURCE DEFINITION which is subordinate to an ENVIRONMENT RESOURCE structure element binds an Environment Identifier to the defined resource in the environment of the Presentation Process. The scope of this binding is system dependent.

A Document RESOURCE DEFINITION binds an Environment Identifier to the defined resource for the processing of the DOCUMENT. The scope of this binding is the set of all structure elements in the most immediately superior BLOCK which follow the RESOURCE DEFINITION in the sequential order.

Resource Undefinition

A resource in the environment of the Presentation Process can be undefined by a RESOURCE UNDEFINITION structure element. The effect of undefining a resource is to unbind the identifying Environment Identifier from the resource so that it can no longer be referenced by that Environment Identifier.

Resource Reference Objects

With the exception of Context Dictionaries, resources which are used in content processing are represented by reference objects. The type of reference object used to represent a resource depends on the resource class shall be as shown in . ResourceReference Object Context DictionaryDictionaryReference Indexed FontDictionaryReference Glyph Index MapVectorReference Color SpaceVectorReference Data SourceStreamObject FilterOctetStringReference PatternDictionaryReference FormDictionaryReference

Resource Declaration

A document that uses a resource must declare it in a RESOURCE DECLARATION, which makes the resource available to the Content Processor as part of the Context of Interpretation.

A RESOURCE DECLARATION binds a Name to a reference object which references a resource. With the exception of Context Dictionaries, a resource which has been declared by a RESOURCE DECLARATION is made available for content processing by the execution of either

Context Dictionaries, in contrast, are made available by means of CONTEXT DECLARATION or CONTEXT ADDITION structure elements which place them on the Context Stack.

The scope of a RESOURCE DECLARATION, and the scope of the binding of a Name to a reference object by a RESOURCE DECLARATION, consist of the set of all structure elements in the most immediately superior BLOCK which follow the RESOURCE DEFINITION in the sequential order, and all of their subordinates. The effect of the binding of a Name to a reference object by a RESOURCE DECLARATION can be overridden by subsequent RESOURCE DECLARATION in the same BLOCK or in a subordinate BLOCK.

ENVIRONMENT RESOURCE

An ENVIRONMENT RESOURCE structure element shall be a composite structure element which shall have the following immediate subordinates:

The immediate subordinates shall occur in the above order.

RESOURCE UNDEFINITION

A RESOURCE UNDEFINITION structure element shall be a composite structure element which shall have the following immediate subordinates:

The immediate subordinates shall occur in the above order.

ENVIRONMENT RESOURCE Processing

The processing of an ENVIRONMENT RESOURCE structure element depends on system dependent administrative policies and system resource availability. It may consist of either:

The administrative policies and system resource availability, and hence the effect of ENVIRONMENT RESOURCE processing, may differ from ENVIRONMENT RESOURCE to ENVIRONMENT RESOURCE and from time to time.

Subordinate RESOURCE DEFINITION

The processing of an ENVIRONMENT RESOURCE structure element which has a subordinate RESOURCE DEFINITION and which is not ignored shall consist of:

  1. creating a Block State for the ENVIRONMENT RESOURCE structure element;
  2. processing the subordinate EXTERNAL DECLARATION structure elements if present;
  3. processing the subordinate RESOURCE DECLARATION or CONTEXT ADDITION structure elements if present;
  4. processing the subordinate RESOURCE DEFINITION structure element;
  5. destroying the Block State created in the step a.

A structure error shall occur if the processing of the subordinate RESOURCE DEFINITION results in a structure error or a structure warning.

Subordinate RESOURCE UNDEFINITION

The processing of a ENVIRONMENT RESOURCE structure element which has a subordinate RESOURCE UNDEFINITION and which is not ignored shall consist of deleting the binding of the Environment Identifier which is the value of the subordinate ENVIRONMENT RESOURCE IDENTIFIER to any resource in the environment of the Presentation Process to which is:

A structure warning shall occur if there is no resource in the environment of the Presentation Process which satisfies these conditions.

Whether or not the resource is actually deleted from the environment of the Presentation Process is system dependent. If the resource is identified by more than one Environment Identifier, the system may delete the resource itself (deleting the binding of any other Environment Identifiers to the resource), or delete only the binding of the current Environment Identifier to the resource (preserving the resource itself and other Environment Identifier bindings).

RESOURCE DEFINITION

A RESOURCE DEFINITION structure element shall be a composite structure element which shall have the following immediate subordinates:

The immediate subordinates shall occur in the above order.

RESOURCE CLASS IDENTIFIER

A RESOURCE CLASS IDENTIFIER structure element shall be a base structure element. The type of the value of the RESOURCE CLASS IDENTIFIER shall be an Enumerated type. The values of this type and the class of resources identified shall be as shown in . ValueClass of Resources DictionaryContext Dictionary IndexedFontIndexed Font GlyphIndexMapGlyph Index Map ColorSpaceColor Space DataSourceData Source FilterFilter PatternPattern FormForm

ENVIRONMENT RESOURCE IDENTIFIER

An ENVIRONMENT RESOURCE IDENTIFIER structure element shall be a base structure element. The value of an ENVIRONMENT RESOURCE IDENTIFIER shall be of type Environment Identifier.

The value of an ENVIRONMENT RESOURCE IDENTIFIER which is subordinate to an ENVIRONMENT RESOURCE should be an Object Identifier or a registered Public Identifier.

RESOURCE SPECIFICATION

A RESOURCE SPECIFICATION structure element shall be one of:

There are no filter specification structure elements defined by this International Standard.

RESOURCE DEFINITION Processing

The processing of a RESOURCE DEFINITION structure element shall consist of:

  1. verifying that the RESOURCE SPECIFICATION defines a resource of the resource class specified by the value of the immediately subordinate RESOURCE CLASS IDENTIFIER;
  2. processing the immediately subordinate RESOURCE SPECIFICATION to define a resource;
  3. adding the resource defined by the immediately subordinate RESOURCE SPECIFICATION to the environment of the Presentation Process for the scope of the RESOURCE DEFINITION;
  4. binding the value of the ENVIRONMENT RESOURCE IDENTIFIER to the resource defined by the immediately subordinate RESOURCE SPECIFICATION for the scope of the RESOURCE DEFINITION.

A structure warning shall occur if the resource defined by the RESOURCE SPECIFICATION is not of the resource class identified by the value of the RESOURCE CLASS IDENTIFIER.

If the RESOURCE DEFINITION is subordinate to a DOCUMENT, a structure error shall occur if the resource defined by the RESOURCE SPECIFICATION cannot be added to the environment of the Presentation Process due to limitations in available space.

If there is a resource in the environment of the Presentation Process which is both

then the binding of the value of the ENVIRONMENT RESOURCE IDENTIFIER to that resource shall be superseded by the binding defined in step d for the scope of the RESOURCE DEFINITION.

RESOURCE DECLARATION

A RESOURCE DECLARATION structure element shall be a composite structure element which shall have the following immediate subordinates:

The immediate subordinates shall occur in the above order.

INTERNAL RESOURCE IDENTIFIER

An INTERNAL RESOURCE IDENTIFIER structure element shall be a base structure element. The value of an INTERNAL RESOURCE IDENTIFIER shall be of type Name.

RESOURCE DECLARATION Processing

The processing of a RESOURCE DECLARATION structure element shall consist of:

  1. identifying a declared resource as specified in ;
  2. binding the value of the immediately subordinate INTERNAL RESOURCE IDENTIFIER to a reference object as specified in ;
  3. adding the reference object and the resource to the Set of Declared Resources of the Block State of the most immediately superior BLOCK.

The processes of resource identification and name binding are specified below.

Resource Identification

If there is a RESOURCE DEFINITION in the context of the RESOURCE DECLARATION which both

then the declared resource shall be the resource defined by the most immediately superior such RESOURCE DEFINITION.

If there is no such RESOURCE DEFINITION, the resource which is to be declared shall be the resource (if any) in the environment of the Presentation Process which is both

Name Binding

The scope of the binding of the value of the INTERNAL RESOURCE IDENTIFIER to the reference object which references the declared resource is the set of all structure elements in the most immediately superior BLOCK which follow the RESOURCE DEFINITION in the sequential order and all of their subordinates, unless overridden by a subsequent RESOURCE DECLARATION in the same BLOCK or in a subordinate BLOCK.

If the RESOURCE DECLARATION falls within the scope of a preceding RESOURCE DECLARATION which bound the same Name to a reference object which references a resource of the same class, then the later binding shall take precedence within its own scope.

No Resource

If there is no resource which is of the class specified by the value of the RESOURCE CLASS IDENTIFIER and which is identified by the value of the ENVIRONMENT RESOURCE IDENTIFIER, no structure processing error or warning shall occur. However, no change shall be made to the Block State of the most immediately superior BLOCK, and the Name which is the value of the INTERNAL RESOURCE IDENTIFIER shall not be bound to a reference object by the processing of the RESOURCE DECLARATION. Consequently, a reference to a resource using that Name during the processing of the content of a TOKENSEQUENCE may result in a content processing error.

Context Dictionary

A Context Dictionary is a Dictionary which is defined by a DICTIONARY SPECIFICATION structure element. A Context Dictionary is not modifiable after processing of the DICTIONARY SPECIFICATION which defines it. Dictionary is defined in . The term "Context Dictionary" is not a generic term for any Dictionary on the Context Stack, but refers explicitly to a Dictionary created by DICTIONARY SPECIFICATION. When a distinction is necessary, the term "non-context Dictionary" shall be used to indicate any Dictionary that is not a Context Dictionary.

DICTIONARY SPECIFICATION

A DICTIONARY SPECIFICATION structure element shall be a composite structure element which shall have the following immediate subordinates:

The immediate subordinates shall occur in the above order.

DICTIONARY SPECIFICATION Processing

The processing of a DICTIONARY SPECIFICATION structure element shall consist of:

  1. Calling the Content Processor with:
    • a content value which is obtained by concatenating the values of the TOKENSEQUENCE structure elements which are immediately subordinate to the DICTIONARY SPECIFICATION;
    • a Context of Interpretation which is obtained from the Block State of the most immediately superior BLOCK as specified in ;
  2. Upon completion of content processing, verifying that the element on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor is a DictionaryReference;
  3. Making the Dictionary referenced by the DictionaryReference on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor read-only.

The Dictionary referenced by the DictionaryReference on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor shall be called the Context Dictionary defined by the RESOURCE SPECIFICATION.

A structure warning shall occur if element on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor is not a DictionaryReference, or if the status returned by the Content Processor is other than OK.

Color Space

A Color Space is represented by a Color Space Object, which is a Vector whose structure is as specified in .

Color Space Family Identifiers

Each Color Space is a member of a Color Space Family. Correspondingly, the first element of a Color Space Object is a Color Space Family Identifier. A Color Space Family Identifier is an OctetStringReference which references an OctetString which contains the canonical character string form of a public identifier (as defined by ISO/IEC 9070) which identifies the Color Space Family, encoded using ISO/IEC 646.

Each Presentation Process has a Color Space Family Identifier for each Color Space Family which it is capable of supporting. The Color Space Families defined by this International Standard, and the public identifier which is represented by the content of the OctetString referenced by each of the corresponding Color Space Family Identifiers, shall be shown in . Color Space FamilyPublic Identifier (canonical character string form) CIELABISO/IEC 10180//ColorSpaceFamily::CIELAB CIELUVISO/IEC 10180//ColorSpaceFamily::CIELUV CIEBasedABCISO/IEC 10180//ColorSpaceFamily::CIEBasedABC CIEBasedAISO/IEC 10180//ColorSpaceFamily::CIEBasedA DeviceRGBISO/IEC 10180//ColorSpaceFamily::DeviceRGB DeviceCMYKISO/IEC 10180//ColorSpaceFamily::DeviceCMYK DeviceKXISO/IEC 10180//ColorSpaceFamily::DeviceKX DeviceGray ISO/IEC10180//ColorSpaceFamily::DeviceGray IndexedISO/IEC 10180//ColorSpaceFamily::Indexed NamedColorISO/IEC 10180//ColorSpaceFamily::NamedColor

COLOR SPACE SPECIFICATION

A COLOR SPACE SPECIFICATION structure element shall be a composite structure element whose immediate subordinates shall consist of:

The immediate subordinates shall occur in the above order.

COLOR SPACE FAMILY IDENTIFIER

A COLOR SPACE FAMILY IDENTIFIER structure element shall be a base structure element. The value of a COLOR SPACE FAMILY IDENTIFIER shall be of type Public Object Identifier. The Object Names for which Public Object Identifier values are defined by this International Standard, and the Color Space Families identified by the corresponding Color Space Family Identifiers, are shown in . Object NameColor Space Family ColorSpaceFamily::CIELABCIELAB ColorSpaceFamily::CIELUVCIELUV ColorSpaceFamily::CIEBasedABCCIEBasedABC ColorSpaceFamily::CIEBasedACIEBasedA ColorSpaceFamily::DeviceRGBDeviceRGB ColorSpaceFamily::DeviceCMYKDeviceCMYK ColorSpaceFamily::DeviceKXDeviceKX ColorSpaceFamily::DeviceGrayDeviceGray ColorSpaceFamily::IndexedIndexed ColorSpaceFamily::NamedColorNamedColor

PRIMARY SET SPECIFICATION

A PRIMARY SET SPECIFICATION provides a hint which characterizes color parameters referenced to the color space. The PRIMARY SET SPECIFICATION specifies the set of color primaries relative to which the color data has been generated. This information is useful for device color spaces, for which it may be used to affect the default mapping from parametric color specifications to device colorants. It may be ignored in processing the colorimetric (CIE based) color spaces.

A PRIMARY SET SPECIFICATION structure element shall be one of:

PRIMARY SET IDENTIFIER

A PRIMARY SET IDENTIFIER structure element shall be a base structure element. The value of a PRIMARY SET IDENTIFIER shall be of type Public Object Identifier. There are no PRIMARY SET IDENTIFIER Public Object Identifier values defined by this International Standard.

PRIMARIES LIST

A PRIMARIES LIST structure element shall be a composite structure element which shall have the following immediate subordinates:

PRIMARY COLOR IDENTIFIER

A PRIMARY COLOR IDENTIFIER structure element shall be a base structure element. The value of a PRIMARY COLOR IDENTIFIER shall be of type Public Object Identifier. There are no PRIMARY COLOR IDENTIFIER Public Object Identifier values defined by this International Standard.

COLOR SPACE SPECIFICATION Processing

The processing of a COLOR SPACE SPECIFICATION structure element shall consist of:

  1. Calling the Content Processor with:
    • a content value which is obtained by concatenating the values of the TOKENSEQUENCE structure elements which are immediately subordinate to the COLOR SPACE SPECIFICATION;
    • a Context of Interpretation which is obtained from the Block State of the most immediately superior BLOCK as specified in , with the exception of the replacement of the Operand Stack of the Virtual Machine State with an Operand Stack consisting of a single element which is the Color Space Family Identifier for the Color Space Family identified by the value of the COLOR SPACE FAMILY IDENTIFIER.
  2. Upon completion of content processing, verifying that the element on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor is a VectorReference;
  3. Verifying that the element of the referenced Vector corresponding to the index value of zero is the Color Space Family Identifier which was on the top of the Operand Stack of the Virtual Machine state of the call to the Content Processor.

The Vector referenced by the VectorReference which was on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor (or the VectorReference itself) shall be called the Color Space Object defined by the COLOR SPACE SPECIFICATION.

A structure warning shall occur if element on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor is not a VectorReference, if the referenced Vector is not a Color Space Object as defined by , if the element of the referenced Vector corresponding to the index value of zero is not the same as the OctetStringReference on the top of the Operand Stack of the Virtual Machine state of the call to the Content Processor, or if the status returned by the Content Processor is other than OK.

Standard Color Space Resources

This International Standard defines Public Object Identifier values which identify several Color Space resources. The Vector referenced by the VectorReference for each of these Color Spaces consists of a single element which is the Color Space Family Identifier for the Color Space Family. The Object Names for which Public Object Identifier values are defined by this International Standard, and the Color Space Families of the Color Spaces identified by those values, are shown in . Object NameColor Space Family ColorSpace::DeviceRGBDeviceRGB ColorSpace::DeviceCMYKDeviceCMYK ColorSpace::DeviceKXDeviceKX ColorSpace::DeviceGrayDeviceGray

Data Source

A Data Source is represented by a StreamObject as defined in .

DATA SOURCE SPECIFICATION

A DATA SOURCE SPECIFICATION shall be one of

DATA BLOCK

A DATA BLOCK structure element shall be a base structure element. The value of a DATA BLOCK shall be of type Octet String.

The value of the DATA BLOCK structure element represents a sequence of octets. The sequence of octets represented by the depends on the Structure Representation and Interchange Format being used:

The determination of the sequence of octets represented by the value of the DATA BLOCK structure element is performed implicitly as part of the creation of the StreamObject defined by the DATA SOURCE SPECIFICATION structure element.

DATA SOURCE SPECIFICATION Processing

LOCATION IDENTIFIER DATA SOURCE SPECIFICATION Processing

The processing of a DATA SOURCE SPECIFICATION which is a LOCATION IDENTIFIER shall consist of:

  1. identifying the data block which is identified by the LOCATION IDENTIFIER;
  2. defining a Data Source resource for which the data consists of the sequence of octets which comprise the data block identified in step a, followed by an end-of-data indication.

The Data Source resource defined in step b shall be called the Data Source resource defined by the DATA SOURCE SPECIFICATION.

DATA BLOCK DATA SOURCE SPECIFICATION Processing

The processing of a DATA SOURCE SPECIFICATION which is a DATA BLOCK shall consist of defining a Data Source resource for which the data consists of a sequence of octets which are derived from the value of the immediately subordinate DATA BLOCK structure element, followed by an end-of-data indication. The sequence of octets depends on the Structure Representation and Interchange Format being used.

Standard Data Source Resources

This International Standard defines one Public Object Identifier value which identifies a Data Source resource. The Object Name for which the Public Object Identifier value is defined by this International Standard, and the Data Source identified by that value is shown in . Object NameData Source DataSource::DocumentDocument

The Data Source resource DataSource::Document represents data which is contained in a token in the content value which is being processed by the Content Processor as defined in .

Filter

A Filter resource is represented by a Filter Identifier. A Filter Identifier is an OctetStringReference which references an OctetString which contains the canonical character string form of a public identifier (as defined by ISO/IEC 9070) which identifies the Filter. The Filter resources defined by this International Standard, and the public identifier which is represented by the content of the OctetString referenced by each of the corresponding Filter Identifiers, is shown in . FilterPublic Identifier (canonical character string form) ASCIIHexDecodeISO/IEC 10180//Filter::ASCIIHexDecode ASCII85DecodeISO/IEC 10180//Filter::ASCII85Decode RunLengthDecodeISO/IEC 10180//Filter::RunLengthDecode CCITTFaxDecodeISO/IEC 10180//Filter::CCITTFaxDecode NullDecodeISO/IEC 10180//Filter::NullDecode

Filter RESOURCE SPECIFICATION

There is no RESOURCE SPECIFICATION structure element defined by this International Standard which defines a Filter resource. The process by which a Filter resource is installed in the environment of the Presentation Process is outside of the scope of this International Standard.

Standard Filters

This International Standard defines a Public Object Identifier value which identifies a Filter resource for each of the Filters defined in . The Object Names for which Public Object Identifier values are defined by this International Standard, and the Filter resources identified by those values, are ashown in . Object NameFilter Filter::ASCIIHexDecodeASCIIHexDecode Filter::ASCII85DecodeASCII85Decode Filter::RunLengthDecodeRunLengthDecode Filter::CCITTFaxDecodeCCITTFaxDecode Filter::NullDecodeNullDecode

Pattern

A Pattern is represented by a Pattern Dictionary as defined in .

PATTERN SPECIFICATION

The value of a PATTERN SPECIFICATION shall be a composite structure element whose immediate subordinates shall consist of:

PATTERN SPECIFICATION Processing

The processing of a PATTERN SPECIFICATION shall consist of:

  1. Calling the Content Processor with:
    • a content value which is obtained by concatenating the values of the TOKENSEQUENCE structure elements which are immediately subordinate to the PATTERN SPECIFICATION;
    • a Context of Interpretation which is obtained from the Block State of the most immediately superior BLOCK as specified in ;
  2. Upon completion of content processing, verifying that the element on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor is a DictionaryReference.

The Dictionary which was referenced by the DictionaryReference on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor shall be called the Pattern Dictionary defined by the PATTERN SPECIFICATION.

A structure warning shall occur if the element on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor is not a DictionaryReference, or if the status returned by the Content Processor is other than OK. The Structure Processor may but need not raise a structure warning if the Pattern Object defined by the PATTERN SPECIFICATION is not a valid Pattern Dictionary.

Form

A Form is represented by a Form Dictionary as defined in .

FORM SPECIFICATION

A FORM SPECIFICATION shall be a composite structure element whose immediate subordinates shall consist of:

FORM SPECIFICATION Processing

The processing of a FORM SPECIFICATION shall consist of:

  1. Calling the Content Processor with:
    • a content value which is obtained by concatenating the values of the TOKENSEQUENCE structure elements which are immediately subordinate to the FORM SPECIFICATION;
    • a Context of Interpretation which is obtained from the Block State of the most immediately superior BLOCK as specified in ;
  2. Upon completion of content processing, verifying that the element on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor is a DictionaryReference.

The Dictionary which was referenced by the DictionaryReference on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor shall be called the Form Dictionary defined by the FORM SPECIFICATION.

A structure warning shall occur if the element on the top of the Operand Stack of the Virtual Machine State returned by the Content Processor is not a DictionaryReference, or if the status returned by the Content Processor is other than OK. The Structure Processor may but need not raise a structure warning if the Form Object defined by the FORM SPECIFICATION is not a valid Form Dictionary.