Copyright © 1992, 1997 International Organization for Standardization. All rights reserved.

This electronic document is for use during development and review of International Standards. Official printed copies of International Standards can be purchased from the ISO and the national standards organization of your country.

Next ClausePrevious Clause  

homeParent clauseNext major clausePrevious major clauseNext clause at this levelPrevious clause at this level


7 Location address module

7.7 Reference control

Subclauses:


The attribute forms reference type (reftype) and reference resolution control (refctl) allow an application to control the target and resolution range of references. (Direct ID references are controlled by the ireftype attribute defined in the General Architecture of the SGML Extended Facilities; see A.5.5 ID immediate referent type control.)

A reference is an attribute whose declared value prescription is IDREF, IDREFS, ENTITY, or ENTITIES; an attribute or data content that is declared to contain references by a lextype attribute whose lexmodel includes IDREF, IDREFS, ENTITY, or ENTITIES; or an attribute or content defined as referential through the optional refloc facility (see 7.8 Reference location address). Attribute ID references are specified by the attribute names, and content ID references by the reserved name "#CONTENT". The reserved name "#ALL" means "all ID references in the attribute values and data content of this element type".

Failure of references to conform to the reference resolution control attributes (refrange, reftype, etc.), or to conform in number or type to other attributes, are RHEs only when (and if) the application requires the references to be resolved sufficiently to recognize the failure. Such failures are always RHEs, however, if they can be determined from the markup alone (for example, if the number of IDREFS specified differs from the number prescribed by a reftype).

7.7.1 Reference element type

The attribute reference element type (reftype) associates names of referential attributes (or #CONTENT) with element types to which their ultimate targets must conform. The element types can be specified as a single GI, possibly followed by an occurrence indicator; a model group of GIs; or the reserved word "#ANY", which signifies that any target is acceptable for the corresponding attribute. If the refmodel option is supported, model groups can be any valid SGML model group. When the list of element types is not a repeating OR group or when it is a single GI without an occurrence indicator, the reference is limited to a single instance of one of the named types. If the refmodel option is not supported, model groups are limited to single (possibly repeatable) GIs or repeating or non-repeating OR groups of GIs.

NOTE 163 In other words, a simple list of possible target GIs.

The constraints associated with "#ALL" can be overridden for particular referential attributes by specifying element types for them individually.

The constraints are those of the target of the reference; intermediate location addresses can be used if permitted by the refrange attribute. If the constraint is a single GI, the element addressed must be of that element type. If the constraint is a model group, the elements addressed must satisfy the model group in the order they occur in the node list resulting from the address to which the reference type constraint applies.

NOTE 164 For example, if the reftype specification is "#ALL (B,C)" the reftype is satisfied by two elements, the first of whose element type is "B" and the second whose element type is "C". This node list could be addressed by two ID references, the first to element B, the second to element C, or by some indirect address that ultimately addresses the elements B and C in that order.

NOTE 165 The reftype attribute allows attribute values to be structures. The structures are defined as SGML element types, and instances of the structures are represented as elements. The structures do not occur directly in the attribute values; instead, references are used to point to them. The application designer can use the refrange attribute to require that the structures are referenced without indirect location addresses, and/or that they precede the reference in the document, in order to keep them close to the start-tags and to allow efficient processing.

NOTE 166 The reftype conventional comment performs the function of a "meta" reftype (with somewhat different syntax) for references defined by the HyTime language, as it constrains the architectural forms of ID reference targets, not their element types. An application designer can impose further constraints by specifying reftype attributes that will restrict the target element types.

                  <!-- Reference Element Type -->
<![ %reftype; [
<!attlist
-- reftype --     -- Reference type attributes --
                  -- Clause: 7.7.1 --
   #ALL

   reftype        -- Reference element type --
      CDATA       -- Lextype: (("#ALL",(GI|modelgroup|"#ANY"))?,
                               (ATTORCON,(GI|modelgroup|"#ANY"))*) --
                  -- Constraint: a given ATTNAME or #CONTENT can occur
                     only once; types apply to ultimate object of
                     address, not including any intermediate location
                     Address elements. --
                  -- Constraint: model groups limited to repeating
                     or non-repeating OR groups if refmodel option not
                     supported. Tokens in model groups must be GIs. --
      "#ALL #ANY" -- Constant --
>
]]><!-- reftype -->

7.7.2 Reference resolution range

The attribute reference resolution range (refrange) associates the names of referential attributes (or content) with resolution ranges. The resolution range associated with "#ALL" can be overridden for individual references by specifying their names with different ranges.

There are four resolution ranges, listed in order of increasing freedom; that is, the later ranges in the list also permit resolutions allowed by the ranges that precede them:

B

Backward direct reference: An identified local element that precedes the reference in the same document (or subdocument).

D

Direct reference: An identified local element in the same document (or subdocument) as the reference.

NOTE 167 A direct reference can be either backward or forward.

NOTE 168 Direct references can be used to address location address elements as though they were not location address elements. In other words, a location address element can be "mentioned" by a reference from an attribute whose reference range is set to "D".

I

Indirect reference: A location in the same document (or subdocument) as the reference that is referenced indirectly through a location address element. This resolution range requires support of the location address module. If that module is not supported, this resolution range is treated like the "D" range, rather than being treated as an RHE.

X

External reference: A location in any document (or subdocument). This resolution range requires support of the "exrefs" option. If that option is not supported, this resolution range is treated like the "I" range, rather than being treated as an RHE.

NOTE 169 The refrange facility allows the processing of elements that use referential attributes (for instance, hyperlinks) to be optimized. In other words, purely local references can be optimized.

7.7.3 Reference resolution level

The attribute reference resolution level (reflevel) associates the names of referential attributes (or content) with the maximum number of location path steps allowed for location paths referenced from those attributes (or content). The length of a branching location path is the length of the longest branch in the path. Counting begins with the first step referenced.

NOTE 170 In other words, the reference itself is not counted.

NOTE 171 The indirect reference pointers, from the initial reference to the target locations, comprise a "location path" that is normally transparent to the applications that process the target objects. The transparency of the indirect referencing allows the location path to be revised when an object is moved, without affecting the application. When a reflevel is specified, however, the steps of the location path are addressed, and this transparency may be lost.

The resolution level associated with "#ALL" can be overridden for individual references by specifying their names with different levels. A reference for which no maximum resolution level is specified (either by name or via "#ALL") is fully resolved.

A resolution level is specified in the form of an unsigned non-zero integer that represents the maximum number of location path steps relative to this element. If the target of a reference is itself a reference with a reflevel specified (or its target is, and so on), resolution is terminated at the earliest point specified by any of them.

NOTE 172 Some examples:

  1. If an element A has an IDREF with a reflevel of 6, resolution will cease 6 steps beyond it (7th level overall).

  2. If element B is a target of A's reference and has an IDREF with a reflevel of 3, resolution will cease 3 steps beyond B (4 steps beyond A, 5th level overall).

  3. If element C is a target of B's reference and has an IDREF for which no reflevel is specified (unlimited), resolution will cease 2 steps beyond C (4 steps beyond A, 5th level overall) because the earliest termination point specified (that of element B's IDREF) governs.

               <!-- Reference Resolution Control -->
