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: Enumeration syntax


Another argument in favour of option (b) is that it is not uncommon to have
attributes with only a single allowed value (eg required="true" in RELAX).
Option (b) allows:

<attribute name="required">
   <value type="token">true</value>
</attribute>

whereas (a) requires

<attribute name="required">
   <enumeration type="token">
      <value>true</value>
   </enumeration>
</attribute>

----- Original Message -----
From: "James Clark" <jjc@jclark.com>
To: "TREX Discussion List" <trex@lists.oasis-open.org>
Sent: Friday, May 18, 2001 11:33 AM
Subject: Enumeration syntax


> The option (b) syntax:
>
> <choice>
>    <value type="xsd:token">foo</value>
>    <value type="xsd:token">bar</value>
> </choice>
>
> looks nicer if we can default type on <value> to the builtin token type.
My
> guess is that the overwhelmingly majority of enumerations are tokens or
> types derived from tokens (which is almost equivalent to token from the
> point of view of what's allowed in the instance).  Indeed this is the only
> case supported by SGML and XML 1.0. If we default the type attribute, then
> the common case would be written as:
>
> <choice>
>   <value>foo</value>
>   <value>bar</value>
> </choice>
>
> James
>
>
>
>
>
>



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


Powered by eList eXpress LLC