Next in thread → Next in month →

Re: sequence of tokens?

From
James Clark <>
Date
2001-05-22T03:33:25+00:00
ID
050901c0e26f$a1983d10$
Thread
Re: sequence of tokens?
Though this would be consistent, I don't think we should do this. In general
people should be using elements to mark up the structure of their elements.
oneOrMoreTokens/zeroOrMoreTokens is a small concession to the
impiclict-markupists, motivated partly by the fact that XML supports this.
I don't think we should go any further.

At some point after 1.0 we may add an element that allows explicit lower and
upper repetition bounds; at that point we could also introduce a ...Tokens
variant of that element to support bounded repetition.

----- Original Message -----
From: "Kohsuke KAWAGUCHI" <>
To: <>
Sent: Tuesday, May 22, 2001 6:08 AM
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                   
>
>
>
>
Next in thread → Next in month →