<![ %refctl; [
<!attlist
-- refctl --      -- Reference resolution control attributes --
                  -- Clause: 7.7.3 --
   #ALL

   refrange       -- Reference resolution range --
                  -- Clause: 7.7.2 --
                  -- B  Backward reference to identified local element
                     D  Identified local element, before or after
                     I  Location address allowed
                     X  Indirect target, may be external to reference
                     --
      CDATA       -- Lextype: (("#ALL",("B"|"D"|"I"|"X"))?,
                               (ATTORCON,("B"|"D"|"I"|"X"))*) --
                  -- Constraint: a given ATTNAME or #CONTENT
                     can occur only once. Its declared value
                     or lextype must contain IDREF. --
      "#ALL X"    -- Constant --

   reflevel       -- Reference resolution level --
                  -- Level that IDREF resolution cannot exceed,
                     relative to this element. --
      CDATA       -- Lextype: (("#ALL",unzi)?,(ATTORCON,unzi)*) --
                  -- Constraint: a given ATTNAME or #CONTENT
                     can occur only once. Its declared value
                     or lextype must contain IDREF. --
      #IMPLIED    -- Default: resolve fully --
>
]]><!-- refctl -->

Next ClausePrevious Clause  

Copyright © 1992, 1997 International Organization for Standardization. All rights reserved.

This electronic document is for use during development and review of International Standards. Official printed copies of International Standards can be purchased from the ISO and the national standards organization of your country.


HTML generated from the original SGML source using a DSSSL style specification and the SGML output back-end of the JADE DSSSL engine.