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: Re: Datatypes



> > How (if at all) would you specify the allowed min/max length of the
list?
>
> If this is really necessary, we only have to introduce two attributes.

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
bounds for repetitions of tokens, we should support arbitrary bounds for
repetitions of elements.

Another reason I don't like the <list itemType="whatever"/> syntax is that I
see no reason to disallow a repetition of a choice of datatypes.

I would therefore propose two elements: <oneOrMoreTokens>,
<zeroOrMoreTokens> each of which contain a pattern.  For example,

<data type="xsd:NMTOKENS"/>

would be equivalent to

<oneOrMoreTokens>
   <data type="xsd:NMTOKEN"/>
</oneOrMoreTokens>

This can support "union" datatypes:

<oneOrMoreTokens>
  <choice>
    <data type="xsd:int"/>
    <enumeration type="string">
      <value>#magic</value>
    </enumeration>
  </choice>
</oneOrMoreTokens>

This also allows us to support IDREFS functionality:

<oneOrMoreTokens>
   <data type="xsd:NCName" keyRef="ID"/>
</oneOrMoreTokens>

There would be a restriction on <oneOrMoreTokens>, <zeroOrMoreTokens> that
disallows it from containing <attribute> or <ref> (in the normalized form,
ie any reference to attributes or elements).

> How
> would you allow two-dimensional vectors?

I wouldn't.

James




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


Powered by eList eXpress LLC