extension vs restriction

I understand how extension works, but am confused about restriction.  Do
you have to repeat everything that is not changed.

With extension
type 1
    element 1
    element 2
    element 3

type 2 by extension of type 1
    element 4
    element 5

Now type 2 has elements 1-5
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
With restriction
type 1
    element 1 minOccurs=0 maxOccurs=1
    element 2 minOccurs=0 maxOccurs=1
    element 3 minOccurs=0 maxOccurs=1

Which is correct to delete element 1, but keep 2 and 3 as they are?

type 2 by restriction of type 1
     element 1 maxOccurs=0

or

type 2 by restriction of type 1
    element 1 maxOccurs=0
    element 2 minOccurs=0 maxOccurs=1
    element 3 minOccurs=0 maxOccurs=1

In otherwords, do you have to do this extra typing?

thank you

Received on Friday, 26 May 2000 11:07:25 UTC