Confusion on "Complex Type Definition" example

The 17 December 1999 Draft of "XML Schema Part 1: Structures" shows 
an example in section "3.4.2 Complex Type Definition" which 
includes the following:

  <type name="length1" type="decimal"/>
   <restrictions>
    <minInclusive value="0"/>
   </restrictions>
   <attribute name="unit" type="NMTOKEN"/>
  </type>

I'm confused about a couple of things. 

(1) In the same document the DTD for Schemas says:

  <!ATTLIST %type;
            name      %NCName;                        #IMPLIED
            content   (textOnly|mixed|elementOnly|empty) #IMPLIED
            abstract  %boolean;                       'false'
            final     %derivationSet;                 ''
            exact     %derivationSet;                 ''
            derivedBy %derivationChoice;              #IMPLIED 
            source    %QName;                         #IMPLIED>

  In other words, there is no "type" attribute on the "type" element.
  The Schema for Schemas appears consistent with this.
  
  In the example is this OK?
      <type name="length1" type="decimal"/>
                           ^^^^
(2) Is this a typo:
      <type name="length1" type="decimal"/>
                                         ^
    In the example does the "type" element end here, or at the
    </type> tag?  

-Randy Waldrop

Received on Wednesday, 5 January 2000 10:00:26 UTC