2006/5/5, Andreas Sewe <[EMAIL PROTECTED]>:
If the value of the "steps" attribute is "continuous" the set of rank
values defined by the r:values element is

   { x | minimum <= x <= maximum }.

And @origin is ignored?

Otherwise the set of rank values defined by the r:values element is

   { x | minimum <= x <= maximum,
         x = (origin + i * steps) for some integer i }.

If "i" and "steps" are positive values, then "x" will always be
superior to "origin".

If "origin" is superior to "minimum", then "minimum" is not needed, as
"origin" *is* the minimum value.
If "origin" is less than "minimum", then "x" will always be superior
to "origin + i*steps" for which "i" is the minimum integer value
verifying "origin + i*steps >= minimum"; this is quite easy to
compute, so there's no real need for "minimum" either in this case:
the following r:values are all equivalent:
   <r:values minimum="1.0" maximum="4.0" origin="0.3" steps="1.0" />
   <r:values minimum="1.0" maximum="4.0" origin="1.3" steps="1.0" />
   <r:values minimum="1.3" maximum="4.0" steps="1.0" />
   <r:values minimum="1.3" maximum="3.3" steps="1.0" />

If "steps" is a negative value, its easy to compute the same set of
values using the minimum allowable value as the "origin" (or
"minimum") and a positive "steps". The following r:values are all
equivalent:
   <r:values minimum="1.0" maximum="4.0" origin="3.3" steps="-1.0" />
   <r:values minimum="1.0" maximum="4.0" origin="0.3" steps="1.0" />

So: there is no need for "origin" and negative "steps" values.

There is however one case where that (converting a negative "steps"
value into a positive one) could not be possible: when "minimum"
equals "unbounded".
Couldn't it be spec'd that:
- if "minimum" is provided and not "unbounded", then "steps" counts
upwards from "minimum" to the greatest value inferior to "maximum"
- if "minimum" is not provided or "unbounded", then "steps" counts
downwards from "maximum" to negative infinity.

In other words, people transitioning from origin and/or negative-steps
have to do the following:
- if "steps" is negative and "minimum" is not "unbounded", replace
"minimum" with the smallest allowable value and use a positive "steps"
value
- if "steps" is negative and "minimum" is "unbounded", replace
"maximum" with the value of "origin" and use a positive "steps" value
(which will count downwards to negative infinity)
- if "steps" is positive, replace "minimum" with the value of "origin"

The following examples illustrate how different sets of rank values can
be defined by means of a single r:value element:

<!-- The rank value 1 -->
<r:values origin="1" />

Could be expressed as:
   <r:value value="1" /> <!-- a ew r:value element -->
or
   <r:values value="1" /><!-- a new "value" attribute -->
or with the following r:values:
   <r:values minimum="1" maximum="1" />

--
Thomas Broyer

Reply via email to