OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

# relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: Repeat M-N times

• From: Josh Lubell <lubell@cme.nist.gov>
• To: TREX Discussion List <trex@lists.oasis-open.org>
• Date: Wed, 21 Feb 2001 15:13:15 -0500

```From: "James Clark" <jjc@jclark.com>
> Thank you.  This was just the sort of example I was looking for.  Do you
> have any feeling for which of the following are most common:
>
> > > - repeat N or more times, where N > 1

Sets with N=2 and ordered lists with N=2 or N=3, while not very common in
STEP models, are not not uncommon as parameters for curve fits, such as
boundary representation data.  That is, there are very few conceptual
objects with these constraints, but those few are used a great deal in the
data for certain applications, particularly mathematical representations.
E.g. in one particular STEP model there are exactly three such "elements",
but they typically occur hundreds or thousands of times in data files.

> > > - repeat between 0 and N times, where N > 1
> > > - repeat between 1 and N times, where N > 1

Sets of repetitions between 1 and 2 times, 1 and 3 times, 0 and 2 times, and
0 and 3 times are very rare, but they do exist.  Other sets and ordered
lists with upper-bounds are almost always artifacts of the intent to map the
model to an array in Java or C.

> > > - repeat exactly N times, where N > 1

This is the standard representation of an array in STEP, including a vector
or a matrix, and it is far and away the most common of these cases. One also
sees unordered tuples in combinatorics and other applications.

> > > - repeat between M and N times, where 1 < M < N

I don't know of a valid example of this. As I said above, there are models
in which the upper-bound is an artifact of the intent to map to a C (or
Fortran or COBOL) array.

I would be careful to distinguish "the data model" from "the business rule".
There are a number of conceptual aggregates in STEP for which the data model
wants to be a set of zero or more items or an ordered list of one or more
items  to allow general use of the model, while the rules for the use of the
model within a given organization or among several trading partners will
place specific minima (and sometimes maxima) on the sizes of those
aggregates.

Joshua Lubell, NIST
100 Bureau Drive, Stop 8263
Gaithersburg MD 20899-8263 USA
(301) 975-3563
lubell@nist.gov

```

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]