![]() | ![]() | 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 | |||
A "coordinate address" is a means of specifying a location by the relative position of an object. A coordinate address is only meaningful in the context of a "coordinate space"; that is, a set of coordinate axes and a system for measuring along them.
The location addressing and scheduling modules of HyTime both use coordinate specifications to address objects and specify the positions of objects within coordinate spaces. Support for coordinate specifications is an option of the base module that is required (and implied) by some location address element forms and by the scheduling module in general.
Conceptually, the phrase "the third and fourth words in the sentence" is an example of locating an object in a coordinate space. The coordinate space has one axis, that of the sentence. For measurement, the axis is divided into indivisible "quanta" which can be counted. In this case, the quantum is a word.
An axis, then, is an ordered set of quanta. An object is located on an axis by its "dimension", which consists of two components: a position along the axis and a quantum count (the total number of quanta occupied by the object). The position of an object along an axis is given as the quantum number of either the first or last quantum occupied by the object. The quantum count of an object is either given directly or derived from the quantum numbers of the first and last quantum. In the example, the dimension of "the third and fourth words" can be described by the quantum number of the first quantum (3) followed by the quantum count (2): "3 2". The quantum number of the last quantum would be 4.
NOTE 131 HyTime uses the term "dimension" as it relates to the length of measurements, as on a mechanical drawing, rather than "dimension" in the sense of "multidimensional space."
The HyTime axis marker list notation defined in this clause is the default way to specify dimensions in HyTime documents.
<!-- HyTime Axis Marker List Notation -->
<![ %HyMrkLst; [
<!notation
HyMrkLst -- HyTime Axis Marker List Notation --
-- Clause: 6.8.1 --
-- A list of HyTime axis markers (signed non-zero
integers) and marker functions (elements that
conform to the markfun architectural form).
Marker functions are evaluated to lists of
markers. --
PUBLIC "ISO/IEC 10744:1997//NOTATION
HyTime Axis Marker List Notation//EN"
-- CommonAttributes [GenArc]: altreps, included, superdcn --
-- CommonAttributes [base]: bosdatt --
-- CommonAttributes [locs]: egrvplan --
>
]]><!-- HyMrkLst -->An axis marker is an integer other than zero that represents a position on a coordinate axis. A positive value counts from the start of the range, beginning at 1 for the first quantum. A negative value counts from the direction of the end of the range, beginning at -1 for the last quantum.
An axis marker list is a list of intermixed axis markers and/or elements that resolve to axis markers.
NOTE 132 When the marker function (markfun) option is supported, axis markers may be specified in documents using a different notation (see 6.8.1.2 Marker Functions).
The architectural parameter entity marklist lists the constructs that can be used anywhere axis markers are allowed. This parameter entity is then used in the definition of other architectural content models.
<!entity %
marklist -- Axis marker list content model --
-- Clause: 6.8.1.1 --
-- Data and elements that resolve to lists of
markers. --
"#PCDATA|dimref|markfun"
>A marker function is an element that resolves to a list of zero or more axis markers. The notation used to specify the markers is arbitrary and user-defined, but the processor for the notation must return the list of axis markers to the marklist notation processor.
NOTE 133 In other words, a marker list notation processor that supports marker functions must provide an interface by which marker function notation processors will return axis marker lists to it.
NOTE 134 The HyTime axis marker list notation, the HyTime marker function language (see 6.8.6 HyTime Marker Function Language (HyFunk)), and the HyTime dimension reference notation (see 9.8 Dimension referencing) are all marker function notations.
The element form marker function (markfun) contains an element or data that is interpreted as a function that returns one or more axis markers.
<!-- Marker function -->
<![ %markfun; [
<![ %HyFunk; [
<!entity % dmarkfun "HyFunk">
]]>
<!entity %
dmarkfun -- Default marker function notation --
-- Clause: 6.8.1.2 --
"#REQUIRED"
>
<!element
markfun -- Marker function --
-- Clause: 6.8.1.2 --
-- Evaluates to a list of zero or more axis
markers. --
O O
(%HyCFC;)* -- Constraint: content must conform to specified
marker function notation. --
-- Attributes [base]: markfun --
-- CommonAttributes [GenArc]: dafe, dvlatt, etfullnm, id, irefmodl,
ireftype, lextype, opacity --
-- CommonAttributes [base]: activity, conloc, dtxtatt, valueref --
-- CommonAttributes [locs]: refctl, refloc, reftype, rflocspn --
>
<!attlist
markfun -- Marker function --
-- Clause: 6.8.1.2 --
notation -- Marker function notation --
NAME -- Lextype: NOTATION --
%dmarkfun;
>
]]><!-- markfun -->A dimension is represented as a list of two axis markers. The two members of the pair of markers in the list are known respectively as marker1 and marker2, or the first marker and second marker.
The sign of each axis marker indicates the direction of counting, as follows:
First marker
Count forward from start of range (1).
Count back from end of range (-1) if marker2 is positive, else count back from marker2.
Second marker
Count forward from marker1.
Count back from end of range (-1).
The second marker must represent a position from the first marker through the last quantum of the axis, inclusive.
START OF RANGE <= first position <= second position <= END OF RANGEThe second marker always locates the last quantum of the dimension, either directly, by specifying a negatively-signed axis marker, or indirectly, by specifying a positively-signed axis marker that counts forward from marker1.
NOTE 135 In the former case, the quantum count can be calculated from the positions of the first and last quanta (last-first+1); in the latter case, the quantum count is the value of the second marker.
NOTE 136 Coordinate addressing can be undependable if the addressed object is
subject to modification, as quanta can be removed and added. To
visualize this easily, think of a paragraph as an axis and the
characters in it as quanta. To address the second sentence, which
currently contains characters 21 through 30, the dimension would be
"21 10". With this form of address, you would get extraneous
characters if the sentence were later shortened. To minimize such problems, either or both of the axis markers used to
specify the dimension can do so with respect to either end of the
range. If the paragraph in the example had 40 characters, the second
sentence could also be addressed as "21 -11". With the dimension
expressed in this way, the second sentence would be addressed in full
regardless of how it was later shortened or lengthened. (Provided, of
course, that the surrounding text was not modified.) The effect of using signed axis markers can be summarized as follows:
means first quantum in the range means last quantum in the range means 1st to last (entire range) means all but last quantum means all but first quantum means 5th through 10th quanta, inclusive
When the second marker is negative, a negative first marker has a slightly different meaning. It still counts from the direction of the end of the range, but from the second marker, rather than the last quantum.
For example, in a range of ten quanta, "-3 -2" would mean the 7th through 9th quanta, inclusive. The first marker is the negation of the quantum count.
<!-- HyTime Dimension Specification Notation -->
<![ %HyDimSpc; [
<!notation
HyDimSpc -- HyTime Dimension Specification Notation --
-- Clause: 6.8.2 --
-- A pair of axis markers (in the HyTime Axis Marker
List Notation, after resolution of marker
functions) that together specify a position and
quantum count along a single axis. --
PUBLIC "ISO/IEC 10744:1997//NOTATION
HyTime Dimension Specification Notation//EN"
-- Attributes [base]: HyDimSpc --
-- CommonAttributes [GenArc]: altreps, included, superdcn --
-- CommonAttributes [base]: bosdatt --
-- CommonAttributes [locs]: egrvplan --
>
<!attlist #NOTATION
HyDimSpc -- HyTime Dimension Specification Notation --
-- Clause: 6.8.2 --
GenArc NAME #FIXED GABridN
superdcn NAME #FIXED HyMrkLst
>
<!entity % HyMrkLst "INCLUDE">
]]><!-- HyDimSpc -->The element form dimension specification (dimspec) contains elements or data that are interpreted as a single dimension on a single axis.
<!-- Dimension specification -->
<![ %dimspec; [
<![ %HyDimSpc; [
<!entity % ddimspec "HyDimSpc">
]]>
<!entity %
ddimspec -- Default dimension specification notation --
-- Clause: 6.8.3 --
"#REQUIRED"
>
<!element
dimspec -- Dimension specification --
-- Clause: 6.8.3 --
-- A position and quantum count along a single
axis. When used as a marker function, returns a
pair of positive axis markers, the first being
the position of the first quantum of the
dimension and the second being the quantum count
of the dimension. --
O O
(%HyCFC;|%marklist;)*
-- Constraint: Content must conform to the notation
specified in the dimspec's notation attribute. --
-- Attributes [base]: dimspec --
-- CommonAttributes [GenArc]: dafe, dvlatt, etfullnm, id, irefmodl,
ireftype, lextype, opacity --
-- CommonAttributes [base]: activity, conloc, dtxtatt, valueref --
-- CommonAttributes [locs]: refctl, refloc, reftype, rflocspn --
>
<!attlist
dimspec -- Dimension specification --
-- Clause: 6.8.3 --
HyBase NAME #FIXED markfun
notation -- Dimension specification notation --
NAME -- Lextype: NOTATION --
%ddimspec;
>
]]><!-- dimspec -->The notation form HyTime dimension list notation (HyDimLst) allows the specification of lists of dimensions without requiring explicit dimension specification elements.
<!-- HyTime Dimension List Notation -->
<![ %HyDimLst; [
<!notation
HyDimLst -- HyTime Dimension List Notation --
-- Clause: 6.8.4 --
-- A list of dimensions each of which may be
specified as either a pair of axis markers (in
the HyTime Marker List Notation), or as all or
part of the list of axis markers returned by a
marker function. --
PUBLIC "ISO/IEC 10744:1997//NOTATION
HyTime Dimension List Notation//EN"
-- Attributes [base]: HyDimLst --
-- CommonAttributes [GenArc]: altreps, included, superdcn --
-- CommonAttributes [base]: bosdatt --
-- CommonAttributes [locs]: egrvplan --
>
<!attlist #NOTATION
HyDimLst -- HyTime Dimension List Notation --
-- Clause: 6.8.4 --
GenArc NAME #FIXED GABridN
superdcn NAME #FIXED HyMrkLst
>
<!entity % HyMrkLst "INCLUDE">
]]><!-- HyDimLst -->
<!entity %
dimlist -- HyTime Dimension List content --
-- Clause: 6.8.4 --
"%marklist;|dimspec"
>The attribute form overrun is associated with element forms that specify coordinate locations.
The attribute overrun handling (overrun) specifies how an actual dimension that overruns the limits of the addressable range will be handled. It will either be treated as an error ("error"), wrapped around modulo the length of the range ("wrap"), or truncated to equal the first and/or last quantum of the range, as required ("trunc"). If "trunc" is specified:
If some part of the dimension occurs within the range, and either marker is before the first quantum of the range, it is treated as the first quantum.
If some part of the dimension occurs within the range, and either marker is after the last quantum of the range, it is treated as the last quantum.
If no part of the dimension occurs within the range, a specification of "trunc" is equivalent to a specification of "ignore".
Alternatively, "ignore" can be specified, in which case the dimension will be treated as though it had not been specified. In some circumstances, an error could result.
<!-- Overrun Handling -->
<![ %overrun; [
<!attlist
-- overrun -- -- Overrun handling --
-- Clause: 6.8.5 --
(dataloc,dimref,event,evgrp,fcsloc,listloc,modgrp,modscope,
pathloc,progrp,proscope,relloc,treeloc)
overrun -- Overrun Handling --
-- Handling of dimension that overruns range --
(error|ignore|trunc|wrap)
error
>
]]><!-- overrun -->The HyTime Marker Function Language (HyFunk) provides the minimum functions needed to perform integer arithmetic on markers in marker functions. It is based on the DSSSL Expression Language.
<!-- HyTime Marker Function Language -->
<![ %HyFunk; [
<!notation
HyFunk -- HyTime Marker Function Language --
-- Clause: 6.8.6 --
PUBLIC "ISO/IEC 10744:1997//NOTATION
HyTime Marker Function Language//EN"
-- CommonAttributes [GenArc]: altreps, included, superdcn --
-- CommonAttributes [base]: bosdatt --
-- CommonAttributes [locs]: egrvplan --
>
]]><!-- HyFunk -->HyFunk is a Scheme-style function language consisting of the arithmetic functions addition, multiplication, subtraction, quotient, remainder, and modulo as well as a function for performing dimension references. The arithmetic functions are identical to the corresponding procedures in the DSSSL expression language. The dimref function emulates the dimension reference element form (see 9.8 Dimension referencing.). HyFunk functions always return a single integer.
In DSSSL, functions are lists, enclosed in parentheses, where the function name is the first member of the list. Lists are s-separator delimited. The arguments to the HyFunk arithmetic functions are:
| arg = | ||
(marker | HyFunk function) | ||
| marker = | ||
snzi | ||
Returns the sum of its arguments.
| addition = | ||
"(+", (arg, arg+), ")" | ||
Returns the product of its arguments.
| multiplication = | ||
"(*", (arg, arg+), ")" | ||
With two or more arguments, returns the difference of its arguments, associating to the left; with one argument, returns the negation of its argument.
| subtraction = | ||
"(-", (arg, arg+), ")" | ||
These functions implement number-theoretic (integer) division: For positive integers n1 and n2, if n3 and n4 are integers such that n1 = n2n3 + n4 and 0 <= n4 < n2, then the following is true.
(quotient n1 n2) -> n3 (remainder n1 n2)-> n4 (modulo n1 n2) -> n4
| quotient = | ||
"(quotient", (arg, arg), ")" | ||
| remainder = | ||
"(remainder", (arg, arg), ")" | ||
| modulo = | ||
"(modulo", (arg, arg), ")" | ||
The dimref function returns the specified dimension component of the referenced element. The parameters of the dimref function correspond to the attributes of the dimref element form and have the same meaning and constraints (see 9.8 Dimension referencing).
| dimref = | ||
"(dimref", IDREF,
("selcomp: (""'first" | "'last" | "'qcnt" |
"'precedng" | "'followng")),
("flip", ("#t" | "#f"))?,
("schdspec:" IDREF)?,
("axisspec:" IDREF)?,
("dimnum:" number)?,
("extnum:" number)?,
("granule:" granule)?,
("roffgran: (""'roerror" | "'rocmplet" | "'roscant" | "'roboundy"))
("dsdtypes:" string)?,
("prjdirct: (""'drctonly" | "'drctproj" | "'projonly"))
("prjtarg:" IDREF)?,
("prjby:" IDREF)?) | ||
HyFunk conforms to all the requirements of and restrictions on the corresponding DSSSL procedures defined in ISO/IEC 10179:1996 Document Style Semantics and Specification Language.
| 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.