W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2001

Re: simpleType in restriction

From: Eddie Robertsson <eddie@allette.com.au>
Date: Thu, 31 May 2001 10:39:37 +1000
Message-ID: <3B1592C9.FB075970@allette.com.au>
To: Yongjiang <zhangyongjiang@yahoo.com>
CC: Jeff Lowery <jlowery@scenicsoft.com>, xmlschema-dev@w3.org


Yongjiang wrote:

> Thanks to Jeff.
> More question: can I use 'base' attribute and 'simpleType' at the same time.

No, "Schema Representation Constraint: Simple Type Definition Representation OK"
[1] says:

"2 If the <restriction> alternative is chosen, either it must have a base
[attribute] or a <simpleType>
among its [children], but not both. "

Cheers,
/Eddie

[1] http://www.w3.org/TR/xmlschema-1/#src-simple-type

>
> For example:
>  <simpleType name="fivePosInts">
>      <restriction base="integer">
>          <simpleType>
>              <list itemType="positiveInteger"/>
>          </simpleType>
>          <length value="5"/>
>       </restriction>
>  </simpleType>
>
> > -----Original Message-----
> > From: Jeff Lowery [mailto:jlowery@scenicsoft.com]
> > Sent: Wednesday, May 30, 2001 1:36 PM
> > To: 'Kevin'; xmlschema-dev@w3.org
> > Subject: RE: simpleType in restriction
> >
> >
> > > In the definition of restriction:
> > > <restriction
> > >   base = QName
> > >   id = ID
> > >   {any attributes with non-schema namespace . . .}>
> > >   Content: (annotation?, (simpleType?, (minExclusive | minInclusive |
> > > maxExclusive | maxInclusive | totalDigits | fractionDigits | length |
> > > minLength | maxLength | enumeration | whiteSpace | pattern)*))
> > > </restriction>
> >
> > <simpleType name="fivePosInts">
> >     <restriction>
> >         <simpleType>
> >             <list itemType="positiveInteger"/>
> >         </simpleType>
> >         <length value="5"/>
> >      </restriction>
> > </simpleType>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
Received on Wednesday, 30 May 2001 20:39:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:21 GMT