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

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

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


Subject: sequence of tokens?



(I'm not saying that we should add this to the spec.)


James Clark wrote:
> I think it would be very ugly to support different possibilities for
> repetition of tokens than for repetition of elements.  If we support one or
> more and zero or more for repetitions of tokens, we ought to support one or
> more and zero or more for repetitions of elements.  If we support arbitrary
    (from http://lists.oasis-open.org/archives/trex/200105/msg00145.html)

One of the problem is we can limit the maximum (or minimum) repetition
of elements, where we can't do that for tokens under the current
proposal.


If we add <oneOrMoreToken> as the string version of <oneOrMore>, then
why not add <sequenceToken>, <optionalToken>, and so on, for the sake of
symmetry?

This allows you to write a three-tuple of integer:

<sequenceToken>
  <data type="xsd:integer"/>
  <data type="xsd:integer"/>
  <data type="xsd:integer"/>
</sequenceType>

or something like "5 cm" (but you can't write it as "5cm"):

<sequenceToken>
  <data type="xsd:integer" />
  <value>cm</value>
</sequenceToken>



--
Kohsuke KAWAGUCHI                          +1 650 786 0721
Sun Microsystems                   kohsuke.kawaguchi@eng.sun.com



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


Powered by eList eXpress LLC