![]() | ![]() | 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 Clause | Previous Clause | |||
The attribute form reference location address (refloc) allows attributes whose semantics are addressing (that is, any attribute that would normally be declared with a value prescription of IDREF, IDREFS, ENTITY, or ENTITIES) to use any location address specification. The location address specification is interpreted as though the attribute were an ID reference to the equivalent location address element. The refloc attribute form is provided for element forms and notation forms.
The attribute reference location type (loctype) associates referential attributes with their location addressing methods. The value of the loctype attribute is a list of ATTORCON and keyword pairs. Each keyword defines the type of location address each attribute (or content) is using. The keywords are:
the attribute value is interpreted as a name-space location in the location source document's element unique identifier name-space.
the attribute value is interpreted as the content of a treeloc whose default location source is the referrer. Requires support for the treeloc option.
the attribute value is interpreted as the content of a pathloc whose default location source is the referrer. Requires support for the pathloc option.
the attribute value is interpreted as a relative location address specified according to the normalized lexical type (("ANC"|"CHILDREN"|"ESIB"|"FOLLOWNG"|"PARENT"|"PRECEDNG"|"YSIB"), dimlist?), where the initial keyword specifies the relationship to the starting node, and the optional dimension list selects nodes from the list of nodes addressed by the specified relation. A dimension list may not be specified when the relationship is "parent" (see 7.10.1.6 Relative location address). The referrer is the starting node. The principal tree root is the location source if no reference location source is specified. Requires support for the relloc option.
This keyword must be followed by a notation name; the attribute value is interpreted as a query in the specified notation. Requires support for the queryloc option.
The value prescription of the attributes listed in the loctype value must be consistent with the location address specification assigned to them (CDATA always meets this requirement).
The value of a loctype attribute must be constant in a client document.
HyTime distinguishes attributes with a value prescription of IDREFS from attributes with a loctype specification of "IDLOC". If an attribute has a declared value of IDREFS but is not also defined as an IDLOC location type, the attribute is referential, with each reference processed independently (as though each ID in the attribute value had been specified as a separate attribute). Attributes so declared do not require the multloc option. Attributes declared as IDREFS and also defined as an IDLOC are processed as a multiple location address such that all the nodes addressed by the ID references are treated as a single list of addressed nodes.
NOTE 173 In other words, for IDREFS that are not also IDLOCs, each ID reference is the beginning of an independent location path, while IDREFS that are also IDLOCs are taken as the beginning of a single, possibly multibranched location path. In grove terms, an IDREFS attribute that is not also an IDLOC addresses a list of node lists, one node list for each ID in the attribute value, while an IDREFS attribute that is also an IDLOC addresses a single node list representing the union of all the nodes directly or indirectly addressed by IDs in the attribute value.
Attributes with a value prescription of "ENTITY" or "ENTITIES" are always referential. Attributes with a value prescription of "ENTITIES" address a single node list whose members are the grove roots or principal tree roots of the groves constructed from the entities named in the attribute value.
NOTE 174 ENTITIES does not require the IDLOC distinction of IDREFS because entity references are always direct references to grove roots or principal tree roots and can therefore only result in a single node.
By default, the location source for referential attributes is either the document that contains the reference (for the IDLOC location type) or the element that makes the reference. A referential attribute can also be associated with another referential attribute that addresses the location source for the first attribute. The attribute reference location source (rflocsrc) associates a reference location attribute with another attribute of the same element that, when specified, addresses the location source for the referential attribute. The value of the rflocsrc attribute is a list of ATTORCON pairs, where the first name in the pair is a referential attribute or content and the second name is the referential attribute or content that addresses the location source for the first attribute or content ("#CONTENT" may not be specified for both members of a pair). If an attribute or content named as a reference location source is not specified for an element, the element itself is taken as the location source.
NOTE 175 Content is taken to not be specified only when the element has a declared content of EMPTY or exhibits an attribute with a default value prescription of #CONREF.
The value of the rflocsrc attribute must be constant in a client document.It is not an error for one reference location source attribute to name another attribute of the same element as its reference location source. (In other words, it is possible to create a multi-rung location ladder with the referential attributes of a single element type.)
The attribute span reference location (rflocspn) names pairs of referential attributes that address the starts and ends of spans (see 7.6 Span Location Address ). The value of the rflocspn attribute is a list of ATTORCON pairs, where both names are referential attributes or content. The same attribute name (or "#CONTENT") cannot be used for both members of a pair. When both attributes or content in the pair are specified, they are taken together to define a span. If only one member of the pair is specified, the address is interpreted as though the rflocspn attribute had not been specified. The value of the rflocspn attribute must be constant in a client document. The rflocspn attribute requires support for the spanloc facility, in addition to support for the refloc facility.
<!-- Reference Location Address -->
<![ %refloc; [
<!entity % rflocatt '
-- refloc -- -- Reference Location Address --
-- Clause: 7.8 --
#ALL
loctype -- Reference location addresses type --
-- Each named attribute treated as if it were an
IDREF to a location address element. --
-- Constraint: The declared values of named
attributes must be lexically compatible with
their specified interpretation. --
-- Note: The declared value CDATA always meets this
requirement. --
CDATA -- Lextype: (ATTORCON,("IDLOC"|"TREELOC"|
"PATHLOC"|"RELLOC"|
("QUERYLOC",NOTATION)))+ --
#IMPLIED -- Constant --
-- Default: all references use SGML IDREFs, and each
IDREF in an IDREFS attribute is considered
separately --
rflocsrc -- Reference location source --
-- Associates referential attributes with their
location sources. --
CDATA -- Lextype: (ATTORCON,ATTORCON)+ --
-- Constraint: attributes named must be referential
attributes. --
#IMPLIED -- Constant --
-- Default: all referential attributes have this
element as their location source. --
'>
<!attlist %rflocatt; >
<!attlist #NOTATION %rflocatt; >
]]><!-- refloc --> <!-- Reference Location Span -->
<![ %refloc; %spanloc; [
<!entity % rfspnatt '
-- rflocspn -- -- Reference location span --
-- Clause: 7.8 --
#ALL
rflocspn -- Reference location span --
-- Names pairs of referential attributes that
address spans when both attributes are
specified. --
CDATA -- Lextype: (ATTORCON,ATTORCON)+ --
-- Constraint: attributes named must be referential
attributes. --
#IMPLIED -- Constant --
'>
<!attlist %rfspnatt; >
<!attlist #NOTATION %rfspnatt; >
>
]]><!-- refloc, spanloc -->NOTE 177 The refloc facility has a number of useful applications, including:
Fixing the values of ID references in document types. Using non-HyTime location address notations directly; for example,
using URLs with HyTime hyperlinks:
<!-- HTML A (anchor) element (derived from HTML 3.2) -->
<!NOTATION URL
PUBLIC "-//IETF/RFC1738//NOTATION Uniform Resource Locator//EN"
>
<!ELEMENT A
- O (%text;)* -(A)
>
<!ATTLIST A
HyTime NAME #FIXED clink
HyNames CDATA #FIXED "linkend href"
anchcstr NAMES #FIXED "self cond"
linktrav NAMES #FIXED "A D"
loctype CDATA #FIXED "href QUERYLOC URL"
name CDATA #IMPLIED -- named link end --
href %URL #IMPLIED -- URL for linked resource --
rel CDATA #IMPLIED -- forward link types --
rev CDATA #IMPLIED -- reverse link types --
title CDATA #IMPLIED -- advisory title string --
>
Retrofitting HyTime to preexisting addressing schemes such as the common target/doc example shown in 176.
| Next Clause | Previous Clause |
HTML generated from the original SGML source using a DSSSL style specification and the SGML output back-end of the JADE DSSSL engine.