Re: simpleType in restriction

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 UTC